NPAPI:NativeAccessibility: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 55: Line 55:
Since accessibility objects are living objects, they cannot be simply serialized over an IPC between the plugin process and the browser process.  Instead, we utilize the AT-SPI registry to coalesce accessibiles from the two processes. Two corresponding objects are involved in this process in ATK, namely <tt>AtkPlug</tt> and <tt>AtkSocket</tt>.  Together, they are used to connect accessibility hierarchies from different processes in a manner that is transparent to ATs.
Since accessibility objects are living objects, they cannot be simply serialized over an IPC between the plugin process and the browser process.  Instead, we utilize the AT-SPI registry to coalesce accessibiles from the two processes. Two corresponding objects are involved in this process in ATK, namely <tt>AtkPlug</tt> and <tt>AtkSocket</tt>.  Together, they are used to connect accessibility hierarchies from different processes in a manner that is transparent to ATs.


In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy.  The plugin's out of process host would then call <tt>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter.
In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy in the main process.  The plugin's out of process host would then call <tt>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter.


Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support.
Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support.


A valid return value can be remoted to the main browser process, and used to attach the plug to the socket via <tt>atk_socket_embed()</tt>.  The connection that is established via AT-SPI and atk-bridge should be not only transparent to ATs, but seamless for the browser. Vendors are expected to use <tt>g_object_ref</tt> and <tt>g_object_unref</tt> as normal to manage the lifecycle of plugs and sockets.
A valid return value would be remoted to the main browser process, and used to attach the plug to the socket via <tt>atk_socket_embed()</tt>.  The connection that is established via AT-SPI and atk-bridge in the background should be not only transparent to ATs, but seamless for the browser.
 
Vendors are expected to use <tt>g_object_ref</tt> and <tt>g_object_unref</tt> as normal to manage the lifecycle of plugs and sockets.


A detailed description of the mechanics of this API in the Linux accessibility stack is available on the [http://mail.gnome.org/archives/gnome-accessibility-devel/2009-September/msg00012.html gnome-accessibility-devel] mailing list.   
A detailed description of the mechanics of this API in the Linux accessibility stack is available on the [http://mail.gnome.org/archives/gnome-accessibility-devel/2009-September/msg00012.html gnome-accessibility-devel] mailing list.   


''NOTE'': The proposed addition to ATK is not yet available, and slated for completion in Q1 2010.
''NOTE'': The proposed addition to ATK is not yet available, and slated for completion in Q1 2010.
26

edits

Navigation menu