1 #Copyright (C) 2008 Codethink Ltd
3 #This library is free software; you can redistribute it and/or
4 #modify it under the terms of the GNU Lesser General Public
5 #License version 2 as published by the Free Software Foundation.
7 #This program is distributed in the hope that it will be useful,
8 #but WITHOUT ANY WARRANTY; without even the implied warranty of
9 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 #GNU General Public License for more details.
11 #You should have received a copy of the GNU Lesser General Public License
12 #along with this program; if not, write to the Free Software
13 #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 BUTTON_PRESSED_EVENT = Accessibility.EventType(2)
19 BUTTON_RELEASED_EVENT = Accessibility.EventType(3)
21 KEY_PRESS = Accessibility.KeySynthType(0)
23 KEY_PRESSED = Accessibility.KeyEventType(0)
25 KEY_PRESSED_EVENT = Accessibility.EventType(0)
27 KEY_PRESSRELEASE = Accessibility.KeySynthType(2)
29 KEY_RELEASE = Accessibility.KeySynthType(1)
31 KEY_RELEASED = Accessibility.KeyEventType(1)
33 KEY_RELEASED_EVENT = Accessibility.EventType(1)
35 KEY_STRING = Accessibility.KeySynthType(4)
37 KEY_SYM = Accessibility.KeySynthType(3)
39 LAYER_BACKGROUND = Accessibility.ComponentLayer(1)
41 LAYER_CANVAS = Accessibility.ComponentLayer(2)
43 LAYER_INVALID = Accessibility.ComponentLayer(0)
45 LAYER_LAST_DEFINED = Accessibility.ComponentLayer(8)
47 LAYER_MDI = Accessibility.ComponentLayer(4)
49 LAYER_OVERLAY = Accessibility.ComponentLayer(6)
51 LAYER_POPUP = Accessibility.ComponentLayer(5)
53 LAYER_WIDGET = Accessibility.ComponentLayer(3)
55 LAYER_WINDOW = Accessibility.ComponentLayer(7)
57 LOCALE_TYPE_COLLATE = Accessibility.LOCALE_TYPE(1)
59 LOCALE_TYPE_CTYPE = Accessibility.LOCALE_TYPE(2)
61 LOCALE_TYPE_MESSAGES = Accessibility.LOCALE_TYPE(0)
63 LOCALE_TYPE_MONETARY = Accessibility.LOCALE_TYPE(3)
65 LOCALE_TYPE_NUMERIC = Accessibility.LOCALE_TYPE(4)
67 LOCALE_TYPE_TIME = Accessibility.LOCALE_TYPE(5)
69 MODIFIER_ALT = Accessibility.ModifierType(3)
71 MODIFIER_CONTROL = Accessibility.ModifierType(2)
73 MODIFIER_META = Accessibility.ModifierType(4)
75 MODIFIER_META2 = Accessibility.ModifierType(5)
77 MODIFIER_META3 = Accessibility.ModifierType(6)
79 MODIFIER_NUMLOCK = Accessibility.ModifierType(7)
81 MODIFIER_SHIFT = Accessibility.ModifierType(0)
83 MODIFIER_SHIFTLOCK = Accessibility.ModifierType(1)
85 RELATION_CONTROLLED_BY = Accessibility.RelationType(4)
87 RELATION_CONTROLLER_FOR = Accessibility.RelationType(3)
89 RELATION_DESCRIBED_BY = Accessibility.RelationType(17)
91 RELATION_DESCRIPTION_FOR = Accessibility.RelationType(16)
93 RELATION_EMBEDDED_BY = Accessibility.RelationType(13)
95 RELATION_EMBEDS = Accessibility.RelationType(12)
97 RELATION_EXTENDED = Accessibility.RelationType(8)
99 RELATION_FLOWS_FROM = Accessibility.RelationType(10)
101 RELATION_FLOWS_TO = Accessibility.RelationType(9)
103 RELATION_LABELLED_BY = Accessibility.RelationType(2)
105 RELATION_LABEL_FOR = Accessibility.RelationType(1)
107 RELATION_LAST_DEFINED = Accessibility.RelationType(18)
109 RELATION_MEMBER_OF = Accessibility.RelationType(5)
111 RELATION_NODE_CHILD_OF = Accessibility.RelationType(7)
113 RELATION_NULL = Accessibility.RelationType(0)
115 RELATION_PARENT_WINDOW_OF = Accessibility.RelationType(15)
117 RELATION_POPUP_FOR = Accessibility.RelationType(14)
119 RELATION_SUBWINDOW_OF = Accessibility.RelationType(11)
121 RELATION_TOOLTIP_FOR = Accessibility.RelationType(6)
123 ROLE_ACCELERATOR_LABEL = Accessibility.Role(1)
125 ROLE_ALERT = Accessibility.Role(2)
127 ROLE_ANIMATION = Accessibility.Role(3)
129 ROLE_APPLICATION = Accessibility.Role(75)
131 ROLE_ARROW = Accessibility.Role(4)
133 ROLE_AUTOCOMPLETE = Accessibility.Role(76)
135 ROLE_CALENDAR = Accessibility.Role(5)
137 ROLE_CANVAS = Accessibility.Role(6)
139 ROLE_CAPTION = Accessibility.Role(81)
141 ROLE_CHART = Accessibility.Role(80)
143 ROLE_CHECK_BOX = Accessibility.Role(7)
145 ROLE_CHECK_MENU_ITEM = Accessibility.Role(8)
147 ROLE_COLOR_CHOOSER = Accessibility.Role(9)
149 ROLE_COLUMN_HEADER = Accessibility.Role(10)
151 ROLE_COMBO_BOX = Accessibility.Role(11)
153 ROLE_DATE_EDITOR = Accessibility.Role(12)
155 ROLE_DESKTOP_FRAME = Accessibility.Role(14)
157 ROLE_DESKTOP_ICON = Accessibility.Role(13)
159 ROLE_DIAL = Accessibility.Role(15)
161 ROLE_DIALOG = Accessibility.Role(16)
163 ROLE_DIRECTORY_PANE = Accessibility.Role(17)
165 ROLE_DOCUMENT_FRAME = Accessibility.Role(82)
167 ROLE_DRAWING_AREA = Accessibility.Role(18)
169 ROLE_EDITBAR = Accessibility.Role(77)
171 ROLE_EMBEDDED = Accessibility.Role(78)
173 ROLE_ENTRY = Accessibility.Role(79)
175 ROLE_EXTENDED = Accessibility.Role(70)
177 ROLE_FILE_CHOOSER = Accessibility.Role(19)
179 ROLE_FILLER = Accessibility.Role(20)
181 ROLE_FOCUS_TRAVERSABLE = Accessibility.Role(21)
183 ROLE_FONT_CHOOSER = Accessibility.Role(22)
185 ROLE_FOOTER = Accessibility.Role(72)
187 ROLE_FORM = Accessibility.Role(87)
189 ROLE_FRAME = Accessibility.Role(23)
191 ROLE_GLASS_PANE = Accessibility.Role(24)
193 ROLE_HEADER = Accessibility.Role(71)
195 ROLE_HEADING = Accessibility.Role(83)
197 ROLE_HTML_CONTAINER = Accessibility.Role(25)
199 ROLE_ICON = Accessibility.Role(26)
201 ROLE_IMAGE = Accessibility.Role(27)
203 ROLE_INPUT_METHOD_WINDOW = Accessibility.Role(89)
205 ROLE_INTERNAL_FRAME = Accessibility.Role(28)
207 ROLE_INVALID = Accessibility.Role(0)
209 ROLE_LABEL = Accessibility.Role(29)
211 ROLE_LAST_DEFINED = Accessibility.Role(90)
213 ROLE_LAYERED_PANE = Accessibility.Role(30)
215 ROLE_LINK = Accessibility.Role(88)
217 ROLE_LIST = Accessibility.Role(31)
219 ROLE_LIST_ITEM = Accessibility.Role(32)
221 ROLE_MENU = Accessibility.Role(33)
223 ROLE_MENU_BAR = Accessibility.Role(34)
225 ROLE_MENU_ITEM = Accessibility.Role(35)
227 ROLE_OPTION_PANE = Accessibility.Role(36)
229 ROLE_PAGE = Accessibility.Role(84)
231 ROLE_PAGE_TAB = Accessibility.Role(37)
233 ROLE_PAGE_TAB_LIST = Accessibility.Role(38)
235 ROLE_PANEL = Accessibility.Role(39)
237 ROLE_PARAGRAPH = Accessibility.Role(73)
239 ROLE_PASSWORD_TEXT = Accessibility.Role(40)
241 ROLE_POPUP_MENU = Accessibility.Role(41)
243 ROLE_PROGRESS_BAR = Accessibility.Role(42)
245 ROLE_PUSH_BUTTON = Accessibility.Role(43)
247 ROLE_RADIO_BUTTON = Accessibility.Role(44)
249 ROLE_RADIO_MENU_ITEM = Accessibility.Role(45)
251 ROLE_REDUNDANT_OBJECT = Accessibility.Role(86)
253 ROLE_ROOT_PANE = Accessibility.Role(46)
255 ROLE_ROW_HEADER = Accessibility.Role(47)
257 ROLE_RULER = Accessibility.Role(74)
259 ROLE_SCROLL_BAR = Accessibility.Role(48)
261 ROLE_SCROLL_PANE = Accessibility.Role(49)
263 ROLE_SECTION = Accessibility.Role(85)
265 ROLE_SEPARATOR = Accessibility.Role(50)
267 ROLE_SLIDER = Accessibility.Role(51)
269 ROLE_SPIN_BUTTON = Accessibility.Role(52)
271 ROLE_SPLIT_PANE = Accessibility.Role(53)
273 ROLE_STATUS_BAR = Accessibility.Role(54)
275 ROLE_TABLE = Accessibility.Role(55)
277 ROLE_TABLE_CELL = Accessibility.Role(56)
279 ROLE_TABLE_COLUMN_HEADER = Accessibility.Role(57)
281 ROLE_TABLE_ROW_HEADER = Accessibility.Role(58)
283 ROLE_TEAROFF_MENU_ITEM = Accessibility.Role(59)
285 ROLE_TERMINAL = Accessibility.Role(60)
287 ROLE_TEXT = Accessibility.Role(61)
289 ROLE_TOGGLE_BUTTON = Accessibility.Role(62)
291 ROLE_TOOL_BAR = Accessibility.Role(63)
293 ROLE_TOOL_TIP = Accessibility.Role(64)
295 ROLE_TREE = Accessibility.Role(65)
297 ROLE_TREE_TABLE = Accessibility.Role(66)
299 ROLE_UNKNOWN = Accessibility.Role(67)
301 ROLE_VIEWPORT = Accessibility.Role(68)
303 ROLE_WINDOW = Accessibility.Role(69)
305 STATE_ACTIVE = Accessibility.StateType(1)
307 STATE_ANIMATED = Accessibility.StateType(35)
309 STATE_ARMED = Accessibility.StateType(2)
311 STATE_BUSY = Accessibility.StateType(3)
313 STATE_CHECKED = Accessibility.StateType(4)
315 STATE_COLLAPSED = Accessibility.StateType(5)
317 STATE_DEFUNCT = Accessibility.StateType(6)
319 STATE_EDITABLE = Accessibility.StateType(7)
321 STATE_ENABLED = Accessibility.StateType(8)
323 STATE_EXPANDABLE = Accessibility.StateType(9)
325 STATE_EXPANDED = Accessibility.StateType(10)
327 STATE_FOCUSABLE = Accessibility.StateType(11)
329 STATE_FOCUSED = Accessibility.StateType(12)
331 STATE_HAS_TOOLTIP = Accessibility.StateType(13)
333 STATE_HORIZONTAL = Accessibility.StateType(14)
335 STATE_ICONIFIED = Accessibility.StateType(15)
337 STATE_INDETERMINATE = Accessibility.StateType(32)
339 STATE_INVALID = Accessibility.StateType(0)
341 STATE_INVALID_ENTRY = Accessibility.StateType(36)
343 STATE_IS_DEFAULT = Accessibility.StateType(39)
345 STATE_LAST_DEFINED = Accessibility.StateType(41)
347 STATE_MANAGES_DESCENDANTS = Accessibility.StateType(31)
349 STATE_MODAL = Accessibility.StateType(16)
351 STATE_MULTISELECTABLE = Accessibility.StateType(18)
353 STATE_MULTI_LINE = Accessibility.StateType(17)
355 STATE_OPAQUE = Accessibility.StateType(19)
357 STATE_PRESSED = Accessibility.StateType(20)
359 STATE_REQUIRED = Accessibility.StateType(33)
361 STATE_RESIZABLE = Accessibility.StateType(21)
363 STATE_SELECTABLE = Accessibility.StateType(22)
365 STATE_SELECTABLE_TEXT = Accessibility.StateType(38)
367 STATE_SELECTED = Accessibility.StateType(23)
369 STATE_SENSITIVE = Accessibility.StateType(24)
371 STATE_SHOWING = Accessibility.StateType(25)
373 STATE_SINGLE_LINE = Accessibility.StateType(26)
375 STATE_STALE = Accessibility.StateType(27)
377 STATE_SUPPORTS_AUTOCOMPLETION = Accessibility.StateType(37)
379 STATE_TRANSIENT = Accessibility.StateType(28)
381 STATE_TRUNCATED = Accessibility.StateType(34)
383 STATE_VERTICAL = Accessibility.StateType(29)
385 STATE_VISIBLE = Accessibility.StateType(30)
387 STATE_VISITED = Accessibility.StateType(40)
389 TEXT_BOUNDARY_CHAR = Accessibility.TEXT_BOUNDARY_TYPE(0)
391 TEXT_BOUNDARY_LINE_END = Accessibility.TEXT_BOUNDARY_TYPE(6)
393 TEXT_BOUNDARY_LINE_START = Accessibility.TEXT_BOUNDARY_TYPE(5)
395 TEXT_BOUNDARY_SENTENCE_END = Accessibility.TEXT_BOUNDARY_TYPE(4)
397 TEXT_BOUNDARY_SENTENCE_START = Accessibility.TEXT_BOUNDARY_TYPE(3)
399 TEXT_BOUNDARY_WORD_END = Accessibility.TEXT_BOUNDARY_TYPE(2)
401 TEXT_BOUNDARY_WORD_START = Accessibility.TEXT_BOUNDARY_TYPE(1)
403 TEXT_CLIP_BOTH = Accessibility.TEXT_CLIP_TYPE(3)
405 TEXT_CLIP_MAX = Accessibility.TEXT_CLIP_TYPE(2)
407 TEXT_CLIP_MIN = Accessibility.TEXT_CLIP_TYPE(1)
409 TEXT_CLIP_NONE = Accessibility.TEXT_CLIP_TYPE(0)
412 class Action(BaseProxy):
416 An interface through which a user-actionable user interface component
417 can be manipulated. Components which react to mouse or keyboard
418 input from the user, (with the exception of pure text entry fields
419 with no other function), should implement this interface. Typical
420 actions include "click", "press", "release" (for instance for
421 buttons), "menu" (for objects which have context menus invokable
422 from mouse or keyboard), "open" for icons representing files
427 def doAction(self, *args, **kwargs):
431 the 0-based index of the action to perform.
432 Causes the object to perform the specified action.
433 @return : a boolean indicating success or failure.
435 func = self.get_dbus_method("doAction")
436 return func(*args, **kwargs)
438 def getDescription(self, *args, **kwargs):
442 the index of the action for which a description is desired.
443 Get the description of the specified action. The description
444 of an action may provide information about the result of action
445 invocation, unlike the action name.
446 @return : a string containing the description of the specified
449 func = self.get_dbus_method("getDescription")
450 return func(*args, **kwargs)
452 def getKeyBinding(self, *args, **kwargs):
456 the 0-based index of the action for which a key binding is requested.
457 Get the key binding associated with a specific action.
458 @return : a string containing the key binding for the specified
459 action, or an empty string ("") if none exists.
461 func = self.get_dbus_method("getKeyBinding")
462 return func(*args, **kwargs)
464 def getName(self, *args, **kwargs):
468 the index of the action whose name is requested.
469 Get the name of the specified action. Action names generally
470 describe the user action, i.e. "click" or "press", rather then
471 the result of invoking the action.
472 @return : a string containing the name of the specified action.
474 func = self.get_dbus_method("getName")
475 return func(*args, **kwargs)
477 def unImplemented(self, *args, **kwargs):
478 func = self.get_dbus_method("unImplemented")
479 return func(*args, **kwargs)
481 def unImplemented2(self, *args, **kwargs):
482 func = self.get_dbus_method("unImplemented2")
483 return func(*args, **kwargs)
485 def unImplemented3(self, *args, **kwargs):
486 func = self.get_dbus_method("unImplemented3")
487 return func(*args, **kwargs)
489 def unImplemented4(self, *args, **kwargs):
490 func = self.get_dbus_method("unImplemented4")
491 return func(*args, **kwargs)
493 def get_nActions(self):
494 self._pgetter(self._dbus_interface, "nActions")
495 def set_nActions(self, value):
496 self._psetter(self._dbus_interface, "nActions", value)
499 nActions: a long containing the number of actions this object
502 nActions = property(fget=get_nActions, fset=set_nActions, doc=_nActionsDoc)
505 class Application(Accessible):
509 An interface identifying an object which is the root of the user
510 interface Accessible hierarchy associated with a running application.
511 Children of Application are typically, but not exclusively, top-level
516 def getLocale(self, *args, **kwargs):
518 Gets the locale in which the application is currently operating.
519 For the current message locale, use lctype LOCALE_TYPE_MESSAGES.
521 The LocaleType for which the locale is queried.
522 @return a string compliant with the POSIX standard for locale
525 func = self.get_dbus_method("getLocale")
526 return func(*args, **kwargs)
528 def pause(self, *args, **kwargs):
530 Request that the application temporarily stop sending events.
531 In most cases this should pause the application's main event
533 @return : true if the request succeeded, false otherwise.
535 func = self.get_dbus_method("pause")
536 return func(*args, **kwargs)
538 def registerObjectEventListener(self, *args, **kwargs):
540 registerObjectEventListener:
542 an EventListener object which will receive the requested events
544 a UTF-8 string indicating the type of (toolkit-specific) event
545 being requested. Register with this application toolkit for "Accessibility::Accessible"
548 func = self.get_dbus_method("registerObjectEventListener")
549 return func(*args, **kwargs)
551 def registerToolkitEventListener(self, *args, **kwargs):
554 an EventListener object which will receive the requested events
555 from the application's toolkits via toolit 'bridges'
557 a UTF-8 string indicating the type of (toolkit-specific) event
558 being requested. Not all applications can generate toolkit events
560 Register with this application's toolkit for "toolkit-specific"
563 func = self.get_dbus_method("registerToolkitEventListener")
564 return func(*args, **kwargs)
566 def resume(self, *args, **kwargs):
568 Request that the application resume sending events.
569 @return : True if the request succeeded, False otherwise.
571 func = self.get_dbus_method("resume")
572 return func(*args, **kwargs)
574 def unImplemented2_(self, *args, **kwargs):
575 func = self.get_dbus_method("unImplemented2_")
576 return func(*args, **kwargs)
578 def unImplemented3_(self, *args, **kwargs):
579 func = self.get_dbus_method("unImplemented3_")
580 return func(*args, **kwargs)
582 def unImplemented_(self, *args, **kwargs):
583 func = self.get_dbus_method("unImplemented_")
584 return func(*args, **kwargs)
587 self._pgetter(self._dbus_interface, "id")
588 def set_id(self, value):
589 self._psetter(self._dbus_interface, "id", value)
592 The application instance's unique ID as assigned by the registry.
594 id = property(fget=get_id, fset=set_id, doc=_idDoc)
596 def get_toolkitName(self):
597 self._pgetter(self._dbus_interface, "toolkitName")
598 def set_toolkitName(self, value):
599 self._psetter(self._dbus_interface, "toolkitName", value)
602 A string indicating the type of user interface toolkit which
603 is used by the application.
605 toolkitName = property(fget=get_toolkitName, fset=set_toolkitName, doc=_toolkitNameDoc)
607 def get_version(self):
608 self._pgetter(self._dbus_interface, "version")
609 def set_version(self, value):
610 self._psetter(self._dbus_interface, "version", value)
613 A string indicating the version number of the application's accessibility
614 bridge implementation.
616 version = property(fget=get_version, fset=set_version, doc=_versionDoc)
619 class BoundingBox(list):
620 def __new__(cls, x, y, width, height):
621 list.__new__(cls, (x, y, width, height)
622 def __init__(self, x, y, width, height):
623 list.__init__(self, (x, y, width, height))
625 x = property(fget=_get_x, fset=_set_x)
628 def _set_x(self, val):
630 y = property(fget=_get_y, fset=_set_y)
633 def _set_y(self, val):
635 width = property(fget=_get_width, fset=_set_width)
636 def _get_width(self):
638 def _set_width(self, val):
640 height = property(fget=_get_height, fset=_set_height)
641 def _get_height(self):
643 def _set_height(self, val):
647 class Collection(BaseProxy):
652 def createMatchRule(self, *args, **kwargs):
653 func = self.get_dbus_method("createMatchRule")
654 return func(*args, **kwargs)
656 def freeMatchRule(self, *args, **kwargs):
657 func = self.get_dbus_method("freeMatchRule")
658 return func(*args, **kwargs)
660 def getActiveDescendant(self, *args, **kwargs):
661 func = self.get_dbus_method("getActiveDescendant")
662 return func(*args, **kwargs)
664 def getMatches(self, *args, **kwargs):
665 func = self.get_dbus_method("getMatches")
666 return func(*args, **kwargs)
668 def getMatchesFrom(self, *args, **kwargs):
669 func = self.get_dbus_method("getMatchesFrom")
670 return func(*args, **kwargs)
672 def getMatchesTo(self, *args, **kwargs):
673 func = self.get_dbus_method("getMatchesTo")
674 return func(*args, **kwargs)
676 def isAncestorOf(self, *args, **kwargs):
677 func = self.get_dbus_method("isAncestorOf")
678 return func(*args, **kwargs)
680 def unImplemented(self, *args, **kwargs):
681 func = self.get_dbus_method("unImplemented")
682 return func(*args, **kwargs)
684 def unImplemented2(self, *args, **kwargs):
685 func = self.get_dbus_method("unImplemented2")
686 return func(*args, **kwargs)
688 def unImplemented3(self, *args, **kwargs):
689 func = self.get_dbus_method("unImplemented3")
690 return func(*args, **kwargs)
692 def unImplemented4(self, *args, **kwargs):
693 func = self.get_dbus_method("unImplemented4")
694 return func(*args, **kwargs)
696 MATCH_ALL = Accessibility.MatchType(1)
698 MATCH_ANY = Accessibility.MatchType(2)
700 MATCH_EMPTY = Accessibility.MatchType(4)
702 MATCH_INVALID = Accessibility.MatchType(0)
704 MATCH_LAST_DEFINED = Accessibility.MatchType(5)
706 MATCH_NONE = Accessibility.MatchType(3)
708 class MatchType(Enum):
715 5:'MATCH_LAST_DEFINED',
719 SORT_ORDER_CANONICAL = Accessibility.SortOrder(1)
721 SORT_ORDER_FLOW = Accessibility.SortOrder(2)
723 SORT_ORDER_INVALID = Accessibility.SortOrder(0)
725 SORT_ORDER_LAST_DEFINED = Accessibility.SortOrder(7)
727 SORT_ORDER_REVERSE_CANONICAL = Accessibility.SortOrder(4)
729 SORT_ORDER_REVERSE_FLOW = Accessibility.SortOrder(5)
731 SORT_ORDER_REVERSE_TAB = Accessibility.SortOrder(6)
733 SORT_ORDER_TAB = Accessibility.SortOrder(3)
735 class SortOrder(Enum):
737 0:'SORT_ORDER_INVALID',
738 1:'SORT_ORDER_CANONICAL',
741 4:'SORT_ORDER_REVERSE_CANONICAL',
742 5:'SORT_ORDER_REVERSE_FLOW',
743 6:'SORT_ORDER_REVERSE_TAB',
744 7:'SORT_ORDER_LAST_DEFINED',
748 TREE_INORDER = Accessibility.TreeTraversalType(2)
750 TREE_LAST_DEFINED = Accessibility.TreeTraversalType(3)
752 TREE_RESTRICT_CHILDREN = Accessibility.TreeTraversalType(0)
754 TREE_RESTRICT_SIBLING = Accessibility.TreeTraversalType(1)
756 class TreeTraversalType(Enum):
758 0:'TREE_RESTRICT_CHILDREN',
759 1:'TREE_RESTRICT_SIBLING',
761 3:'TREE_LAST_DEFINED',
766 def __new__(cls, name, id):
767 list.__new__(cls, (name, id)
768 def __init__(self, name, id):
769 list.__init__(self, (name, id))
771 name = property(fget=_get_name, fset=_set_name)
774 def _set_name(self, val):
776 id = property(fget=_get_id, fset=_set_id)
779 def _set_id(self, val):
783 class CommandListener(BaseProxy):
787 An interface which should be implemented by assistive technologies
788 or other clients of the Selector interface, over which notifications
789 to the list of available commands is made. The notifyCommands()
790 method of the client is then called by the Selector instance.
794 def notifyCommands(self, *args, **kwargs):
796 Notify the CommandListener instance of changes to the currently
797 available commands, by sending the current CommandList.
799 The newly-available list of Command objects which may be invoked
802 func = self.get_dbus_method("notifyCommands")
803 return func(*args, **kwargs)
806 class Component(BaseProxy):
810 The Component interface is implemented by objects which occupy
811 on-screen space, e.g. objects which have onscreen visual representations.
812 The methods in Component allow clients to identify where the
813 objects lie in the onscreen coordinate system, their relative
814 size, stacking order, and position. It also provides a mechanism
815 whereby keyboard focus may be transferred to specific user interface
816 elements programmatically. This is a 2D API, coordinates of 3D
817 objects are projected into the 2-dimensional screen view for
818 purposes of this interface.
822 def contains(self, *args, **kwargs):
824 @return True if the specified point lies within the Component's
825 bounding box, False otherwise.
827 func = self.get_dbus_method("contains")
828 return func(*args, **kwargs)
830 def deregisterFocusHandler(self, *args, **kwargs):
832 Request that an EventListener registered via registerFocusHandler
833 no longer be notified when this object receives keyboard focus.
835 func = self.get_dbus_method("deregisterFocusHandler")
836 return func(*args, **kwargs)
838 def getAccessibleAtPoint(self, *args, **kwargs):
840 @return the Accessible child whose bounding box contains the
843 func = self.get_dbus_method("getAccessibleAtPoint")
844 return func(*args, **kwargs)
846 def getAlpha(self, *args, **kwargs):
848 Obtain the alpha value of the component. An alpha value of 1.0
849 or greater indicates that the object is fully opaque, and an
850 alpha value of 0.0 indicates that the object is fully transparent.
851 Negative alpha values have no defined meaning at this time.
853 func = self.get_dbus_method("getAlpha")
854 return func(*args, **kwargs)
856 def getExtents(self, *args, **kwargs):
858 Obtain the Component's bounding box, in pixels, relative to the
859 specified coordinate system.
860 @return a BoundingBox which entirely contains the object's onscreen
861 visual representation.
863 func = self.get_dbus_method("getExtents")
864 return func(*args, **kwargs)
866 def getLayer(self, *args, **kwargs):
868 @return the ComponentLayer in which this object resides.
870 func = self.get_dbus_method("getLayer")
871 return func(*args, **kwargs)
873 def getMDIZOrder(self, *args, **kwargs):
875 Obtain the relative stacking order (i.e. 'Z' order) of an object.
876 Larger values indicate that an object is on "top" of the stack,
877 therefore objects with smaller MDIZOrder may be obscured by objects
878 with a larger MDIZOrder, but not vice-versa.
879 @return an integer indicating the object's place in the stacking
882 func = self.get_dbus_method("getMDIZOrder")
883 return func(*args, **kwargs)
885 def getPosition(self, *args, **kwargs):
887 Obtain the position of the current component in the coordinate
888 system specified by coord_type.
891 an out parameter which will be back-filled with the returned
894 an out parameter which will be back-filled with the returned
897 func = self.get_dbus_method("getPosition")
898 return func(*args, **kwargs)
900 def getSize(self, *args, **kwargs):
902 Obtain the size, in the coordinate system specified by coord_type,
903 of the rectangular area which fully contains the object's visual
904 representation, without accounting for viewport clipping.
906 the object's horizontal extents in the specified coordinate system.
908 the object's vertical extents in the specified coordinate system.
910 func = self.get_dbus_method("getSize")
911 return func(*args, **kwargs)
913 def grabFocus(self, *args, **kwargs):
915 Request that the object obtain keyboard focus.
916 @return True if keyboard focus was successfully transferred to
919 func = self.get_dbus_method("grabFocus")
920 return func(*args, **kwargs)
922 def registerFocusHandler(self, *args, **kwargs):
924 Register an EventListener for notification when this object receives
927 func = self.get_dbus_method("registerFocusHandler")
928 return func(*args, **kwargs)
930 def unImplemented(self, *args, **kwargs):
931 func = self.get_dbus_method("unImplemented")
932 return func(*args, **kwargs)
934 def unImplemented2(self, *args, **kwargs):
935 func = self.get_dbus_method("unImplemented2")
936 return func(*args, **kwargs)
938 def unImplemented3(self, *args, **kwargs):
939 func = self.get_dbus_method("unImplemented3")
940 return func(*args, **kwargs)
943 class ComponentLayer(Enum):
946 1:'LAYER_BACKGROUND',
953 8:'LAYER_LAST_DEFINED',
957 class ContentStream(BaseProxy):
961 An interface by which the requested data from a StreamableContent
962 object may be read by the client.
966 def close(self, *args, **kwargs):
968 close the stream and release associated resources. A client should
969 not perform further operations on a StreamableContent::Stream
970 object after closing it.
972 func = self.get_dbus_method("close")
973 return func(*args, **kwargs)
975 def read(self, *args, **kwargs):
977 Request/read a specified amount of data from a Stream.
978 @return the number of bytes actually read into the client buffer.
980 func = self.get_dbus_method("read")
981 return func(*args, **kwargs)
983 def seek(self, *args, **kwargs):
985 Seek to a specified position in the Stream.
987 an offset specifying the requested position in the stream, relative
988 to the SeekType specified in whence.
990 a SeekType specifying the reference point from which the seek
991 offset is calculated. Some forms of seek are not supported by
992 certain implementations of Stream, in which case a NotSupported
993 exception will be raised.
994 @return the actual resulting offset, if no exception was raised.
996 func = self.get_dbus_method("seek")
997 return func(*args, **kwargs)
999 def unimplemented(self, *args, **kwargs):
1003 func = self.get_dbus_method("unimplemented")
1004 return func(*args, **kwargs)
1006 def unimplemented2(self, *args, **kwargs):
1007 func = self.get_dbus_method("unimplemented2")
1008 return func(*args, **kwargs)
1010 class IOError(Exception):
1013 class NoPermission(Exception):
1016 class NotSupported(Exception):
1019 SEEK_CURRENT = Accessibility.SeekType(1)
1021 SEEK_END = Accessibility.SeekType(2)
1023 SEEK_SET = Accessibility.SeekType(0)
1025 class SeekType(Enum):
1027 Specifies the meaning of a seek 'offset'. Not all SeekTypes are
1028 supported by all StreamableContent data sources, for instance
1029 some streams may not support seeking from the beginning or other
1030 types of 'backwards' seeks.
1039 class Desktop(Accessible):
1043 At the moment this is only a marker interface, it acts just like
1044 any other Accessible. In all known implementations, the children
1045 are all instances of Application, but this is not guaranteed
1050 def unImplemented2_(self, *args, **kwargs):
1051 func = self.get_dbus_method("unImplemented2_")
1052 return func(*args, **kwargs)
1054 def unImplemented3_(self, *args, **kwargs):
1055 func = self.get_dbus_method("unImplemented3_")
1056 return func(*args, **kwargs)
1058 def unImplemented4_(self, *args, **kwargs):
1059 func = self.get_dbus_method("unImplemented4_")
1060 return func(*args, **kwargs)
1062 def unImplemented_(self, *args, **kwargs):
1063 func = self.get_dbus_method("unImplemented_")
1064 return func(*args, **kwargs)
1067 class DeviceEvent(list):
1068 def __new__(cls, type, id, hw_code, modifiers, timestamp, event_string, is_text):
1069 list.__new__(cls, (type, id, hw_code, modifiers, timestamp, event_string, is_text)
1070 def __init__(self, type, id, hw_code, modifiers, timestamp, event_string, is_text):
1071 list.__init__(self, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
1073 type = property(fget=_get_type, fset=_set_type)
1074 def _get_type(self):
1076 def _set_type(self, val):
1078 id = property(fget=_get_id, fset=_set_id)
1081 def _set_id(self, val):
1083 hw_code = property(fget=_get_hw_code, fset=_set_hw_code)
1084 def _get_hw_code(self):
1086 def _set_hw_code(self, val):
1088 modifiers = property(fget=_get_modifiers, fset=_set_modifiers)
1089 def _get_modifiers(self):
1091 def _set_modifiers(self, val):
1093 timestamp = property(fget=_get_timestamp, fset=_set_timestamp)
1094 def _get_timestamp(self):
1096 def _set_timestamp(self, val):
1098 event_string = property(fget=_get_event_string, fset=_set_event_string)
1099 def _get_event_string(self):
1101 def _set_event_string(self, val):
1103 is_text = property(fget=_get_is_text, fset=_set_is_text)
1104 def _get_is_text(self):
1106 def _set_is_text(self, val):
1110 class DeviceEventController(BaseProxy):
1114 The interface via which clients request notification of device
1115 events, and through which device events may be simulated.
1119 def deregisterDeviceEventListener(self, *args, **kwargs):
1121 De-register a previously registered keyboard eventlistener.
1123 a DeviceEventListener which will intercept events.
1125 an EventTypeSeq indicating which event types to stop listening
1128 func = self.get_dbus_method("deregisterDeviceEventListener")
1129 return func(*args, **kwargs)
1131 def deregisterKeystrokeListener(self, *args, **kwargs):
1133 De-register a previously registered keyboard eventlistener.
1135 a DeviceEventListener which will intercept key events.
1137 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
1139 a ControllerEventMask filtering the intercepted key events.
1141 an EventType mask that may created by ORing event types together.
1143 func = self.get_dbus_method("deregisterKeystrokeListener")
1144 return func(*args, **kwargs)
1146 def generateKeyboardEvent(self, *args, **kwargs):
1148 Synthesize a keyboard event.
1150 a long integer indicating the keycode of the keypress to be synthesized.
1152 an optional UTF-8 string indicating a complex keyboard input
1155 a KeySynthType indicating the type of event(s) to be synthesized:
1156 a key press, release, press-release pair, or a complex input
1157 string (for instance from an internationalized or complex text
1158 input method, or a composed character).
1160 func = self.get_dbus_method("generateKeyboardEvent")
1161 return func(*args, **kwargs)
1163 def generateMouseEvent(self, *args, **kwargs):
1165 Synthesize a mouse event.
1167 a long integer indicating the screen x coord for the mouse event.
1169 a long integer indicating the screen y coord for the mouse event.
1171 a string indicating the type of mouse event, e.g. "button1up"
1173 func = self.get_dbus_method("generateMouseEvent")
1174 return func(*args, **kwargs)
1176 def notifyListenersAsync(self, *args, **kwargs):
1178 Notify the Registry instance that a device event has taken place
1179 in an asynchronous manner. This is the method used by accessibility
1180 bridges to forward "toolkit dependent" device events to the Registry
1181 from the application's process space. If the event in question
1182 is potentially pre-emptible. notifyListenersSync should be used
1185 func = self.get_dbus_method("notifyListenersAsync")
1186 return func(*args, **kwargs)
1188 def notifyListenersSync(self, *args, **kwargs):
1190 Notify the Registry instance that a device event has taken place,
1191 and allow pre-emptive listeners the opportunity to 'consume'
1192 the event and thus prevent its further issuance/forwarding. This
1193 is the method used by accessibility bridges to forward "toolkit
1194 dependent" device events to the Registry from the application's
1196 @return True if the event was consumed by a (pre-emptive) listener,
1197 False if not (in which case the device event will be forwarded
1198 as normal to any application which would normally receive it,
1199 e.g. the currently active application in the case of mouse or
1202 func = self.get_dbus_method("notifyListenersSync")
1203 return func(*args, **kwargs)
1205 def registerDeviceEventListener(self, *args, **kwargs):
1207 Register to intercept events, and either pass them on or consume
1208 them. To listen to keyboard events use registerKeystrokeListener
1211 a DeviceEventListener which will intercept events.
1213 an EventTypeSeq indicating which event types to listen for.
1214 @return True if successful, False if not
1216 func = self.get_dbus_method("registerDeviceEventListener")
1217 return func(*args, **kwargs)
1219 def registerKeystrokeListener(self, *args, **kwargs):
1221 Register to intercept keyboard events, and either pass them on
1224 a DeviceEventListener which will intercept key events.
1226 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
1228 a ControllerEventMask filtering the intercepted key events.
1230 a KeyEventTypeSeq that may created by ORing event types together.
1232 an EventListenerMode indicating whether the listener should receive
1233 the events synchronously, potentially consuming them, or just
1234 be notified asynchronously of those events that have been generated.
1235 @return True if the DeviceEventListener was successfully registered
1236 for the requested KeySet, ControllerEventMask, event types, and
1237 EventListenerMode; otherwise returns False.
1239 func = self.get_dbus_method("registerKeystrokeListener")
1240 return func(*args, **kwargs)
1242 def unImplemented(self, *args, **kwargs):
1243 func = self.get_dbus_method("unImplemented")
1244 return func(*args, **kwargs)
1246 def unImplemented2(self, *args, **kwargs):
1247 func = self.get_dbus_method("unImplemented2")
1248 return func(*args, **kwargs)
1250 def unImplemented3(self, *args, **kwargs):
1251 func = self.get_dbus_method("unImplemented3")
1252 return func(*args, **kwargs)
1254 def unImplemented4(self, *args, **kwargs):
1255 func = self.get_dbus_method("unImplemented4")
1256 return func(*args, **kwargs)
1259 class DeviceEventListener(BaseProxy):
1263 This interface should be implemented by AT-SPI clients who wish
1264 to make use of the DeviceEventController to receive device event
1265 notifications. DeviceEvents include keyboard events and mouse
1266 button/motion events.
1270 def notifyEvent(self, *args, **kwargs):
1272 Notify an interested DeviceEventListener that a DeviceEvent has
1274 @return True if the recipient/consumer wishes to consume the
1275 event, i.e. prevent it from being delivered to the desktop, False
1276 if the event should continue to be delivered as normal.
1278 func = self.get_dbus_method("notifyEvent")
1279 return func(*args, **kwargs)
1281 def unImplemented_2_(self, *args, **kwargs):
1282 func = self.get_dbus_method("unImplemented_2_")
1283 return func(*args, **kwargs)
1285 def unImplemented_3_(self, *args, **kwargs):
1286 func = self.get_dbus_method("unImplemented_3_")
1287 return func(*args, **kwargs)
1289 def unImplemented_4_(self, *args, **kwargs):
1290 func = self.get_dbus_method("unImplemented_4_")
1291 return func(*args, **kwargs)
1293 def unImplemented_5_(self, *args, **kwargs):
1294 func = self.get_dbus_method("unImplemented_5_")
1295 return func(*args, **kwargs)
1297 def unImplemented_6_(self, *args, **kwargs):
1298 func = self.get_dbus_method("unImplemented_6_")
1299 return func(*args, **kwargs)
1301 def unImplemented__(self, *args, **kwargs):
1302 func = self.get_dbus_method("unImplemented__")
1303 return func(*args, **kwargs)
1306 class Document(BaseProxy):
1310 Primarily a 'tagging' interface which indicates the start of
1311 document content in the Accessibility hierarchy. Accessible objects
1312 below the node implementing Document are normally assumed to
1313 be part of the document content. Attributes of Document are those
1314 attributes associated with the document as a whole. Objects that
1315 implement Document are normally expected to implement Collection
1320 def getAttributeValue(self, *args, **kwargs):
1322 Gets the value of a single attribute, if specified for the document
1324 @param : attributename
1325 a string indicating the name of a specific attribute (name-value
1326 pair) being queried.
1327 @return a string corresponding to the value of the specified
1328 attribute, or an empty string if the attribute is unspecified
1331 func = self.get_dbus_method("getAttributeValue")
1332 return func(*args, **kwargs)
1334 def getAttributes(self, *args, **kwargs):
1336 Gets all attributes specified for a document as a whole. For
1337 attributes which change within the document content, see Accessibility::Text::getAttributes
1339 @return an AttributeSet containing the attributes of the document,
1340 as name-value pairs.
1342 func = self.get_dbus_method("getAttributes")
1343 return func(*args, **kwargs)
1345 def getLocale(self, *args, **kwargs):
1347 Gets the locale associated with the document's content. e.g.
1348 the locale for LOCALE_TYPE_MESSAGES.
1349 @return a string compliant with the POSIX standard for locale
1352 func = self.get_dbus_method("getLocale")
1353 return func(*args, **kwargs)
1355 def unImplemented2_(self, *args, **kwargs):
1356 func = self.get_dbus_method("unImplemented2_")
1357 return func(*args, **kwargs)
1359 def unImplemented3_(self, *args, **kwargs):
1360 func = self.get_dbus_method("unImplemented3_")
1361 return func(*args, **kwargs)
1363 def unImplemented4_(self, *args, **kwargs):
1364 func = self.get_dbus_method("unImplemented4_")
1365 return func(*args, **kwargs)
1367 def unImplemented_(self, *args, **kwargs):
1368 func = self.get_dbus_method("unImplemented_")
1369 return func(*args, **kwargs)
1372 class EditableText(Text):
1376 Derived from interface Text, EditableText provides methods for
1377 modifying textual content of components which support editing.
1378 EditableText also interacts with the system clipboard via copyText,
1379 cutText, and pasteText.
1383 def copyText(self, *args, **kwargs):
1385 Copy a range of text into the system clipboard.
1387 the character offset of the first character in the range of text
1390 the offset of the first character past the end of the range of
1393 func = self.get_dbus_method("copyText")
1394 return func(*args, **kwargs)
1396 def cutText(self, *args, **kwargs):
1398 Excise a range of text from a Text object, copying it into the
1401 the character offset of the first character in the range of text
1404 the offset of the first character past the end of the range of
1406 @return True if the text was successfully cut, False otherwise.
1408 func = self.get_dbus_method("cutText")
1409 return func(*args, **kwargs)
1411 def deleteText(self, *args, **kwargs):
1413 Excise a range of text from a Text object without copying it
1414 into the system clipboard.
1416 the character offset of the first character in the range of text
1419 the offset of the first character past the end of the range of
1421 @return True if the text was successfully deleted, False otherwise.
1423 func = self.get_dbus_method("deleteText")
1424 return func(*args, **kwargs)
1426 def insertText(self, *args, **kwargs):
1428 Insert new text contents into an existing text object at a given
1429 location, while retaining the old contents.
1431 the character offset into the Text implementor's content at which
1432 the new content will be inserted.
1434 a UTF-8 string of which length characters will be inserted into
1435 the text object's text buffer.
1437 the number of characters of text to insert. If the character
1438 count of text is less than or equal to length, the entire contents
1439 of text will be inserted.
1440 @return True if the text content was successfully inserted, False
1443 func = self.get_dbus_method("insertText")
1444 return func(*args, **kwargs)
1446 def pasteText(self, *args, **kwargs):
1448 Copy the text contents of the system clipboard, if any, into
1449 a Text object, inserting it at a particular character offset.
1451 the character offset before which the text will be inserted.
1452 @return True if the text was successfully pasted into the Text
1453 object, False otherwise.
1455 func = self.get_dbus_method("pasteText")
1456 return func(*args, **kwargs)
1458 def setAttributes(self, *args, **kwargs):
1460 Apply a particular set of attributes to a range of text.
1461 @return True if the text attributes were successfully modified,
1464 func = self.get_dbus_method("setAttributes")
1465 return func(*args, **kwargs)
1467 def setTextContents(self, *args, **kwargs):
1469 Replace the text contents with a new string, discarding the old
1471 @param : newContents
1472 a UTF-8 string with which the text object's contents will be
1474 @return True if the text content was successfully changed, False
1477 func = self.get_dbus_method("setTextContents")
1478 return func(*args, **kwargs)
1480 def unImplemented10(self, *args, **kwargs):
1481 func = self.get_dbus_method("unImplemented10")
1482 return func(*args, **kwargs)
1484 def unImplemented11(self, *args, **kwargs):
1485 func = self.get_dbus_method("unImplemented11")
1486 return func(*args, **kwargs)
1488 def unImplemented12(self, *args, **kwargs):
1489 func = self.get_dbus_method("unImplemented12")
1490 return func(*args, **kwargs)
1492 def unImplemented5(self, *args, **kwargs):
1495 placeholders for future expansion. Note that these are named
1496 'unimplemented5 and unimplemented6' to avoid conflict with placeholders
1497 from Accessibility::Text.
1499 func = self.get_dbus_method("unImplemented5")
1500 return func(*args, **kwargs)
1502 def unImplemented6(self, *args, **kwargs):
1503 func = self.get_dbus_method("unImplemented6")
1504 return func(*args, **kwargs)
1506 def unImplemented9(self, *args, **kwargs):
1507 func = self.get_dbus_method("unImplemented9")
1508 return func(*args, **kwargs)
1512 def __new__(cls, type, source, detail1, detail2, any_data):
1513 list.__new__(cls, (type, source, detail1, detail2, any_data)
1514 def __init__(self, type, source, detail1, detail2, any_data):
1515 list.__init__(self, (type, source, detail1, detail2, any_data))
1517 type = property(fget=_get_type, fset=_set_type)
1518 def _get_type(self):
1520 def _set_type(self, val):
1522 source = property(fget=_get_source, fset=_set_source)
1523 def _get_source(self):
1525 def _set_source(self, val):
1527 detail1 = property(fget=_get_detail1, fset=_set_detail1)
1528 def _get_detail1(self):
1530 def _set_detail1(self, val):
1532 detail2 = property(fget=_get_detail2, fset=_set_detail2)
1533 def _get_detail2(self):
1535 def _set_detail2(self, val):
1537 any_data = property(fget=_get_any_data, fset=_set_any_data)
1538 def _get_any_data(self):
1540 def _set_any_data(self, val):
1544 class EventDetails(list):
1545 def __new__(cls, host_application, source_role, source_name, any_data):
1546 list.__new__(cls, (host_application, source_role, source_name, any_data)
1547 def __init__(self, host_application, source_role, source_name, any_data):
1548 list.__init__(self, (host_application, source_role, source_name, any_data))
1550 host_application = property(fget=_get_host_application, fset=_set_host_application)
1551 def _get_host_application(self):
1553 def _set_host_application(self, val):
1555 source_role = property(fget=_get_source_role, fset=_set_source_role)
1556 def _get_source_role(self):
1558 def _set_source_role(self, val):
1560 source_name = property(fget=_get_source_name, fset=_set_source_name)
1561 def _get_source_name(self):
1563 def _set_source_name(self, val):
1565 any_data = property(fget=_get_any_data, fset=_set_any_data)
1566 def _get_any_data(self):
1568 def _set_any_data(self, val):
1572 class EventListener(BaseProxy):
1576 A generic interface implemented by objects for the receipt of
1577 event notifications. EventListener is the interface from which
1578 Accessibility::Registry is derived, and via which clients of
1579 the Registry receive notification of changes to an application's
1580 user interface and content.
1584 def notifyEvent(self, *args, **kwargs):
1586 Synchronously notify an EventListener that an event has occurred,
1587 by passing it an Event struct.
1589 The Event about which the listener is being notified.
1591 func = self.get_dbus_method("notifyEvent")
1592 return func(*args, **kwargs)
1594 def unImplemented2_(self, *args, **kwargs):
1595 func = self.get_dbus_method("unImplemented2_")
1596 return func(*args, **kwargs)
1598 def unImplemented3_(self, *args, **kwargs):
1599 func = self.get_dbus_method("unImplemented3_")
1600 return func(*args, **kwargs)
1602 def unImplemented4_(self, *args, **kwargs):
1603 func = self.get_dbus_method("unImplemented4_")
1604 return func(*args, **kwargs)
1606 def unImplemented_(self, *args, **kwargs):
1607 func = self.get_dbus_method("unImplemented_")
1608 return func(*args, **kwargs)
1611 class EventListenerMode(list):
1612 def __new__(cls, synchronous, preemptive, global):
1613 list.__new__(cls, (synchronous, preemptive, global)
1614 def __init__(self, synchronous, preemptive, global):
1615 list.__init__(self, (synchronous, preemptive, global))
1617 synchronous = property(fget=_get_synchronous, fset=_set_synchronous)
1618 def _get_synchronous(self):
1620 def _set_synchronous(self, val):
1622 preemptive = property(fget=_get_preemptive, fset=_set_preemptive)
1623 def _get_preemptive(self):
1625 def _set_preemptive(self, val):
1627 global = property(fget=_get_global, fset=_set_global)
1628 def _get_global(self):
1630 def _set_global(self, val):
1634 class EventType(Enum):
1636 0:'KEY_PRESSED_EVENT',
1637 1:'KEY_RELEASED_EVENT',
1638 2:'BUTTON_PRESSED_EVENT',
1639 3:'BUTTON_RELEASED_EVENT',
1643 class Hyperlink(BaseProxy):
1647 Instances of Hyperlink are returned by Hypertext objects, and
1648 are the means by which end users and clients interact with linked,
1649 and in some cases embedded, content. Hyperlinks may have multiple
1650 "anchors", where an anchor corresponds to a reference to a particular
1651 resource with a corresponding resource identified (URI). Hyperlinks
1652 may be queried for their URIs, or queried for the objects corresponding
1653 to their anchors. The objects thus obtained are instances of
1654 Accessible, and may be queried, and manipulated via the Action
1659 def getObject(self, *args, **kwargs):
1661 Gets the i'th object, (where i is an integer between 0 and Hyperlink::numAnchors
1662 - 1, inclusive) associated with a Hyperlink. The objects returned
1663 are usually actionable (i.e. they should implement Accessibility::Action),
1664 and the available actions often include "open", "bookmark", "save
1665 link as", etc. They may also implement Accessibility::StreamableContent,
1666 although clients can normally use getURI to obtain a resource
1667 locator via which the object's data may be accessed.
1668 @return an Accessible object instance representing the Hyperlink's
1669 ith anchor, or through which the content associated with the
1670 ith anchor can be accessed.
1672 func = self.get_dbus_method("getObject")
1673 return func(*args, **kwargs)
1675 def getURI(self, *args, **kwargs):
1677 Obtain a resource locator ('URI') which can be used to access
1678 the content to which this link "points" or is connected.
1679 @return a string corresponding to the URI of the Hyperlink's
1680 'ith' anchor, if one exists, or a NIL string otherwise.
1682 func = self.get_dbus_method("getURI")
1683 return func(*args, **kwargs)
1685 def isValid(self, *args, **kwargs):
1687 Check the hyperlink to see if a connection to its backing content
1688 can be established, or if its URI is valid.
1689 @return True if the object's content is available, or False if
1690 the hyperlink's URI is invalid, or a connection to the resource
1691 can not be established.
1693 func = self.get_dbus_method("isValid")
1694 return func(*args, **kwargs)
1696 def unImplemented(self, *args, **kwargs):
1697 func = self.get_dbus_method("unImplemented")
1698 return func(*args, **kwargs)
1700 def unImplemented2(self, *args, **kwargs):
1701 func = self.get_dbus_method("unImplemented2")
1702 return func(*args, **kwargs)
1704 def unImplemented3(self, *args, **kwargs):
1705 func = self.get_dbus_method("unImplemented3")
1706 return func(*args, **kwargs)
1708 def unImplemented4(self, *args, **kwargs):
1709 func = self.get_dbus_method("unImplemented4")
1710 return func(*args, **kwargs)
1712 def get_endIndex(self):
1713 self._pgetter(self._dbus_interface, "endIndex")
1714 def set_endIndex(self, value):
1715 self._psetter(self._dbus_interface, "endIndex", value)
1718 the ending offset within the containing Hypertext content with
1719 which this Hyperlink is associated; that is, the offset of the
1720 first element past the range within the Hypertext associated
1721 with this Hyperlink.
1723 endIndex = property(fget=get_endIndex, fset=set_endIndex, doc=_endIndexDoc)
1725 def get_nAnchors(self):
1726 self._pgetter(self._dbus_interface, "nAnchors")
1727 def set_nAnchors(self, value):
1728 self._psetter(self._dbus_interface, "nAnchors", value)
1731 the number of separate anchors associated with this Hyperlink
1733 nAnchors = property(fget=get_nAnchors, fset=set_nAnchors, doc=_nAnchorsDoc)
1735 def get_startIndex(self):
1736 self._pgetter(self._dbus_interface, "startIndex")
1737 def set_startIndex(self, value):
1738 self._psetter(self._dbus_interface, "startIndex", value)
1741 the starting offset within the containing Hypertext content with
1742 which this Hyperlink is associated
1744 startIndex = property(fget=get_startIndex, fset=set_startIndex, doc=_startIndexDoc)
1747 class Hypertext(BaseProxy):
1751 An interface used for objects which implement linking between
1752 multiple resource or content locations, or multiple 'markers'
1753 within a single document. A Hypertext instance is associated
1754 with one or more Hyperlinks, which are associated with particular
1755 offsets within the Hypertext's included content.
1759 def getLink(self, *args, **kwargs):
1761 Get one of the Hyperlinks associated with this Hypertext object,
1764 an integer from 0 to getNLinks() - 1.
1765 @return the Hyperlink in this Hypertext object.
1767 func = self.get_dbus_method("getLink")
1768 return func(*args, **kwargs)
1770 def getLinkIndex(self, *args, **kwargs):
1772 Get the hyperlink index, if any, associated with a particular
1773 character offset in the Hypertext object. For Hypertext implementors
1774 without textual content, all hyperlinks are associated with character
1776 @return the index of the Hyperlink associated with character
1777 offset characterIndex, or -1 if no Hyperlink is associated with
1778 that character offset.
1780 func = self.get_dbus_method("getLinkIndex")
1781 return func(*args, **kwargs)
1783 def getNLinks(self, *args, **kwargs):
1785 Query the hypertext object for the number of Hyperlinks it contains.
1786 @return the number of Hyperlinks associated with this Hypertext
1787 object, as a long integer.
1789 func = self.get_dbus_method("getNLinks")
1790 return func(*args, **kwargs)
1792 def unImplemented(self, *args, **kwargs):
1793 func = self.get_dbus_method("unImplemented")
1794 return func(*args, **kwargs)
1796 def unImplemented2(self, *args, **kwargs):
1797 func = self.get_dbus_method("unImplemented2")
1798 return func(*args, **kwargs)
1800 def unImplemented3(self, *args, **kwargs):
1801 func = self.get_dbus_method("unImplemented3")
1802 return func(*args, **kwargs)
1804 def unImplemented4(self, *args, **kwargs):
1805 func = self.get_dbus_method("unImplemented4")
1806 return func(*args, **kwargs)
1809 class Image(BaseProxy):
1813 An interface implemented by objects which render image data or
1814 pictorial information to the screen. When onscreen components
1815 include graphical information that is not purely intended to
1816 enhance "3d effect" or visual layout, but which conveys some
1817 semantic or informational content to the sighted user, they should
1818 implement Image, and that semantic content should be conveyed
1819 textually to the extent possible via the image description, as
1820 well as the Accessible::name and Accessible::description properties.
1824 def getImageExtents(self, *args, **kwargs):
1826 Obtain a bounding box which entirely contains the image contents,
1827 as displayed on screen. The bounds returned do not account for
1828 any viewport clipping or the fact that the image may be partially
1829 or wholly obscured by other onscreen content.
1831 If 0, the returned bounding box position is returned relative
1832 to the screen; if 1, the bounding box position is returned relative
1833 to the containing window.
1834 @return a BoundingBox enclosing the image's onscreen representation.
1836 func = self.get_dbus_method("getImageExtents")
1837 return func(*args, **kwargs)
1839 def getImagePosition(self, *args, **kwargs):
1841 Get the coordinates of the current image position on screen.
1843 Back-filled with the x coordinate of the onscreen image (i.e.
1844 the minimum x coordinate)
1846 Back-filled with the y coordinate of the onscreen image (i.e.
1847 the minimum y coordinate)
1849 If 0, the returned x and y coordinates are returned relative
1850 to the screen; if 1, they are returned relative to the containing
1853 func = self.get_dbus_method("getImagePosition")
1854 return func(*args, **kwargs)
1856 def getImageSize(self, *args, **kwargs):
1858 Obtain the width and height of the current onscreen view of the
1859 image. The extents returned do not account for any viewport clipping
1860 or the fact that the image may be partially or wholly obscured
1861 by other onscreen content.
1863 Back-filled with the x extents of the onscreen image (i.e. the
1864 image width in pixels)
1866 Back-filled with the y extents of the onscreen image (i.e. the
1867 image height in pixels)
1869 func = self.get_dbus_method("getImageSize")
1870 return func(*args, **kwargs)
1872 def unImplemented(self, *args, **kwargs):
1873 func = self.get_dbus_method("unImplemented")
1874 return func(*args, **kwargs)
1876 def unImplemented2(self, *args, **kwargs):
1877 func = self.get_dbus_method("unImplemented2")
1878 return func(*args, **kwargs)
1880 def unImplemented3(self, *args, **kwargs):
1881 func = self.get_dbus_method("unImplemented3")
1882 return func(*args, **kwargs)
1884 def get_imageDescription(self):
1885 self._pgetter(self._dbus_interface, "imageDescription")
1886 def set_imageDescription(self, value):
1887 self._psetter(self._dbus_interface, "imageDescription", value)
1888 _imageDescriptionDoc = \
1890 A UTF-8 string providing a textual description of what is visually
1891 depicted in the image.
1893 imageDescription = property(fget=get_imageDescription, fset=set_imageDescription, doc=_imageDescriptionDoc)
1895 def get_imageLocale(self):
1896 self._pgetter(self._dbus_interface, "imageLocale")
1897 def set_imageLocale(self, value):
1898 self._psetter(self._dbus_interface, "imageLocale", value)
1901 A string corresponding to the POSIX LC_MESSAGES locale used by
1902 the imageDescription.
1904 imageLocale = property(fget=get_imageLocale, fset=set_imageLocale, doc=_imageLocaleDoc)
1907 class KeyDefinition(list):
1908 def __new__(cls, keycode, keysym, keystring, unused):
1909 list.__new__(cls, (keycode, keysym, keystring, unused)
1910 def __init__(self, keycode, keysym, keystring, unused):
1911 list.__init__(self, (keycode, keysym, keystring, unused))
1913 keycode = property(fget=_get_keycode, fset=_set_keycode)
1914 def _get_keycode(self):
1916 def _set_keycode(self, val):
1918 keysym = property(fget=_get_keysym, fset=_set_keysym)
1919 def _get_keysym(self):
1921 def _set_keysym(self, val):
1923 keystring = property(fget=_get_keystring, fset=_set_keystring)
1924 def _get_keystring(self):
1926 def _set_keystring(self, val):
1928 unused = property(fget=_get_unused, fset=_set_unused)
1929 def _get_unused(self):
1931 def _set_unused(self, val):
1935 class KeyEventType(Enum):
1942 class KeySynthType(Enum):
1946 2:'KEY_PRESSRELEASE',
1952 class LOCALE_TYPE(Enum):
1954 0:'LOCALE_TYPE_MESSAGES',
1955 1:'LOCALE_TYPE_COLLATE',
1956 2:'LOCALE_TYPE_CTYPE',
1957 3:'LOCALE_TYPE_MONETARY',
1958 4:'LOCALE_TYPE_NUMERIC',
1959 5:'LOCALE_TYPE_TIME',
1963 class LoginHelper(BaseProxy):
1967 An interface for use by assistive technologies by which they
1968 can access system information and services on a 'need to know'
1969 basis while the screen is locked, during user authentication,
1970 or during other sensitive operations.
1971 This interface is intended for use by assistive technologies
1972 and related user-enabling services, and by applications and utilities
1973 which may wish to restrict access to certain system devices and
1974 services during security-sensitive states, e.g. when the screen
1975 is locked or during authentication into some secure service.
1976 Such 'applications' (for instance, screen lock dialogs and security-enabled
1977 web browsers) use the LoginHelper client interfaces, and the
1978 bonobo-activation query service, to query for assistive technologies
1979 which advertise the LoginHelper service. The client then queries
1980 these assistive technologies for their device I/O requirements,
1981 via the getDeviceReqs call. The client may then issue the advisory
1982 request setSafe (TRUE), which requests that the LoginHelper -implementing
1983 service make a best-effort attempt to make itself more secure
1984 (for instance, an onscreen keyboard might turn off word prediction,
1985 and a screenreader may turn off keyboard echo via speech). The
1986 return value of setSafe is an advisory indication of whether
1987 this attempt was successful (no specific guarantees are implied).
1988 Once the 'security sensitive' state is exited, the client should
1989 call setSafe (FALSE).
1990 The return values from getDeviceReqs inform the client of which
1991 services the LoginHelper service (e. g. assistive technology)
1992 needs in order to do its job. The client may use this information
1993 to loosen any restrictions on access which it may currently have
1994 in place (for instance, keyboard grabs, etc.). If it does not
1995 do so, the likely outcome is that the end-user will experience
1996 loss of access to the system.
2000 def getDeviceReqs(self, *args, **kwargs):
2003 Query a LoginHelper for the types of device I/O it requires,
2004 in order to do its job. For instance, a LoginHelper which needs
2005 to receive keyboard events will include Accessibility_LoginHelper_CORE_KEYBOARD
2007 @return : A sequence of LoginHelper_DeviceReq indicating the
2008 device I/O required in order to facilitate end-user access to
2011 func = self.get_dbus_method("getDeviceReqs")
2012 return func(*args, **kwargs)
2014 def getRaiseWindows(self, *args, **kwargs):
2017 Get a list of window IDs that need raising on login.
2018 @return : a sequence containing window IDS for toplevels which
2019 need to be raised/made visible during user authentication, in
2020 order for the LoginHelper to facilitate end-user access to the
2023 func = self.get_dbus_method("getRaiseWindows")
2024 return func(*args, **kwargs)
2026 def setSafe(self, *args, **kwargs):
2030 TRUE if the client is requesting that 'safe mode' be initiated,
2031 FALSE if the client is advising that 'safe mode' may be exited,
2032 i.e. normal operation may be resumed.
2033 Request a LoginHelper to enter "safe" mode, or inform LoginHelper
2034 that "safe" mode may be exited. If safe_mode is TRUE, but the
2035 return value is FALSE, the requesting client may wish to deny
2036 services to the LoginHelper, for instance avoid raising its toplevels.
2037 The return value is purely advisory, and no guarantees are intended
2038 about what the implementing LoginHelper will do to improve security
2039 when in "safe" mode.
2040 @return : whether the LoginHelper is now "safe" or not.
2042 func = self.get_dbus_method("setSafe")
2043 return func(*args, **kwargs)
2045 def unImplemented(self, *args, **kwargs):
2046 func = self.get_dbus_method("unImplemented")
2047 return func(*args, **kwargs)
2049 def unImplemented2(self, *args, **kwargs):
2050 func = self.get_dbus_method("unImplemented2")
2051 return func(*args, **kwargs)
2053 def unImplemented3(self, *args, **kwargs):
2054 func = self.get_dbus_method("unImplemented3")
2055 return func(*args, **kwargs)
2057 def unImplemented4(self, *args, **kwargs):
2058 func = self.get_dbus_method("unImplemented4")
2059 return func(*args, **kwargs)
2061 AUDIO_IN = Accessibility.DeviceReq(6)
2063 AUDIO_OUT = Accessibility.DeviceReq(5)
2065 CORE_KEYBOARD = Accessibility.DeviceReq(1)
2067 CORE_POINTER = Accessibility.DeviceReq(2)
2069 class DeviceReq(Enum):
2085 EXT_INPUT = Accessibility.DeviceReq(3)
2087 GUI_EVENTS = Accessibility.DeviceReq(0)
2089 LOCALHOST = Accessibility.DeviceReq(8)
2091 NETWORK = Accessibility.DeviceReq(7)
2093 POST_WINDOWS = Accessibility.DeviceReq(4)
2095 SERIAL_IN = Accessibility.DeviceReq(10)
2097 SERIAL_OUT = Accessibility.DeviceReq(9)
2099 class WindowInfo(list):
2100 def __new__(cls, winID):
2101 list.__new__(cls, (winID)
2102 def __init__(self, winID):
2103 list.__init__(self, (winID))
2105 winID = property(fget=_get_winID, fset=_set_winID)
2106 def _get_winID(self):
2108 def _set_winID(self, val):
2112 class ModifierType(Enum):
2115 1:'MODIFIER_SHIFTLOCK',
2116 2:'MODIFIER_CONTROL',
2121 7:'MODIFIER_NUMLOCK',
2125 class Registry(EventListener):
2129 The Registry is a service through which applications providing
2130 accessibility services (servers) can rendezvous with consumers
2131 of those services (Assistive Technologies). The Registry is the
2132 first "port of call" for accessible applications and for assistive
2133 technologies wishing to query and interact with those applications.
2134 The Registry service provides four basic functions to Assistive
2135 Technology (AT) clients:
2136 it provides a list of the applications who have registered with
2137 the AT-SPI framework, thereby announcing their participation
2138 in the AT-SPI framework;
2139 it allows AT clients to register for notification of changes
2140 in application state (at-spi Events);
2141 it dispatches/relays said events from participating applications
2142 to the registered listeners;
2143 it gives access to system device events via the associated DeviceEventController
2145 From the point of view of accessible applications (i.e. AT-SPI
2146 service producers), the Registry is primarily a registration
2147 and event delivery service. Applications normally only call the
2148 registerApplication and deregisterApplication Registry methods,
2149 and its inherited EventListener::notifyEvent method.
2150 The Registry normally lives in its own process space; communication
2151 via Registry and both application services and AT clients takes
2152 place via IPC. A process space diagram illustrating the relationship
2153 between applications, Registry, and AT is shown below.
2157 def deregisterApplication(self, *args, **kwargs):
2159 De-register an application previously registered with the broker.
2160 deregisterApplication:
2162 a reference to the Application to be deregistered.
2164 func = self.get_dbus_method("deregisterApplication")
2165 return func(*args, **kwargs)
2167 def deregisterGlobalEventListener(self, *args, **kwargs):
2169 deregisterGlobalEventListener:
2171 the requesting EventListener
2173 a string indicating the type of events
2174 Request that a previously registered client stop receiving global
2175 notifications for events of a certain type.
2177 func = self.get_dbus_method("deregisterGlobalEventListener")
2178 return func(*args, **kwargs)
2180 def deregisterGlobalEventListenerAll(self, *args, **kwargs):
2182 deregisterGlobalEventListenerAll:
2184 the requesting EventListener
2185 Request that a previously registered client stop receiving global
2186 notifications for all events for which it was registered.
2188 func = self.get_dbus_method("deregisterGlobalEventListenerAll")
2189 return func(*args, **kwargs)
2191 def getDesktop(self, *args, **kwargs):
2194 : the index of the requested Desktop.
2195 Get the nth accessible desktop.
2196 @return a reference to the requested Desktop.
2198 func = self.get_dbus_method("getDesktop")
2199 return func(*args, **kwargs)
2201 def getDesktopCount(self, *args, **kwargs):
2203 event types: "Window" "Desktop" "Window:Create" "Window:Destroy"
2204 "Window:Iconify" "Window:Restore" "Window:Fullscreen" "Window:Resize"
2205 "Desktop:Create" "Desktop:Destroy" "Desktop:Focus" "Desktop:Defocus"
2206 "Desktop:Reorder" "Focus" "GtkWidget:show" "GObject:notify:<propertyname>"
2207 ( not sure we should allow these last 2 forms, since they are
2208 toolkit-specific, but they're powerful ) getDesktopCount:
2209 Get the current number of desktops.
2210 @return a short integer indicating the current number of Desktops.
2212 func = self.get_dbus_method("getDesktopCount")
2213 return func(*args, **kwargs)
2215 def getDesktopList(self, *args, **kwargs):
2217 Get a list of accessible desktops.
2218 @return : a sequence containing references to the Desktops.
2220 func = self.get_dbus_method("getDesktopList")
2221 return func(*args, **kwargs)
2223 def getDeviceEventController(self, *args, **kwargs):
2225 Obtain an object which can be used to request device event notifications.
2226 @return : an object implementing DeviceEventController
2228 func = self.get_dbus_method("getDeviceEventController")
2229 return func(*args, **kwargs)
2231 def registerApplication(self, *args, **kwargs):
2233 Register a new application with the accessibility broker.
2235 a reference to the requesting Application
2237 func = self.get_dbus_method("registerApplication")
2238 return func(*args, **kwargs)
2240 def registerGlobalEventListener(self, *args, **kwargs):
2242 Register a client's interest in (all) application events of a
2245 a reference to the requesting EventListener.
2247 a string which indicates the type of events about which the client
2248 desires notification.
2250 func = self.get_dbus_method("registerGlobalEventListener")
2251 return func(*args, **kwargs)
2253 def unImplemented(self, *args, **kwargs):
2254 func = self.get_dbus_method("unImplemented")
2255 return func(*args, **kwargs)
2257 def unImplemented2(self, *args, **kwargs):
2258 func = self.get_dbus_method("unImplemented2")
2259 return func(*args, **kwargs)
2261 def unImplemented3(self, *args, **kwargs):
2262 func = self.get_dbus_method("unImplemented3")
2263 return func(*args, **kwargs)
2265 def unImplemented4(self, *args, **kwargs):
2266 func = self.get_dbus_method("unImplemented4")
2267 return func(*args, **kwargs)
2269 def unImplemented5(self, *args, **kwargs):
2270 func = self.get_dbus_method("unImplemented5")
2271 return func(*args, **kwargs)
2273 def unImplemented6(self, *args, **kwargs):
2274 func = self.get_dbus_method("unImplemented6")
2275 return func(*args, **kwargs)
2278 class Relation(BaseProxy):
2282 An interface via which objects' non-hierarchical relationships
2283 to one another are indicated. An instance of Relations represents
2284 a "one-to-many" correspondance.
2288 def getNTargets(self, *args, **kwargs):
2290 @return the number of objects to which this relationship applies.
2292 func = self.get_dbus_method("getNTargets")
2293 return func(*args, **kwargs)
2295 def getRelationType(self, *args, **kwargs):
2297 @return the RelationType of this Relation.
2299 func = self.get_dbus_method("getRelationType")
2300 return func(*args, **kwargs)
2302 def getRelationTypeName(self, *args, **kwargs):
2304 @return an unlocalized string representing the relation type.
2306 func = self.get_dbus_method("getRelationTypeName")
2307 return func(*args, **kwargs)
2309 def getTarget(self, *args, **kwargs):
2311 @return an Object which is the 'nth'target of this Relation,
2312 e.g. the Object at index i in the list of Objects having the
2313 specified relationship to this Accessible.
2315 func = self.get_dbus_method("getTarget")
2316 return func(*args, **kwargs)
2318 def unImplemented(self, *args, **kwargs):
2319 func = self.get_dbus_method("unImplemented")
2320 return func(*args, **kwargs)
2322 def unImplemented2(self, *args, **kwargs):
2323 func = self.get_dbus_method("unImplemented2")
2324 return func(*args, **kwargs)
2326 def unImplemented3(self, *args, **kwargs):
2327 func = self.get_dbus_method("unImplemented3")
2328 return func(*args, **kwargs)
2330 def unImplemented4(self, *args, **kwargs):
2331 func = self.get_dbus_method("unImplemented4")
2332 return func(*args, **kwargs)
2335 class RelationType(Enum):
2338 1:'RELATION_LABEL_FOR',
2339 2:'RELATION_LABELLED_BY',
2340 3:'RELATION_CONTROLLER_FOR',
2341 4:'RELATION_CONTROLLED_BY',
2342 5:'RELATION_MEMBER_OF',
2343 6:'RELATION_TOOLTIP_FOR',
2344 7:'RELATION_NODE_CHILD_OF',
2345 8:'RELATION_EXTENDED',
2346 9:'RELATION_FLOWS_TO',
2347 10:'RELATION_FLOWS_FROM',
2348 11:'RELATION_SUBWINDOW_OF',
2349 12:'RELATION_EMBEDS',
2350 13:'RELATION_EMBEDDED_BY',
2351 14:'RELATION_POPUP_FOR',
2352 15:'RELATION_PARENT_WINDOW_OF',
2353 16:'RELATION_DESCRIPTION_FOR',
2354 17:'RELATION_DESCRIBED_BY',
2355 18:'RELATION_LAST_DEFINED',
2362 1:'ROLE_ACCELERATOR_LABEL',
2369 8:'ROLE_CHECK_MENU_ITEM',
2370 9:'ROLE_COLOR_CHOOSER',
2371 10:'ROLE_COLUMN_HEADER',
2372 11:'ROLE_COMBO_BOX',
2373 12:'ROLE_DATE_EDITOR',
2374 13:'ROLE_DESKTOP_ICON',
2375 14:'ROLE_DESKTOP_FRAME',
2378 17:'ROLE_DIRECTORY_PANE',
2379 18:'ROLE_DRAWING_AREA',
2380 19:'ROLE_FILE_CHOOSER',
2382 21:'ROLE_FOCUS_TRAVERSABLE',
2383 22:'ROLE_FONT_CHOOSER',
2385 24:'ROLE_GLASS_PANE',
2386 25:'ROLE_HTML_CONTAINER',
2389 28:'ROLE_INTERNAL_FRAME',
2391 30:'ROLE_LAYERED_PANE',
2393 32:'ROLE_LIST_ITEM',
2396 35:'ROLE_MENU_ITEM',
2397 36:'ROLE_OPTION_PANE',
2399 38:'ROLE_PAGE_TAB_LIST',
2401 40:'ROLE_PASSWORD_TEXT',
2402 41:'ROLE_POPUP_MENU',
2403 42:'ROLE_PROGRESS_BAR',
2404 43:'ROLE_PUSH_BUTTON',
2405 44:'ROLE_RADIO_BUTTON',
2406 45:'ROLE_RADIO_MENU_ITEM',
2407 46:'ROLE_ROOT_PANE',
2408 47:'ROLE_ROW_HEADER',
2409 48:'ROLE_SCROLL_BAR',
2410 49:'ROLE_SCROLL_PANE',
2411 50:'ROLE_SEPARATOR',
2413 52:'ROLE_SPIN_BUTTON',
2414 53:'ROLE_SPLIT_PANE',
2415 54:'ROLE_STATUS_BAR',
2417 56:'ROLE_TABLE_CELL',
2418 57:'ROLE_TABLE_COLUMN_HEADER',
2419 58:'ROLE_TABLE_ROW_HEADER',
2420 59:'ROLE_TEAROFF_MENU_ITEM',
2423 62:'ROLE_TOGGLE_BUTTON',
2427 66:'ROLE_TREE_TABLE',
2434 73:'ROLE_PARAGRAPH',
2436 75:'ROLE_APPLICATION',
2437 76:'ROLE_AUTOCOMPLETE',
2443 82:'ROLE_DOCUMENT_FRAME',
2447 86:'ROLE_REDUNDANT_OBJECT',
2450 89:'ROLE_INPUT_METHOD_WINDOW',
2451 90:'ROLE_LAST_DEFINED',
2455 class Selection(BaseProxy):
2459 An interface which indicates that an object exposes a 'selection'
2460 model, allowing the selection of one or more of its children.
2461 Read-only Selection instances are possible, in which case the
2462 interface is used to programmatically determine the selected-ness
2463 of its children. A selected child has State::STATE_SELECTED,
2464 and a child which may hypothetically be selected (though possibly
2465 not programmatically selectable) has State::STATE_SELECTABLE.
2469 def clearSelection(self, *args, **kwargs):
2471 Attempt to clear all selections (i.e. deselect all children)
2472 of a Selection. Not all Selection implementations allow the removal
2474 @return True if the selections were successfully cleared, False
2477 func = self.get_dbus_method("clearSelection")
2478 return func(*args, **kwargs)
2480 def deselectChild(self, *args, **kwargs):
2482 Remove a child from the selected children list of a Selection,
2483 if the child is currently selected.
2485 a long integer (the zero offset index into the Accessible object's
2486 list of children) indicating which child of the Selection is
2488 @return True if the child was successfully selected, False otherwise.
2490 func = self.get_dbus_method("deselectChild")
2491 return func(*args, **kwargs)
2493 def deselectSelectedChild(self, *args, **kwargs):
2495 Remove a child to the selected children list of a Selection.
2496 @param : selectedChildIndex
2497 a long integer indicating which of the selected children of the
2498 Selection is to be deselected. The index is a zero-offset index
2499 into the 'selected child list', not a zero-offset index into
2500 the list of all children of the Selection.
2501 @return True if the child was successfully deselected, False
2504 func = self.get_dbus_method("deselectSelectedChild")
2505 return func(*args, **kwargs)
2507 def getSelectedChild(self, *args, **kwargs):
2509 Get the i-th selected Accessible child of a Selection.
2510 @param : selectedChildIndex
2511 a long integer indicating which of the selected children of an
2512 object is being requested.
2513 @return a pointer to a selected Accessible child object, specified
2514 by selectedChildIndex.
2516 func = self.get_dbus_method("getSelectedChild")
2517 return func(*args, **kwargs)
2519 def isChildSelected(self, *args, **kwargs):
2521 Determine whether a particular child of an Selection implementor
2522 is currently selected. Note that childIndex is the zero-offset
2523 index into the standard Accessible container's list of children.
2525 an index into the Selection's list of children.
2526 @return True if the specified child is currently selected, False
2529 func = self.get_dbus_method("isChildSelected")
2530 return func(*args, **kwargs)
2532 def selectAll(self, *args, **kwargs):
2534 Attempt to select all of the children of a Selection implementor.
2535 Not all Selection implementors support this operation (for instance,
2536 implementations which support only "single selection" do not
2537 support this operation).
2538 @return True if successful, False otherwise.
2540 func = self.get_dbus_method("selectAll")
2541 return func(*args, **kwargs)
2543 def selectChild(self, *args, **kwargs):
2545 Add a child to the selected children list of a Selection.
2547 a long integer indicating which child of the Selection is to
2549 @return True if the child was successfully selected, False otherwise.
2551 func = self.get_dbus_method("selectChild")
2552 return func(*args, **kwargs)
2554 def unImplemented(self, *args, **kwargs):
2557 placeholders for future expansion.
2559 func = self.get_dbus_method("unImplemented")
2560 return func(*args, **kwargs)
2562 def unImplemented2(self, *args, **kwargs):
2563 func = self.get_dbus_method("unImplemented2")
2564 return func(*args, **kwargs)
2566 def unImplemented3(self, *args, **kwargs):
2567 func = self.get_dbus_method("unImplemented3")
2568 return func(*args, **kwargs)
2570 def get_nSelectedChildren(self):
2571 self._pgetter(self._dbus_interface, "nSelectedChildren")
2572 def set_nSelectedChildren(self, value):
2573 self._psetter(self._dbus_interface, "nSelectedChildren", value)
2574 _nSelectedChildrenDoc = \
2576 The number of children of a Selection implementor which are currently
2579 nSelectedChildren = property(fget=get_nSelectedChildren, fset=set_nSelectedChildren, doc=_nSelectedChildrenDoc)
2582 class Selector(BaseProxy):
2586 This interface is intended for use by assistive technologies
2587 and related user-agents. Via this interface, an assistive technology
2588 or user agent may expose a series of choices or selections in
2589 textual form, which can be activated on demand by a client of
2590 the Selector interface.
2591 Examples of the use of this interface include voice-command and
2592 remote-control applications, in which the user interaction is
2593 wholly or partly delegated by the implementor to an external
2598 def activateCommand(self, *args, **kwargs):
2600 Request that the Selector invoke the specified Command.
2602 the Command to activate/invoke.
2603 @return a CommandResult indicating whether the request was honored,
2604 and the reason for failure if the Command could not be activated
2607 func = self.get_dbus_method("activateCommand")
2608 return func(*args, **kwargs)
2610 def deregisterChangeListener(self, *args, **kwargs):
2612 Tell the Selector instance to cease notifying the specified CommandListener
2613 of changes to the command list.
2615 the CommandListener to remove from the notification list.
2617 func = self.get_dbus_method("deregisterChangeListener")
2618 return func(*args, **kwargs)
2620 def getCommands(self, *args, **kwargs):
2622 Query the Selector for the current CommandList.
2623 @return the currently available CommandList
2625 func = self.get_dbus_method("getCommands")
2626 return func(*args, **kwargs)
2628 def refreshCommands(self, *args, **kwargs):
2630 Ask the Selector to re-calculate its CommandList.
2631 @return TRUE if the CommandList changed.
2633 func = self.get_dbus_method("refreshCommands")
2634 return func(*args, **kwargs)
2636 def registerChangeListener(self, *args, **kwargs):
2638 Register a :CommandListener instance for notification of changes
2641 the CommandListener to be notified of changes.
2643 func = self.get_dbus_method("registerChangeListener")
2644 return func(*args, **kwargs)
2646 def replaceCommands(self, *args, **kwargs):
2648 @return TRUE if the replacement request was successful, FALSE
2649 if the request could not be honored.
2651 func = self.get_dbus_method("replaceCommands")
2652 return func(*args, **kwargs)
2654 def unImplemented(self, *args, **kwargs):
2655 func = self.get_dbus_method("unImplemented")
2656 return func(*args, **kwargs)
2658 def unImplemented2(self, *args, **kwargs):
2659 func = self.get_dbus_method("unImplemented2")
2660 return func(*args, **kwargs)
2662 def unImplemented3(self, *args, **kwargs):
2663 func = self.get_dbus_method("unImplemented3")
2664 return func(*args, **kwargs)
2666 def unImplemented4(self, *args, **kwargs):
2667 func = self.get_dbus_method("unImplemented4")
2668 return func(*args, **kwargs)
2670 def get_supportsReplace(self):
2671 self._pgetter(self._dbus_interface, "supportsReplace")
2672 def set_supportsReplace(self, value):
2673 self._psetter(self._dbus_interface, "supportsReplace", value)
2674 _supportsReplaceDoc = \
2676 This attribute is TRUE if this Selector allows its CommandList
2677 to be specified by the client
2679 supportsReplace = property(fget=get_supportsReplace, fset=set_supportsReplace, doc=_supportsReplaceDoc)
2681 COMMAND_RESULT_FAILED = Accessibility.CommandResult(2)
2683 COMMAND_RESULT_INVALID = Accessibility.CommandResult(0)
2685 COMMAND_RESULT_LAST_DEFINED = Accessibility.CommandResult(4)
2687 COMMAND_RESULT_OBSOLETE = Accessibility.CommandResult(3)
2689 COMMAND_RESULT_SUCCESS = Accessibility.CommandResult(1)
2691 class CommandResult(Enum):
2693 A code returned by a call to activateCommand, indicating the
2694 result of the activation request.
2698 0:'COMMAND_RESULT_INVALID',
2699 1:'COMMAND_RESULT_SUCCESS',
2700 2:'COMMAND_RESULT_FAILED',
2701 3:'COMMAND_RESULT_OBSOLETE',
2702 4:'COMMAND_RESULT_LAST_DEFINED',
2705 class StateSet(BaseProxy):
2707 The StateSet interface encapsulates a collection of state information.
2708 It allows comparison of state information between object instances,
2709 and comparisons of an object's state with some hypothetical collection
2713 def add(self, *args, **kwargs):
2715 Add a StateType to an existing StateSet, if not already present.
2717 func = self.get_dbus_method("add")
2718 return func(*args, **kwargs)
2720 def compare(self, *args, **kwargs):
2722 Compare two StateSet instances and obtain their differences.
2723 @return a 'difference set', i.e. a StateSet consisting of those
2724 states not shared by the two sets being compared.
2726 func = self.get_dbus_method("compare")
2727 return func(*args, **kwargs)
2729 def contains(self, *args, **kwargs):
2731 Query a StateSet for a specific StateType.
2733 the StateType being queried for.
2734 @return TRUE if the StateSet contains StateType state.
2736 func = self.get_dbus_method("contains")
2737 return func(*args, **kwargs)
2739 def equals(self, *args, **kwargs):
2741 Compare two statesets for equivalence.
2742 @param : tarStateSet
2743 the StateSet to be compared with this one.
2744 @return TRUE if the two StateSet objects are composed of the
2747 func = self.get_dbus_method("equals")
2748 return func(*args, **kwargs)
2750 def getStates(self, *args, **kwargs):
2751 func = self.get_dbus_method("getStates")
2752 return func(*args, **kwargs)
2754 def isEmpty(self, *args, **kwargs):
2756 @return TRUE if the StateSet contains no states.
2758 func = self.get_dbus_method("isEmpty")
2759 return func(*args, **kwargs)
2761 def remove(self, *args, **kwargs):
2763 Remove a StateType to an existing StateSet, if it is present.
2765 func = self.get_dbus_method("remove")
2766 return func(*args, **kwargs)
2768 def unImplemented(self, *args, **kwargs):
2769 func = self.get_dbus_method("unImplemented")
2770 return func(*args, **kwargs)
2772 def unImplemented2(self, *args, **kwargs):
2773 func = self.get_dbus_method("unImplemented2")
2774 return func(*args, **kwargs)
2776 def unImplemented3(self, *args, **kwargs):
2777 func = self.get_dbus_method("unImplemented3")
2778 return func(*args, **kwargs)
2780 def unImplemented4(self, *args, **kwargs):
2781 func = self.get_dbus_method("unImplemented4")
2782 return func(*args, **kwargs)
2785 class StateType(Enum):
2792 5:'STATE_COLLAPSED',
2796 9:'STATE_EXPANDABLE',
2797 10:'STATE_EXPANDED',
2798 11:'STATE_FOCUSABLE',
2800 13:'STATE_HAS_TOOLTIP',
2801 14:'STATE_HORIZONTAL',
2802 15:'STATE_ICONIFIED',
2804 17:'STATE_MULTI_LINE',
2805 18:'STATE_MULTISELECTABLE',
2808 21:'STATE_RESIZABLE',
2809 22:'STATE_SELECTABLE',
2810 23:'STATE_SELECTED',
2811 24:'STATE_SENSITIVE',
2813 26:'STATE_SINGLE_LINE',
2815 28:'STATE_TRANSIENT',
2816 29:'STATE_VERTICAL',
2818 31:'STATE_MANAGES_DESCENDANTS',
2819 32:'STATE_INDETERMINATE',
2820 33:'STATE_REQUIRED',
2821 34:'STATE_TRUNCATED',
2822 35:'STATE_ANIMATED',
2823 36:'STATE_INVALID_ENTRY',
2824 37:'STATE_SUPPORTS_AUTOCOMPLETION',
2825 38:'STATE_SELECTABLE_TEXT',
2826 39:'STATE_IS_DEFAULT',
2828 41:'STATE_LAST_DEFINED',
2832 class StreamableContent(BaseProxy):
2836 An interface whereby an object allows its backing content to
2837 be streamed to clients. Negotiation of content type is allowed.
2838 Clients may examine the backing data and transform, convert,
2839 or parse the content in order to present it in an alternate form
2844 def getContent(self, *args, **kwargs):
2846 DEPRECATED, use getStream instead. getContent: Retrieve this
2847 object's content, in a format appropriate to a requested mimetype.
2848 long Bonobo::Stream:seek (in long offset, in SeekType
2850 raises (NoPermission, IOError)
2851 void Bonobo::Stream:read (in long count, out iobuf buffer)
2852 raises (NoPermission, IOError)
2854 @return a Bonobo::Stream whose mimetype matches contentType,
2855 if available, or NIL.
2857 func = self.get_dbus_method("getContent")
2858 return func(*args, **kwargs)
2860 def getContentTypes(self, *args, **kwargs):
2863 @return the list of available mimetypes for this object's content.
2865 func = self.get_dbus_method("getContentTypes")
2866 return func(*args, **kwargs)
2868 def getStream(self, *args, **kwargs):
2870 Retrieve this object's content, in a format appropriate to a
2871 requested mimetype, as a ContentStream instance.
2872 @param : contentType
2873 a string specifying the desired mimetype for the content stream.
2874 @return a Stream whose mimetype matches contentType, if available,
2877 func = self.get_dbus_method("getStream")
2878 return func(*args, **kwargs)
2880 def getURI(self, *args, **kwargs):
2882 Get a URI pointing to the content of the specified type, if such
2883 a URI can be obtained. Not all streamable content providers have
2884 URI representations.
2885 @param : contentType
2886 a string specifying the desired mimetype for the content stream.
2887 If NULL, then a URI for the default content type will be returned,
2889 @return a string which constitutes a URI for a stream of the
2890 specified content type, or NULL if no such URI can be obtained.
2892 func = self.get_dbus_method("getURI")
2893 return func(*args, **kwargs)
2895 def unImplemented(self, *args, **kwargs):
2896 func = self.get_dbus_method("unImplemented")
2897 return func(*args, **kwargs)
2899 def unImplemented2(self, *args, **kwargs):
2900 func = self.get_dbus_method("unImplemented2")
2901 return func(*args, **kwargs)
2904 class TEXT_BOUNDARY_TYPE(Enum):
2906 0:'TEXT_BOUNDARY_CHAR',
2907 1:'TEXT_BOUNDARY_WORD_START',
2908 2:'TEXT_BOUNDARY_WORD_END',
2909 3:'TEXT_BOUNDARY_SENTENCE_START',
2910 4:'TEXT_BOUNDARY_SENTENCE_END',
2911 5:'TEXT_BOUNDARY_LINE_START',
2912 6:'TEXT_BOUNDARY_LINE_END',
2916 class TEXT_CLIP_TYPE(Enum):
2925 class Table(BaseProxy):
2929 An interface used by containers whose contained data is arranged
2930 in a "tabular" (i.e. row-column) fashion. Tables may resemble
2931 a two-dimensional grid, as in a spreadsheet, or may feature objects
2932 which span multiple rows and/or columns, but whose bounds are
2933 aligned on a row/column matrix. Thus, the Table interface may
2934 be used to represent "spreadsheets" as well as "frames".
2935 Objects within tables are children of the Table instance, and
2936 they may be referenced either via a child index or via a row/column
2937 pair. Their role may be ROLE_TABLE_CELL, but table 'cells' may
2938 have other roles as well. These 'cells' may implement other interfaces,
2939 such as Text, Action, Image, and Component, and should do so
2940 as appropriate to their onscreen representation and/or behavior.
2944 def addColumnSelection(self, *args, **kwargs):
2946 Select the specified column, adding it to the current column
2947 selection, if the table's selection model permits it.
2949 @return True if the specified column was successfully selected,
2952 func = self.get_dbus_method("addColumnSelection")
2953 return func(*args, **kwargs)
2955 def addRowSelection(self, *args, **kwargs):
2957 Select the specified row, adding it to the current row selection,
2958 if the table's selection model permits it.
2960 @return True if the specified row was successfully selected,
2963 func = self.get_dbus_method("addRowSelection")
2964 return func(*args, **kwargs)
2966 def getAccessibleAt(self, *args, **kwargs):
2968 Get the table cell at the specified row and column indices.
2970 the specified table row, zero-indexed.
2972 the specified table column, zero-indexed.
2973 @return an Accessible object representing the specified table
2976 func = self.get_dbus_method("getAccessibleAt")
2977 return func(*args, **kwargs)
2979 def getColumnAtIndex(self, *args, **kwargs):
2981 Get the table column index occupied by the child at a particular
2984 the specified child index, zero-indexed.
2985 @return a long integer indicating the first column spanned by
2986 the child of a table, at the specified 1-D (zero-offset) index.
2988 func = self.get_dbus_method("getColumnAtIndex")
2989 return func(*args, **kwargs)
2991 def getColumnDescription(self, *args, **kwargs):
2993 Get a text description of a particular table column. This differs
2994 from AccessibleTable_getColumnHeader, which returns an Accessible.
2996 the specified table column, zero-indexed.
2997 @return a UTF-8 string describing the specified table column,
3000 func = self.get_dbus_method("getColumnDescription")
3001 return func(*args, **kwargs)
3003 def getColumnExtentAt(self, *args, **kwargs):
3005 Get the number of columns spanned by the table cell at the specific
3006 row and column. (some tables can have cells which span multiple
3007 rows and/or columns).
3009 the specified table row, zero-indexed.
3011 the specified table column, zero-indexed.
3012 @return a long integer indicating the number of columns spanned
3013 by the specified cell.
3015 func = self.get_dbus_method("getColumnExtentAt")
3016 return func(*args, **kwargs)
3018 def getColumnHeader(self, *args, **kwargs):
3020 Get the header associated with a table column, if available,
3021 as an instance of Accessible. This differs from getColumnDescription,
3022 which returns a string.
3024 the specified table column, zero-indexed.
3025 @return an Accessible representatin of the specified table column,
3028 func = self.get_dbus_method("getColumnHeader")
3029 return func(*args, **kwargs)
3031 def getIndexAt(self, *args, **kwargs):
3033 Get the 1-D child index corresponding to the specified 2-D row
3036 the specified table row, zero-indexed.
3038 the specified table column, zero-indexed.
3039 @return a long integer which serves as the index of a specified
3040 cell in the table, in a form usable by Accessible::getChildAtIndex.
3042 func = self.get_dbus_method("getIndexAt")
3043 return func(*args, **kwargs)
3045 def getRowAtIndex(self, *args, **kwargs):
3047 Get the table row index occupied by the child at a particular
3050 the specified child index, zero-indexed.
3051 @return a long integer indicating the first row spanned by the
3052 child of a table, at the specified 1-D (zero-offset) index.
3054 func = self.get_dbus_method("getRowAtIndex")
3055 return func(*args, **kwargs)
3057 def getRowColumnExtentsAtIndex(self, *args, **kwargs):
3059 Given a child index, determine the row and column indices and
3060 extents, and whether the cell is currently selected. If the child
3061 at index is not a cell (for instance, if it is a summary, caption,
3062 etc.), False is returned.
3064 the index of the Table child whose row/column extents are requested.
3066 back-filled with the first table row associated with the cell
3067 with child index index.
3069 back-filled with the first table column associated with the cell
3070 with child index index.
3071 @param : row_extents
3072 back-filled with the number of table rows across which child
3074 @param : col_extents
3075 back-filled with the number of table columns across which child
3077 @param : is_selected
3078 a boolean which is back-filled with True if the child at index
3079 i corresponds to a selected table cell, False otherwise.
3080 Example: If the Table child at index '6' extends across columns
3081 5 and 6 of row 2 of a Table instance, and is currently selected,
3082 then retval=table::getRowColumnExtentsAtIndex(6,row,col,
3086 will return True, and after the call row, col, row_extents,
3087 col_extents, and is_selected will contain 2, 5, 1, 2, and True,
3089 @return True if the index is associated with a valid table cell,
3090 False if the index does not correspond to a cell. If False is
3091 returned, the values of the out parameters are undefined.
3093 func = self.get_dbus_method("getRowColumnExtentsAtIndex")
3094 return func(*args, **kwargs)
3096 def getRowDescription(self, *args, **kwargs):
3098 Get a text description of a particular table row. This differs
3099 from AccessibleTable_getRowHeader, which returns an Accessible.
3101 the specified table row, zero-indexed.
3102 @return a UTF-8 string describing the specified table row, if
3105 func = self.get_dbus_method("getRowDescription")
3106 return func(*args, **kwargs)
3108 def getRowExtentAt(self, *args, **kwargs):
3110 Get the number of rows spanned by the table cell at the specific
3111 row and column. (some tables can have cells which span multiple
3112 rows and/or columns).
3114 the specified table row, zero-indexed.
3116 the specified table column, zero-indexed.
3117 @return a long integer indicating the number of rows spanned
3118 by the specified cell.
3120 func = self.get_dbus_method("getRowExtentAt")
3121 return func(*args, **kwargs)
3123 def getRowHeader(self, *args, **kwargs):
3125 Get the header associated with a table row, if available. This
3126 differs from getRowDescription, which returns a string.
3128 the specified table row, zero-indexed.
3129 @return an Accessible representatin of the specified table row,
3132 func = self.get_dbus_method("getRowHeader")
3133 return func(*args, **kwargs)
3135 def getSelectedColumns(self, *args, **kwargs):
3137 Obtain the indices of all columns which are currently selected.
3138 @return a sequence of integers comprising the indices of columns
3141 func = self.get_dbus_method("getSelectedColumns")
3142 return func(*args, **kwargs)
3144 def getSelectedRows(self, *args, **kwargs):
3146 Obtain the indices of all rows which are currently selected.
3147 @return a sequence of integers comprising the indices of rows
3150 func = self.get_dbus_method("getSelectedRows")
3151 return func(*args, **kwargs)
3153 def isColumnSelected(self, *args, **kwargs):
3155 Determine whether a table column is selected.
3157 the column being queried.
3158 @return True if the specified column is currently selected, False
3161 func = self.get_dbus_method("isColumnSelected")
3162 return func(*args, **kwargs)
3164 def isRowSelected(self, *args, **kwargs):
3166 Determine whether a table row is selected.
3168 the row being queried.
3169 @return True if the specified row is currently selected, False
3172 func = self.get_dbus_method("isRowSelected")
3173 return func(*args, **kwargs)
3175 def isSelected(self, *args, **kwargs):
3177 Determine whether the cell at a specific row and column is selected.
3179 a row occupied by the cell whose state is being queried.
3181 a column occupied by the cell whose state is being queried.
3182 @return True if the specified cell is currently selected, False
3185 func = self.get_dbus_method("isSelected")
3186 return func(*args, **kwargs)
3188 def removeColumnSelection(self, *args, **kwargs):
3190 Remove the specified column from current column selection, if
3191 the table's selection model permits it.
3193 @return True if the specified column was successfully de-selected,
3196 func = self.get_dbus_method("removeColumnSelection")
3197 return func(*args, **kwargs)
3199 def removeRowSelection(self, *args, **kwargs):
3201 Remove the specified row from current row selection, if the table's
3202 selection model permits it.
3204 @return True if the specified row was successfully de-selected,
3207 func = self.get_dbus_method("removeRowSelection")
3208 return func(*args, **kwargs)
3210 def unImplemented(self, *args, **kwargs):
3211 func = self.get_dbus_method("unImplemented")
3212 return func(*args, **kwargs)
3214 def unImplemented2(self, *args, **kwargs):
3215 func = self.get_dbus_method("unImplemented2")
3216 return func(*args, **kwargs)
3218 def unImplemented3(self, *args, **kwargs):
3219 func = self.get_dbus_method("unImplemented3")
3220 return func(*args, **kwargs)
3222 def unImplemented4(self, *args, **kwargs):
3223 func = self.get_dbus_method("unImplemented4")
3224 return func(*args, **kwargs)
3226 def unImplemented5(self, *args, **kwargs):
3227 func = self.get_dbus_method("unImplemented5")
3228 return func(*args, **kwargs)
3230 def unImplemented6(self, *args, **kwargs):
3231 func = self.get_dbus_method("unImplemented6")
3232 return func(*args, **kwargs)
3234 def unImplemented7(self, *args, **kwargs):
3235 func = self.get_dbus_method("unImplemented7")
3236 return func(*args, **kwargs)
3238 def get_caption(self):
3239 self._pgetter(self._dbus_interface, "caption")
3240 def set_caption(self, value):
3241 self._psetter(self._dbus_interface, "caption", value)
3244 An Accessible which represents of a caption for a Table.
3246 caption = property(fget=get_caption, fset=set_caption, doc=_captionDoc)
3248 def get_nColumns(self):
3249 self._pgetter(self._dbus_interface, "nColumns")
3250 def set_nColumns(self, value):
3251 self._psetter(self._dbus_interface, "nColumns", value)
3254 The total number of columns in this table (including empty columns),
3255 exclusive of columns which are programmatically hidden. Columns
3256 which are scrolled out of view or clipped by the current viewport
3259 nColumns = property(fget=get_nColumns, fset=set_nColumns, doc=_nColumnsDoc)
3261 def get_nRows(self):
3262 self._pgetter(self._dbus_interface, "nRows")
3263 def set_nRows(self, value):
3264 self._psetter(self._dbus_interface, "nRows", value)
3267 The total number of rows in this table (including empty rows),
3268 exclusive of any rows which are programmatically hidden. Rows
3269 which are merely scrolled out of view are included.
3271 nRows = property(fget=get_nRows, fset=set_nRows, doc=_nRowsDoc)
3273 def get_nSelectedColumns(self):
3274 self._pgetter(self._dbus_interface, "nSelectedColumns")
3275 def set_nSelectedColumns(self, value):
3276 self._psetter(self._dbus_interface, "nSelectedColumns", value)
3277 _nSelectedColumnsDoc = \
3279 The number of columns currently selected. A selected column is
3280 one in which all included cells are selected.
3282 nSelectedColumns = property(fget=get_nSelectedColumns, fset=set_nSelectedColumns, doc=_nSelectedColumnsDoc)
3284 def get_nSelectedRows(self):
3285 self._pgetter(self._dbus_interface, "nSelectedRows")
3286 def set_nSelectedRows(self, value):
3287 self._psetter(self._dbus_interface, "nSelectedRows", value)
3288 _nSelectedRowsDoc = \
3290 The number of rows currently selected. A selected row is one
3291 in which all included cells are selected.
3293 nSelectedRows = property(fget=get_nSelectedRows, fset=set_nSelectedRows, doc=_nSelectedRowsDoc)
3295 def get_summary(self):
3296 self._pgetter(self._dbus_interface, "summary")
3297 def set_summary(self, value):
3298 self._psetter(self._dbus_interface, "summary", value)
3301 An accessible object which summarizes the contents of a Table.
3302 This object is frequently itself a Table instance, albeit a simplified
3305 summary = property(fget=get_summary, fset=set_summary, doc=_summaryDoc)
3308 class Text(BaseProxy):
3312 The text interface should be implemented by objects which place
3313 textual information onscreen as character strings or glyphs.
3314 The text interface allows access to textual content, including
3315 display attributes and semantic hints associated with runs of
3316 text, and access to bounding box information for glyphs and substrings.
3317 It also allows portions of textual content to be selected, if
3318 the object's StateSet includes STATE_SELECTABLE_TEXT.
3319 In some cases a Text object may have, as its content, an empty
3320 string. In particular this can occur in the case of Hypertext
3321 objects which do not display explicitly textual information onscreen,
3322 as Hypertext is derived from the Text interface.
3323 Typographic and semantic attributes of onscreen textual content,
3324 for instance typeface, weight, language, and such qualities as
3325 'emphasis' or 'blockquote', are represented as text attributes.
3326 Contiguous sequences of characters over which these attributes
3327 are unchanged are referred to as "attribute runs", and are available
3328 via Text::getAttributeRun. Where possible, implementing clients
3329 will report textual attributes which are the same over the entire
3330 text object, for instance those inherited from a default or document-scope
3331 style, via getDefaultAttributes instead of reporting them explicitly
3332 for each character. Therefore, for any span of text, the attributes
3333 in effect are the union of the set returned by Text::getDefaultAttributes,
3334 and the set returned at a particular character offset via Text::getAttributeRun.
3338 def addSelection(self, *args, **kwargs):
3340 The result of calling addSelection on objects which already have
3341 one selection present, and which do not include STATE_MULTISELECTABLE,
3342 is undefined, other than the return value.
3343 @return True of the selection was successfully added, False otherwise.
3344 Selection may fail if the object does not support selection of
3345 text (see STATE_SELECTABLE_TEXT), if the object does not support
3346 multiple selections and a selection is already defined, or for
3347 other reasons (for instance if the user does not have permission
3348 to copy the text into the relevant selection buffer).
3350 func = self.get_dbus_method("addSelection")
3351 return func(*args, **kwargs)
3353 def getAttributeRun(self, *args, **kwargs):
3355 Query a particular text object for the text attributes defined
3356 at a given offset, obtaining the start and end of the "attribute
3357 run" over which these attributes are currently invariant. Text
3358 attributes are those presentational, typographic, or semantic
3359 attributes or qualitites which apply to a range of text specifyable
3360 by starting and ending offsets. Attributes relevant to localization
3361 should be provided in accordance with the w3c "Internationalization
3362 and Localization Markup Requirements", http://www.w3.org/TR/2005/WD-itsreq-20051122/
3363 Other text attributes should choose their names and value semantics
3364 in accordance with relevant standards such as CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512),
3365 XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and
3366 WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/). Those attributes
3367 from the aforementioned specifications and recommendations which
3368 do not concern typographic, presentational, or semantic aspects
3369 of text should be exposed via the more general Accessible::getAttributes()
3371 For example, CSS attributes which should be exposed on text (either
3372 as default attributes, or as explicitly-set attributes when non-default
3373 values are specified in the content view) include the Font attributes
3374 (i.e. "css2:font-weight", "css2:font-style"), the "css2:color"
3375 and "css2:background-color" attributes, and "css2:text-decoration"
3377 If includeDefaults is TRUE, then this AttributeSet should include
3378 the default attributes as well as those which are explicitly
3379 assigned to the attribute run in question. startOffset and endOffset
3380 will be back-filled to indicate the start and end of the attribute
3381 run which contains 'offset' - an attribute run is a contiguous
3382 section of text whose attributes are homogeneous.
3384 the offset of the character whose attributes will be reported.
3385 @param : startOffset
3386 backfilled with the starting offset of the character range over
3387 which all text attributes match those of offset, i.e. the start
3388 of the homogeneous attribute run including offset.
3390 backfilled with the offset of the first character past the character
3391 range over which all text attributes match those of offset, i.e.
3392 the character immediately after the homogeneous attribute run
3394 @param : includeDefaults
3395 if False, the call should only return those attributes which
3396 are explicitly set on the current attribute run, omitting any
3397 attributes which are inherited from the default values. See also
3398 Text::getDefaultAttributes.
3399 @return the AttributeSet defined at offset, optionally including
3400 the 'default' attributes.
3402 func = self.get_dbus_method("getAttributeRun")
3403 return func(*args, **kwargs)
3405 def getAttributeValue(self, *args, **kwargs):
3407 Get the string value of a named attribute at a given offset,
3410 the offset of the character for which the attribute run is to
3412 @param : attributeName
3413 the name of the attribute for which the value is to be returned,
3415 @param : startOffset
3416 back-filled with the offset of the first character in the attribute
3417 run containing the character at offset.
3419 back-filled with the offset of the first character past the end
3420 of the attribute run containing the character at offset.
3422 back-filled with True if the attributeName has a defined value
3423 at offset, False otherwise.
3424 @return the value of attribute (name-value pair) corresponding
3425 to "name", if defined.
3427 func = self.get_dbus_method("getAttributeValue")
3428 return func(*args, **kwargs)
3430 def getAttributes(self, *args, **kwargs):
3432 getAttributes is deprecated in favor of getAttributeRun.
3433 @return the attributes at offset, as a semicolon-delimited set
3434 of colon-delimited name-value pairs.
3436 func = self.get_dbus_method("getAttributes")
3437 return func(*args, **kwargs)
3439 def getBoundedRanges(self, *args, **kwargs):
3441 Return the text content within a bounding box, as a list of Range
3442 structures. Depending on the TEXT_CLIP_TYPE parameters, glyphs
3443 which are clipped by the bounding box (i.e. which lie partially
3444 inside and partially outside it) may or may not be included in
3445 the ranges returned.
3447 the minimum x ( i.e. leftmost) coordinate of the bounding box.
3449 the minimum y coordinate of the bounding box.
3451 the horizontal size of the bounding box. The rightmost bound
3452 of the bounding box is (x + width);
3454 the vertical size of the bounding box. The maximum y value of
3455 the bounding box is (y + height);
3457 If 0, the above coordinates are interpreted as pixels relative
3458 to corner of the screen; if 1, the coordinates are interpreted
3459 as pixels relative to the corner of the containing toplevel window.
3461 determines whether text which intersects the bounding box in
3462 the x direction is included.
3464 determines whether text which intersects the bounding box in
3465 the y direction is included.
3467 func = self.get_dbus_method("getBoundedRanges")
3468 return func(*args, **kwargs)
3470 def getCharacterAtOffset(self, *args, **kwargs):
3472 @return an unsigned long integer whose value corresponds to the
3473 UCS-4 representation of the character at the specified text offset,
3474 or 0 if offset is out of range.
3476 func = self.get_dbus_method("getCharacterAtOffset")
3477 return func(*args, **kwargs)
3479 def getCharacterExtents(self, *args, **kwargs):
3481 Obtain a the bounding box, as x, y, width, and height, of the
3482 character or glyph at a particular character offset in this object's
3483 text content. The coordinate system in which the results are
3484 reported is specified by coordType. If an onscreen glyph corresponds
3485 to multiple character offsets, for instance if the glyph is a
3486 ligature, the bounding box reported will include the entire glyph
3487 and therefore may apply to more than one character offset.
3489 the character offset of the character or glyph being queried.
3491 the minimum horizontal coordinate of the bounding box of the
3492 glyph representing the character at offset.
3494 the minimum vertical coordinate of the bounding box of the glyph
3495 representing the character at offset.
3497 the horizontal extent of the bounding box of the glyph representing
3498 the character at offset.
3500 the vertical extent of the bounding box of the glyph representing
3501 the character at offset.
3503 If 0, the results will be reported in screen coordinates, i.e.
3504 in pixels relative to the upper-left corner of the screen, with
3505 the x axis pointing right and the y axis pointing down. If 1,
3506 the results will be reported relative to the containing toplevel
3507 window, with the x axis pointing right and the y axis pointing
3510 func = self.get_dbus_method("getCharacterExtents")
3511 return func(*args, **kwargs)
3513 def getDefaultAttributeSet(self, *args, **kwargs):
3515 Return an AttributeSet containing the text attributes which apply
3516 to all text in the object by virtue of the default settings of
3517 the document, view, or user agent; e.g. those attributes which
3518 are implied rather than explicitly applied to the text object.
3519 For instance, an object whose entire text content has been explicitly
3520 marked as 'bold' will report the 'bold' attribute via getAttributeRun(),
3521 whereas an object whose text weight is inspecified may report
3522 the default or implied text weight in the default AttributeSet.
3524 func = self.get_dbus_method("getDefaultAttributeSet")
3525 return func(*args, **kwargs)
3527 def getDefaultAttributes(self, *args, **kwargs):
3529 Deprecated in favor of getDefaultAttributeSet.
3530 @return the attributes which apply to the entire text content,
3531 but which were not explicitly specified by the content creator.
3533 func = self.get_dbus_method("getDefaultAttributes")
3534 return func(*args, **kwargs)
3536 def getNSelections(self, *args, **kwargs):
3538 Obtain the number of separate, contiguous selections in the current
3539 Text object. Text objects which do not implement selection of
3540 discontiguous text regions will always return '0' or '1'. Note
3541 that "contiguous" is defined by continuity of the offsets, i.e.
3542 a text 'selection' is defined by a start/end offset pair. In
3543 the case of bidirectional text, this means that a continguous
3544 selection may appear visually discontiguous, and vice-versa.
3545 @return the number of contiguous selections in the current Text
3548 func = self.get_dbus_method("getNSelections")
3549 return func(*args, **kwargs)
3551 def getOffsetAtPoint(self, *args, **kwargs):
3553 Get the offset of the character at a given onscreen coordinate.
3554 The coordinate system used to interpret x and y is determined
3555 by parameter coordType.
3559 if 0, the input coordinates are interpreted relative to the entire
3560 screen, if 1, they are relative to the toplevel window containing
3562 @return the text offset (as an offset into the character array)
3563 of the glyph whose onscreen bounds contain the point x,y, or
3564 -1 if the point is outside the bounds of any glyph.
3566 func = self.get_dbus_method("getOffsetAtPoint")
3567 return func(*args, **kwargs)
3569 def getRangeExtents(self, *args, **kwargs):
3571 Obtain the bounding box which entirely contains a given text
3572 range. Negative values may be returned for the bounding box parameters
3573 in the event that all or part of the text range is offscreen
3574 or not mapped to the screen.
3575 @param : startOffset
3576 the offset of the first character in the specified range.
3578 the offset of the character immediately after the last character
3579 in the specified range.
3581 an integer parameter which is back-filled with the minimum horizontal
3582 coordinate of the resulting bounding box.
3584 an integer parameter which is back-filled with the minimum vertical
3585 coordinate of the resulting bounding box.
3587 an integer parameter which is back-filled with the horizontal
3588 extent of the bounding box.
3590 an integer parameter which is back-filled with the vertical extent
3591 of the bounding box.
3593 If 0, the above coordinates are reported in pixels relative to
3594 corner of the screen; if 1, the coordinates are reported relative
3595 to the corner of the containing toplevel window.
3597 func = self.get_dbus_method("getRangeExtents")
3598 return func(*args, **kwargs)
3600 def getSelection(self, *args, **kwargs):
3602 The result of calling getSelection with an out-of-range selectionNum
3603 (i.e. for a selection which does not exist) is not strictly defined,
3604 but should set endOffset equal to startOffset.
3606 func = self.get_dbus_method("getSelection")
3607 return func(*args, **kwargs)
3609 def getText(self, *args, **kwargs):
3611 Obtain all or part of the onscreen textual content of a Text
3612 object. If endOffset is specified as "-1", then this method will
3613 return the entire onscreen textual contents of the Text object.
3614 @return the textual content of the current Text object beginning
3615 startOffset (inclusive) up to but not including the character
3618 func = self.get_dbus_method("getText")
3619 return func(*args, **kwargs)
3621 def getTextAfterOffset(self, *args, **kwargs):
3623 Obtain a subset of the text content of an object which entirely
3624 follows offset, delimited by character, word, line, or sentence
3625 boundaries as specified by type. The starting and ending offsets
3626 of the resulting substring are returned in startOffset and endOffset.
3627 By definition, if such a substring exists, startOffset must be
3628 greater than offset.
3630 the offset from which the substring search begins, and which
3631 must lie before the returned substring.
3633 the text-boundary delimiter which determines whether the returned
3634 text constitures a character, word, line, or sentence (and possibly
3635 attendant whitespace), and whether the start or ending of such
3636 a substring forms the boundary condition.
3637 @param : startOffset
3638 back-filled with the starting offset of the resulting substring,
3641 back-filled with the offset of the character immediately following
3642 the resulting substring, if one exists.
3643 @return a string which is a substring of the text content of
3644 the object, delimited by the specified boundary condition.
3646 func = self.get_dbus_method("getTextAfterOffset")
3647 return func(*args, **kwargs)
3649 def getTextAtOffset(self, *args, **kwargs):
3651 Obtain a subset of the text content of an object which includes
3652 the specified offset, delimited by character, word, line, or
3653 sentence boundaries as specified by type. The starting and ending
3654 offsets of the resulting substring are returned in startOffset
3657 the offset from which the substring search begins, and which
3658 must lie within the returned substring.
3660 the text-boundary delimiter which determines whether the returned
3661 text constitures a character, word, line, or sentence (and possibly
3662 attendant whitespace), and whether the start or ending of such
3663 a substring forms the boundary condition.
3664 @param : startOffset
3665 back-filled with the starting offset of the resulting substring,
3668 back-filled with the offset of the character immediately following
3669 the resulting substring, if one exists.
3670 @return a string which is a substring of the text content of
3671 the object, delimited by the specified boundary condition.
3673 func = self.get_dbus_method("getTextAtOffset")
3674 return func(*args, **kwargs)
3676 def getTextBeforeOffset(self, *args, **kwargs):
3678 Obtain a subset of the text content of an object which entirely
3679 precedes offset, delimited by character, word, line, or sentence
3680 boundaries as specified by type. The starting and ending offsets
3681 of the resulting substring are returned in startOffset and endOffset.
3682 By definition, if such a substring exists, endOffset is less
3683 than or equal to offset.
3685 the offset from which the substring search begins.
3687 the text-boundary delimiter which determines whether the returned
3688 text constitures a character, word, line, or sentence (and possibly
3689 attendant whitespace), and whether the start or ending of such
3690 a substring forms the boundary condition.
3691 @param : startOffset
3692 back-filled with the starting offset of the resulting substring,
3695 back-filled with the offset of the character immediately following
3696 the resulting substring, if one exists.
3697 @return a string which is a substring of the text content of
3698 the object, delimited by the specified boundary condition.
3700 func = self.get_dbus_method("getTextBeforeOffset")
3701 return func(*args, **kwargs)
3703 def removeSelection(self, *args, **kwargs):
3705 Deselect the text contained in the specified selectionNum, if
3706 such a selection exists, otherwise do nothing. Removal of a non-existant
3707 selectionNum has no effect.
3708 @return True if the selection was successfully removed, False
3711 func = self.get_dbus_method("removeSelection")
3712 return func(*args, **kwargs)
3714 def setCaretOffset(self, *args, **kwargs):
3716 Programmatically move the text caret (visible or virtual, as
3717 above) to a given position.
3719 a long int indicating the desired character offset. Not all implementations
3720 of Text will honor setCaretOffset requests, so the return value
3721 below should be checked by the client.
3722 @return TRUE if the request was carried out, or FALSE if the
3723 caret could not be moved to the requested position.
3725 func = self.get_dbus_method("setCaretOffset")
3726 return func(*args, **kwargs)
3728 def setSelection(self, *args, **kwargs):
3730 Modify an existing selection's start or ending offset.
3731 Calling setSelection for a selectionNum that is not already defined
3732 has no effect. The result of calling setSelection with a selectionNum
3733 greater than 0 for objects that do not include STATE_MULTISELECTABLE
3735 @param : selectionNum
3736 indicates which of a set of non-contiguous selections to modify.
3737 @param : startOffset
3738 the new starting offset for the selection
3740 the new ending offset for the selection
3741 @return True if the selection corresponding to selectionNum is
3742 successfully modified, False otherwise.
3744 func = self.get_dbus_method("setSelection")
3745 return func(*args, **kwargs)
3747 def unImplemented(self, *args, **kwargs):
3748 func = self.get_dbus_method("unImplemented")
3749 return func(*args, **kwargs)
3751 def unImplemented2(self, *args, **kwargs):
3752 func = self.get_dbus_method("unImplemented2")
3753 return func(*args, **kwargs)
3755 def get_caretOffset(self):
3756 self._pgetter(self._dbus_interface, "caretOffset")
3757 def set_caretOffset(self, value):
3758 self._psetter(self._dbus_interface, "caretOffset", value)
3761 The current offset of the text caret in the Text object. This
3762 caret may be virtual, e.g. non-visual and notional-only, but
3763 if an onscreen representation of the caret position is visible,
3764 it will correspond to this offset. The caret offset is given
3765 as a character offset, as opposed to a byte offset into a text
3766 buffer or a column offset.
3768 caretOffset = property(fget=get_caretOffset, fset=set_caretOffset, doc=_caretOffsetDoc)
3770 def get_characterCount(self):
3771 self._pgetter(self._dbus_interface, "characterCount")
3772 def set_characterCount(self, value):
3773 self._psetter(self._dbus_interface, "characterCount", value)
3774 _characterCountDoc = \
3776 The total current number of characters in the Text object, including
3777 whitespace and non-spacing characters.
3779 characterCount = property(fget=get_characterCount, fset=set_characterCount, doc=_characterCountDoc)
3782 def __new__(cls, startOffset, endOffset, content, data):
3783 list.__new__(cls, (startOffset, endOffset, content, data)
3784 def __init__(self, startOffset, endOffset, content, data):
3785 list.__init__(self, (startOffset, endOffset, content, data))
3787 startOffset = property(fget=_get_startOffset, fset=_set_startOffset)
3788 def _get_startOffset(self):
3790 def _set_startOffset(self, val):
3792 endOffset = property(fget=_get_endOffset, fset=_set_endOffset)
3793 def _get_endOffset(self):
3795 def _set_endOffset(self, val):
3797 content = property(fget=_get_content, fset=_set_content)
3798 def _get_content(self):
3800 def _set_content(self, val):
3802 data = property(fget=_get_data, fset=_set_data)
3803 def _get_data(self):
3805 def _set_data(self, val):
3809 class Value(BaseProxy):
3813 An interface supporting controls which allow a one-dimensional,
3814 scalar quantity to be modified or which reflect a scalar quantity.
3815 (If STATE_EDITABLE is not present, the valuator is treated as
3820 def unImplemented(self, *args, **kwargs):
3821 func = self.get_dbus_method("unImplemented")
3822 return func(*args, **kwargs)
3824 def unImplemented2(self, *args, **kwargs):
3825 func = self.get_dbus_method("unImplemented2")
3826 return func(*args, **kwargs)
3828 def unImplemented3(self, *args, **kwargs):
3829 func = self.get_dbus_method("unImplemented3")
3830 return func(*args, **kwargs)
3832 def unImplemented4(self, *args, **kwargs):
3833 func = self.get_dbus_method("unImplemented4")
3834 return func(*args, **kwargs)
3836 def get_currentValue(self):
3837 self._pgetter(self._dbus_interface, "currentValue")
3838 def set_currentValue(self, value):
3839 self._psetter(self._dbus_interface, "currentValue", value)
3840 _currentValueDoc = \
3842 The current value of the valuator.
3844 currentValue = property(fget=get_currentValue, fset=set_currentValue, doc=_currentValueDoc)
3846 def get_maximumValue(self):
3847 self._pgetter(self._dbus_interface, "maximumValue")
3848 def set_maximumValue(self, value):
3849 self._psetter(self._dbus_interface, "maximumValue", value)
3850 _maximumValueDoc = \
3852 The maximum value allowed by this valuator.
3854 maximumValue = property(fget=get_maximumValue, fset=set_maximumValue, doc=_maximumValueDoc)
3856 def get_minimumIncrement(self):
3857 self._pgetter(self._dbus_interface, "minimumIncrement")
3858 def set_minimumIncrement(self, value):
3859 self._psetter(self._dbus_interface, "minimumIncrement", value)
3860 _minimumIncrementDoc = \
3862 The smallest incremental change which this valuator allows. If
3863 0, the incremental changes to the valuator are limited only by
3864 the precision of a double precision value on the platform.
3866 minimumIncrement = property(fget=get_minimumIncrement, fset=set_minimumIncrement, doc=_minimumIncrementDoc)
3868 def get_minimumValue(self):
3869 self._pgetter(self._dbus_interface, "minimumValue")
3870 def set_minimumValue(self, value):
3871 self._psetter(self._dbus_interface, "minimumValue", value)
3872 _minimumValueDoc = \
3874 The minimum value allowed by this valuator.
3876 minimumValue = property(fget=get_minimumValue, fset=set_minimumValue, doc=_minimumValueDoc)