NPAPI:NativeAccessibility: Difference between revisions

Jump to navigation Jump to search
Give example of a base accessible type
(Give example of a base accessible type)
Line 35: Line 35:
If the plugin sets <tt>value</tt> to <tt>NULL</tt>, the browser should use an empty accessible to represent the plugin.
If the plugin sets <tt>value</tt> to <tt>NULL</tt>, the browser should use an empty accessible to represent the plugin.


If <tt>value</tt> is not <tt>NULL</tt>, the browser should cast it to the base type of the native accessibility toolkit, and insert the object into the accessibility hierarchy as a child of the plugin's DOM parent.
If <tt>value</tt> is not <tt>NULL</tt>, the browser should cast it to the base type of the native accessibility toolkit (e.g.: [http://library.gnome.org/devel/atk/unstable/AtkObject.html AtkObject] on Linux), and insert the object into the accessibility hierarchy as a child of the plugin's DOM parent.


If the accessibility toolkit supports reference counting, the plugin accessible's reference should be incremented right after the call to <tt>NPN_GetValue</tt>, and decremented when the plugin is freed.  If the accessible object provided is a pointer, the value ''should not'' be copied to ensure that the plugin can maintain the state of the plugin object.
If the accessibility toolkit supports reference counting, the plugin accessible's reference should be incremented right after the call to <tt>NPN_GetValue</tt>, and decremented when the plugin is freed.  If the accessible object provided is a pointer, the value ''should not'' be copied to ensure that the plugin can maintain the state of the plugin object.


This accessible does not need to be updated, so the browser may cache the object for the life of the plugin.  Plugins that need to regularly remove and re-add their root accessible object should return a container-type object from <tt>NPN_GetValue</tt> and make their root accessible a child of the container.
This accessible does not need to be updated, so the browser may cache the object for the life of the plugin.  Plugins that need to regularly remove and re-add their root accessible object should return a container-type object from <tt>NPN_GetValue</tt> and make their root accessible a child of the container.
26

edits

Navigation menu