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.
16 from accessible import *
18 class Action(BaseProxy):
22 An interface through which a user-actionable user interface component
23 can be manipulated. Components which react to mouse or keyboard
24 input from the user, (with the exception of pure text entry fields
25 with no other function), should implement this interface. Typical
26 actions include "click", "press", "release" (for instance for
27 buttons), "menu" (for objects which have context menus invokable
28 from mouse or keyboard), "open" for icons representing files
33 def doAction(self, *args, **kwargs):
37 the 0-based index of the action to perform.
38 Causes the object to perform the specified action.
39 @return : a boolean indicating success or failure.
41 func = self.get_dbus_method("doAction")
42 return func(*args, **kwargs)
44 def getDescription(self, *args, **kwargs):
48 the index of the action for which a description is desired.
49 Get the description of the specified action. The description
50 of an action may provide information about the result of action
51 invocation, unlike the action name.
52 @return : a string containing the description of the specified
55 func = self.get_dbus_method("getDescription")
56 return func(*args, **kwargs)
58 def getKeyBinding(self, *args, **kwargs):
62 the 0-based index of the action for which a key binding is requested.
63 Get the key binding associated with a specific action.
64 @return : a string containing the key binding for the specified
65 action, or an empty string ("") if none exists.
67 func = self.get_dbus_method("getKeyBinding")
68 return func(*args, **kwargs)
70 def getName(self, *args, **kwargs):
74 the index of the action whose name is requested.
75 Get the name of the specified action. Action names generally
76 describe the user action, i.e. "click" or "press", rather then
77 the result of invoking the action.
78 @return : a string containing the name of the specified action.
80 func = self.get_dbus_method("getName")
81 return func(*args, **kwargs)
83 def unImplemented(self, *args, **kwargs):
84 func = self.get_dbus_method("unImplemented")
85 return func(*args, **kwargs)
87 def unImplemented2(self, *args, **kwargs):
88 func = self.get_dbus_method("unImplemented2")
89 return func(*args, **kwargs)
91 def unImplemented3(self, *args, **kwargs):
92 func = self.get_dbus_method("unImplemented3")
93 return func(*args, **kwargs)
95 def unImplemented4(self, *args, **kwargs):
96 func = self.get_dbus_method("unImplemented4")
97 return func(*args, **kwargs)
99 def get_nActions(self):
100 self._pgetter(self._dbus_interface, "nActions")
101 def set_nActions(self, value):
102 self._psetter(self._dbus_interface, "nActions", value)
105 nActions: a long containing the number of actions this object
108 nActions = property(fget=get_nActions, fset=set_nActions, doc=_nActionsDoc)
111 class Application(Accessible):
115 An interface identifying an object which is the root of the user
116 interface Accessible hierarchy associated with a running application.
117 Children of Application are typically, but not exclusively, top-level
122 def getLocale(self, *args, **kwargs):
124 Gets the locale in which the application is currently operating.
125 For the current message locale, use lctype LOCALE_TYPE_MESSAGES.
127 The LocaleType for which the locale is queried.
128 @return a string compliant with the POSIX standard for locale
131 func = self.get_dbus_method("getLocale")
132 return func(*args, **kwargs)
134 def pause(self, *args, **kwargs):
136 Request that the application temporarily stop sending events.
137 In most cases this should pause the application's main event
139 @return : true if the request succeeded, false otherwise.
141 func = self.get_dbus_method("pause")
142 return func(*args, **kwargs)
144 def registerObjectEventListener(self, *args, **kwargs):
146 registerObjectEventListener:
148 an EventListener object which will receive the requested events
150 a UTF-8 string indicating the type of (toolkit-specific) event
151 being requested. Register with this application toolkit for "Accessibility::Accessible"
154 func = self.get_dbus_method("registerObjectEventListener")
155 return func(*args, **kwargs)
157 def registerToolkitEventListener(self, *args, **kwargs):
160 an EventListener object which will receive the requested events
161 from the application's toolkits via toolit 'bridges'
163 a UTF-8 string indicating the type of (toolkit-specific) event
164 being requested. Not all applications can generate toolkit events
166 Register with this application's toolkit for "toolkit-specific"
169 func = self.get_dbus_method("registerToolkitEventListener")
170 return func(*args, **kwargs)
172 def resume(self, *args, **kwargs):
174 Request that the application resume sending events.
175 @return : True if the request succeeded, False otherwise.
177 func = self.get_dbus_method("resume")
178 return func(*args, **kwargs)
180 def unImplemented2_(self, *args, **kwargs):
181 func = self.get_dbus_method("unImplemented2_")
182 return func(*args, **kwargs)
184 def unImplemented3_(self, *args, **kwargs):
185 func = self.get_dbus_method("unImplemented3_")
186 return func(*args, **kwargs)
188 def unImplemented_(self, *args, **kwargs):
189 func = self.get_dbus_method("unImplemented_")
190 return func(*args, **kwargs)
193 self._pgetter(self._dbus_interface, "id")
194 def set_id(self, value):
195 self._psetter(self._dbus_interface, "id", value)
198 The application instance's unique ID as assigned by the registry.
200 id = property(fget=get_id, fset=set_id, doc=_idDoc)
202 def get_toolkitName(self):
203 self._pgetter(self._dbus_interface, "toolkitName")
204 def set_toolkitName(self, value):
205 self._psetter(self._dbus_interface, "toolkitName", value)
208 A string indicating the type of user interface toolkit which
209 is used by the application.
211 toolkitName = property(fget=get_toolkitName, fset=set_toolkitName, doc=_toolkitNameDoc)
213 def get_version(self):
214 self._pgetter(self._dbus_interface, "version")
215 def set_version(self, value):
216 self._psetter(self._dbus_interface, "version", value)
219 A string indicating the version number of the application's accessibility
220 bridge implementation.
222 version = property(fget=get_version, fset=set_version, doc=_versionDoc)
225 class BoundingBox(list):
226 def __new__(cls, x, y, width, height):
227 list.__new__(cls, (x, y, width, height))
228 def __init__(self, x, y, width, height):
229 list.__init__(self, (x, y, width, height))
233 def _set_x(self, val):
235 x = property(fget=_get_x, fset=_set_x)
238 def _set_y(self, val):
240 y = property(fget=_get_y, fset=_set_y)
241 def _get_width(self):
243 def _set_width(self, val):
245 width = property(fget=_get_width, fset=_set_width)
246 def _get_height(self):
248 def _set_height(self, val):
250 height = property(fget=_get_height, fset=_set_height)
253 class Collection(BaseProxy):
255 def createMatchRule(self, *args, **kwargs):
256 func = self.get_dbus_method("createMatchRule")
257 return func(*args, **kwargs)
259 def freeMatchRule(self, *args, **kwargs):
260 func = self.get_dbus_method("freeMatchRule")
261 return func(*args, **kwargs)
263 def getActiveDescendant(self, *args, **kwargs):
264 func = self.get_dbus_method("getActiveDescendant")
265 return func(*args, **kwargs)
267 def getMatches(self, *args, **kwargs):
268 func = self.get_dbus_method("getMatches")
269 return func(*args, **kwargs)
271 def getMatchesFrom(self, *args, **kwargs):
272 func = self.get_dbus_method("getMatchesFrom")
273 return func(*args, **kwargs)
275 def getMatchesTo(self, *args, **kwargs):
276 func = self.get_dbus_method("getMatchesTo")
277 return func(*args, **kwargs)
279 def isAncestorOf(self, *args, **kwargs):
280 func = self.get_dbus_method("isAncestorOf")
281 return func(*args, **kwargs)
283 def unImplemented(self, *args, **kwargs):
284 func = self.get_dbus_method("unImplemented")
285 return func(*args, **kwargs)
287 def unImplemented2(self, *args, **kwargs):
288 func = self.get_dbus_method("unImplemented2")
289 return func(*args, **kwargs)
291 def unImplemented3(self, *args, **kwargs):
292 func = self.get_dbus_method("unImplemented3")
293 return func(*args, **kwargs)
295 def unImplemented4(self, *args, **kwargs):
296 func = self.get_dbus_method("unImplemented4")
297 return func(*args, **kwargs)
299 class MatchType(Enum):
306 5:'MATCH_LAST_DEFINED',
309 MATCH_ALL = MatchType(1)
311 MATCH_ANY = MatchType(2)
313 MATCH_EMPTY = MatchType(4)
315 MATCH_INVALID = MatchType(0)
317 MATCH_LAST_DEFINED = MatchType(5)
319 MATCH_NONE = MatchType(3)
321 class SortOrder(Enum):
323 0:'SORT_ORDER_INVALID',
324 1:'SORT_ORDER_CANONICAL',
327 4:'SORT_ORDER_REVERSE_CANONICAL',
328 5:'SORT_ORDER_REVERSE_FLOW',
329 6:'SORT_ORDER_REVERSE_TAB',
330 7:'SORT_ORDER_LAST_DEFINED',
333 SORT_ORDER_CANONICAL = SortOrder(1)
335 SORT_ORDER_FLOW = SortOrder(2)
337 SORT_ORDER_INVALID = SortOrder(0)
339 SORT_ORDER_LAST_DEFINED = SortOrder(7)
341 SORT_ORDER_REVERSE_CANONICAL = SortOrder(4)
343 SORT_ORDER_REVERSE_FLOW = SortOrder(5)
345 SORT_ORDER_REVERSE_TAB = SortOrder(6)
347 SORT_ORDER_TAB = SortOrder(3)
349 class TreeTraversalType(Enum):
351 0:'TREE_RESTRICT_CHILDREN',
352 1:'TREE_RESTRICT_SIBLING',
354 3:'TREE_LAST_DEFINED',
357 TREE_INORDER = TreeTraversalType(2)
359 TREE_LAST_DEFINED = TreeTraversalType(3)
361 TREE_RESTRICT_CHILDREN = TreeTraversalType(0)
363 TREE_RESTRICT_SIBLING = TreeTraversalType(1)
366 def __new__(cls, name, id):
367 list.__new__(cls, (name, id))
368 def __init__(self, name, id):
369 list.__init__(self, (name, id))
373 def _set_name(self, val):
375 name = property(fget=_get_name, fset=_set_name)
378 def _set_id(self, val):
380 id = property(fget=_get_id, fset=_set_id)
382 class CommandListener(BaseProxy):
384 An interface which should be implemented by assistive technologies
385 or other clients of the Selector interface, over which notifications
386 to the list of available commands is made. The notifyCommands()
387 method of the client is then called by the Selector instance.
391 def notifyCommands(self, *args, **kwargs):
393 Notify the CommandListener instance of changes to the currently
394 available commands, by sending the current CommandList.
396 The newly-available list of Command objects which may be invoked
399 func = self.get_dbus_method("notifyCommands")
400 return func(*args, **kwargs)
403 class Component(BaseProxy):
407 The Component interface is implemented by objects which occupy
408 on-screen space, e.g. objects which have onscreen visual representations.
409 The methods in Component allow clients to identify where the
410 objects lie in the onscreen coordinate system, their relative
411 size, stacking order, and position. It also provides a mechanism
412 whereby keyboard focus may be transferred to specific user interface
413 elements programmatically. This is a 2D API, coordinates of 3D
414 objects are projected into the 2-dimensional screen view for
415 purposes of this interface.
419 def contains(self, *args, **kwargs):
421 @return True if the specified point lies within the Component's
422 bounding box, False otherwise.
424 func = self.get_dbus_method("contains")
425 return func(*args, **kwargs)
427 def deregisterFocusHandler(self, *args, **kwargs):
429 Request that an EventListener registered via registerFocusHandler
430 no longer be notified when this object receives keyboard focus.
432 func = self.get_dbus_method("deregisterFocusHandler")
433 return func(*args, **kwargs)
435 def getAccessibleAtPoint(self, *args, **kwargs):
437 @return the Accessible child whose bounding box contains the
440 func = self.get_dbus_method("getAccessibleAtPoint")
441 return func(*args, **kwargs)
443 def getAlpha(self, *args, **kwargs):
445 Obtain the alpha value of the component. An alpha value of 1.0
446 or greater indicates that the object is fully opaque, and an
447 alpha value of 0.0 indicates that the object is fully transparent.
448 Negative alpha values have no defined meaning at this time.
450 func = self.get_dbus_method("getAlpha")
451 return func(*args, **kwargs)
453 def getExtents(self, *args, **kwargs):
455 Obtain the Component's bounding box, in pixels, relative to the
456 specified coordinate system.
457 @return a BoundingBox which entirely contains the object's onscreen
458 visual representation.
460 func = self.get_dbus_method("getExtents")
461 return func(*args, **kwargs)
463 def getLayer(self, *args, **kwargs):
465 @return the ComponentLayer in which this object resides.
467 func = self.get_dbus_method("getLayer")
468 return func(*args, **kwargs)
470 def getMDIZOrder(self, *args, **kwargs):
472 Obtain the relative stacking order (i.e. 'Z' order) of an object.
473 Larger values indicate that an object is on "top" of the stack,
474 therefore objects with smaller MDIZOrder may be obscured by objects
475 with a larger MDIZOrder, but not vice-versa.
476 @return an integer indicating the object's place in the stacking
479 func = self.get_dbus_method("getMDIZOrder")
480 return func(*args, **kwargs)
482 def getPosition(self, *args, **kwargs):
484 Obtain the position of the current component in the coordinate
485 system specified by coord_type.
488 an out parameter which will be back-filled with the returned
491 an out parameter which will be back-filled with the returned
494 func = self.get_dbus_method("getPosition")
495 return func(*args, **kwargs)
497 def getSize(self, *args, **kwargs):
499 Obtain the size, in the coordinate system specified by coord_type,
500 of the rectangular area which fully contains the object's visual
501 representation, without accounting for viewport clipping.
503 the object's horizontal extents in the specified coordinate system.
505 the object's vertical extents in the specified coordinate system.
507 func = self.get_dbus_method("getSize")
508 return func(*args, **kwargs)
510 def grabFocus(self, *args, **kwargs):
512 Request that the object obtain keyboard focus.
513 @return True if keyboard focus was successfully transferred to
516 func = self.get_dbus_method("grabFocus")
517 return func(*args, **kwargs)
519 def registerFocusHandler(self, *args, **kwargs):
521 Register an EventListener for notification when this object receives
524 func = self.get_dbus_method("registerFocusHandler")
525 return func(*args, **kwargs)
527 def unImplemented(self, *args, **kwargs):
528 func = self.get_dbus_method("unImplemented")
529 return func(*args, **kwargs)
531 def unImplemented2(self, *args, **kwargs):
532 func = self.get_dbus_method("unImplemented2")
533 return func(*args, **kwargs)
535 def unImplemented3(self, *args, **kwargs):
536 func = self.get_dbus_method("unImplemented3")
537 return func(*args, **kwargs)
540 class ComponentLayer(Enum):
543 1:'LAYER_BACKGROUND',
550 8:'LAYER_LAST_DEFINED',
554 class ContentStream(BaseProxy):
556 An interface by which the requested data from a StreamableContent
557 object may be read by the client.
560 def close(self, *args, **kwargs):
562 close the stream and release associated resources. A client should
563 not perform further operations on a StreamableContent::Stream
564 object after closing it.
566 func = self.get_dbus_method("close")
567 return func(*args, **kwargs)
569 def read(self, *args, **kwargs):
571 Request/read a specified amount of data from a Stream.
572 @return the number of bytes actually read into the client buffer.
574 func = self.get_dbus_method("read")
575 return func(*args, **kwargs)
577 def seek(self, *args, **kwargs):
579 Seek to a specified position in the Stream.
581 an offset specifying the requested position in the stream, relative
582 to the SeekType specified in whence.
584 a SeekType specifying the reference point from which the seek
585 offset is calculated. Some forms of seek are not supported by
586 certain implementations of Stream, in which case a NotSupported
587 exception will be raised.
588 @return the actual resulting offset, if no exception was raised.
590 func = self.get_dbus_method("seek")
591 return func(*args, **kwargs)
593 def unimplemented(self, *args, **kwargs):
597 func = self.get_dbus_method("unimplemented")
598 return func(*args, **kwargs)
600 def unimplemented2(self, *args, **kwargs):
601 func = self.get_dbus_method("unimplemented2")
602 return func(*args, **kwargs)
604 class IOError(Exception):
607 class NoPermission(Exception):
610 class NotSupported(Exception):
613 class SeekType(Enum):
615 Specifies the meaning of a seek 'offset'. Not all SeekTypes are
616 supported by all StreamableContent data sources, for instance
617 some streams may not support seeking from the beginning or other
618 types of 'backwards' seeks.
626 SEEK_CURRENT = SeekType(1)
628 SEEK_END = SeekType(2)
630 SEEK_SET = SeekType(0)
632 class DeviceEvent(list):
633 def __new__(cls, type, id, hw_code, modifiers, timestamp, event_string, is_text):
634 list.__new__(cls, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
635 def __init__(self, type, id, hw_code, modifiers, timestamp, event_string, is_text):
636 list.__init__(self, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
640 def _set_type(self, val):
642 type = property(fget=_get_type, fset=_set_type)
645 def _set_id(self, val):
647 id = property(fget=_get_id, fset=_set_id)
648 def _get_hw_code(self):
650 def _set_hw_code(self, val):
652 hw_code = property(fget=_get_hw_code, fset=_set_hw_code)
653 def _get_modifiers(self):
655 def _set_modifiers(self, val):
657 modifiers = property(fget=_get_modifiers, fset=_set_modifiers)
658 def _get_timestamp(self):
660 def _set_timestamp(self, val):
662 timestamp = property(fget=_get_timestamp, fset=_set_timestamp)
663 def _get_event_string(self):
665 def _set_event_string(self, val):
667 event_string = property(fget=_get_event_string, fset=_set_event_string)
668 def _get_is_text(self):
670 def _set_is_text(self, val):
672 is_text = property(fget=_get_is_text, fset=_set_is_text)
674 class DeviceEventController(BaseProxy):
676 The interface via which clients request notification of device
677 events, and through which device events may be simulated.
680 def deregisterDeviceEventListener(self, *args, **kwargs):
682 De-register a previously registered keyboard eventlistener.
684 a DeviceEventListener which will intercept events.
686 an EventTypeSeq indicating which event types to stop listening
689 func = self.get_dbus_method("deregisterDeviceEventListener")
690 return func(*args, **kwargs)
692 def deregisterKeystrokeListener(self, *args, **kwargs):
694 De-register a previously registered keyboard eventlistener.
696 a DeviceEventListener which will intercept key events.
698 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
700 a ControllerEventMask filtering the intercepted key events.
702 an EventType mask that may created by ORing event types together.
704 func = self.get_dbus_method("deregisterKeystrokeListener")
705 return func(*args, **kwargs)
707 def generateKeyboardEvent(self, *args, **kwargs):
709 Synthesize a keyboard event.
711 a long integer indicating the keycode of the keypress to be synthesized.
713 an optional UTF-8 string indicating a complex keyboard input
716 a KeySynthType indicating the type of event(s) to be synthesized:
717 a key press, release, press-release pair, or a complex input
718 string (for instance from an internationalized or complex text
719 input method, or a composed character).
721 func = self.get_dbus_method("generateKeyboardEvent")
722 return func(*args, **kwargs)
724 def generateMouseEvent(self, *args, **kwargs):
726 Synthesize a mouse event.
728 a long integer indicating the screen x coord for the mouse event.
730 a long integer indicating the screen y coord for the mouse event.
732 a string indicating the type of mouse event, e.g. "button1up"
734 func = self.get_dbus_method("generateMouseEvent")
735 return func(*args, **kwargs)
737 def notifyListenersAsync(self, *args, **kwargs):
739 Notify the Registry instance that a device event has taken place
740 in an asynchronous manner. This is the method used by accessibility
741 bridges to forward "toolkit dependent" device events to the Registry
742 from the application's process space. If the event in question
743 is potentially pre-emptible. notifyListenersSync should be used
746 func = self.get_dbus_method("notifyListenersAsync")
747 return func(*args, **kwargs)
749 def notifyListenersSync(self, *args, **kwargs):
751 Notify the Registry instance that a device event has taken place,
752 and allow pre-emptive listeners the opportunity to 'consume'
753 the event and thus prevent its further issuance/forwarding. This
754 is the method used by accessibility bridges to forward "toolkit
755 dependent" device events to the Registry from the application's
757 @return True if the event was consumed by a (pre-emptive) listener,
758 False if not (in which case the device event will be forwarded
759 as normal to any application which would normally receive it,
760 e.g. the currently active application in the case of mouse or
763 func = self.get_dbus_method("notifyListenersSync")
764 return func(*args, **kwargs)
766 def registerDeviceEventListener(self, *args, **kwargs):
768 Register to intercept events, and either pass them on or consume
769 them. To listen to keyboard events use registerKeystrokeListener
772 a DeviceEventListener which will intercept events.
774 an EventTypeSeq indicating which event types to listen for.
775 @return True if successful, False if not
777 func = self.get_dbus_method("registerDeviceEventListener")
778 return func(*args, **kwargs)
780 def registerKeystrokeListener(self, *args, **kwargs):
782 Register to intercept keyboard events, and either pass them on
785 a DeviceEventListener which will intercept key events.
787 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
789 a ControllerEventMask filtering the intercepted key events.
791 a KeyEventTypeSeq that may created by ORing event types together.
793 an EventListenerMode indicating whether the listener should receive
794 the events synchronously, potentially consuming them, or just
795 be notified asynchronously of those events that have been generated.
796 @return True if the DeviceEventListener was successfully registered
797 for the requested KeySet, ControllerEventMask, event types, and
798 EventListenerMode; otherwise returns False.
800 func = self.get_dbus_method("registerKeystrokeListener")
801 return func(*args, **kwargs)
803 def unImplemented(self, *args, **kwargs):
804 func = self.get_dbus_method("unImplemented")
805 return func(*args, **kwargs)
807 def unImplemented2(self, *args, **kwargs):
808 func = self.get_dbus_method("unImplemented2")
809 return func(*args, **kwargs)
811 def unImplemented3(self, *args, **kwargs):
812 func = self.get_dbus_method("unImplemented3")
813 return func(*args, **kwargs)
815 def unImplemented4(self, *args, **kwargs):
816 func = self.get_dbus_method("unImplemented4")
817 return func(*args, **kwargs)
820 class DeviceEventListener(BaseProxy):
822 This interface should be implemented by AT-SPI clients who wish
823 to make use of the DeviceEventController to receive device event
824 notifications. DeviceEvents include keyboard events and mouse
825 button/motion events.
828 def notifyEvent(self, *args, **kwargs):
830 Notify an interested DeviceEventListener that a DeviceEvent has
832 @return True if the recipient/consumer wishes to consume the
833 event, i.e. prevent it from being delivered to the desktop, False
834 if the event should continue to be delivered as normal.
836 func = self.get_dbus_method("notifyEvent")
837 return func(*args, **kwargs)
839 def unImplemented_2_(self, *args, **kwargs):
840 func = self.get_dbus_method("unImplemented_2_")
841 return func(*args, **kwargs)
843 def unImplemented_3_(self, *args, **kwargs):
844 func = self.get_dbus_method("unImplemented_3_")
845 return func(*args, **kwargs)
847 def unImplemented_4_(self, *args, **kwargs):
848 func = self.get_dbus_method("unImplemented_4_")
849 return func(*args, **kwargs)
851 def unImplemented_5_(self, *args, **kwargs):
852 func = self.get_dbus_method("unImplemented_5_")
853 return func(*args, **kwargs)
855 def unImplemented_6_(self, *args, **kwargs):
856 func = self.get_dbus_method("unImplemented_6_")
857 return func(*args, **kwargs)
859 def unImplemented__(self, *args, **kwargs):
860 func = self.get_dbus_method("unImplemented__")
861 return func(*args, **kwargs)
864 class Document(BaseProxy):
866 Primarily a 'tagging' interface which indicates the start of
867 document content in the Accessibility hierarchy. Accessible objects
868 below the node implementing Document are normally assumed to
869 be part of the document content. Attributes of Document are those
870 attributes associated with the document as a whole. Objects that
871 implement Document are normally expected to implement Collection
875 def getAttributeValue(self, *args, **kwargs):
877 Gets the value of a single attribute, if specified for the document
879 @param : attributename
880 a string indicating the name of a specific attribute (name-value
882 @return a string corresponding to the value of the specified
883 attribute, or an empty string if the attribute is unspecified
886 func = self.get_dbus_method("getAttributeValue")
887 return func(*args, **kwargs)
889 def getAttributes(self, *args, **kwargs):
891 Gets all attributes specified for a document as a whole. For
892 attributes which change within the document content, see Accessibility::Text::getAttributes
894 @return an AttributeSet containing the attributes of the document,
897 func = self.get_dbus_method("getAttributes")
898 return func(*args, **kwargs)
900 def getLocale(self, *args, **kwargs):
902 Gets the locale associated with the document's content. e.g.
903 the locale for LOCALE_TYPE_MESSAGES.
904 @return a string compliant with the POSIX standard for locale
907 func = self.get_dbus_method("getLocale")
908 return func(*args, **kwargs)
910 def unImplemented2_(self, *args, **kwargs):
911 func = self.get_dbus_method("unImplemented2_")
912 return func(*args, **kwargs)
914 def unImplemented3_(self, *args, **kwargs):
915 func = self.get_dbus_method("unImplemented3_")
916 return func(*args, **kwargs)
918 def unImplemented4_(self, *args, **kwargs):
919 func = self.get_dbus_method("unImplemented4_")
920 return func(*args, **kwargs)
922 def unImplemented_(self, *args, **kwargs):
923 func = self.get_dbus_method("unImplemented_")
924 return func(*args, **kwargs)
926 class Text(BaseProxy):
928 The text interface should be implemented by objects which place
929 textual information onscreen as character strings or glyphs.
930 The text interface allows access to textual content, including
931 display attributes and semantic hints associated with runs of
932 text, and access to bounding box information for glyphs and substrings.
933 It also allows portions of textual content to be selected, if
934 the object's StateSet includes STATE_SELECTABLE_TEXT.
935 In some cases a Text object may have, as its content, an empty
936 string. In particular this can occur in the case of Hypertext
937 objects which do not display explicitly textual information onscreen,
938 as Hypertext is derived from the Text interface.
939 Typographic and semantic attributes of onscreen textual content,
940 for instance typeface, weight, language, and such qualities as
941 'emphasis' or 'blockquote', are represented as text attributes.
942 Contiguous sequences of characters over which these attributes
943 are unchanged are referred to as "attribute runs", and are available
944 via Text::getAttributeRun. Where possible, implementing clients
945 will report textual attributes which are the same over the entire
946 text object, for instance those inherited from a default or document-scope
947 style, via getDefaultAttributes instead of reporting them explicitly
948 for each character. Therefore, for any span of text, the attributes
949 in effect are the union of the set returned by Text::getDefaultAttributes,
950 and the set returned at a particular character offset via Text::getAttributeRun.
954 def addSelection(self, *args, **kwargs):
956 The result of calling addSelection on objects which already have
957 one selection present, and which do not include STATE_MULTISELECTABLE,
958 is undefined, other than the return value.
959 @return True of the selection was successfully added, False otherwise.
960 Selection may fail if the object does not support selection of
961 text (see STATE_SELECTABLE_TEXT), if the object does not support
962 multiple selections and a selection is already defined, or for
963 other reasons (for instance if the user does not have permission
964 to copy the text into the relevant selection buffer).
966 func = self.get_dbus_method("addSelection")
967 return func(*args, **kwargs)
969 def getAttributeRun(self, *args, **kwargs):
971 Query a particular text object for the text attributes defined
972 at a given offset, obtaining the start and end of the "attribute
973 run" over which these attributes are currently invariant. Text
974 attributes are those presentational, typographic, or semantic
975 attributes or qualitites which apply to a range of text specifyable
976 by starting and ending offsets. Attributes relevant to localization
977 should be provided in accordance with the w3c "Internationalization
978 and Localization Markup Requirements", http://www.w3.org/TR/2005/WD-itsreq-20051122/
979 Other text attributes should choose their names and value semantics
980 in accordance with relevant standards such as CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512),
981 XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and
982 WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/). Those attributes
983 from the aforementioned specifications and recommendations which
984 do not concern typographic, presentational, or semantic aspects
985 of text should be exposed via the more general Accessible::getAttributes()
987 For example, CSS attributes which should be exposed on text (either
988 as default attributes, or as explicitly-set attributes when non-default
989 values are specified in the content view) include the Font attributes
990 (i.e. "css2:font-weight", "css2:font-style"), the "css2:color"
991 and "css2:background-color" attributes, and "css2:text-decoration"
993 If includeDefaults is TRUE, then this AttributeSet should include
994 the default attributes as well as those which are explicitly
995 assigned to the attribute run in question. startOffset and endOffset
996 will be back-filled to indicate the start and end of the attribute
997 run which contains 'offset' - an attribute run is a contiguous
998 section of text whose attributes are homogeneous.
1000 the offset of the character whose attributes will be reported.
1001 @param : startOffset
1002 backfilled with the starting offset of the character range over
1003 which all text attributes match those of offset, i.e. the start
1004 of the homogeneous attribute run including offset.
1006 backfilled with the offset of the first character past the character
1007 range over which all text attributes match those of offset, i.e.
1008 the character immediately after the homogeneous attribute run
1010 @param : includeDefaults
1011 if False, the call should only return those attributes which
1012 are explicitly set on the current attribute run, omitting any
1013 attributes which are inherited from the default values. See also
1014 Text::getDefaultAttributes.
1015 @return the AttributeSet defined at offset, optionally including
1016 the 'default' attributes.
1018 func = self.get_dbus_method("getAttributeRun")
1019 return func(*args, **kwargs)
1021 def getAttributeValue(self, *args, **kwargs):
1023 Get the string value of a named attribute at a given offset,
1026 the offset of the character for which the attribute run is to
1028 @param : attributeName
1029 the name of the attribute for which the value is to be returned,
1031 @param : startOffset
1032 back-filled with the offset of the first character in the attribute
1033 run containing the character at offset.
1035 back-filled with the offset of the first character past the end
1036 of the attribute run containing the character at offset.
1038 back-filled with True if the attributeName has a defined value
1039 at offset, False otherwise.
1040 @return the value of attribute (name-value pair) corresponding
1041 to "name", if defined.
1043 func = self.get_dbus_method("getAttributeValue")
1044 return func(*args, **kwargs)
1046 def getAttributes(self, *args, **kwargs):
1048 getAttributes is deprecated in favor of getAttributeRun.
1049 @return the attributes at offset, as a semicolon-delimited set
1050 of colon-delimited name-value pairs.
1052 func = self.get_dbus_method("getAttributes")
1053 return func(*args, **kwargs)
1055 def getBoundedRanges(self, *args, **kwargs):
1057 Return the text content within a bounding box, as a list of Range
1058 structures. Depending on the TEXT_CLIP_TYPE parameters, glyphs
1059 which are clipped by the bounding box (i.e. which lie partially
1060 inside and partially outside it) may or may not be included in
1061 the ranges returned.
1063 the minimum x ( i.e. leftmost) coordinate of the bounding box.
1065 the minimum y coordinate of the bounding box.
1067 the horizontal size of the bounding box. The rightmost bound
1068 of the bounding box is (x + width);
1070 the vertical size of the bounding box. The maximum y value of
1071 the bounding box is (y + height);
1073 If 0, the above coordinates are interpreted as pixels relative
1074 to corner of the screen; if 1, the coordinates are interpreted
1075 as pixels relative to the corner of the containing toplevel window.
1077 determines whether text which intersects the bounding box in
1078 the x direction is included.
1080 determines whether text which intersects the bounding box in
1081 the y direction is included.
1083 func = self.get_dbus_method("getBoundedRanges")
1084 return func(*args, **kwargs)
1086 def getCharacterAtOffset(self, *args, **kwargs):
1088 @return an unsigned long integer whose value corresponds to the
1089 UCS-4 representation of the character at the specified text offset,
1090 or 0 if offset is out of range.
1092 func = self.get_dbus_method("getCharacterAtOffset")
1093 return func(*args, **kwargs)
1095 def getCharacterExtents(self, *args, **kwargs):
1097 Obtain a the bounding box, as x, y, width, and height, of the
1098 character or glyph at a particular character offset in this object's
1099 text content. The coordinate system in which the results are
1100 reported is specified by coordType. If an onscreen glyph corresponds
1101 to multiple character offsets, for instance if the glyph is a
1102 ligature, the bounding box reported will include the entire glyph
1103 and therefore may apply to more than one character offset.
1105 the character offset of the character or glyph being queried.
1107 the minimum horizontal coordinate of the bounding box of the
1108 glyph representing the character at offset.
1110 the minimum vertical coordinate of the bounding box of the glyph
1111 representing the character at offset.
1113 the horizontal extent of the bounding box of the glyph representing
1114 the character at offset.
1116 the vertical extent of the bounding box of the glyph representing
1117 the character at offset.
1119 If 0, the results will be reported in screen coordinates, i.e.
1120 in pixels relative to the upper-left corner of the screen, with
1121 the x axis pointing right and the y axis pointing down. If 1,
1122 the results will be reported relative to the containing toplevel
1123 window, with the x axis pointing right and the y axis pointing
1126 func = self.get_dbus_method("getCharacterExtents")
1127 return func(*args, **kwargs)
1129 def getDefaultAttributeSet(self, *args, **kwargs):
1131 Return an AttributeSet containing the text attributes which apply
1132 to all text in the object by virtue of the default settings of
1133 the document, view, or user agent; e.g. those attributes which
1134 are implied rather than explicitly applied to the text object.
1135 For instance, an object whose entire text content has been explicitly
1136 marked as 'bold' will report the 'bold' attribute via getAttributeRun(),
1137 whereas an object whose text weight is inspecified may report
1138 the default or implied text weight in the default AttributeSet.
1140 func = self.get_dbus_method("getDefaultAttributeSet")
1141 return func(*args, **kwargs)
1143 def getDefaultAttributes(self, *args, **kwargs):
1145 Deprecated in favor of getDefaultAttributeSet.
1146 @return the attributes which apply to the entire text content,
1147 but which were not explicitly specified by the content creator.
1149 func = self.get_dbus_method("getDefaultAttributes")
1150 return func(*args, **kwargs)
1152 def getNSelections(self, *args, **kwargs):
1154 Obtain the number of separate, contiguous selections in the current
1155 Text object. Text objects which do not implement selection of
1156 discontiguous text regions will always return '0' or '1'. Note
1157 that "contiguous" is defined by continuity of the offsets, i.e.
1158 a text 'selection' is defined by a start/end offset pair. In
1159 the case of bidirectional text, this means that a continguous
1160 selection may appear visually discontiguous, and vice-versa.
1161 @return the number of contiguous selections in the current Text
1164 func = self.get_dbus_method("getNSelections")
1165 return func(*args, **kwargs)
1167 def getOffsetAtPoint(self, *args, **kwargs):
1169 Get the offset of the character at a given onscreen coordinate.
1170 The coordinate system used to interpret x and y is determined
1171 by parameter coordType.
1175 if 0, the input coordinates are interpreted relative to the entire
1176 screen, if 1, they are relative to the toplevel window containing
1178 @return the text offset (as an offset into the character array)
1179 of the glyph whose onscreen bounds contain the point x,y, or
1180 -1 if the point is outside the bounds of any glyph.
1182 func = self.get_dbus_method("getOffsetAtPoint")
1183 return func(*args, **kwargs)
1185 def getRangeExtents(self, *args, **kwargs):
1187 Obtain the bounding box which entirely contains a given text
1188 range. Negative values may be returned for the bounding box parameters
1189 in the event that all or part of the text range is offscreen
1190 or not mapped to the screen.
1191 @param : startOffset
1192 the offset of the first character in the specified range.
1194 the offset of the character immediately after the last character
1195 in the specified range.
1197 an integer parameter which is back-filled with the minimum horizontal
1198 coordinate of the resulting bounding box.
1200 an integer parameter which is back-filled with the minimum vertical
1201 coordinate of the resulting bounding box.
1203 an integer parameter which is back-filled with the horizontal
1204 extent of the bounding box.
1206 an integer parameter which is back-filled with the vertical extent
1207 of the bounding box.
1209 If 0, the above coordinates are reported in pixels relative to
1210 corner of the screen; if 1, the coordinates are reported relative
1211 to the corner of the containing toplevel window.
1213 func = self.get_dbus_method("getRangeExtents")
1214 return func(*args, **kwargs)
1216 def getSelection(self, *args, **kwargs):
1218 The result of calling getSelection with an out-of-range selectionNum
1219 (i.e. for a selection which does not exist) is not strictly defined,
1220 but should set endOffset equal to startOffset.
1222 func = self.get_dbus_method("getSelection")
1223 return func(*args, **kwargs)
1225 def getText(self, *args, **kwargs):
1227 Obtain all or part of the onscreen textual content of a Text
1228 object. If endOffset is specified as "-1", then this method will
1229 return the entire onscreen textual contents of the Text object.
1230 @return the textual content of the current Text object beginning
1231 startOffset (inclusive) up to but not including the character
1234 func = self.get_dbus_method("getText")
1235 return func(*args, **kwargs)
1237 def getTextAfterOffset(self, *args, **kwargs):
1239 Obtain a subset of the text content of an object which entirely
1240 follows offset, delimited by character, word, line, or sentence
1241 boundaries as specified by type. The starting and ending offsets
1242 of the resulting substring are returned in startOffset and endOffset.
1243 By definition, if such a substring exists, startOffset must be
1244 greater than offset.
1246 the offset from which the substring search begins, and which
1247 must lie before the returned substring.
1249 the text-boundary delimiter which determines whether the returned
1250 text constitures a character, word, line, or sentence (and possibly
1251 attendant whitespace), and whether the start or ending of such
1252 a substring forms the boundary condition.
1253 @param : startOffset
1254 back-filled with the starting offset of the resulting substring,
1257 back-filled with the offset of the character immediately following
1258 the resulting substring, if one exists.
1259 @return a string which is a substring of the text content of
1260 the object, delimited by the specified boundary condition.
1262 func = self.get_dbus_method("getTextAfterOffset")
1263 return func(*args, **kwargs)
1265 def getTextAtOffset(self, *args, **kwargs):
1267 Obtain a subset of the text content of an object which includes
1268 the specified offset, delimited by character, word, line, or
1269 sentence boundaries as specified by type. The starting and ending
1270 offsets of the resulting substring are returned in startOffset
1273 the offset from which the substring search begins, and which
1274 must lie within the returned substring.
1276 the text-boundary delimiter which determines whether the returned
1277 text constitures a character, word, line, or sentence (and possibly
1278 attendant whitespace), and whether the start or ending of such
1279 a substring forms the boundary condition.
1280 @param : startOffset
1281 back-filled with the starting offset of the resulting substring,
1284 back-filled with the offset of the character immediately following
1285 the resulting substring, if one exists.
1286 @return a string which is a substring of the text content of
1287 the object, delimited by the specified boundary condition.
1289 func = self.get_dbus_method("getTextAtOffset")
1290 return func(*args, **kwargs)
1292 def getTextBeforeOffset(self, *args, **kwargs):
1294 Obtain a subset of the text content of an object which entirely
1295 precedes offset, delimited by character, word, line, or sentence
1296 boundaries as specified by type. The starting and ending offsets
1297 of the resulting substring are returned in startOffset and endOffset.
1298 By definition, if such a substring exists, endOffset is less
1299 than or equal to offset.
1301 the offset from which the substring search begins.
1303 the text-boundary delimiter which determines whether the returned
1304 text constitures a character, word, line, or sentence (and possibly
1305 attendant whitespace), and whether the start or ending of such
1306 a substring forms the boundary condition.
1307 @param : startOffset
1308 back-filled with the starting offset of the resulting substring,
1311 back-filled with the offset of the character immediately following
1312 the resulting substring, if one exists.
1313 @return a string which is a substring of the text content of
1314 the object, delimited by the specified boundary condition.
1316 func = self.get_dbus_method("getTextBeforeOffset")
1317 return func(*args, **kwargs)
1319 def removeSelection(self, *args, **kwargs):
1321 Deselect the text contained in the specified selectionNum, if
1322 such a selection exists, otherwise do nothing. Removal of a non-existant
1323 selectionNum has no effect.
1324 @return True if the selection was successfully removed, False
1327 func = self.get_dbus_method("removeSelection")
1328 return func(*args, **kwargs)
1330 def setCaretOffset(self, *args, **kwargs):
1332 Programmatically move the text caret (visible or virtual, as
1333 above) to a given position.
1335 a long int indicating the desired character offset. Not all implementations
1336 of Text will honor setCaretOffset requests, so the return value
1337 below should be checked by the client.
1338 @return TRUE if the request was carried out, or FALSE if the
1339 caret could not be moved to the requested position.
1341 func = self.get_dbus_method("setCaretOffset")
1342 return func(*args, **kwargs)
1344 def setSelection(self, *args, **kwargs):
1346 Modify an existing selection's start or ending offset.
1347 Calling setSelection for a selectionNum that is not already defined
1348 has no effect. The result of calling setSelection with a selectionNum
1349 greater than 0 for objects that do not include STATE_MULTISELECTABLE
1351 @param : selectionNum
1352 indicates which of a set of non-contiguous selections to modify.
1353 @param : startOffset
1354 the new starting offset for the selection
1356 the new ending offset for the selection
1357 @return True if the selection corresponding to selectionNum is
1358 successfully modified, False otherwise.
1360 func = self.get_dbus_method("setSelection")
1361 return func(*args, **kwargs)
1363 def unImplemented(self, *args, **kwargs):
1364 func = self.get_dbus_method("unImplemented")
1365 return func(*args, **kwargs)
1367 def unImplemented2(self, *args, **kwargs):
1368 func = self.get_dbus_method("unImplemented2")
1369 return func(*args, **kwargs)
1371 def get_caretOffset(self):
1372 self._pgetter(self._dbus_interface, "caretOffset")
1373 def set_caretOffset(self, value):
1374 self._psetter(self._dbus_interface, "caretOffset", value)
1377 The current offset of the text caret in the Text object. This
1378 caret may be virtual, e.g. non-visual and notional-only, but
1379 if an onscreen representation of the caret position is visible,
1380 it will correspond to this offset. The caret offset is given
1381 as a character offset, as opposed to a byte offset into a text
1382 buffer or a column offset.
1384 caretOffset = property(fget=get_caretOffset, fset=set_caretOffset, doc=_caretOffsetDoc)
1386 def get_characterCount(self):
1387 self._pgetter(self._dbus_interface, "characterCount")
1388 def set_characterCount(self, value):
1389 self._psetter(self._dbus_interface, "characterCount", value)
1390 _characterCountDoc = \
1392 The total current number of characters in the Text object, including
1393 whitespace and non-spacing characters.
1395 characterCount = property(fget=get_characterCount, fset=set_characterCount, doc=_characterCountDoc)
1398 def __new__(cls, startOffset, endOffset, content, data):
1399 list.__new__(cls, (startOffset, endOffset, content, data))
1400 def __init__(self, startOffset, endOffset, content, data):
1401 list.__init__(self, (startOffset, endOffset, content, data))
1403 def _get_startOffset(self):
1405 def _set_startOffset(self, val):
1407 startOffset = property(fget=_get_startOffset, fset=_set_startOffset)
1408 def _get_endOffset(self):
1410 def _set_endOffset(self, val):
1412 endOffset = property(fget=_get_endOffset, fset=_set_endOffset)
1413 def _get_content(self):
1415 def _set_content(self, val):
1417 content = property(fget=_get_content, fset=_set_content)
1418 def _get_data(self):
1420 def _set_data(self, val):
1422 data = property(fget=_get_data, fset=_set_data)
1425 class EditableText(Text):
1427 Derived from interface Text, EditableText provides methods for
1428 modifying textual content of components which support editing.
1429 EditableText also interacts with the system clipboard via copyText,
1430 cutText, and pasteText.
1433 def copyText(self, *args, **kwargs):
1435 Copy a range of text into the system clipboard.
1437 the character offset of the first character in the range of text
1440 the offset of the first character past the end of the range of
1443 func = self.get_dbus_method("copyText")
1444 return func(*args, **kwargs)
1446 def cutText(self, *args, **kwargs):
1448 Excise a range of text from a Text object, copying it into the
1451 the character offset of the first character in the range of text
1454 the offset of the first character past the end of the range of
1456 @return True if the text was successfully cut, False otherwise.
1458 func = self.get_dbus_method("cutText")
1459 return func(*args, **kwargs)
1461 def deleteText(self, *args, **kwargs):
1463 Excise a range of text from a Text object without copying it
1464 into the system clipboard.
1466 the character offset of the first character in the range of text
1469 the offset of the first character past the end of the range of
1471 @return True if the text was successfully deleted, False otherwise.
1473 func = self.get_dbus_method("deleteText")
1474 return func(*args, **kwargs)
1476 def insertText(self, *args, **kwargs):
1478 Insert new text contents into an existing text object at a given
1479 location, while retaining the old contents.
1481 the character offset into the Text implementor's content at which
1482 the new content will be inserted.
1484 a UTF-8 string of which length characters will be inserted into
1485 the text object's text buffer.
1487 the number of characters of text to insert. If the character
1488 count of text is less than or equal to length, the entire contents
1489 of text will be inserted.
1490 @return True if the text content was successfully inserted, False
1493 func = self.get_dbus_method("insertText")
1494 return func(*args, **kwargs)
1496 def pasteText(self, *args, **kwargs):
1498 Copy the text contents of the system clipboard, if any, into
1499 a Text object, inserting it at a particular character offset.
1501 the character offset before which the text will be inserted.
1502 @return True if the text was successfully pasted into the Text
1503 object, False otherwise.
1505 func = self.get_dbus_method("pasteText")
1506 return func(*args, **kwargs)
1508 def setAttributes(self, *args, **kwargs):
1510 Apply a particular set of attributes to a range of text.
1511 @return True if the text attributes were successfully modified,
1514 func = self.get_dbus_method("setAttributes")
1515 return func(*args, **kwargs)
1517 def setTextContents(self, *args, **kwargs):
1519 Replace the text contents with a new string, discarding the old
1521 @param : newContents
1522 a UTF-8 string with which the text object's contents will be
1524 @return True if the text content was successfully changed, False
1527 func = self.get_dbus_method("setTextContents")
1528 return func(*args, **kwargs)
1530 def unImplemented10(self, *args, **kwargs):
1531 func = self.get_dbus_method("unImplemented10")
1532 return func(*args, **kwargs)
1534 def unImplemented11(self, *args, **kwargs):
1535 func = self.get_dbus_method("unImplemented11")
1536 return func(*args, **kwargs)
1538 def unImplemented12(self, *args, **kwargs):
1539 func = self.get_dbus_method("unImplemented12")
1540 return func(*args, **kwargs)
1542 def unImplemented5(self, *args, **kwargs):
1545 placeholders for future expansion. Note that these are named
1546 'unimplemented5 and unimplemented6' to avoid conflict with placeholders
1547 from Accessibility::Text.
1549 func = self.get_dbus_method("unImplemented5")
1550 return func(*args, **kwargs)
1552 def unImplemented6(self, *args, **kwargs):
1553 func = self.get_dbus_method("unImplemented6")
1554 return func(*args, **kwargs)
1556 def unImplemented9(self, *args, **kwargs):
1557 func = self.get_dbus_method("unImplemented9")
1558 return func(*args, **kwargs)
1561 def __new__(cls, type, source, detail1, detail2, any_data):
1562 list.__new__(cls, (type, source, detail1, detail2, any_data))
1563 def __init__(self, type, source, detail1, detail2, any_data):
1564 list.__init__(self, (type, source, detail1, detail2, any_data))
1566 def _get_type(self):
1568 def _set_type(self, val):
1570 type = property(fget=_get_type, fset=_set_type)
1571 def _get_source(self):
1573 def _set_source(self, val):
1575 source = property(fget=_get_source, fset=_set_source)
1576 def _get_detail1(self):
1578 def _set_detail1(self, val):
1580 detail1 = property(fget=_get_detail1, fset=_set_detail1)
1581 def _get_detail2(self):
1583 def _set_detail2(self, val):
1585 detail2 = property(fget=_get_detail2, fset=_set_detail2)
1586 def _get_any_data(self):
1588 def _set_any_data(self, val):
1590 any_data = property(fget=_get_any_data, fset=_set_any_data)
1593 class EventDetails(list):
1594 def __new__(cls, host_application, source_role, source_name, any_data):
1595 list.__new__(cls, (host_application, source_role, source_name, any_data))
1596 def __init__(self, host_application, source_role, source_name, any_data):
1597 list.__init__(self, (host_application, source_role, source_name, any_data))
1599 def _get_host_application(self):
1601 def _set_host_application(self, val):
1603 host_application = property(fget=_get_host_application, fset=_set_host_application)
1604 def _get_source_role(self):
1606 def _set_source_role(self, val):
1608 source_role = property(fget=_get_source_role, fset=_set_source_role)
1609 def _get_source_name(self):
1611 def _set_source_name(self, val):
1613 source_name = property(fget=_get_source_name, fset=_set_source_name)
1614 def _get_any_data(self):
1616 def _set_any_data(self, val):
1618 any_data = property(fget=_get_any_data, fset=_set_any_data)
1620 class EventListener(BaseProxy):
1622 A generic interface implemented by objects for the receipt of
1623 event notifications. EventListener is the interface from which
1624 Accessibility::Registry is derived, and via which clients of
1625 the Registry receive notification of changes to an application's
1626 user interface and content.
1629 def notifyEvent(self, *args, **kwargs):
1631 Synchronously notify an EventListener that an event has occurred,
1632 by passing it an Event struct.
1634 The Event about which the listener is being notified.
1636 func = self.get_dbus_method("notifyEvent")
1637 return func(*args, **kwargs)
1639 def unImplemented2_(self, *args, **kwargs):
1640 func = self.get_dbus_method("unImplemented2_")
1641 return func(*args, **kwargs)
1643 def unImplemented3_(self, *args, **kwargs):
1644 func = self.get_dbus_method("unImplemented3_")
1645 return func(*args, **kwargs)
1647 def unImplemented4_(self, *args, **kwargs):
1648 func = self.get_dbus_method("unImplemented4_")
1649 return func(*args, **kwargs)
1651 def unImplemented_(self, *args, **kwargs):
1652 func = self.get_dbus_method("unImplemented_")
1653 return func(*args, **kwargs)
1656 class EventListenerMode(list):
1657 def __new__(cls, synchronous, preemptive, global_):
1658 list.__new__(cls, (synchronous, preemptive, global_))
1659 def __init__(self, synchronous, preemptive, global_):
1660 list.__init__(self, (synchronous, preemptive, global_))
1662 def _get_synchronous(self):
1664 def _set_synchronous(self, val):
1666 synchronous = property(fget=_get_synchronous, fset=_set_synchronous)
1667 def _get_preemptive(self):
1669 def _set_preemptive(self, val):
1671 preemptive = property(fget=_get_preemptive, fset=_set_preemptive)
1672 def _get_global_(self):
1674 def _set_global_(self, val):
1676 global_ = property(fget=_get_global_, fset=_set_global_)
1679 class EventType(Enum):
1681 0:'KEY_PRESSED_EVENT',
1682 1:'KEY_RELEASED_EVENT',
1683 2:'BUTTON_PRESSED_EVENT',
1684 3:'BUTTON_RELEASED_EVENT',
1687 class Hyperlink(BaseProxy):
1689 Instances of Hyperlink are returned by Hypertext objects, and
1690 are the means by which end users and clients interact with linked,
1691 and in some cases embedded, content. Hyperlinks may have multiple
1692 "anchors", where an anchor corresponds to a reference to a particular
1693 resource with a corresponding resource identified (URI). Hyperlinks
1694 may be queried for their URIs, or queried for the objects corresponding
1695 to their anchors. The objects thus obtained are instances of
1696 Accessible, and may be queried, and manipulated via the Action
1700 def getObject(self, *args, **kwargs):
1702 Gets the i'th object, (where i is an integer between 0 and Hyperlink::numAnchors
1703 - 1, inclusive) associated with a Hyperlink. The objects returned
1704 are usually actionable (i.e. they should implement Accessibility::Action),
1705 and the available actions often include "open", "bookmark", "save
1706 link as", etc. They may also implement Accessibility::StreamableContent,
1707 although clients can normally use getURI to obtain a resource
1708 locator via which the object's data may be accessed.
1709 @return an Accessible object instance representing the Hyperlink's
1710 ith anchor, or through which the content associated with the
1711 ith anchor can be accessed.
1713 func = self.get_dbus_method("getObject")
1714 return func(*args, **kwargs)
1716 def getURI(self, *args, **kwargs):
1718 Obtain a resource locator ('URI') which can be used to access
1719 the content to which this link "points" or is connected.
1720 @return a string corresponding to the URI of the Hyperlink's
1721 'ith' anchor, if one exists, or a NIL string otherwise.
1723 func = self.get_dbus_method("getURI")
1724 return func(*args, **kwargs)
1726 def isValid(self, *args, **kwargs):
1728 Check the hyperlink to see if a connection to its backing content
1729 can be established, or if its URI is valid.
1730 @return True if the object's content is available, or False if
1731 the hyperlink's URI is invalid, or a connection to the resource
1732 can not be established.
1734 func = self.get_dbus_method("isValid")
1735 return func(*args, **kwargs)
1737 def unImplemented(self, *args, **kwargs):
1738 func = self.get_dbus_method("unImplemented")
1739 return func(*args, **kwargs)
1741 def unImplemented2(self, *args, **kwargs):
1742 func = self.get_dbus_method("unImplemented2")
1743 return func(*args, **kwargs)
1745 def unImplemented3(self, *args, **kwargs):
1746 func = self.get_dbus_method("unImplemented3")
1747 return func(*args, **kwargs)
1749 def unImplemented4(self, *args, **kwargs):
1750 func = self.get_dbus_method("unImplemented4")
1751 return func(*args, **kwargs)
1753 def get_endIndex(self):
1754 self._pgetter(self._dbus_interface, "endIndex")
1755 def set_endIndex(self, value):
1756 self._psetter(self._dbus_interface, "endIndex", value)
1759 the ending offset within the containing Hypertext content with
1760 which this Hyperlink is associated; that is, the offset of the
1761 first element past the range within the Hypertext associated
1762 with this Hyperlink.
1764 endIndex = property(fget=get_endIndex, fset=set_endIndex, doc=_endIndexDoc)
1766 def get_nAnchors(self):
1767 self._pgetter(self._dbus_interface, "nAnchors")
1768 def set_nAnchors(self, value):
1769 self._psetter(self._dbus_interface, "nAnchors", value)
1772 the number of separate anchors associated with this Hyperlink
1774 nAnchors = property(fget=get_nAnchors, fset=set_nAnchors, doc=_nAnchorsDoc)
1776 def get_startIndex(self):
1777 self._pgetter(self._dbus_interface, "startIndex")
1778 def set_startIndex(self, value):
1779 self._psetter(self._dbus_interface, "startIndex", value)
1782 the starting offset within the containing Hypertext content with
1783 which this Hyperlink is associated
1785 startIndex = property(fget=get_startIndex, fset=set_startIndex, doc=_startIndexDoc)
1788 class Hypertext(BaseProxy):
1790 An interface used for objects which implement linking between
1791 multiple resource or content locations, or multiple 'markers'
1792 within a single document. A Hypertext instance is associated
1793 with one or more Hyperlinks, which are associated with particular
1794 offsets within the Hypertext's included content.
1797 def getLink(self, *args, **kwargs):
1799 Get one of the Hyperlinks associated with this Hypertext object,
1802 an integer from 0 to getNLinks() - 1.
1803 @return the Hyperlink in this Hypertext object.
1805 func = self.get_dbus_method("getLink")
1806 return func(*args, **kwargs)
1808 def getLinkIndex(self, *args, **kwargs):
1810 Get the hyperlink index, if any, associated with a particular
1811 character offset in the Hypertext object. For Hypertext implementors
1812 without textual content, all hyperlinks are associated with character
1814 @return the index of the Hyperlink associated with character
1815 offset characterIndex, or -1 if no Hyperlink is associated with
1816 that character offset.
1818 func = self.get_dbus_method("getLinkIndex")
1819 return func(*args, **kwargs)
1821 def getNLinks(self, *args, **kwargs):
1823 Query the hypertext object for the number of Hyperlinks it contains.
1824 @return the number of Hyperlinks associated with this Hypertext
1825 object, as a long integer.
1827 func = self.get_dbus_method("getNLinks")
1828 return func(*args, **kwargs)
1830 def unImplemented(self, *args, **kwargs):
1831 func = self.get_dbus_method("unImplemented")
1832 return func(*args, **kwargs)
1834 def unImplemented2(self, *args, **kwargs):
1835 func = self.get_dbus_method("unImplemented2")
1836 return func(*args, **kwargs)
1838 def unImplemented3(self, *args, **kwargs):
1839 func = self.get_dbus_method("unImplemented3")
1840 return func(*args, **kwargs)
1842 def unImplemented4(self, *args, **kwargs):
1843 func = self.get_dbus_method("unImplemented4")
1844 return func(*args, **kwargs)
1847 class Image(BaseProxy):
1849 An interface implemented by objects which render image data or
1850 pictorial information to the screen. When onscreen components
1851 include graphical information that is not purely intended to
1852 enhance "3d effect" or visual layout, but which conveys some
1853 semantic or informational content to the sighted user, they should
1854 implement Image, and that semantic content should be conveyed
1855 textually to the extent possible via the image description, as
1856 well as the Accessible::name and Accessible::description properties.
1859 def getImageExtents(self, *args, **kwargs):
1861 Obtain a bounding box which entirely contains the image contents,
1862 as displayed on screen. The bounds returned do not account for
1863 any viewport clipping or the fact that the image may be partially
1864 or wholly obscured by other onscreen content.
1866 If 0, the returned bounding box position is returned relative
1867 to the screen; if 1, the bounding box position is returned relative
1868 to the containing window.
1869 @return a BoundingBox enclosing the image's onscreen representation.
1871 func = self.get_dbus_method("getImageExtents")
1872 return func(*args, **kwargs)
1874 def getImagePosition(self, *args, **kwargs):
1876 Get the coordinates of the current image position on screen.
1878 Back-filled with the x coordinate of the onscreen image (i.e.
1879 the minimum x coordinate)
1881 Back-filled with the y coordinate of the onscreen image (i.e.
1882 the minimum y coordinate)
1884 If 0, the returned x and y coordinates are returned relative
1885 to the screen; if 1, they are returned relative to the containing
1888 func = self.get_dbus_method("getImagePosition")
1889 return func(*args, **kwargs)
1891 def getImageSize(self, *args, **kwargs):
1893 Obtain the width and height of the current onscreen view of the
1894 image. The extents returned do not account for any viewport clipping
1895 or the fact that the image may be partially or wholly obscured
1896 by other onscreen content.
1898 Back-filled with the x extents of the onscreen image (i.e. the
1899 image width in pixels)
1901 Back-filled with the y extents of the onscreen image (i.e. the
1902 image height in pixels)
1904 func = self.get_dbus_method("getImageSize")
1905 return func(*args, **kwargs)
1907 def unImplemented(self, *args, **kwargs):
1908 func = self.get_dbus_method("unImplemented")
1909 return func(*args, **kwargs)
1911 def unImplemented2(self, *args, **kwargs):
1912 func = self.get_dbus_method("unImplemented2")
1913 return func(*args, **kwargs)
1915 def unImplemented3(self, *args, **kwargs):
1916 func = self.get_dbus_method("unImplemented3")
1917 return func(*args, **kwargs)
1919 def get_imageDescription(self):
1920 self._pgetter(self._dbus_interface, "imageDescription")
1921 def set_imageDescription(self, value):
1922 self._psetter(self._dbus_interface, "imageDescription", value)
1923 _imageDescriptionDoc = \
1925 A UTF-8 string providing a textual description of what is visually
1926 depicted in the image.
1928 imageDescription = property(fget=get_imageDescription, fset=set_imageDescription, doc=_imageDescriptionDoc)
1930 def get_imageLocale(self):
1931 self._pgetter(self._dbus_interface, "imageLocale")
1932 def set_imageLocale(self, value):
1933 self._psetter(self._dbus_interface, "imageLocale", value)
1936 A string corresponding to the POSIX LC_MESSAGES locale used by
1937 the imageDescription.
1939 imageLocale = property(fget=get_imageLocale, fset=set_imageLocale, doc=_imageLocaleDoc)
1942 class KeyDefinition(list):
1943 def __new__(cls, keycode, keysym, keystring, unused):
1944 list.__new__(cls, (keycode, keysym, keystring, unused))
1945 def __init__(self, keycode, keysym, keystring, unused):
1946 list.__init__(self, (keycode, keysym, keystring, unused))
1948 def _get_keycode(self):
1950 def _set_keycode(self, val):
1952 keycode = property(fget=_get_keycode, fset=_set_keycode)
1953 def _get_keysym(self):
1955 def _set_keysym(self, val):
1957 keysym = property(fget=_get_keysym, fset=_set_keysym)
1958 def _get_keystring(self):
1960 def _set_keystring(self, val):
1962 keystring = property(fget=_get_keystring, fset=_set_keystring)
1963 def _get_unused(self):
1965 def _set_unused(self, val):
1967 unused = property(fget=_get_unused, fset=_set_unused)
1969 class KeyEventType(Enum):
1975 class KeySynthType(Enum):
1979 2:'KEY_PRESSRELEASE',
1984 class LOCALE_TYPE(Enum):
1986 0:'LOCALE_TYPE_MESSAGES',
1987 1:'LOCALE_TYPE_COLLATE',
1988 2:'LOCALE_TYPE_CTYPE',
1989 3:'LOCALE_TYPE_MONETARY',
1990 4:'LOCALE_TYPE_NUMERIC',
1991 5:'LOCALE_TYPE_TIME',
1994 class LoginHelper(BaseProxy):
1996 An interface for use by assistive technologies by which they
1997 can access system information and services on a 'need to know'
1998 basis while the screen is locked, during user authentication,
1999 or during other sensitive operations.
2000 This interface is intended for use by assistive technologies
2001 and related user-enabling services, and by applications and utilities
2002 which may wish to restrict access to certain system devices and
2003 services during security-sensitive states, e.g. when the screen
2004 is locked or during authentication into some secure service.
2005 Such 'applications' (for instance, screen lock dialogs and security-enabled
2006 web browsers) use the LoginHelper client interfaces, and the
2007 bonobo-activation query service, to query for assistive technologies
2008 which advertise the LoginHelper service. The client then queries
2009 these assistive technologies for their device I/O requirements,
2010 via the getDeviceReqs call. The client may then issue the advisory
2011 request setSafe (TRUE), which requests that the LoginHelper -implementing
2012 service make a best-effort attempt to make itself more secure
2013 (for instance, an onscreen keyboard might turn off word prediction,
2014 and a screenreader may turn off keyboard echo via speech). The
2015 return value of setSafe is an advisory indication of whether
2016 this attempt was successful (no specific guarantees are implied).
2017 Once the 'security sensitive' state is exited, the client should
2018 call setSafe (FALSE).
2019 The return values from getDeviceReqs inform the client of which
2020 services the LoginHelper service (e. g. assistive technology)
2021 needs in order to do its job. The client may use this information
2022 to loosen any restrictions on access which it may currently have
2023 in place (for instance, keyboard grabs, etc.). If it does not
2024 do so, the likely outcome is that the end-user will experience
2025 loss of access to the system.
2028 def getDeviceReqs(self, *args, **kwargs):
2031 Query a LoginHelper for the types of device I/O it requires,
2032 in order to do its job. For instance, a LoginHelper which needs
2033 to receive keyboard events will include Accessibility_LoginHelper_CORE_KEYBOARD
2035 @return : A sequence of LoginHelper_DeviceReq indicating the
2036 device I/O required in order to facilitate end-user access to
2039 func = self.get_dbus_method("getDeviceReqs")
2040 return func(*args, **kwargs)
2042 def getRaiseWindows(self, *args, **kwargs):
2045 Get a list of window IDs that need raising on login.
2046 @return : a sequence containing window IDS for toplevels which
2047 need to be raised/made visible during user authentication, in
2048 order for the LoginHelper to facilitate end-user access to the
2051 func = self.get_dbus_method("getRaiseWindows")
2052 return func(*args, **kwargs)
2054 def setSafe(self, *args, **kwargs):
2058 TRUE if the client is requesting that 'safe mode' be initiated,
2059 FALSE if the client is advising that 'safe mode' may be exited,
2060 i.e. normal operation may be resumed.
2061 Request a LoginHelper to enter "safe" mode, or inform LoginHelper
2062 that "safe" mode may be exited. If safe_mode is TRUE, but the
2063 return value is FALSE, the requesting client may wish to deny
2064 services to the LoginHelper, for instance avoid raising its toplevels.
2065 The return value is purely advisory, and no guarantees are intended
2066 about what the implementing LoginHelper will do to improve security
2067 when in "safe" mode.
2068 @return : whether the LoginHelper is now "safe" or not.
2070 func = self.get_dbus_method("setSafe")
2071 return func(*args, **kwargs)
2073 def unImplemented(self, *args, **kwargs):
2074 func = self.get_dbus_method("unImplemented")
2075 return func(*args, **kwargs)
2077 def unImplemented2(self, *args, **kwargs):
2078 func = self.get_dbus_method("unImplemented2")
2079 return func(*args, **kwargs)
2081 def unImplemented3(self, *args, **kwargs):
2082 func = self.get_dbus_method("unImplemented3")
2083 return func(*args, **kwargs)
2085 def unImplemented4(self, *args, **kwargs):
2086 func = self.get_dbus_method("unImplemented4")
2087 return func(*args, **kwargs)
2089 class DeviceReq(Enum):
2104 AUDIO_IN = DeviceReq(6)
2106 AUDIO_OUT = DeviceReq(5)
2108 CORE_KEYBOARD = DeviceReq(1)
2110 CORE_POINTER = DeviceReq(2)
2112 EXT_INPUT = DeviceReq(3)
2114 GUI_EVENTS = DeviceReq(0)
2116 LOCALHOST = DeviceReq(8)
2118 NETWORK = DeviceReq(7)
2120 POST_WINDOWS = DeviceReq(4)
2122 SERIAL_IN = DeviceReq(10)
2124 SERIAL_OUT = DeviceReq(9)
2126 class WindowInfo(list):
2127 def __new__(cls, winID):
2128 list.__new__(cls, (winID))
2129 def __init__(self, winID):
2130 list.__init__(self, (winID))
2132 def _get_winID(self):
2134 def _set_winID(self, val):
2136 winID = property(fget=_get_winID, fset=_set_winID)
2138 class ModifierType(Enum):
2141 1:'MODIFIER_SHIFTLOCK',
2142 2:'MODIFIER_CONTROL',
2147 7:'MODIFIER_NUMLOCK',
2150 class Registry(EventListener):
2152 The Registry is a service through which applications providing
2153 accessibility services (servers) can rendezvous with consumers
2154 of those services (Assistive Technologies). The Registry is the
2155 first "port of call" for accessible applications and for assistive
2156 technologies wishing to query and interact with those applications.
2157 The Registry service provides four basic functions to Assistive
2158 Technology (AT) clients:
2159 it provides a list of the applications who have registered with
2160 the AT-SPI framework, thereby announcing their participation
2161 in the AT-SPI framework;
2162 it allows AT clients to register for notification of changes
2163 in application state (at-spi Events);
2164 it dispatches/relays said events from participating applications
2165 to the registered listeners;
2166 it gives access to system device events via the associated DeviceEventController
2168 From the point of view of accessible applications (i.e. AT-SPI
2169 service producers), the Registry is primarily a registration
2170 and event delivery service. Applications normally only call the
2171 registerApplication and deregisterApplication Registry methods,
2172 and its inherited EventListener::notifyEvent method.
2173 The Registry normally lives in its own process space; communication
2174 via Registry and both application services and AT clients takes
2175 place via IPC. A process space diagram illustrating the relationship
2176 between applications, Registry, and AT is shown below.
2179 def deregisterApplication(self, *args, **kwargs):
2181 De-register an application previously registered with the broker.
2182 deregisterApplication:
2184 a reference to the Application to be deregistered.
2186 func = self.get_dbus_method("deregisterApplication")
2187 return func(*args, **kwargs)
2189 def deregisterGlobalEventListener(self, *args, **kwargs):
2191 deregisterGlobalEventListener:
2193 the requesting EventListener
2195 a string indicating the type of events
2196 Request that a previously registered client stop receiving global
2197 notifications for events of a certain type.
2199 func = self.get_dbus_method("deregisterGlobalEventListener")
2200 return func(*args, **kwargs)
2202 def deregisterGlobalEventListenerAll(self, *args, **kwargs):
2204 deregisterGlobalEventListenerAll:
2206 the requesting EventListener
2207 Request that a previously registered client stop receiving global
2208 notifications for all events for which it was registered.
2210 func = self.get_dbus_method("deregisterGlobalEventListenerAll")
2211 return func(*args, **kwargs)
2213 def getDesktop(self, *args, **kwargs):
2216 : the index of the requested Desktop.
2217 Get the nth accessible desktop.
2218 @return a reference to the requested Desktop.
2220 func = self.get_dbus_method("getDesktop")
2221 return func(*args, **kwargs)
2223 def getDesktopCount(self, *args, **kwargs):
2225 event types: "Window" "Desktop" "Window:Create" "Window:Destroy"
2226 "Window:Iconify" "Window:Restore" "Window:Fullscreen" "Window:Resize"
2227 "Desktop:Create" "Desktop:Destroy" "Desktop:Focus" "Desktop:Defocus"
2228 "Desktop:Reorder" "Focus" "GtkWidget:show" "GObject:notify:<propertyname>"
2229 ( not sure we should allow these last 2 forms, since they are
2230 toolkit-specific, but they're powerful ) getDesktopCount:
2231 Get the current number of desktops.
2232 @return a short integer indicating the current number of Desktops.
2234 func = self.get_dbus_method("getDesktopCount")
2235 return func(*args, **kwargs)
2237 def getDesktopList(self, *args, **kwargs):
2239 Get a list of accessible desktops.
2240 @return : a sequence containing references to the Desktops.
2242 func = self.get_dbus_method("getDesktopList")
2243 return func(*args, **kwargs)
2245 def getDeviceEventController(self, *args, **kwargs):
2247 Obtain an object which can be used to request device event notifications.
2248 @return : an object implementing DeviceEventController
2250 func = self.get_dbus_method("getDeviceEventController")
2251 return func(*args, **kwargs)
2253 def registerApplication(self, *args, **kwargs):
2255 Register a new application with the accessibility broker.
2257 a reference to the requesting Application
2259 func = self.get_dbus_method("registerApplication")
2260 return func(*args, **kwargs)
2262 def registerGlobalEventListener(self, *args, **kwargs):
2264 Register a client's interest in (all) application events of a
2267 a reference to the requesting EventListener.
2269 a string which indicates the type of events about which the client
2270 desires notification.
2272 func = self.get_dbus_method("registerGlobalEventListener")
2273 return func(*args, **kwargs)
2275 def unImplemented(self, *args, **kwargs):
2276 func = self.get_dbus_method("unImplemented")
2277 return func(*args, **kwargs)
2279 def unImplemented2(self, *args, **kwargs):
2280 func = self.get_dbus_method("unImplemented2")
2281 return func(*args, **kwargs)
2283 def unImplemented3(self, *args, **kwargs):
2284 func = self.get_dbus_method("unImplemented3")
2285 return func(*args, **kwargs)
2287 def unImplemented4(self, *args, **kwargs):
2288 func = self.get_dbus_method("unImplemented4")
2289 return func(*args, **kwargs)
2291 def unImplemented5(self, *args, **kwargs):
2292 func = self.get_dbus_method("unImplemented5")
2293 return func(*args, **kwargs)
2295 def unImplemented6(self, *args, **kwargs):
2296 func = self.get_dbus_method("unImplemented6")
2297 return func(*args, **kwargs)
2300 class Relation(BaseProxy):
2302 An interface via which objects' non-hierarchical relationships
2303 to one another are indicated. An instance of Relations represents
2304 a "one-to-many" correspondance.
2307 def getNTargets(self, *args, **kwargs):
2309 @return the number of objects to which this relationship applies.
2311 func = self.get_dbus_method("getNTargets")
2312 return func(*args, **kwargs)
2314 def getRelationType(self, *args, **kwargs):
2316 @return the RelationType of this Relation.
2318 func = self.get_dbus_method("getRelationType")
2319 return func(*args, **kwargs)
2321 def getRelationTypeName(self, *args, **kwargs):
2323 @return an unlocalized string representing the relation type.
2325 func = self.get_dbus_method("getRelationTypeName")
2326 return func(*args, **kwargs)
2328 def getTarget(self, *args, **kwargs):
2330 @return an Object which is the 'nth'target of this Relation,
2331 e.g. the Object at index i in the list of Objects having the
2332 specified relationship to this Accessible.
2334 func = self.get_dbus_method("getTarget")
2335 return func(*args, **kwargs)
2337 def unImplemented(self, *args, **kwargs):
2338 func = self.get_dbus_method("unImplemented")
2339 return func(*args, **kwargs)
2341 def unImplemented2(self, *args, **kwargs):
2342 func = self.get_dbus_method("unImplemented2")
2343 return func(*args, **kwargs)
2345 def unImplemented3(self, *args, **kwargs):
2346 func = self.get_dbus_method("unImplemented3")
2347 return func(*args, **kwargs)
2349 def unImplemented4(self, *args, **kwargs):
2350 func = self.get_dbus_method("unImplemented4")
2351 return func(*args, **kwargs)
2354 class RelationType(Enum):
2357 1:'RELATION_LABEL_FOR',
2358 2:'RELATION_LABELLED_BY',
2359 3:'RELATION_CONTROLLER_FOR',
2360 4:'RELATION_CONTROLLED_BY',
2361 5:'RELATION_MEMBER_OF',
2362 6:'RELATION_TOOLTIP_FOR',
2363 7:'RELATION_NODE_CHILD_OF',
2364 8:'RELATION_EXTENDED',
2365 9:'RELATION_FLOWS_TO',
2366 10:'RELATION_FLOWS_FROM',
2367 11:'RELATION_SUBWINDOW_OF',
2368 12:'RELATION_EMBEDS',
2369 13:'RELATION_EMBEDDED_BY',
2370 14:'RELATION_POPUP_FOR',
2371 15:'RELATION_PARENT_WINDOW_OF',
2372 16:'RELATION_DESCRIPTION_FOR',
2373 17:'RELATION_DESCRIBED_BY',
2374 18:'RELATION_LAST_DEFINED',
2380 1:'ROLE_ACCELERATOR_LABEL',
2387 8:'ROLE_CHECK_MENU_ITEM',
2388 9:'ROLE_COLOR_CHOOSER',
2389 10:'ROLE_COLUMN_HEADER',
2390 11:'ROLE_COMBO_BOX',
2391 12:'ROLE_DATE_EDITOR',
2392 13:'ROLE_DESKTOP_ICON',
2393 14:'ROLE_DESKTOP_FRAME',
2396 17:'ROLE_DIRECTORY_PANE',
2397 18:'ROLE_DRAWING_AREA',
2398 19:'ROLE_FILE_CHOOSER',
2400 21:'ROLE_FOCUS_TRAVERSABLE',
2401 22:'ROLE_FONT_CHOOSER',
2403 24:'ROLE_GLASS_PANE',
2404 25:'ROLE_HTML_CONTAINER',
2407 28:'ROLE_INTERNAL_FRAME',
2409 30:'ROLE_LAYERED_PANE',
2411 32:'ROLE_LIST_ITEM',
2414 35:'ROLE_MENU_ITEM',
2415 36:'ROLE_OPTION_PANE',
2417 38:'ROLE_PAGE_TAB_LIST',
2419 40:'ROLE_PASSWORD_TEXT',
2420 41:'ROLE_POPUP_MENU',
2421 42:'ROLE_PROGRESS_BAR',
2422 43:'ROLE_PUSH_BUTTON',
2423 44:'ROLE_RADIO_BUTTON',
2424 45:'ROLE_RADIO_MENU_ITEM',
2425 46:'ROLE_ROOT_PANE',
2426 47:'ROLE_ROW_HEADER',
2427 48:'ROLE_SCROLL_BAR',
2428 49:'ROLE_SCROLL_PANE',
2429 50:'ROLE_SEPARATOR',
2431 52:'ROLE_SPIN_BUTTON',
2432 53:'ROLE_SPLIT_PANE',
2433 54:'ROLE_STATUS_BAR',
2435 56:'ROLE_TABLE_CELL',
2436 57:'ROLE_TABLE_COLUMN_HEADER',
2437 58:'ROLE_TABLE_ROW_HEADER',
2438 59:'ROLE_TEAROFF_MENU_ITEM',
2441 62:'ROLE_TOGGLE_BUTTON',
2445 66:'ROLE_TREE_TABLE',
2452 73:'ROLE_PARAGRAPH',
2454 75:'ROLE_APPLICATION',
2455 76:'ROLE_AUTOCOMPLETE',
2461 82:'ROLE_DOCUMENT_FRAME',
2465 86:'ROLE_REDUNDANT_OBJECT',
2468 89:'ROLE_INPUT_METHOD_WINDOW',
2469 90:'ROLE_LAST_DEFINED',
2472 class Selection(BaseProxy):
2474 An interface which indicates that an object exposes a 'selection'
2475 model, allowing the selection of one or more of its children.
2476 Read-only Selection instances are possible, in which case the
2477 interface is used to programmatically determine the selected-ness
2478 of its children. A selected child has State::STATE_SELECTED,
2479 and a child which may hypothetically be selected (though possibly
2480 not programmatically selectable) has State::STATE_SELECTABLE.
2483 def clearSelection(self, *args, **kwargs):
2485 Attempt to clear all selections (i.e. deselect all children)
2486 of a Selection. Not all Selection implementations allow the removal
2488 @return True if the selections were successfully cleared, False
2491 func = self.get_dbus_method("clearSelection")
2492 return func(*args, **kwargs)
2494 def deselectChild(self, *args, **kwargs):
2496 Remove a child from the selected children list of a Selection,
2497 if the child is currently selected.
2499 a long integer (the zero offset index into the Accessible object's
2500 list of children) indicating which child of the Selection is
2502 @return True if the child was successfully selected, False otherwise.
2504 func = self.get_dbus_method("deselectChild")
2505 return func(*args, **kwargs)
2507 def deselectSelectedChild(self, *args, **kwargs):
2509 Remove a child to the selected children list of a Selection.
2510 @param : selectedChildIndex
2511 a long integer indicating which of the selected children of the
2512 Selection is to be deselected. The index is a zero-offset index
2513 into the 'selected child list', not a zero-offset index into
2514 the list of all children of the Selection.
2515 @return True if the child was successfully deselected, False
2518 func = self.get_dbus_method("deselectSelectedChild")
2519 return func(*args, **kwargs)
2521 def getSelectedChild(self, *args, **kwargs):
2523 Get the i-th selected Accessible child of a Selection.
2524 @param : selectedChildIndex
2525 a long integer indicating which of the selected children of an
2526 object is being requested.
2527 @return a pointer to a selected Accessible child object, specified
2528 by selectedChildIndex.
2530 func = self.get_dbus_method("getSelectedChild")
2531 return func(*args, **kwargs)
2533 def isChildSelected(self, *args, **kwargs):
2535 Determine whether a particular child of an Selection implementor
2536 is currently selected. Note that childIndex is the zero-offset
2537 index into the standard Accessible container's list of children.
2539 an index into the Selection's list of children.
2540 @return True if the specified child is currently selected, False
2543 func = self.get_dbus_method("isChildSelected")
2544 return func(*args, **kwargs)
2546 def selectAll(self, *args, **kwargs):
2548 Attempt to select all of the children of a Selection implementor.
2549 Not all Selection implementors support this operation (for instance,
2550 implementations which support only "single selection" do not
2551 support this operation).
2552 @return True if successful, False otherwise.
2554 func = self.get_dbus_method("selectAll")
2555 return func(*args, **kwargs)
2557 def selectChild(self, *args, **kwargs):
2559 Add a child to the selected children list of a Selection.
2561 a long integer indicating which child of the Selection is to
2563 @return True if the child was successfully selected, False otherwise.
2565 func = self.get_dbus_method("selectChild")
2566 return func(*args, **kwargs)
2568 def unImplemented(self, *args, **kwargs):
2571 placeholders for future expansion.
2573 func = self.get_dbus_method("unImplemented")
2574 return func(*args, **kwargs)
2576 def unImplemented2(self, *args, **kwargs):
2577 func = self.get_dbus_method("unImplemented2")
2578 return func(*args, **kwargs)
2580 def unImplemented3(self, *args, **kwargs):
2581 func = self.get_dbus_method("unImplemented3")
2582 return func(*args, **kwargs)
2584 def get_nSelectedChildren(self):
2585 self._pgetter(self._dbus_interface, "nSelectedChildren")
2586 def set_nSelectedChildren(self, value):
2587 self._psetter(self._dbus_interface, "nSelectedChildren", value)
2588 _nSelectedChildrenDoc = \
2590 The number of children of a Selection implementor which are currently
2593 nSelectedChildren = property(fget=get_nSelectedChildren, fset=set_nSelectedChildren, doc=_nSelectedChildrenDoc)
2596 class Selector(BaseProxy):
2598 This interface is intended for use by assistive technologies
2599 and related user-agents. Via this interface, an assistive technology
2600 or user agent may expose a series of choices or selections in
2601 textual form, which can be activated on demand by a client of
2602 the Selector interface.
2603 Examples of the use of this interface include voice-command and
2604 remote-control applications, in which the user interaction is
2605 wholly or partly delegated by the implementor to an external
2609 def activateCommand(self, *args, **kwargs):
2611 Request that the Selector invoke the specified Command.
2613 the Command to activate/invoke.
2614 @return a CommandResult indicating whether the request was honored,
2615 and the reason for failure if the Command could not be activated
2618 func = self.get_dbus_method("activateCommand")
2619 return func(*args, **kwargs)
2621 def deregisterChangeListener(self, *args, **kwargs):
2623 Tell the Selector instance to cease notifying the specified CommandListener
2624 of changes to the command list.
2626 the CommandListener to remove from the notification list.
2628 func = self.get_dbus_method("deregisterChangeListener")
2629 return func(*args, **kwargs)
2631 def getCommands(self, *args, **kwargs):
2633 Query the Selector for the current CommandList.
2634 @return the currently available CommandList
2636 func = self.get_dbus_method("getCommands")
2637 return func(*args, **kwargs)
2639 def refreshCommands(self, *args, **kwargs):
2641 Ask the Selector to re-calculate its CommandList.
2642 @return TRUE if the CommandList changed.
2644 func = self.get_dbus_method("refreshCommands")
2645 return func(*args, **kwargs)
2647 def registerChangeListener(self, *args, **kwargs):
2649 Register a :CommandListener instance for notification of changes
2652 the CommandListener to be notified of changes.
2654 func = self.get_dbus_method("registerChangeListener")
2655 return func(*args, **kwargs)
2657 def replaceCommands(self, *args, **kwargs):
2659 @return TRUE if the replacement request was successful, FALSE
2660 if the request could not be honored.
2662 func = self.get_dbus_method("replaceCommands")
2663 return func(*args, **kwargs)
2665 def unImplemented(self, *args, **kwargs):
2666 func = self.get_dbus_method("unImplemented")
2667 return func(*args, **kwargs)
2669 def unImplemented2(self, *args, **kwargs):
2670 func = self.get_dbus_method("unImplemented2")
2671 return func(*args, **kwargs)
2673 def unImplemented3(self, *args, **kwargs):
2674 func = self.get_dbus_method("unImplemented3")
2675 return func(*args, **kwargs)
2677 def unImplemented4(self, *args, **kwargs):
2678 func = self.get_dbus_method("unImplemented4")
2679 return func(*args, **kwargs)
2681 def get_supportsReplace(self):
2682 self._pgetter(self._dbus_interface, "supportsReplace")
2683 def set_supportsReplace(self, value):
2684 self._psetter(self._dbus_interface, "supportsReplace", value)
2685 _supportsReplaceDoc = \
2687 This attribute is TRUE if this Selector allows its CommandList
2688 to be specified by the client
2690 supportsReplace = property(fget=get_supportsReplace, fset=set_supportsReplace, doc=_supportsReplaceDoc)
2692 class CommandResult(Enum):
2694 A code returned by a call to activateCommand, indicating the
2695 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 COMMAND_RESULT_FAILED = CommandResult(2)
2707 COMMAND_RESULT_INVALID = CommandResult(0)
2709 COMMAND_RESULT_LAST_DEFINED = CommandResult(4)
2711 COMMAND_RESULT_OBSOLETE = CommandResult(3)
2713 COMMAND_RESULT_SUCCESS = CommandResult(1)
2715 class StateSet(BaseProxy):
2717 The StateSet interface encapsulates a collection of state information.
2718 It allows comparison of state information between object instances,
2719 and comparisons of an object's state with some hypothetical collection
2723 def add(self, *args, **kwargs):
2725 Add a StateType to an existing StateSet, if not already present.
2727 func = self.get_dbus_method("add")
2728 return func(*args, **kwargs)
2730 def compare(self, *args, **kwargs):
2732 Compare two StateSet instances and obtain their differences.
2733 @return a 'difference set', i.e. a StateSet consisting of those
2734 states not shared by the two sets being compared.
2736 func = self.get_dbus_method("compare")
2737 return func(*args, **kwargs)
2739 def contains(self, *args, **kwargs):
2741 Query a StateSet for a specific StateType.
2743 the StateType being queried for.
2744 @return TRUE if the StateSet contains StateType state.
2746 func = self.get_dbus_method("contains")
2747 return func(*args, **kwargs)
2749 def equals(self, *args, **kwargs):
2751 Compare two statesets for equivalence.
2752 @param : tarStateSet
2753 the StateSet to be compared with this one.
2754 @return TRUE if the two StateSet objects are composed of the
2757 func = self.get_dbus_method("equals")
2758 return func(*args, **kwargs)
2760 def getStates(self, *args, **kwargs):
2761 func = self.get_dbus_method("getStates")
2762 return func(*args, **kwargs)
2764 def isEmpty(self, *args, **kwargs):
2766 @return TRUE if the StateSet contains no states.
2768 func = self.get_dbus_method("isEmpty")
2769 return func(*args, **kwargs)
2771 def remove(self, *args, **kwargs):
2773 Remove a StateType to an existing StateSet, if it is present.
2775 func = self.get_dbus_method("remove")
2776 return func(*args, **kwargs)
2778 def unImplemented(self, *args, **kwargs):
2779 func = self.get_dbus_method("unImplemented")
2780 return func(*args, **kwargs)
2782 def unImplemented2(self, *args, **kwargs):
2783 func = self.get_dbus_method("unImplemented2")
2784 return func(*args, **kwargs)
2786 def unImplemented3(self, *args, **kwargs):
2787 func = self.get_dbus_method("unImplemented3")
2788 return func(*args, **kwargs)
2790 def unImplemented4(self, *args, **kwargs):
2791 func = self.get_dbus_method("unImplemented4")
2792 return func(*args, **kwargs)
2795 class StateType(Enum):
2802 5:'STATE_COLLAPSED',
2806 9:'STATE_EXPANDABLE',
2807 10:'STATE_EXPANDED',
2808 11:'STATE_FOCUSABLE',
2810 13:'STATE_HAS_TOOLTIP',
2811 14:'STATE_HORIZONTAL',
2812 15:'STATE_ICONIFIED',
2814 17:'STATE_MULTI_LINE',
2815 18:'STATE_MULTISELECTABLE',
2818 21:'STATE_RESIZABLE',
2819 22:'STATE_SELECTABLE',
2820 23:'STATE_SELECTED',
2821 24:'STATE_SENSITIVE',
2823 26:'STATE_SINGLE_LINE',
2825 28:'STATE_TRANSIENT',
2826 29:'STATE_VERTICAL',
2828 31:'STATE_MANAGES_DESCENDANTS',
2829 32:'STATE_INDETERMINATE',
2830 33:'STATE_REQUIRED',
2831 34:'STATE_TRUNCATED',
2832 35:'STATE_ANIMATED',
2833 36:'STATE_INVALID_ENTRY',
2834 37:'STATE_SUPPORTS_AUTOCOMPLETION',
2835 38:'STATE_SELECTABLE_TEXT',
2836 39:'STATE_IS_DEFAULT',
2838 41:'STATE_LAST_DEFINED',
2841 class StreamableContent(BaseProxy):
2843 An interface whereby an object allows its backing content to
2844 be streamed to clients. Negotiation of content type is allowed.
2845 Clients may examine the backing data and transform, convert,
2846 or parse the content in order to present it in an alternate form
2850 def getContent(self, *args, **kwargs):
2852 DEPRECATED, use getStream instead. getContent: Retrieve this
2853 object's content, in a format appropriate to a requested mimetype.
2854 long Bonobo::Stream:seek (in long offset, in SeekType
2856 raises (NoPermission, IOError)
2857 void Bonobo::Stream:read (in long count, out iobuf buffer)
2858 raises (NoPermission, IOError)
2860 @return a Bonobo::Stream whose mimetype matches contentType,
2861 if available, or NIL.
2863 func = self.get_dbus_method("getContent")
2864 return func(*args, **kwargs)
2866 def getContentTypes(self, *args, **kwargs):
2869 @return the list of available mimetypes for this object's content.
2871 func = self.get_dbus_method("getContentTypes")
2872 return func(*args, **kwargs)
2874 def getStream(self, *args, **kwargs):
2876 Retrieve this object's content, in a format appropriate to a
2877 requested mimetype, as a ContentStream instance.
2878 @param : contentType
2879 a string specifying the desired mimetype for the content stream.
2880 @return a Stream whose mimetype matches contentType, if available,
2883 func = self.get_dbus_method("getStream")
2884 return func(*args, **kwargs)
2886 def getURI(self, *args, **kwargs):
2888 Get a URI pointing to the content of the specified type, if such
2889 a URI can be obtained. Not all streamable content providers have
2890 URI representations.
2891 @param : contentType
2892 a string specifying the desired mimetype for the content stream.
2893 If NULL, then a URI for the default content type will be returned,
2895 @return a string which constitutes a URI for a stream of the
2896 specified content type, or NULL if no such URI can be obtained.
2898 func = self.get_dbus_method("getURI")
2899 return func(*args, **kwargs)
2901 def unImplemented(self, *args, **kwargs):
2902 func = self.get_dbus_method("unImplemented")
2903 return func(*args, **kwargs)
2905 def unImplemented2(self, *args, **kwargs):
2906 func = self.get_dbus_method("unImplemented2")
2907 return func(*args, **kwargs)
2910 class TEXT_BOUNDARY_TYPE(Enum):
2912 0:'TEXT_BOUNDARY_CHAR',
2913 1:'TEXT_BOUNDARY_WORD_START',
2914 2:'TEXT_BOUNDARY_WORD_END',
2915 3:'TEXT_BOUNDARY_SENTENCE_START',
2916 4:'TEXT_BOUNDARY_SENTENCE_END',
2917 5:'TEXT_BOUNDARY_LINE_START',
2918 6:'TEXT_BOUNDARY_LINE_END',
2921 class TEXT_CLIP_TYPE(Enum):
2929 class Table(BaseProxy):
2931 An interface used by containers whose contained data is arranged
2932 in a "tabular" (i.e. row-column) fashion. Tables may resemble
2933 a two-dimensional grid, as in a spreadsheet, or may feature objects
2934 which span multiple rows and/or columns, but whose bounds are
2935 aligned on a row/column matrix. Thus, the Table interface may
2936 be used to represent "spreadsheets" as well as "frames".
2937 Objects within tables are children of the Table instance, and
2938 they may be referenced either via a child index or via a row/column
2939 pair. Their role may be ROLE_TABLE_CELL, but table 'cells' may
2940 have other roles as well. These 'cells' may implement other interfaces,
2941 such as Text, Action, Image, and Component, and should do so
2942 as appropriate to their onscreen representation and/or behavior.
2945 def addColumnSelection(self, *args, **kwargs):
2947 Select the specified column, adding it to the current column
2948 selection, if the table's selection model permits it.
2950 @return True if the specified column was successfully selected,
2953 func = self.get_dbus_method("addColumnSelection")
2954 return func(*args, **kwargs)
2956 def addRowSelection(self, *args, **kwargs):
2958 Select the specified row, adding it to the current row selection,
2959 if the table's selection model permits it.
2961 @return True if the specified row was successfully selected,
2964 func = self.get_dbus_method("addRowSelection")
2965 return func(*args, **kwargs)
2967 def getAccessibleAt(self, *args, **kwargs):
2969 Get the table cell at the specified row and column indices.
2971 the specified table row, zero-indexed.
2973 the specified table column, zero-indexed.
2974 @return an Accessible object representing the specified table
2977 func = self.get_dbus_method("getAccessibleAt")
2978 return func(*args, **kwargs)
2980 def getColumnAtIndex(self, *args, **kwargs):
2982 Get the table column index occupied by the child at a particular
2985 the specified child index, zero-indexed.
2986 @return a long integer indicating the first column spanned by
2987 the child of a table, at the specified 1-D (zero-offset) index.
2989 func = self.get_dbus_method("getColumnAtIndex")
2990 return func(*args, **kwargs)
2992 def getColumnDescription(self, *args, **kwargs):
2994 Get a text description of a particular table column. This differs
2995 from AccessibleTable_getColumnHeader, which returns an Accessible.
2997 the specified table column, zero-indexed.
2998 @return a UTF-8 string describing the specified table column,
3001 func = self.get_dbus_method("getColumnDescription")
3002 return func(*args, **kwargs)
3004 def getColumnExtentAt(self, *args, **kwargs):
3006 Get the number of columns spanned by the table cell at the specific
3007 row and column. (some tables can have cells which span multiple
3008 rows and/or columns).
3010 the specified table row, zero-indexed.
3012 the specified table column, zero-indexed.
3013 @return a long integer indicating the number of columns spanned
3014 by the specified cell.
3016 func = self.get_dbus_method("getColumnExtentAt")
3017 return func(*args, **kwargs)
3019 def getColumnHeader(self, *args, **kwargs):
3021 Get the header associated with a table column, if available,
3022 as an instance of Accessible. This differs from getColumnDescription,
3023 which returns a string.
3025 the specified table column, zero-indexed.
3026 @return an Accessible representatin of the specified table column,
3029 func = self.get_dbus_method("getColumnHeader")
3030 return func(*args, **kwargs)
3032 def getIndexAt(self, *args, **kwargs):
3034 Get the 1-D child index corresponding to the specified 2-D row
3037 the specified table row, zero-indexed.
3039 the specified table column, zero-indexed.
3040 @return a long integer which serves as the index of a specified
3041 cell in the table, in a form usable by Accessible::getChildAtIndex.
3043 func = self.get_dbus_method("getIndexAt")
3044 return func(*args, **kwargs)
3046 def getRowAtIndex(self, *args, **kwargs):
3048 Get the table row index occupied by the child at a particular
3051 the specified child index, zero-indexed.
3052 @return a long integer indicating the first row spanned by the
3053 child of a table, at the specified 1-D (zero-offset) index.
3055 func = self.get_dbus_method("getRowAtIndex")
3056 return func(*args, **kwargs)
3058 def getRowColumnExtentsAtIndex(self, *args, **kwargs):
3060 Given a child index, determine the row and column indices and
3061 extents, and whether the cell is currently selected. If the child
3062 at index is not a cell (for instance, if it is a summary, caption,
3063 etc.), False is returned.
3065 the index of the Table child whose row/column extents are requested.
3067 back-filled with the first table row associated with the cell
3068 with child index index.
3070 back-filled with the first table column associated with the cell
3071 with child index index.
3072 @param : row_extents
3073 back-filled with the number of table rows across which child
3075 @param : col_extents
3076 back-filled with the number of table columns across which child
3078 @param : is_selected
3079 a boolean which is back-filled with True if the child at index
3080 i corresponds to a selected table cell, False otherwise.
3081 Example: If the Table child at index '6' extends across columns
3082 5 and 6 of row 2 of a Table instance, and is currently selected,
3083 then retval=table::getRowColumnExtentsAtIndex(6,row,col,
3087 will return True, and after the call row, col, row_extents,
3088 col_extents, and is_selected will contain 2, 5, 1, 2, and True,
3090 @return True if the index is associated with a valid table cell,
3091 False if the index does not correspond to a cell. If False is
3092 returned, the values of the out parameters are undefined.
3094 func = self.get_dbus_method("getRowColumnExtentsAtIndex")
3095 return func(*args, **kwargs)
3097 def getRowDescription(self, *args, **kwargs):
3099 Get a text description of a particular table row. This differs
3100 from AccessibleTable_getRowHeader, which returns an Accessible.
3102 the specified table row, zero-indexed.
3103 @return a UTF-8 string describing the specified table row, if
3106 func = self.get_dbus_method("getRowDescription")
3107 return func(*args, **kwargs)
3109 def getRowExtentAt(self, *args, **kwargs):
3111 Get the number of rows spanned by the table cell at the specific
3112 row and column. (some tables can have cells which span multiple
3113 rows and/or columns).
3115 the specified table row, zero-indexed.
3117 the specified table column, zero-indexed.
3118 @return a long integer indicating the number of rows spanned
3119 by the specified cell.
3121 func = self.get_dbus_method("getRowExtentAt")
3122 return func(*args, **kwargs)
3124 def getRowHeader(self, *args, **kwargs):
3126 Get the header associated with a table row, if available. This
3127 differs from getRowDescription, which returns a string.
3129 the specified table row, zero-indexed.
3130 @return an Accessible representatin of the specified table row,
3133 func = self.get_dbus_method("getRowHeader")
3134 return func(*args, **kwargs)
3136 def getSelectedColumns(self, *args, **kwargs):
3138 Obtain the indices of all columns which are currently selected.
3139 @return a sequence of integers comprising the indices of columns
3142 func = self.get_dbus_method("getSelectedColumns")
3143 return func(*args, **kwargs)
3145 def getSelectedRows(self, *args, **kwargs):
3147 Obtain the indices of all rows which are currently selected.
3148 @return a sequence of integers comprising the indices of rows
3151 func = self.get_dbus_method("getSelectedRows")
3152 return func(*args, **kwargs)
3154 def isColumnSelected(self, *args, **kwargs):
3156 Determine whether a table column is selected.
3158 the column being queried.
3159 @return True if the specified column is currently selected, False
3162 func = self.get_dbus_method("isColumnSelected")
3163 return func(*args, **kwargs)
3165 def isRowSelected(self, *args, **kwargs):
3167 Determine whether a table row is selected.
3169 the row being queried.
3170 @return True if the specified row is currently selected, False
3173 func = self.get_dbus_method("isRowSelected")
3174 return func(*args, **kwargs)
3176 def isSelected(self, *args, **kwargs):
3178 Determine whether the cell at a specific row and column is selected.
3180 a row occupied by the cell whose state is being queried.
3182 a column occupied by the cell whose state is being queried.
3183 @return True if the specified cell is currently selected, False
3186 func = self.get_dbus_method("isSelected")
3187 return func(*args, **kwargs)
3189 def removeColumnSelection(self, *args, **kwargs):
3191 Remove the specified column from current column selection, if
3192 the table's selection model permits it.
3194 @return True if the specified column was successfully de-selected,
3197 func = self.get_dbus_method("removeColumnSelection")
3198 return func(*args, **kwargs)
3200 def removeRowSelection(self, *args, **kwargs):
3202 Remove the specified row from current row selection, if the table's
3203 selection model permits it.
3205 @return True if the specified row was successfully de-selected,
3208 func = self.get_dbus_method("removeRowSelection")
3209 return func(*args, **kwargs)
3211 def unImplemented(self, *args, **kwargs):
3212 func = self.get_dbus_method("unImplemented")
3213 return func(*args, **kwargs)
3215 def unImplemented2(self, *args, **kwargs):
3216 func = self.get_dbus_method("unImplemented2")
3217 return func(*args, **kwargs)
3219 def unImplemented3(self, *args, **kwargs):
3220 func = self.get_dbus_method("unImplemented3")
3221 return func(*args, **kwargs)
3223 def unImplemented4(self, *args, **kwargs):
3224 func = self.get_dbus_method("unImplemented4")
3225 return func(*args, **kwargs)
3227 def unImplemented5(self, *args, **kwargs):
3228 func = self.get_dbus_method("unImplemented5")
3229 return func(*args, **kwargs)
3231 def unImplemented6(self, *args, **kwargs):
3232 func = self.get_dbus_method("unImplemented6")
3233 return func(*args, **kwargs)
3235 def unImplemented7(self, *args, **kwargs):
3236 func = self.get_dbus_method("unImplemented7")
3237 return func(*args, **kwargs)
3239 def get_caption(self):
3240 self._pgetter(self._dbus_interface, "caption")
3241 def set_caption(self, value):
3242 self._psetter(self._dbus_interface, "caption", value)
3245 An Accessible which represents of a caption for a Table.
3247 caption = property(fget=get_caption, fset=set_caption, doc=_captionDoc)
3249 def get_nColumns(self):
3250 self._pgetter(self._dbus_interface, "nColumns")
3251 def set_nColumns(self, value):
3252 self._psetter(self._dbus_interface, "nColumns", value)
3255 The total number of columns in this table (including empty columns),
3256 exclusive of columns which are programmatically hidden. Columns
3257 which are scrolled out of view or clipped by the current viewport
3260 nColumns = property(fget=get_nColumns, fset=set_nColumns, doc=_nColumnsDoc)
3262 def get_nRows(self):
3263 self._pgetter(self._dbus_interface, "nRows")
3264 def set_nRows(self, value):
3265 self._psetter(self._dbus_interface, "nRows", value)
3268 The total number of rows in this table (including empty rows),
3269 exclusive of any rows which are programmatically hidden. Rows
3270 which are merely scrolled out of view are included.
3272 nRows = property(fget=get_nRows, fset=set_nRows, doc=_nRowsDoc)
3274 def get_nSelectedColumns(self):
3275 self._pgetter(self._dbus_interface, "nSelectedColumns")
3276 def set_nSelectedColumns(self, value):
3277 self._psetter(self._dbus_interface, "nSelectedColumns", value)
3278 _nSelectedColumnsDoc = \
3280 The number of columns currently selected. A selected column is
3281 one in which all included cells are selected.
3283 nSelectedColumns = property(fget=get_nSelectedColumns, fset=set_nSelectedColumns, doc=_nSelectedColumnsDoc)
3285 def get_nSelectedRows(self):
3286 self._pgetter(self._dbus_interface, "nSelectedRows")
3287 def set_nSelectedRows(self, value):
3288 self._psetter(self._dbus_interface, "nSelectedRows", value)
3289 _nSelectedRowsDoc = \
3291 The number of rows currently selected. A selected row is one
3292 in which all included cells are selected.
3294 nSelectedRows = property(fget=get_nSelectedRows, fset=set_nSelectedRows, doc=_nSelectedRowsDoc)
3296 def get_summary(self):
3297 self._pgetter(self._dbus_interface, "summary")
3298 def set_summary(self, value):
3299 self._psetter(self._dbus_interface, "summary", value)
3302 An accessible object which summarizes the contents of a Table.
3303 This object is frequently itself a Table instance, albeit a simplified
3306 summary = property(fget=get_summary, fset=set_summary, doc=_summaryDoc)
3310 class Value(BaseProxy):
3312 An interface supporting controls which allow a one-dimensional,
3313 scalar quantity to be modified or which reflect a scalar quantity.
3314 (If STATE_EDITABLE is not present, the valuator is treated as
3318 def unImplemented(self, *args, **kwargs):
3319 func = self.get_dbus_method("unImplemented")
3320 return func(*args, **kwargs)
3322 def unImplemented2(self, *args, **kwargs):
3323 func = self.get_dbus_method("unImplemented2")
3324 return func(*args, **kwargs)
3326 def unImplemented3(self, *args, **kwargs):
3327 func = self.get_dbus_method("unImplemented3")
3328 return func(*args, **kwargs)
3330 def unImplemented4(self, *args, **kwargs):
3331 func = self.get_dbus_method("unImplemented4")
3332 return func(*args, **kwargs)
3334 def get_currentValue(self):
3335 self._pgetter(self._dbus_interface, "currentValue")
3336 def set_currentValue(self, value):
3337 self._psetter(self._dbus_interface, "currentValue", value)
3338 _currentValueDoc = \
3340 The current value of the valuator.
3342 currentValue = property(fget=get_currentValue, fset=set_currentValue, doc=_currentValueDoc)
3344 def get_maximumValue(self):
3345 self._pgetter(self._dbus_interface, "maximumValue")
3346 def set_maximumValue(self, value):
3347 self._psetter(self._dbus_interface, "maximumValue", value)
3348 _maximumValueDoc = \
3350 The maximum value allowed by this valuator.
3352 maximumValue = property(fget=get_maximumValue, fset=set_maximumValue, doc=_maximumValueDoc)
3354 def get_minimumIncrement(self):
3355 self._pgetter(self._dbus_interface, "minimumIncrement")
3356 def set_minimumIncrement(self, value):
3357 self._psetter(self._dbus_interface, "minimumIncrement", value)
3358 _minimumIncrementDoc = \
3360 The smallest incremental change which this valuator allows. If
3361 0, the incremental changes to the valuator are limited only by
3362 the precision of a double precision value on the platform.
3364 minimumIncrement = property(fget=get_minimumIncrement, fset=set_minimumIncrement, doc=_minimumIncrementDoc)
3366 def get_minimumValue(self):
3367 self._pgetter(self._dbus_interface, "minimumValue")
3368 def set_minimumValue(self, value):
3369 self._psetter(self._dbus_interface, "minimumValue", value)
3370 _minimumValueDoc = \
3372 The minimum value allowed by this valuator.
3374 minimumValue = property(fget=get_minimumValue, fset=set_minimumValue, doc=_minimumValueDoc)
3376 BUTTON_PRESSED_EVENT = EventType(2)
3378 BUTTON_RELEASED_EVENT = EventType(3)
3380 KEY_PRESS = KeySynthType(0)
3382 KEY_PRESSED = KeyEventType(0)
3384 KEY_PRESSED_EVENT = EventType(0)
3386 KEY_PRESSRELEASE = KeySynthType(2)
3388 KEY_RELEASE = KeySynthType(1)
3390 KEY_RELEASED = KeyEventType(1)
3392 KEY_RELEASED_EVENT = EventType(1)
3394 KEY_STRING = KeySynthType(4)
3396 KEY_SYM = KeySynthType(3)
3398 LAYER_BACKGROUND = ComponentLayer(1)
3400 LAYER_CANVAS = ComponentLayer(2)
3402 LAYER_INVALID = ComponentLayer(0)
3404 LAYER_LAST_DEFINED = ComponentLayer(8)
3406 LAYER_MDI = ComponentLayer(4)
3408 LAYER_OVERLAY = ComponentLayer(6)
3410 LAYER_POPUP = ComponentLayer(5)
3412 LAYER_WIDGET = ComponentLayer(3)
3414 LAYER_WINDOW = ComponentLayer(7)
3416 LOCALE_TYPE_COLLATE = LOCALE_TYPE(1)
3418 LOCALE_TYPE_CTYPE = LOCALE_TYPE(2)
3420 LOCALE_TYPE_MESSAGES = LOCALE_TYPE(0)
3422 LOCALE_TYPE_MONETARY = LOCALE_TYPE(3)
3424 LOCALE_TYPE_NUMERIC = LOCALE_TYPE(4)
3426 LOCALE_TYPE_TIME = LOCALE_TYPE(5)
3428 MODIFIER_ALT = ModifierType(3)
3430 MODIFIER_CONTROL = ModifierType(2)
3432 MODIFIER_META = ModifierType(4)
3434 MODIFIER_META2 = ModifierType(5)
3436 MODIFIER_META3 = ModifierType(6)
3438 MODIFIER_NUMLOCK = ModifierType(7)
3440 MODIFIER_SHIFT = ModifierType(0)
3442 MODIFIER_SHIFTLOCK = ModifierType(1)
3444 RELATION_CONTROLLED_BY = RelationType(4)
3446 RELATION_CONTROLLER_FOR = RelationType(3)
3448 RELATION_DESCRIBED_BY = RelationType(17)
3450 RELATION_DESCRIPTION_FOR = RelationType(16)
3452 RELATION_EMBEDDED_BY = RelationType(13)
3454 RELATION_EMBEDS = RelationType(12)
3456 RELATION_EXTENDED = RelationType(8)
3458 RELATION_FLOWS_FROM = RelationType(10)
3460 RELATION_FLOWS_TO = RelationType(9)
3462 RELATION_LABELLED_BY = RelationType(2)
3464 RELATION_LABEL_FOR = RelationType(1)
3466 RELATION_LAST_DEFINED = RelationType(18)
3468 RELATION_MEMBER_OF = RelationType(5)
3470 RELATION_NODE_CHILD_OF = RelationType(7)
3472 RELATION_NULL = RelationType(0)
3474 RELATION_PARENT_WINDOW_OF = RelationType(15)
3476 RELATION_POPUP_FOR = RelationType(14)
3478 RELATION_SUBWINDOW_OF = RelationType(11)
3480 RELATION_TOOLTIP_FOR = RelationType(6)
3482 ROLE_ACCELERATOR_LABEL = Role(1)
3484 ROLE_ALERT = Role(2)
3486 ROLE_ANIMATION = Role(3)
3488 ROLE_APPLICATION = Role(75)
3490 ROLE_ARROW = Role(4)
3492 ROLE_AUTOCOMPLETE = Role(76)
3494 ROLE_CALENDAR = Role(5)
3496 ROLE_CANVAS = Role(6)
3498 ROLE_CAPTION = Role(81)
3500 ROLE_CHART = Role(80)
3502 ROLE_CHECK_BOX = Role(7)
3504 ROLE_CHECK_MENU_ITEM = Role(8)
3506 ROLE_COLOR_CHOOSER = Role(9)
3508 ROLE_COLUMN_HEADER = Role(10)
3510 ROLE_COMBO_BOX = Role(11)
3512 ROLE_DATE_EDITOR = Role(12)
3514 ROLE_DESKTOP_FRAME = Role(14)
3516 ROLE_DESKTOP_ICON = Role(13)
3518 ROLE_DIAL = Role(15)
3520 ROLE_DIALOG = Role(16)
3522 ROLE_DIRECTORY_PANE = Role(17)
3524 ROLE_DOCUMENT_FRAME = Role(82)
3526 ROLE_DRAWING_AREA = Role(18)
3528 ROLE_EDITBAR = Role(77)
3530 ROLE_EMBEDDED = Role(78)
3532 ROLE_ENTRY = Role(79)
3534 ROLE_EXTENDED = Role(70)
3536 ROLE_FILE_CHOOSER = Role(19)
3538 ROLE_FILLER = Role(20)
3540 ROLE_FOCUS_TRAVERSABLE = Role(21)
3542 ROLE_FONT_CHOOSER = Role(22)
3544 ROLE_FOOTER = Role(72)
3546 ROLE_FORM = Role(87)
3548 ROLE_FRAME = Role(23)
3550 ROLE_GLASS_PANE = Role(24)
3552 ROLE_HEADER = Role(71)
3554 ROLE_HEADING = Role(83)
3556 ROLE_HTML_CONTAINER = Role(25)
3558 ROLE_ICON = Role(26)
3560 ROLE_IMAGE = Role(27)
3562 ROLE_INPUT_METHOD_WINDOW = Role(89)
3564 ROLE_INTERNAL_FRAME = Role(28)
3566 ROLE_INVALID = Role(0)
3568 ROLE_LABEL = Role(29)
3570 ROLE_LAST_DEFINED = Role(90)
3572 ROLE_LAYERED_PANE = Role(30)
3574 ROLE_LINK = Role(88)
3576 ROLE_LIST = Role(31)
3578 ROLE_LIST_ITEM = Role(32)
3580 ROLE_MENU = Role(33)
3582 ROLE_MENU_BAR = Role(34)
3584 ROLE_MENU_ITEM = Role(35)
3586 ROLE_OPTION_PANE = Role(36)
3588 ROLE_PAGE = Role(84)
3590 ROLE_PAGE_TAB = Role(37)
3592 ROLE_PAGE_TAB_LIST = Role(38)
3594 ROLE_PANEL = Role(39)
3596 ROLE_PARAGRAPH = Role(73)
3598 ROLE_PASSWORD_TEXT = Role(40)
3600 ROLE_POPUP_MENU = Role(41)
3602 ROLE_PROGRESS_BAR = Role(42)
3604 ROLE_PUSH_BUTTON = Role(43)
3606 ROLE_RADIO_BUTTON = Role(44)
3608 ROLE_RADIO_MENU_ITEM = Role(45)
3610 ROLE_REDUNDANT_OBJECT = Role(86)
3612 ROLE_ROOT_PANE = Role(46)
3614 ROLE_ROW_HEADER = Role(47)
3616 ROLE_RULER = Role(74)
3618 ROLE_SCROLL_BAR = Role(48)
3620 ROLE_SCROLL_PANE = Role(49)
3622 ROLE_SECTION = Role(85)
3624 ROLE_SEPARATOR = Role(50)
3626 ROLE_SLIDER = Role(51)
3628 ROLE_SPIN_BUTTON = Role(52)
3630 ROLE_SPLIT_PANE = Role(53)
3632 ROLE_STATUS_BAR = Role(54)
3634 ROLE_TABLE = Role(55)
3636 ROLE_TABLE_CELL = Role(56)
3638 ROLE_TABLE_COLUMN_HEADER = Role(57)
3640 ROLE_TABLE_ROW_HEADER = Role(58)
3642 ROLE_TEAROFF_MENU_ITEM = Role(59)
3644 ROLE_TERMINAL = Role(60)
3646 ROLE_TEXT = Role(61)
3648 ROLE_TOGGLE_BUTTON = Role(62)
3650 ROLE_TOOL_BAR = Role(63)
3652 ROLE_TOOL_TIP = Role(64)
3654 ROLE_TREE = Role(65)
3656 ROLE_TREE_TABLE = Role(66)
3658 ROLE_UNKNOWN = Role(67)
3660 ROLE_VIEWPORT = Role(68)
3662 ROLE_WINDOW = Role(69)
3664 STATE_ACTIVE = StateType(1)
3666 STATE_ANIMATED = StateType(35)
3668 STATE_ARMED = StateType(2)
3670 STATE_BUSY = StateType(3)
3672 STATE_CHECKED = StateType(4)
3674 STATE_COLLAPSED = StateType(5)
3676 STATE_DEFUNCT = StateType(6)
3678 STATE_EDITABLE = StateType(7)
3680 STATE_ENABLED = StateType(8)
3682 STATE_EXPANDABLE = StateType(9)
3684 STATE_EXPANDED = StateType(10)
3686 STATE_FOCUSABLE = StateType(11)
3688 STATE_FOCUSED = StateType(12)
3690 STATE_HAS_TOOLTIP = StateType(13)
3692 STATE_HORIZONTAL = StateType(14)
3694 STATE_ICONIFIED = StateType(15)
3696 STATE_INDETERMINATE = StateType(32)
3698 STATE_INVALID = StateType(0)
3700 STATE_INVALID_ENTRY = StateType(36)
3702 STATE_IS_DEFAULT = StateType(39)
3704 STATE_LAST_DEFINED = StateType(41)
3706 STATE_MANAGES_DESCENDANTS = StateType(31)
3708 STATE_MODAL = StateType(16)
3710 STATE_MULTISELECTABLE = StateType(18)
3712 STATE_MULTI_LINE = StateType(17)
3714 STATE_OPAQUE = StateType(19)
3716 STATE_PRESSED = StateType(20)
3718 STATE_REQUIRED = StateType(33)
3720 STATE_RESIZABLE = StateType(21)
3722 STATE_SELECTABLE = StateType(22)
3724 STATE_SELECTABLE_TEXT = StateType(38)
3726 STATE_SELECTED = StateType(23)
3728 STATE_SENSITIVE = StateType(24)
3730 STATE_SHOWING = StateType(25)
3732 STATE_SINGLE_LINE = StateType(26)
3734 STATE_STALE = StateType(27)
3736 STATE_SUPPORTS_AUTOCOMPLETION = StateType(37)
3738 STATE_TRANSIENT = StateType(28)
3740 STATE_TRUNCATED = StateType(34)
3742 STATE_VERTICAL = StateType(29)
3744 STATE_VISIBLE = StateType(30)
3746 STATE_VISITED = StateType(40)
3748 TEXT_BOUNDARY_CHAR = TEXT_BOUNDARY_TYPE(0)
3750 TEXT_BOUNDARY_LINE_END = TEXT_BOUNDARY_TYPE(6)
3752 TEXT_BOUNDARY_LINE_START = TEXT_BOUNDARY_TYPE(5)
3754 TEXT_BOUNDARY_SENTENCE_END = TEXT_BOUNDARY_TYPE(4)
3756 TEXT_BOUNDARY_SENTENCE_START = TEXT_BOUNDARY_TYPE(3)
3758 TEXT_BOUNDARY_WORD_END = TEXT_BOUNDARY_TYPE(2)
3760 TEXT_BOUNDARY_WORD_START = TEXT_BOUNDARY_TYPE(1)
3762 TEXT_CLIP_BOTH = TEXT_CLIP_TYPE(3)
3764 TEXT_CLIP_MAX = TEXT_CLIP_TYPE(2)
3766 TEXT_CLIP_MIN = TEXT_CLIP_TYPE(1)
3768 TEXT_CLIP_NONE = TEXT_CLIP_TYPE(0)