2008-07-28 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / pyatspi / other.py
1 #Copyright (C) 2008 Codethink Ltd
2
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.
6
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.
14
15 from base import *
16
17 BUTTON_PRESSED_EVENT = Accessibility.EventType(2)
18
19 BUTTON_RELEASED_EVENT = Accessibility.EventType(3)
20
21 KEY_PRESS = Accessibility.KeySynthType(0)
22
23 KEY_PRESSED = Accessibility.KeyEventType(0)
24
25 KEY_PRESSED_EVENT = Accessibility.EventType(0)
26
27 KEY_PRESSRELEASE = Accessibility.KeySynthType(2)
28
29 KEY_RELEASE = Accessibility.KeySynthType(1)
30
31 KEY_RELEASED = Accessibility.KeyEventType(1)
32
33 KEY_RELEASED_EVENT = Accessibility.EventType(1)
34
35 KEY_STRING = Accessibility.KeySynthType(4)
36
37 KEY_SYM = Accessibility.KeySynthType(3)
38
39 LAYER_BACKGROUND = Accessibility.ComponentLayer(1)
40
41 LAYER_CANVAS = Accessibility.ComponentLayer(2)
42
43 LAYER_INVALID = Accessibility.ComponentLayer(0)
44
45 LAYER_LAST_DEFINED = Accessibility.ComponentLayer(8)
46
47 LAYER_MDI = Accessibility.ComponentLayer(4)
48
49 LAYER_OVERLAY = Accessibility.ComponentLayer(6)
50
51 LAYER_POPUP = Accessibility.ComponentLayer(5)
52
53 LAYER_WIDGET = Accessibility.ComponentLayer(3)
54
55 LAYER_WINDOW = Accessibility.ComponentLayer(7)
56
57 LOCALE_TYPE_COLLATE = Accessibility.LOCALE_TYPE(1)
58
59 LOCALE_TYPE_CTYPE = Accessibility.LOCALE_TYPE(2)
60
61 LOCALE_TYPE_MESSAGES = Accessibility.LOCALE_TYPE(0)
62
63 LOCALE_TYPE_MONETARY = Accessibility.LOCALE_TYPE(3)
64
65 LOCALE_TYPE_NUMERIC = Accessibility.LOCALE_TYPE(4)
66
67 LOCALE_TYPE_TIME = Accessibility.LOCALE_TYPE(5)
68
69 MODIFIER_ALT = Accessibility.ModifierType(3)
70
71 MODIFIER_CONTROL = Accessibility.ModifierType(2)
72
73 MODIFIER_META = Accessibility.ModifierType(4)
74
75 MODIFIER_META2 = Accessibility.ModifierType(5)
76
77 MODIFIER_META3 = Accessibility.ModifierType(6)
78
79 MODIFIER_NUMLOCK = Accessibility.ModifierType(7)
80
81 MODIFIER_SHIFT = Accessibility.ModifierType(0)
82
83 MODIFIER_SHIFTLOCK = Accessibility.ModifierType(1)
84
85 RELATION_CONTROLLED_BY = Accessibility.RelationType(4)
86
87 RELATION_CONTROLLER_FOR = Accessibility.RelationType(3)
88
89 RELATION_DESCRIBED_BY = Accessibility.RelationType(17)
90
91 RELATION_DESCRIPTION_FOR = Accessibility.RelationType(16)
92
93 RELATION_EMBEDDED_BY = Accessibility.RelationType(13)
94
95 RELATION_EMBEDS = Accessibility.RelationType(12)
96
97 RELATION_EXTENDED = Accessibility.RelationType(8)
98
99 RELATION_FLOWS_FROM = Accessibility.RelationType(10)
100
101 RELATION_FLOWS_TO = Accessibility.RelationType(9)
102
103 RELATION_LABELLED_BY = Accessibility.RelationType(2)
104
105 RELATION_LABEL_FOR = Accessibility.RelationType(1)
106
107 RELATION_LAST_DEFINED = Accessibility.RelationType(18)
108
109 RELATION_MEMBER_OF = Accessibility.RelationType(5)
110
111 RELATION_NODE_CHILD_OF = Accessibility.RelationType(7)
112
113 RELATION_NULL = Accessibility.RelationType(0)
114
115 RELATION_PARENT_WINDOW_OF = Accessibility.RelationType(15)
116
117 RELATION_POPUP_FOR = Accessibility.RelationType(14)
118
119 RELATION_SUBWINDOW_OF = Accessibility.RelationType(11)
120
121 RELATION_TOOLTIP_FOR = Accessibility.RelationType(6)
122
123 ROLE_ACCELERATOR_LABEL = Accessibility.Role(1)
124
125 ROLE_ALERT = Accessibility.Role(2)
126
127 ROLE_ANIMATION = Accessibility.Role(3)
128
129 ROLE_APPLICATION = Accessibility.Role(75)
130
131 ROLE_ARROW = Accessibility.Role(4)
132
133 ROLE_AUTOCOMPLETE = Accessibility.Role(76)
134
135 ROLE_CALENDAR = Accessibility.Role(5)
136
137 ROLE_CANVAS = Accessibility.Role(6)
138
139 ROLE_CAPTION = Accessibility.Role(81)
140
141 ROLE_CHART = Accessibility.Role(80)
142
143 ROLE_CHECK_BOX = Accessibility.Role(7)
144
145 ROLE_CHECK_MENU_ITEM = Accessibility.Role(8)
146
147 ROLE_COLOR_CHOOSER = Accessibility.Role(9)
148
149 ROLE_COLUMN_HEADER = Accessibility.Role(10)
150
151 ROLE_COMBO_BOX = Accessibility.Role(11)
152
153 ROLE_DATE_EDITOR = Accessibility.Role(12)
154
155 ROLE_DESKTOP_FRAME = Accessibility.Role(14)
156
157 ROLE_DESKTOP_ICON = Accessibility.Role(13)
158
159 ROLE_DIAL = Accessibility.Role(15)
160
161 ROLE_DIALOG = Accessibility.Role(16)
162
163 ROLE_DIRECTORY_PANE = Accessibility.Role(17)
164
165 ROLE_DOCUMENT_FRAME = Accessibility.Role(82)
166
167 ROLE_DRAWING_AREA = Accessibility.Role(18)
168
169 ROLE_EDITBAR = Accessibility.Role(77)
170
171 ROLE_EMBEDDED = Accessibility.Role(78)
172
173 ROLE_ENTRY = Accessibility.Role(79)
174
175 ROLE_EXTENDED = Accessibility.Role(70)
176
177 ROLE_FILE_CHOOSER = Accessibility.Role(19)
178
179 ROLE_FILLER = Accessibility.Role(20)
180
181 ROLE_FOCUS_TRAVERSABLE = Accessibility.Role(21)
182
183 ROLE_FONT_CHOOSER = Accessibility.Role(22)
184
185 ROLE_FOOTER = Accessibility.Role(72)
186
187 ROLE_FORM = Accessibility.Role(87)
188
189 ROLE_FRAME = Accessibility.Role(23)
190
191 ROLE_GLASS_PANE = Accessibility.Role(24)
192
193 ROLE_HEADER = Accessibility.Role(71)
194
195 ROLE_HEADING = Accessibility.Role(83)
196
197 ROLE_HTML_CONTAINER = Accessibility.Role(25)
198
199 ROLE_ICON = Accessibility.Role(26)
200
201 ROLE_IMAGE = Accessibility.Role(27)
202
203 ROLE_INPUT_METHOD_WINDOW = Accessibility.Role(89)
204
205 ROLE_INTERNAL_FRAME = Accessibility.Role(28)
206
207 ROLE_INVALID = Accessibility.Role(0)
208
209 ROLE_LABEL = Accessibility.Role(29)
210
211 ROLE_LAST_DEFINED = Accessibility.Role(90)
212
213 ROLE_LAYERED_PANE = Accessibility.Role(30)
214
215 ROLE_LINK = Accessibility.Role(88)
216
217 ROLE_LIST = Accessibility.Role(31)
218
219 ROLE_LIST_ITEM = Accessibility.Role(32)
220
221 ROLE_MENU = Accessibility.Role(33)
222
223 ROLE_MENU_BAR = Accessibility.Role(34)
224
225 ROLE_MENU_ITEM = Accessibility.Role(35)
226
227 ROLE_OPTION_PANE = Accessibility.Role(36)
228
229 ROLE_PAGE = Accessibility.Role(84)
230
231 ROLE_PAGE_TAB = Accessibility.Role(37)
232
233 ROLE_PAGE_TAB_LIST = Accessibility.Role(38)
234
235 ROLE_PANEL = Accessibility.Role(39)
236
237 ROLE_PARAGRAPH = Accessibility.Role(73)
238
239 ROLE_PASSWORD_TEXT = Accessibility.Role(40)
240
241 ROLE_POPUP_MENU = Accessibility.Role(41)
242
243 ROLE_PROGRESS_BAR = Accessibility.Role(42)
244
245 ROLE_PUSH_BUTTON = Accessibility.Role(43)
246
247 ROLE_RADIO_BUTTON = Accessibility.Role(44)
248
249 ROLE_RADIO_MENU_ITEM = Accessibility.Role(45)
250
251 ROLE_REDUNDANT_OBJECT = Accessibility.Role(86)
252
253 ROLE_ROOT_PANE = Accessibility.Role(46)
254
255 ROLE_ROW_HEADER = Accessibility.Role(47)
256
257 ROLE_RULER = Accessibility.Role(74)
258
259 ROLE_SCROLL_BAR = Accessibility.Role(48)
260
261 ROLE_SCROLL_PANE = Accessibility.Role(49)
262
263 ROLE_SECTION = Accessibility.Role(85)
264
265 ROLE_SEPARATOR = Accessibility.Role(50)
266
267 ROLE_SLIDER = Accessibility.Role(51)
268
269 ROLE_SPIN_BUTTON = Accessibility.Role(52)
270
271 ROLE_SPLIT_PANE = Accessibility.Role(53)
272
273 ROLE_STATUS_BAR = Accessibility.Role(54)
274
275 ROLE_TABLE = Accessibility.Role(55)
276
277 ROLE_TABLE_CELL = Accessibility.Role(56)
278
279 ROLE_TABLE_COLUMN_HEADER = Accessibility.Role(57)
280
281 ROLE_TABLE_ROW_HEADER = Accessibility.Role(58)
282
283 ROLE_TEAROFF_MENU_ITEM = Accessibility.Role(59)
284
285 ROLE_TERMINAL = Accessibility.Role(60)
286
287 ROLE_TEXT = Accessibility.Role(61)
288
289 ROLE_TOGGLE_BUTTON = Accessibility.Role(62)
290
291 ROLE_TOOL_BAR = Accessibility.Role(63)
292
293 ROLE_TOOL_TIP = Accessibility.Role(64)
294
295 ROLE_TREE = Accessibility.Role(65)
296
297 ROLE_TREE_TABLE = Accessibility.Role(66)
298
299 ROLE_UNKNOWN = Accessibility.Role(67)
300
301 ROLE_VIEWPORT = Accessibility.Role(68)
302
303 ROLE_WINDOW = Accessibility.Role(69)
304
305 STATE_ACTIVE = Accessibility.StateType(1)
306
307 STATE_ANIMATED = Accessibility.StateType(35)
308
309 STATE_ARMED = Accessibility.StateType(2)
310
311 STATE_BUSY = Accessibility.StateType(3)
312
313 STATE_CHECKED = Accessibility.StateType(4)
314
315 STATE_COLLAPSED = Accessibility.StateType(5)
316
317 STATE_DEFUNCT = Accessibility.StateType(6)
318
319 STATE_EDITABLE = Accessibility.StateType(7)
320
321 STATE_ENABLED = Accessibility.StateType(8)
322
323 STATE_EXPANDABLE = Accessibility.StateType(9)
324
325 STATE_EXPANDED = Accessibility.StateType(10)
326
327 STATE_FOCUSABLE = Accessibility.StateType(11)
328
329 STATE_FOCUSED = Accessibility.StateType(12)
330
331 STATE_HAS_TOOLTIP = Accessibility.StateType(13)
332
333 STATE_HORIZONTAL = Accessibility.StateType(14)
334
335 STATE_ICONIFIED = Accessibility.StateType(15)
336
337 STATE_INDETERMINATE = Accessibility.StateType(32)
338
339 STATE_INVALID = Accessibility.StateType(0)
340
341 STATE_INVALID_ENTRY = Accessibility.StateType(36)
342
343 STATE_IS_DEFAULT = Accessibility.StateType(39)
344
345 STATE_LAST_DEFINED = Accessibility.StateType(41)
346
347 STATE_MANAGES_DESCENDANTS = Accessibility.StateType(31)
348
349 STATE_MODAL = Accessibility.StateType(16)
350
351 STATE_MULTISELECTABLE = Accessibility.StateType(18)
352
353 STATE_MULTI_LINE = Accessibility.StateType(17)
354
355 STATE_OPAQUE = Accessibility.StateType(19)
356
357 STATE_PRESSED = Accessibility.StateType(20)
358
359 STATE_REQUIRED = Accessibility.StateType(33)
360
361 STATE_RESIZABLE = Accessibility.StateType(21)
362
363 STATE_SELECTABLE = Accessibility.StateType(22)
364
365 STATE_SELECTABLE_TEXT = Accessibility.StateType(38)
366
367 STATE_SELECTED = Accessibility.StateType(23)
368
369 STATE_SENSITIVE = Accessibility.StateType(24)
370
371 STATE_SHOWING = Accessibility.StateType(25)
372
373 STATE_SINGLE_LINE = Accessibility.StateType(26)
374
375 STATE_STALE = Accessibility.StateType(27)
376
377 STATE_SUPPORTS_AUTOCOMPLETION = Accessibility.StateType(37)
378
379 STATE_TRANSIENT = Accessibility.StateType(28)
380
381 STATE_TRUNCATED = Accessibility.StateType(34)
382
383 STATE_VERTICAL = Accessibility.StateType(29)
384
385 STATE_VISIBLE = Accessibility.StateType(30)
386
387 STATE_VISITED = Accessibility.StateType(40)
388
389 TEXT_BOUNDARY_CHAR = Accessibility.TEXT_BOUNDARY_TYPE(0)
390
391 TEXT_BOUNDARY_LINE_END = Accessibility.TEXT_BOUNDARY_TYPE(6)
392
393 TEXT_BOUNDARY_LINE_START = Accessibility.TEXT_BOUNDARY_TYPE(5)
394
395 TEXT_BOUNDARY_SENTENCE_END = Accessibility.TEXT_BOUNDARY_TYPE(4)
396
397 TEXT_BOUNDARY_SENTENCE_START = Accessibility.TEXT_BOUNDARY_TYPE(3)
398
399 TEXT_BOUNDARY_WORD_END = Accessibility.TEXT_BOUNDARY_TYPE(2)
400
401 TEXT_BOUNDARY_WORD_START = Accessibility.TEXT_BOUNDARY_TYPE(1)
402
403 TEXT_CLIP_BOTH = Accessibility.TEXT_CLIP_TYPE(3)
404
405 TEXT_CLIP_MAX = Accessibility.TEXT_CLIP_TYPE(2)
406
407 TEXT_CLIP_MIN = Accessibility.TEXT_CLIP_TYPE(1)
408
409 TEXT_CLIP_NONE = Accessibility.TEXT_CLIP_TYPE(0)
410
411
412 class Action(BaseProxy):
413     
414     
415     """
416     An interface through which a user-actionable user interface component
417     can be manipulated. Components which react to mouse or keyboard
418     input from the user, (with the exception of pure text entry fields
419     with no other function), should implement this interface. Typical
420     actions include "click", "press", "release" (for instance for
421     buttons), "menu" (for objects which have context menus invokable
422     from mouse or keyboard), "open" for icons representing files
423     folders, and others.
424     """
425     
426     
427     def doAction(self, *args, **kwargs):
428         """
429         doAction: 
430         @param : index
431         the 0-based index of the action to perform.
432         Causes the object to perform the specified action.
433         @return : a boolean indicating success or failure.
434         """
435         func = self.get_dbus_method("doAction")
436         return func(*args, **kwargs)
437     
438     def getDescription(self, *args, **kwargs):
439         """
440         getDescription: 
441         @param : index
442         the index of the action for which a description is desired.
443         Get the description of the specified action. The description
444         of an action may provide information about the result of action
445         invocation, unlike the action name. 
446         @return : a string containing the description of the specified
447         action.
448         """
449         func = self.get_dbus_method("getDescription")
450         return func(*args, **kwargs)
451     
452     def getKeyBinding(self, *args, **kwargs):
453         """
454         getKeyBinding: 
455         @param : index
456         the 0-based index of the action for which a key binding is requested.
457         Get the key binding associated with a specific action.
458         @return : a string containing the key binding for the specified
459         action, or an empty string ("") if none exists.
460         """
461         func = self.get_dbus_method("getKeyBinding")
462         return func(*args, **kwargs)
463     
464     def getName(self, *args, **kwargs):
465         """
466         getName: 
467         @param : index
468         the index of the action whose name is requested.
469         Get the name of the specified action. Action names generally
470         describe the user action, i.e. "click" or "press", rather then
471         the result of invoking the action.
472         @return : a string containing the name of the specified action.
473         """
474         func = self.get_dbus_method("getName")
475         return func(*args, **kwargs)
476     
477     def unImplemented(self, *args, **kwargs):
478         func = self.get_dbus_method("unImplemented")
479         return func(*args, **kwargs)
480     
481     def unImplemented2(self, *args, **kwargs):
482         func = self.get_dbus_method("unImplemented2")
483         return func(*args, **kwargs)
484     
485     def unImplemented3(self, *args, **kwargs):
486         func = self.get_dbus_method("unImplemented3")
487         return func(*args, **kwargs)
488     
489     def unImplemented4(self, *args, **kwargs):
490         func = self.get_dbus_method("unImplemented4")
491         return func(*args, **kwargs)
492     
493     def get_nActions(self):
494         self._pgetter(self._dbus_interface, "nActions")
495     def set_nActions(self, value):
496         self._psetter(self._dbus_interface, "nActions", value)
497     _nActionsDoc = \
498         """
499         nActions: a long containing the number of actions this object
500         supports.
501         """
502     nActions = property(fget=get_nActions, fset=set_nActions, doc=_nActionsDoc)
503
504
505 class Application(Accessible):
506     
507     
508     """
509     An interface identifying an object which is the root of the user
510     interface Accessible hierarchy associated with a running application.
511     Children of Application are typically, but not exclusively, top-level
512     windows.
513     """
514     
515     
516     def getLocale(self, *args, **kwargs):
517         """
518         Gets the locale in which the application is currently operating.
519         For the current message locale, use lctype LOCALE_TYPE_MESSAGES.
520         @param : lctype
521         The LocaleType for which the locale is queried. 
522         @return a string compliant with the POSIX standard for locale
523         description.
524         """
525         func = self.get_dbus_method("getLocale")
526         return func(*args, **kwargs)
527     
528     def pause(self, *args, **kwargs):
529         """
530         Request that the application temporarily stop sending events.
531         In most cases this should pause the application's main event
532         loop.
533         @return : true if the request succeeded, false otherwise.
534         """
535         func = self.get_dbus_method("pause")
536         return func(*args, **kwargs)
537     
538     def registerObjectEventListener(self, *args, **kwargs):
539         """
540         registerObjectEventListener: 
541         @param : listener
542         an EventListener object which will receive the requested events
543         @param : eventName
544         a UTF-8 string indicating the type of (toolkit-specific) event
545         being requested. Register with this application toolkit for "Accessibility::Accessible"
546         event notifications.
547         """
548         func = self.get_dbus_method("registerObjectEventListener")
549         return func(*args, **kwargs)
550     
551     def registerToolkitEventListener(self, *args, **kwargs):
552         """
553         @param : listener
554         an EventListener object which will receive the requested events
555         from the application's toolkits via toolit 'bridges' 
556         @param : eventName
557         a UTF-8 string indicating the type of (toolkit-specific) event
558         being requested. Not all applications can generate toolkit events
559         of a given type.
560         Register with this application's toolkit for "toolkit-specific"
561         event notifications.
562         """
563         func = self.get_dbus_method("registerToolkitEventListener")
564         return func(*args, **kwargs)
565     
566     def resume(self, *args, **kwargs):
567         """
568         Request that the application resume sending events.
569         @return : True if the request succeeded, False otherwise.
570         """
571         func = self.get_dbus_method("resume")
572         return func(*args, **kwargs)
573     
574     def unImplemented2_(self, *args, **kwargs):
575         func = self.get_dbus_method("unImplemented2_")
576         return func(*args, **kwargs)
577     
578     def unImplemented3_(self, *args, **kwargs):
579         func = self.get_dbus_method("unImplemented3_")
580         return func(*args, **kwargs)
581     
582     def unImplemented_(self, *args, **kwargs):
583         func = self.get_dbus_method("unImplemented_")
584         return func(*args, **kwargs)
585     
586     def get_id(self):
587         self._pgetter(self._dbus_interface, "id")
588     def set_id(self, value):
589         self._psetter(self._dbus_interface, "id", value)
590     _idDoc = \
591         """
592         The application instance's unique ID as assigned by the registry.
593         """
594     id = property(fget=get_id, fset=set_id, doc=_idDoc)
595     
596     def get_toolkitName(self):
597         self._pgetter(self._dbus_interface, "toolkitName")
598     def set_toolkitName(self, value):
599         self._psetter(self._dbus_interface, "toolkitName", value)
600     _toolkitNameDoc = \
601         """
602         A string indicating the type of user interface toolkit which
603         is used by the application.
604         """
605     toolkitName = property(fget=get_toolkitName, fset=set_toolkitName, doc=_toolkitNameDoc)
606     
607     def get_version(self):
608         self._pgetter(self._dbus_interface, "version")
609     def set_version(self, value):
610         self._psetter(self._dbus_interface, "version", value)
611     _versionDoc = \
612         """
613         A string indicating the version number of the application's accessibility
614         bridge implementation.
615         """
616     version = property(fget=get_version, fset=set_version, doc=_versionDoc)
617
618
619 class BoundingBox(list):
620     def __new__(cls, x, y, width, height):
621         list.__new__(cls, (x, y, width, height)
622     def __init__(self, x, y, width, height):
623         list.__init__(self, (x, y, width, height))
624     
625     x = property(fget=_get_x, fset=_set_x)
626     def _get_x(self):
627         return self[0]
628     def _set_x(self, val):
629         self[0] = val
630     y = property(fget=_get_y, fset=_set_y)
631     def _get_y(self):
632         return self[1]
633     def _set_y(self, val):
634         self[1] = val
635     width = property(fget=_get_width, fset=_set_width)
636     def _get_width(self):
637         return self[2]
638     def _set_width(self, val):
639         self[2] = val
640     height = property(fget=_get_height, fset=_set_height)
641     def _get_height(self):
642         return self[3]
643     def _set_height(self, val):
644         self[3] = val
645
646
647 class Collection(BaseProxy):
648     
649     
650     
651     
652     def createMatchRule(self, *args, **kwargs):
653         func = self.get_dbus_method("createMatchRule")
654         return func(*args, **kwargs)
655     
656     def freeMatchRule(self, *args, **kwargs):
657         func = self.get_dbus_method("freeMatchRule")
658         return func(*args, **kwargs)
659     
660     def getActiveDescendant(self, *args, **kwargs):
661         func = self.get_dbus_method("getActiveDescendant")
662         return func(*args, **kwargs)
663     
664     def getMatches(self, *args, **kwargs):
665         func = self.get_dbus_method("getMatches")
666         return func(*args, **kwargs)
667     
668     def getMatchesFrom(self, *args, **kwargs):
669         func = self.get_dbus_method("getMatchesFrom")
670         return func(*args, **kwargs)
671     
672     def getMatchesTo(self, *args, **kwargs):
673         func = self.get_dbus_method("getMatchesTo")
674         return func(*args, **kwargs)
675     
676     def isAncestorOf(self, *args, **kwargs):
677         func = self.get_dbus_method("isAncestorOf")
678         return func(*args, **kwargs)
679     
680     def unImplemented(self, *args, **kwargs):
681         func = self.get_dbus_method("unImplemented")
682         return func(*args, **kwargs)
683     
684     def unImplemented2(self, *args, **kwargs):
685         func = self.get_dbus_method("unImplemented2")
686         return func(*args, **kwargs)
687     
688     def unImplemented3(self, *args, **kwargs):
689         func = self.get_dbus_method("unImplemented3")
690         return func(*args, **kwargs)
691     
692     def unImplemented4(self, *args, **kwargs):
693         func = self.get_dbus_method("unImplemented4")
694         return func(*args, **kwargs)
695     
696     MATCH_ALL = Accessibility.MatchType(1)
697     
698     MATCH_ANY = Accessibility.MatchType(2)
699     
700     MATCH_EMPTY = Accessibility.MatchType(4)
701     
702     MATCH_INVALID = Accessibility.MatchType(0)
703     
704     MATCH_LAST_DEFINED = Accessibility.MatchType(5)
705     
706     MATCH_NONE = Accessibility.MatchType(3)
707     
708     class MatchType(Enum):
709         _enum_lookup = {
710             0:'MATCH_INVALID',
711             1:'MATCH_ALL',
712             2:'MATCH_ANY',
713             3:'MATCH_NONE',
714             4:'MATCH_EMPTY',
715             5:'MATCH_LAST_DEFINED',
716         }
717     
718     
719     SORT_ORDER_CANONICAL = Accessibility.SortOrder(1)
720     
721     SORT_ORDER_FLOW = Accessibility.SortOrder(2)
722     
723     SORT_ORDER_INVALID = Accessibility.SortOrder(0)
724     
725     SORT_ORDER_LAST_DEFINED = Accessibility.SortOrder(7)
726     
727     SORT_ORDER_REVERSE_CANONICAL = Accessibility.SortOrder(4)
728     
729     SORT_ORDER_REVERSE_FLOW = Accessibility.SortOrder(5)
730     
731     SORT_ORDER_REVERSE_TAB = Accessibility.SortOrder(6)
732     
733     SORT_ORDER_TAB = Accessibility.SortOrder(3)
734     
735     class SortOrder(Enum):
736         _enum_lookup = {
737             0:'SORT_ORDER_INVALID',
738             1:'SORT_ORDER_CANONICAL',
739             2:'SORT_ORDER_FLOW',
740             3:'SORT_ORDER_TAB',
741             4:'SORT_ORDER_REVERSE_CANONICAL',
742             5:'SORT_ORDER_REVERSE_FLOW',
743             6:'SORT_ORDER_REVERSE_TAB',
744             7:'SORT_ORDER_LAST_DEFINED',
745         }
746     
747     
748     TREE_INORDER = Accessibility.TreeTraversalType(2)
749     
750     TREE_LAST_DEFINED = Accessibility.TreeTraversalType(3)
751     
752     TREE_RESTRICT_CHILDREN = Accessibility.TreeTraversalType(0)
753     
754     TREE_RESTRICT_SIBLING = Accessibility.TreeTraversalType(1)
755     
756     class TreeTraversalType(Enum):
757         _enum_lookup = {
758             0:'TREE_RESTRICT_CHILDREN',
759             1:'TREE_RESTRICT_SIBLING',
760             2:'TREE_INORDER',
761             3:'TREE_LAST_DEFINED',
762         }
763
764
765 class Command(list):
766     def __new__(cls, name, id):
767         list.__new__(cls, (name, id)
768     def __init__(self, name, id):
769         list.__init__(self, (name, id))
770     
771     name = property(fget=_get_name, fset=_set_name)
772     def _get_name(self):
773         return self[0]
774     def _set_name(self, val):
775         self[0] = val
776     id = property(fget=_get_id, fset=_set_id)
777     def _get_id(self):
778         return self[1]
779     def _set_id(self, val):
780         self[1] = val
781
782
783 class CommandListener(BaseProxy):
784     
785     
786     """
787     An interface which should be implemented by assistive technologies
788     or other clients of the Selector interface, over which notifications
789     to the list of available commands is made. The notifyCommands()
790     method of the client is then called by the Selector instance.
791     """
792     
793     
794     def notifyCommands(self, *args, **kwargs):
795         """
796         Notify the CommandListener instance of changes to the currently
797         available commands, by sending the current CommandList.
798         @param : commands
799         The newly-available list of Command objects which may be invoked
800         by the listener.
801         """
802         func = self.get_dbus_method("notifyCommands")
803         return func(*args, **kwargs)
804
805
806 class Component(BaseProxy):
807     
808     
809     """
810     The Component interface is implemented by objects which occupy
811     on-screen space, e.g. objects which have onscreen visual representations.
812     The methods in Component allow clients to identify where the
813     objects lie in the onscreen coordinate system, their relative
814     size, stacking order, and position. It also provides a mechanism
815     whereby keyboard focus may be transferred to specific user interface
816     elements programmatically. This is a 2D API, coordinates of 3D
817     objects are projected into the 2-dimensional screen view for
818     purposes of this interface.
819     """
820     
821     
822     def contains(self, *args, **kwargs):
823         """
824         @return True if the specified point lies within the Component's
825         bounding box, False otherwise.
826         """
827         func = self.get_dbus_method("contains")
828         return func(*args, **kwargs)
829     
830     def deregisterFocusHandler(self, *args, **kwargs):
831         """
832         Request that an EventListener registered via registerFocusHandler
833         no longer be notified when this object receives keyboard focus.
834         """
835         func = self.get_dbus_method("deregisterFocusHandler")
836         return func(*args, **kwargs)
837     
838     def getAccessibleAtPoint(self, *args, **kwargs):
839         """
840         @return the Accessible child whose bounding box contains the
841         specified point.
842         """
843         func = self.get_dbus_method("getAccessibleAtPoint")
844         return func(*args, **kwargs)
845     
846     def getAlpha(self, *args, **kwargs):
847         """
848         Obtain the alpha value of the component. An alpha value of 1.0
849         or greater indicates that the object is fully opaque, and an
850         alpha value of 0.0 indicates that the object is fully transparent.
851         Negative alpha values have no defined meaning at this time.
852         """
853         func = self.get_dbus_method("getAlpha")
854         return func(*args, **kwargs)
855     
856     def getExtents(self, *args, **kwargs):
857         """
858         Obtain the Component's bounding box, in pixels, relative to the
859         specified coordinate system. 
860         @return a BoundingBox which entirely contains the object's onscreen
861         visual representation.
862         """
863         func = self.get_dbus_method("getExtents")
864         return func(*args, **kwargs)
865     
866     def getLayer(self, *args, **kwargs):
867         """
868         @return the ComponentLayer in which this object resides.
869         """
870         func = self.get_dbus_method("getLayer")
871         return func(*args, **kwargs)
872     
873     def getMDIZOrder(self, *args, **kwargs):
874         """
875         Obtain the relative stacking order (i.e. 'Z' order) of an object.
876         Larger values indicate that an object is on "top" of the stack,
877         therefore objects with smaller MDIZOrder may be obscured by objects
878         with a larger MDIZOrder, but not vice-versa. 
879         @return an integer indicating the object's place in the stacking
880         order.
881         """
882         func = self.get_dbus_method("getMDIZOrder")
883         return func(*args, **kwargs)
884     
885     def getPosition(self, *args, **kwargs):
886         """
887         Obtain the position of the current component in the coordinate
888         system specified by coord_type. 
889         @param : coord_type
890         @param : x
891         an out parameter which will be back-filled with the returned
892         x coordinate. 
893         @param : y
894         an out parameter which will be back-filled with the returned
895         y coordinate.
896         """
897         func = self.get_dbus_method("getPosition")
898         return func(*args, **kwargs)
899     
900     def getSize(self, *args, **kwargs):
901         """
902         Obtain the size, in the coordinate system specified by coord_type,
903         of the rectangular area which fully contains the object's visual
904         representation, without accounting for viewport clipping. 
905         @param : width
906         the object's horizontal extents in the specified coordinate system.
907         @param : height
908         the object's vertical extents in the specified coordinate system.
909         """
910         func = self.get_dbus_method("getSize")
911         return func(*args, **kwargs)
912     
913     def grabFocus(self, *args, **kwargs):
914         """
915         Request that the object obtain keyboard focus.
916         @return True if keyboard focus was successfully transferred to
917         the Component.
918         """
919         func = self.get_dbus_method("grabFocus")
920         return func(*args, **kwargs)
921     
922     def registerFocusHandler(self, *args, **kwargs):
923         """
924         Register an EventListener for notification when this object receives
925         keyboard focus.
926         """
927         func = self.get_dbus_method("registerFocusHandler")
928         return func(*args, **kwargs)
929     
930     def unImplemented(self, *args, **kwargs):
931         func = self.get_dbus_method("unImplemented")
932         return func(*args, **kwargs)
933     
934     def unImplemented2(self, *args, **kwargs):
935         func = self.get_dbus_method("unImplemented2")
936         return func(*args, **kwargs)
937     
938     def unImplemented3(self, *args, **kwargs):
939         func = self.get_dbus_method("unImplemented3")
940         return func(*args, **kwargs)
941
942
943 class ComponentLayer(Enum):
944     _enum_lookup = {
945         0:'LAYER_INVALID',
946         1:'LAYER_BACKGROUND',
947         2:'LAYER_CANVAS',
948         3:'LAYER_WIDGET',
949         4:'LAYER_MDI',
950         5:'LAYER_POPUP',
951         6:'LAYER_OVERLAY',
952         7:'LAYER_WINDOW',
953         8:'LAYER_LAST_DEFINED',
954     }
955
956
957 class ContentStream(BaseProxy):
958     
959     
960     """
961     An interface by which the requested data from a StreamableContent
962     object may be read by the client.
963     """
964     
965     
966     def close(self, *args, **kwargs):
967         """
968         close the stream and release associated resources. A client should
969         not perform further operations on a StreamableContent::Stream
970         object after closing it.
971         """
972         func = self.get_dbus_method("close")
973         return func(*args, **kwargs)
974     
975     def read(self, *args, **kwargs):
976         """
977         Request/read a specified amount of data from a Stream. 
978         @return the number of bytes actually read into the client buffer.
979         """
980         func = self.get_dbus_method("read")
981         return func(*args, **kwargs)
982     
983     def seek(self, *args, **kwargs):
984         """
985         Seek to a specified position in the Stream. 
986         @param : offset
987         an offset specifying the requested position in the stream, relative
988         to the SeekType specified in whence. 
989         @param : whence
990         a SeekType specifying the reference point from which the seek
991         offset is calculated. Some forms of seek are not supported by
992         certain implementations of Stream, in which case a NotSupported
993         exception will be raised. 
994         @return the actual resulting offset, if no exception was raised.
995         """
996         func = self.get_dbus_method("seek")
997         return func(*args, **kwargs)
998     
999     def unimplemented(self, *args, **kwargs):
1000         """
1001         /cond
1002         """
1003         func = self.get_dbus_method("unimplemented")
1004         return func(*args, **kwargs)
1005     
1006     def unimplemented2(self, *args, **kwargs):
1007         func = self.get_dbus_method("unimplemented2")
1008         return func(*args, **kwargs)
1009     
1010     class IOError(Exception):
1011         pass
1012     
1013     class NoPermission(Exception):
1014         pass
1015     
1016     class NotSupported(Exception):
1017         pass
1018     
1019     SEEK_CURRENT = Accessibility.SeekType(1)
1020     
1021     SEEK_END = Accessibility.SeekType(2)
1022     
1023     SEEK_SET = Accessibility.SeekType(0)
1024     
1025     class SeekType(Enum):
1026         """
1027         Specifies the meaning of a seek 'offset'. Not all SeekTypes are
1028         supported by all StreamableContent data sources, for instance
1029         some streams may not support seeking from the beginning or other
1030         types of 'backwards' seeks.
1031         """
1032
1033         _enum_lookup = {
1034             0:'SEEK_SET',
1035             1:'SEEK_CURRENT',
1036             2:'SEEK_END',
1037         }
1038
1039 class Desktop(Accessible):
1040     
1041     
1042     """
1043     At the moment this is only a marker interface, it acts just like
1044     any other Accessible. In all known implementations, the children
1045     are all instances of Application, but this is not guaranteed
1046     by this interface.
1047     """
1048     
1049     
1050     def unImplemented2_(self, *args, **kwargs):
1051         func = self.get_dbus_method("unImplemented2_")
1052         return func(*args, **kwargs)
1053     
1054     def unImplemented3_(self, *args, **kwargs):
1055         func = self.get_dbus_method("unImplemented3_")
1056         return func(*args, **kwargs)
1057     
1058     def unImplemented4_(self, *args, **kwargs):
1059         func = self.get_dbus_method("unImplemented4_")
1060         return func(*args, **kwargs)
1061     
1062     def unImplemented_(self, *args, **kwargs):
1063         func = self.get_dbus_method("unImplemented_")
1064         return func(*args, **kwargs)
1065
1066
1067 class DeviceEvent(list):
1068     def __new__(cls, type, id, hw_code, modifiers, timestamp, event_string, is_text):
1069         list.__new__(cls, (type, id, hw_code, modifiers, timestamp, event_string, is_text)
1070     def __init__(self, type, id, hw_code, modifiers, timestamp, event_string, is_text):
1071         list.__init__(self, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
1072     
1073     type = property(fget=_get_type, fset=_set_type)
1074     def _get_type(self):
1075         return self[0]
1076     def _set_type(self, val):
1077         self[0] = val
1078     id = property(fget=_get_id, fset=_set_id)
1079     def _get_id(self):
1080         return self[1]
1081     def _set_id(self, val):
1082         self[1] = val
1083     hw_code = property(fget=_get_hw_code, fset=_set_hw_code)
1084     def _get_hw_code(self):
1085         return self[2]
1086     def _set_hw_code(self, val):
1087         self[2] = val
1088     modifiers = property(fget=_get_modifiers, fset=_set_modifiers)
1089     def _get_modifiers(self):
1090         return self[3]
1091     def _set_modifiers(self, val):
1092         self[3] = val
1093     timestamp = property(fget=_get_timestamp, fset=_set_timestamp)
1094     def _get_timestamp(self):
1095         return self[4]
1096     def _set_timestamp(self, val):
1097         self[4] = val
1098     event_string = property(fget=_get_event_string, fset=_set_event_string)
1099     def _get_event_string(self):
1100         return self[5]
1101     def _set_event_string(self, val):
1102         self[5] = val
1103     is_text = property(fget=_get_is_text, fset=_set_is_text)
1104     def _get_is_text(self):
1105         return self[6]
1106     def _set_is_text(self, val):
1107         self[6] = val
1108
1109
1110 class DeviceEventController(BaseProxy):
1111     
1112     
1113     """
1114     The interface via which clients request notification of device
1115     events, and through which device events may be simulated.
1116     """
1117     
1118     
1119     def deregisterDeviceEventListener(self, *args, **kwargs):
1120         """
1121         De-register a previously registered keyboard eventlistener. 
1122         @param : listener
1123         a DeviceEventListener which will intercept events. 
1124         @param : typeseq
1125         an EventTypeSeq indicating which event types to stop listening
1126         for.
1127         """
1128         func = self.get_dbus_method("deregisterDeviceEventListener")
1129         return func(*args, **kwargs)
1130     
1131     def deregisterKeystrokeListener(self, *args, **kwargs):
1132         """
1133         De-register a previously registered keyboard eventlistener. 
1134         @param : listener
1135         a DeviceEventListener which will intercept key events. 
1136         @param : keys
1137         a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
1138         @param : mask
1139         a ControllerEventMask filtering the intercepted key events. 
1140         @param : type
1141         an EventType mask that may created by ORing event types together.
1142         """
1143         func = self.get_dbus_method("deregisterKeystrokeListener")
1144         return func(*args, **kwargs)
1145     
1146     def generateKeyboardEvent(self, *args, **kwargs):
1147         """
1148         Synthesize a keyboard event. 
1149         @param : keycode
1150         a long integer indicating the keycode of the keypress to be synthesized.
1151         @param : keystring
1152         an optional UTF-8 string indicating a complex keyboard input
1153         event. 
1154         @param : type
1155         a KeySynthType indicating the type of event(s) to be synthesized:
1156         a key press, release, press-release pair, or a complex input
1157         string (for instance from an internationalized or complex text
1158         input method, or a composed character).
1159         """
1160         func = self.get_dbus_method("generateKeyboardEvent")
1161         return func(*args, **kwargs)
1162     
1163     def generateMouseEvent(self, *args, **kwargs):
1164         """
1165         Synthesize a mouse event. 
1166         @param : x
1167         a long integer indicating the screen x coord for the mouse event.
1168         @param : y
1169         a long integer indicating the screen y coord for the mouse event.
1170         @param : eventName
1171         a string indicating the type of mouse event, e.g. "button1up"
1172         """
1173         func = self.get_dbus_method("generateMouseEvent")
1174         return func(*args, **kwargs)
1175     
1176     def notifyListenersAsync(self, *args, **kwargs):
1177         """
1178         Notify the Registry instance that a device event has taken place
1179         in an asynchronous manner. This is the method used by accessibility
1180         bridges to forward "toolkit dependent" device events to the Registry
1181         from the application's process space. If the event in question
1182         is potentially pre-emptible. notifyListenersSync should be used
1183         instead.
1184         """
1185         func = self.get_dbus_method("notifyListenersAsync")
1186         return func(*args, **kwargs)
1187     
1188     def notifyListenersSync(self, *args, **kwargs):
1189         """
1190         Notify the Registry instance that a device event has taken place,
1191         and allow pre-emptive listeners the opportunity to 'consume'
1192         the event and thus prevent its further issuance/forwarding. This
1193         is the method used by accessibility bridges to forward "toolkit
1194         dependent" device events to the Registry from the application's
1195         process space.
1196         @return True if the event was consumed by a (pre-emptive) listener,
1197         False if not (in which case the device event will be forwarded
1198         as normal to any application which would normally receive it,
1199         e.g. the currently active application in the case of mouse or
1200         keyboard events).
1201         """
1202         func = self.get_dbus_method("notifyListenersSync")
1203         return func(*args, **kwargs)
1204     
1205     def registerDeviceEventListener(self, *args, **kwargs):
1206         """
1207         Register to intercept events, and either pass them on or consume
1208         them. To listen to keyboard events use registerKeystrokeListener
1209         instead. 
1210         @param : listener
1211         a DeviceEventListener which will intercept events. 
1212         @param : typeseq
1213         an EventTypeSeq indicating which event types to listen for. 
1214         @return True if successful, False if not
1215         """
1216         func = self.get_dbus_method("registerDeviceEventListener")
1217         return func(*args, **kwargs)
1218     
1219     def registerKeystrokeListener(self, *args, **kwargs):
1220         """
1221         Register to intercept keyboard events, and either pass them on
1222         or consume them.
1223         @param : listener
1224         a DeviceEventListener which will intercept key events. 
1225         @param : keys
1226         a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
1227         @param : mask
1228         a ControllerEventMask filtering the intercepted key events. 
1229         @param : type
1230         a KeyEventTypeSeq that may created by ORing event types together.
1231         @param : mode
1232         an EventListenerMode indicating whether the listener should receive
1233         the events synchronously, potentially consuming them, or just
1234         be notified asynchronously of those events that have been generated.
1235         @return True if the DeviceEventListener was successfully registered
1236         for the requested KeySet, ControllerEventMask, event types, and
1237         EventListenerMode; otherwise returns False.
1238         """
1239         func = self.get_dbus_method("registerKeystrokeListener")
1240         return func(*args, **kwargs)
1241     
1242     def unImplemented(self, *args, **kwargs):
1243         func = self.get_dbus_method("unImplemented")
1244         return func(*args, **kwargs)
1245     
1246     def unImplemented2(self, *args, **kwargs):
1247         func = self.get_dbus_method("unImplemented2")
1248         return func(*args, **kwargs)
1249     
1250     def unImplemented3(self, *args, **kwargs):
1251         func = self.get_dbus_method("unImplemented3")
1252         return func(*args, **kwargs)
1253     
1254     def unImplemented4(self, *args, **kwargs):
1255         func = self.get_dbus_method("unImplemented4")
1256         return func(*args, **kwargs)
1257
1258
1259 class DeviceEventListener(BaseProxy):
1260     
1261     
1262     """
1263     This interface should be implemented by AT-SPI clients who wish
1264     to make use of the DeviceEventController to receive device event
1265     notifications. DeviceEvents include keyboard events and mouse
1266     button/motion events.
1267     """
1268     
1269     
1270     def notifyEvent(self, *args, **kwargs):
1271         """
1272         Notify an interested DeviceEventListener that a DeviceEvent has
1273         occurred. 
1274         @return True if the recipient/consumer wishes to consume the
1275         event, i.e. prevent it from being delivered to the desktop, False
1276         if the event should continue to be delivered as normal.
1277         """
1278         func = self.get_dbus_method("notifyEvent")
1279         return func(*args, **kwargs)
1280     
1281     def unImplemented_2_(self, *args, **kwargs):
1282         func = self.get_dbus_method("unImplemented_2_")
1283         return func(*args, **kwargs)
1284     
1285     def unImplemented_3_(self, *args, **kwargs):
1286         func = self.get_dbus_method("unImplemented_3_")
1287         return func(*args, **kwargs)
1288     
1289     def unImplemented_4_(self, *args, **kwargs):
1290         func = self.get_dbus_method("unImplemented_4_")
1291         return func(*args, **kwargs)
1292     
1293     def unImplemented_5_(self, *args, **kwargs):
1294         func = self.get_dbus_method("unImplemented_5_")
1295         return func(*args, **kwargs)
1296     
1297     def unImplemented_6_(self, *args, **kwargs):
1298         func = self.get_dbus_method("unImplemented_6_")
1299         return func(*args, **kwargs)
1300     
1301     def unImplemented__(self, *args, **kwargs):
1302         func = self.get_dbus_method("unImplemented__")
1303         return func(*args, **kwargs)
1304
1305
1306 class Document(BaseProxy):
1307     
1308     
1309     """
1310     Primarily a 'tagging' interface which indicates the start of
1311     document content in the Accessibility hierarchy. Accessible objects
1312     below the node implementing Document are normally assumed to
1313     be part of the document content. Attributes of Document are those
1314     attributes associated with the document as a whole. Objects that
1315     implement Document are normally expected to implement Collection
1316     as well.
1317     """
1318     
1319     
1320     def getAttributeValue(self, *args, **kwargs):
1321         """
1322         Gets the value of a single attribute, if specified for the document
1323         as a whole.
1324         @param : attributename
1325         a string indicating the name of a specific attribute (name-value
1326         pair) being queried.
1327         @return a string corresponding to the value of the specified
1328         attribute, or an empty string if the attribute is unspecified
1329         for the object.
1330         """
1331         func = self.get_dbus_method("getAttributeValue")
1332         return func(*args, **kwargs)
1333     
1334     def getAttributes(self, *args, **kwargs):
1335         """
1336         Gets all attributes specified for a document as a whole. For
1337         attributes which change within the document content, see Accessibility::Text::getAttributes
1338         instead.
1339         @return an AttributeSet containing the attributes of the document,
1340         as name-value pairs.
1341         """
1342         func = self.get_dbus_method("getAttributes")
1343         return func(*args, **kwargs)
1344     
1345     def getLocale(self, *args, **kwargs):
1346         """
1347         Gets the locale associated with the document's content. e.g.
1348         the locale for LOCALE_TYPE_MESSAGES.
1349         @return a string compliant with the POSIX standard for locale
1350         description.
1351         """
1352         func = self.get_dbus_method("getLocale")
1353         return func(*args, **kwargs)
1354     
1355     def unImplemented2_(self, *args, **kwargs):
1356         func = self.get_dbus_method("unImplemented2_")
1357         return func(*args, **kwargs)
1358     
1359     def unImplemented3_(self, *args, **kwargs):
1360         func = self.get_dbus_method("unImplemented3_")
1361         return func(*args, **kwargs)
1362     
1363     def unImplemented4_(self, *args, **kwargs):
1364         func = self.get_dbus_method("unImplemented4_")
1365         return func(*args, **kwargs)
1366     
1367     def unImplemented_(self, *args, **kwargs):
1368         func = self.get_dbus_method("unImplemented_")
1369         return func(*args, **kwargs)
1370
1371
1372 class EditableText(Text):
1373     
1374     
1375     """
1376     Derived from interface Text, EditableText provides methods for
1377     modifying textual content of components which support editing.
1378     EditableText also interacts with the system clipboard via copyText,
1379     cutText, and pasteText.
1380     """
1381     
1382     
1383     def copyText(self, *args, **kwargs):
1384         """
1385         Copy a range of text into the system clipboard. 
1386         @param : startPos
1387         the character offset of the first character in the range of text
1388         being copied. 
1389         @param : endPos
1390         the offset of the first character past the end of the range of
1391         text being copied.
1392         """
1393         func = self.get_dbus_method("copyText")
1394         return func(*args, **kwargs)
1395     
1396     def cutText(self, *args, **kwargs):
1397         """
1398         Excise a range of text from a Text object, copying it into the
1399         system clipboard. 
1400         @param : startPos
1401         the character offset of the first character in the range of text
1402         being cut. 
1403         @param : endPos
1404         the offset of the first character past the end of the range of
1405         text being cut. 
1406         @return True if the text was successfully cut, False otherwise.
1407         """
1408         func = self.get_dbus_method("cutText")
1409         return func(*args, **kwargs)
1410     
1411     def deleteText(self, *args, **kwargs):
1412         """
1413         Excise a range of text from a Text object without copying it
1414         into the system clipboard. 
1415         @param : startPos
1416         the character offset of the first character in the range of text
1417         being deleted. 
1418         @param : endPos
1419         the offset of the first character past the end of the range of
1420         text being deleted. 
1421         @return True if the text was successfully deleted, False otherwise.
1422         """
1423         func = self.get_dbus_method("deleteText")
1424         return func(*args, **kwargs)
1425     
1426     def insertText(self, *args, **kwargs):
1427         """
1428         Insert new text contents into an existing text object at a given
1429         location, while retaining the old contents. 
1430         @param : position
1431         the character offset into the Text implementor's content at which
1432         the new content will be inserted. 
1433         @param : text
1434         a UTF-8 string of which length characters will be inserted into
1435         the text object's text buffer. 
1436         @param : length
1437         the number of characters of text to insert. If the character
1438         count of text is less than or equal to length, the entire contents
1439         of text will be inserted.
1440         @return True if the text content was successfully inserted, False
1441         otherwise.
1442         """
1443         func = self.get_dbus_method("insertText")
1444         return func(*args, **kwargs)
1445     
1446     def pasteText(self, *args, **kwargs):
1447         """
1448         Copy the text contents of the system clipboard, if any, into
1449         a Text object, inserting it at a particular character offset.
1450         @param : position
1451         the character offset before which the text will be inserted.
1452         @return True if the text was successfully pasted into the Text
1453         object, False otherwise.
1454         """
1455         func = self.get_dbus_method("pasteText")
1456         return func(*args, **kwargs)
1457     
1458     def setAttributes(self, *args, **kwargs):
1459         """
1460         Apply a particular set of attributes to a range of text.
1461         @return True if the text attributes were successfully modified,
1462         False otherwise.
1463         """
1464         func = self.get_dbus_method("setAttributes")
1465         return func(*args, **kwargs)
1466     
1467     def setTextContents(self, *args, **kwargs):
1468         """
1469         Replace the text contents with a new string, discarding the old
1470         contents.
1471         @param : newContents
1472         a UTF-8 string with which the text object's contents will be
1473         replaced. 
1474         @return True if the text content was successfully changed, False
1475         otherwise.
1476         """
1477         func = self.get_dbus_method("setTextContents")
1478         return func(*args, **kwargs)
1479     
1480     def unImplemented10(self, *args, **kwargs):
1481         func = self.get_dbus_method("unImplemented10")
1482         return func(*args, **kwargs)
1483     
1484     def unImplemented11(self, *args, **kwargs):
1485         func = self.get_dbus_method("unImplemented11")
1486         return func(*args, **kwargs)
1487     
1488     def unImplemented12(self, *args, **kwargs):
1489         func = self.get_dbus_method("unImplemented12")
1490         return func(*args, **kwargs)
1491     
1492     def unImplemented5(self, *args, **kwargs):
1493         """
1494         unImplemented:
1495         placeholders for future expansion. Note that these are named
1496         'unimplemented5 and unimplemented6' to avoid conflict with placeholders
1497         from Accessibility::Text.
1498         """
1499         func = self.get_dbus_method("unImplemented5")
1500         return func(*args, **kwargs)
1501     
1502     def unImplemented6(self, *args, **kwargs):
1503         func = self.get_dbus_method("unImplemented6")
1504         return func(*args, **kwargs)
1505     
1506     def unImplemented9(self, *args, **kwargs):
1507         func = self.get_dbus_method("unImplemented9")
1508         return func(*args, **kwargs)
1509
1510
1511 class Event(list):
1512     def __new__(cls, type, source, detail1, detail2, any_data):
1513         list.__new__(cls, (type, source, detail1, detail2, any_data)
1514     def __init__(self, type, source, detail1, detail2, any_data):
1515         list.__init__(self, (type, source, detail1, detail2, any_data))
1516     
1517     type = property(fget=_get_type, fset=_set_type)
1518     def _get_type(self):
1519         return self[0]
1520     def _set_type(self, val):
1521         self[0] = val
1522     source = property(fget=_get_source, fset=_set_source)
1523     def _get_source(self):
1524         return self[1]
1525     def _set_source(self, val):
1526         self[1] = val
1527     detail1 = property(fget=_get_detail1, fset=_set_detail1)
1528     def _get_detail1(self):
1529         return self[2]
1530     def _set_detail1(self, val):
1531         self[2] = val
1532     detail2 = property(fget=_get_detail2, fset=_set_detail2)
1533     def _get_detail2(self):
1534         return self[3]
1535     def _set_detail2(self, val):
1536         self[3] = val
1537     any_data = property(fget=_get_any_data, fset=_set_any_data)
1538     def _get_any_data(self):
1539         return self[4]
1540     def _set_any_data(self, val):
1541         self[4] = val
1542
1543
1544 class EventDetails(list):
1545     def __new__(cls, host_application, source_role, source_name, any_data):
1546         list.__new__(cls, (host_application, source_role, source_name, any_data)
1547     def __init__(self, host_application, source_role, source_name, any_data):
1548         list.__init__(self, (host_application, source_role, source_name, any_data))
1549     
1550     host_application = property(fget=_get_host_application, fset=_set_host_application)
1551     def _get_host_application(self):
1552         return self[0]
1553     def _set_host_application(self, val):
1554         self[0] = val
1555     source_role = property(fget=_get_source_role, fset=_set_source_role)
1556     def _get_source_role(self):
1557         return self[1]
1558     def _set_source_role(self, val):
1559         self[1] = val
1560     source_name = property(fget=_get_source_name, fset=_set_source_name)
1561     def _get_source_name(self):
1562         return self[2]
1563     def _set_source_name(self, val):
1564         self[2] = val
1565     any_data = property(fget=_get_any_data, fset=_set_any_data)
1566     def _get_any_data(self):
1567         return self[3]
1568     def _set_any_data(self, val):
1569         self[3] = val
1570
1571
1572 class EventListener(BaseProxy):
1573     
1574     
1575     """
1576     A generic interface implemented by objects for the receipt of
1577     event notifications. EventListener is the interface from which
1578     Accessibility::Registry is derived, and via which clients of
1579     the Registry receive notification of changes to an application's
1580     user interface and content.
1581     """
1582     
1583     
1584     def notifyEvent(self, *args, **kwargs):
1585         """
1586         Synchronously notify an EventListener that an event has occurred,
1587         by passing it an Event struct. 
1588         @param : e
1589         The Event about which the listener is being notified.
1590         """
1591         func = self.get_dbus_method("notifyEvent")
1592         return func(*args, **kwargs)
1593     
1594     def unImplemented2_(self, *args, **kwargs):
1595         func = self.get_dbus_method("unImplemented2_")
1596         return func(*args, **kwargs)
1597     
1598     def unImplemented3_(self, *args, **kwargs):
1599         func = self.get_dbus_method("unImplemented3_")
1600         return func(*args, **kwargs)
1601     
1602     def unImplemented4_(self, *args, **kwargs):
1603         func = self.get_dbus_method("unImplemented4_")
1604         return func(*args, **kwargs)
1605     
1606     def unImplemented_(self, *args, **kwargs):
1607         func = self.get_dbus_method("unImplemented_")
1608         return func(*args, **kwargs)
1609
1610
1611 class EventListenerMode(list):
1612     def __new__(cls, synchronous, preemptive, global):
1613         list.__new__(cls, (synchronous, preemptive, global)
1614     def __init__(self, synchronous, preemptive, global):
1615         list.__init__(self, (synchronous, preemptive, global))
1616     
1617     synchronous = property(fget=_get_synchronous, fset=_set_synchronous)
1618     def _get_synchronous(self):
1619         return self[0]
1620     def _set_synchronous(self, val):
1621         self[0] = val
1622     preemptive = property(fget=_get_preemptive, fset=_set_preemptive)
1623     def _get_preemptive(self):
1624         return self[1]
1625     def _set_preemptive(self, val):
1626         self[1] = val
1627     global = property(fget=_get_global, fset=_set_global)
1628     def _get_global(self):
1629         return self[2]
1630     def _set_global(self, val):
1631         self[2] = val
1632
1633
1634 class EventType(Enum):
1635     _enum_lookup = {
1636         0:'KEY_PRESSED_EVENT',
1637         1:'KEY_RELEASED_EVENT',
1638         2:'BUTTON_PRESSED_EVENT',
1639         3:'BUTTON_RELEASED_EVENT',
1640     }
1641
1642
1643 class Hyperlink(BaseProxy):
1644     
1645     
1646     """
1647     Instances of Hyperlink are returned by Hypertext objects, and
1648     are the means by which end users and clients interact with linked,
1649     and in some cases embedded, content. Hyperlinks may have multiple
1650     "anchors", where an anchor corresponds to a reference to a particular
1651     resource with a corresponding resource identified (URI). Hyperlinks
1652     may be queried for their URIs, or queried for the objects corresponding
1653     to their anchors. The objects thus obtained are instances of
1654     Accessible, and may be queried, and manipulated via the Action
1655     interface.
1656     """
1657     
1658     
1659     def getObject(self, *args, **kwargs):
1660         """
1661         Gets the i'th object, (where i is an integer between 0 and Hyperlink::numAnchors
1662         - 1, inclusive) associated with a Hyperlink. The objects returned
1663         are usually actionable (i.e. they should implement Accessibility::Action),
1664         and the available actions often include "open", "bookmark", "save
1665         link as", etc. They may also implement Accessibility::StreamableContent,
1666         although clients can normally use getURI to obtain a resource
1667         locator via which the object's data may be accessed.
1668         @return an Accessible object instance representing the Hyperlink's
1669         ith anchor, or through which the content associated with the
1670         ith anchor can be accessed.
1671         """
1672         func = self.get_dbus_method("getObject")
1673         return func(*args, **kwargs)
1674     
1675     def getURI(self, *args, **kwargs):
1676         """
1677         Obtain a resource locator ('URI') which can be used to access
1678         the content to which this link "points" or is connected. 
1679         @return a string corresponding to the URI of the Hyperlink's
1680         'ith' anchor, if one exists, or a NIL string otherwise.
1681         """
1682         func = self.get_dbus_method("getURI")
1683         return func(*args, **kwargs)
1684     
1685     def isValid(self, *args, **kwargs):
1686         """
1687         Check the hyperlink to see if a connection to its backing content
1688         can be established, or if its URI is valid. 
1689         @return True if the object's content is available, or False if
1690         the hyperlink's URI is invalid, or a connection to the resource
1691         can not be established.
1692         """
1693         func = self.get_dbus_method("isValid")
1694         return func(*args, **kwargs)
1695     
1696     def unImplemented(self, *args, **kwargs):
1697         func = self.get_dbus_method("unImplemented")
1698         return func(*args, **kwargs)
1699     
1700     def unImplemented2(self, *args, **kwargs):
1701         func = self.get_dbus_method("unImplemented2")
1702         return func(*args, **kwargs)
1703     
1704     def unImplemented3(self, *args, **kwargs):
1705         func = self.get_dbus_method("unImplemented3")
1706         return func(*args, **kwargs)
1707     
1708     def unImplemented4(self, *args, **kwargs):
1709         func = self.get_dbus_method("unImplemented4")
1710         return func(*args, **kwargs)
1711     
1712     def get_endIndex(self):
1713         self._pgetter(self._dbus_interface, "endIndex")
1714     def set_endIndex(self, value):
1715         self._psetter(self._dbus_interface, "endIndex", value)
1716     _endIndexDoc = \
1717         """
1718         the ending offset within the containing Hypertext content with
1719         which this Hyperlink is associated; that is, the offset of the
1720         first element past the range within the Hypertext associated
1721         with this Hyperlink.
1722         """
1723     endIndex = property(fget=get_endIndex, fset=set_endIndex, doc=_endIndexDoc)
1724     
1725     def get_nAnchors(self):
1726         self._pgetter(self._dbus_interface, "nAnchors")
1727     def set_nAnchors(self, value):
1728         self._psetter(self._dbus_interface, "nAnchors", value)
1729     _nAnchorsDoc = \
1730         """
1731         the number of separate anchors associated with this Hyperlink
1732         """
1733     nAnchors = property(fget=get_nAnchors, fset=set_nAnchors, doc=_nAnchorsDoc)
1734     
1735     def get_startIndex(self):
1736         self._pgetter(self._dbus_interface, "startIndex")
1737     def set_startIndex(self, value):
1738         self._psetter(self._dbus_interface, "startIndex", value)
1739     _startIndexDoc = \
1740         """
1741         the starting offset within the containing Hypertext content with
1742         which this Hyperlink is associated
1743         """
1744     startIndex = property(fget=get_startIndex, fset=set_startIndex, doc=_startIndexDoc)
1745
1746
1747 class Hypertext(BaseProxy):
1748     
1749     
1750     """
1751     An interface used for objects which implement linking between
1752     multiple resource or content locations, or multiple 'markers'
1753     within a single document. A Hypertext instance is associated
1754     with one or more Hyperlinks, which are associated with particular
1755     offsets within the Hypertext's included content.
1756     """
1757     
1758     
1759     def getLink(self, *args, **kwargs):
1760         """
1761         Get one of the Hyperlinks associated with this Hypertext object,
1762         by index.
1763         @param : linkIndex
1764         an integer from 0 to getNLinks() - 1. 
1765         @return the Hyperlink in this Hypertext object.
1766         """
1767         func = self.get_dbus_method("getLink")
1768         return func(*args, **kwargs)
1769     
1770     def getLinkIndex(self, *args, **kwargs):
1771         """
1772         Get the hyperlink index, if any, associated with a particular
1773         character offset in the Hypertext object. For Hypertext implementors
1774         without textual content, all hyperlinks are associated with character
1775         offset '0'.
1776         @return the index of the Hyperlink associated with character
1777         offset characterIndex, or -1 if no Hyperlink is associated with
1778         that character offset.
1779         """
1780         func = self.get_dbus_method("getLinkIndex")
1781         return func(*args, **kwargs)
1782     
1783     def getNLinks(self, *args, **kwargs):
1784         """
1785         Query the hypertext object for the number of Hyperlinks it contains.
1786         @return the number of Hyperlinks associated with this Hypertext
1787         object, as a long integer.
1788         """
1789         func = self.get_dbus_method("getNLinks")
1790         return func(*args, **kwargs)
1791     
1792     def unImplemented(self, *args, **kwargs):
1793         func = self.get_dbus_method("unImplemented")
1794         return func(*args, **kwargs)
1795     
1796     def unImplemented2(self, *args, **kwargs):
1797         func = self.get_dbus_method("unImplemented2")
1798         return func(*args, **kwargs)
1799     
1800     def unImplemented3(self, *args, **kwargs):
1801         func = self.get_dbus_method("unImplemented3")
1802         return func(*args, **kwargs)
1803     
1804     def unImplemented4(self, *args, **kwargs):
1805         func = self.get_dbus_method("unImplemented4")
1806         return func(*args, **kwargs)
1807
1808
1809 class Image(BaseProxy):
1810     
1811     
1812     """
1813     An interface implemented by objects which render image data or
1814     pictorial information to the screen. When onscreen components
1815     include graphical information that is not purely intended to
1816     enhance "3d effect" or visual layout, but which conveys some
1817     semantic or informational content to the sighted user, they should
1818     implement Image, and that semantic content should be conveyed
1819     textually to the extent possible via the image description, as
1820     well as the Accessible::name and Accessible::description properties.
1821     """
1822     
1823     
1824     def getImageExtents(self, *args, **kwargs):
1825         """
1826         Obtain a bounding box which entirely contains the image contents,
1827         as displayed on screen. The bounds returned do not account for
1828         any viewport clipping or the fact that the image may be partially
1829         or wholly obscured by other onscreen content. 
1830         @param : coordType
1831         If 0, the returned bounding box position is returned relative
1832         to the screen; if 1, the bounding box position is returned relative
1833         to the containing window. 
1834         @return a BoundingBox enclosing the image's onscreen representation.
1835         """
1836         func = self.get_dbus_method("getImageExtents")
1837         return func(*args, **kwargs)
1838     
1839     def getImagePosition(self, *args, **kwargs):
1840         """
1841         Get the coordinates of the current image position on screen.
1842         @param : x
1843         Back-filled with the x coordinate of the onscreen image (i.e.
1844         the minimum x coordinate) 
1845         @param : y
1846         Back-filled with the y coordinate of the onscreen image (i.e.
1847         the minimum y coordinate) 
1848         @param : coordType
1849         If 0, the returned x and y coordinates are returned relative
1850         to the screen; if 1, they are returned relative to the containing
1851         window.
1852         """
1853         func = self.get_dbus_method("getImagePosition")
1854         return func(*args, **kwargs)
1855     
1856     def getImageSize(self, *args, **kwargs):
1857         """
1858         Obtain the width and height of the current onscreen view of the
1859         image. The extents returned do not account for any viewport clipping
1860         or the fact that the image may be partially or wholly obscured
1861         by other onscreen content. 
1862         @param : width
1863         Back-filled with the x extents of the onscreen image (i.e. the
1864         image width in pixels) 
1865         @param : height
1866         Back-filled with the y extents of the onscreen image (i.e. the
1867         image height in pixels)
1868         """
1869         func = self.get_dbus_method("getImageSize")
1870         return func(*args, **kwargs)
1871     
1872     def unImplemented(self, *args, **kwargs):
1873         func = self.get_dbus_method("unImplemented")
1874         return func(*args, **kwargs)
1875     
1876     def unImplemented2(self, *args, **kwargs):
1877         func = self.get_dbus_method("unImplemented2")
1878         return func(*args, **kwargs)
1879     
1880     def unImplemented3(self, *args, **kwargs):
1881         func = self.get_dbus_method("unImplemented3")
1882         return func(*args, **kwargs)
1883     
1884     def get_imageDescription(self):
1885         self._pgetter(self._dbus_interface, "imageDescription")
1886     def set_imageDescription(self, value):
1887         self._psetter(self._dbus_interface, "imageDescription", value)
1888     _imageDescriptionDoc = \
1889         """
1890         A UTF-8 string providing a textual description of what is visually
1891         depicted in the image.
1892         """
1893     imageDescription = property(fget=get_imageDescription, fset=set_imageDescription, doc=_imageDescriptionDoc)
1894     
1895     def get_imageLocale(self):
1896         self._pgetter(self._dbus_interface, "imageLocale")
1897     def set_imageLocale(self, value):
1898         self._psetter(self._dbus_interface, "imageLocale", value)
1899     _imageLocaleDoc = \
1900         """
1901         A string corresponding to the POSIX LC_MESSAGES locale used by
1902         the imageDescription.
1903         """
1904     imageLocale = property(fget=get_imageLocale, fset=set_imageLocale, doc=_imageLocaleDoc)
1905
1906
1907 class KeyDefinition(list):
1908     def __new__(cls, keycode, keysym, keystring, unused):
1909         list.__new__(cls, (keycode, keysym, keystring, unused)
1910     def __init__(self, keycode, keysym, keystring, unused):
1911         list.__init__(self, (keycode, keysym, keystring, unused))
1912     
1913     keycode = property(fget=_get_keycode, fset=_set_keycode)
1914     def _get_keycode(self):
1915         return self[0]
1916     def _set_keycode(self, val):
1917         self[0] = val
1918     keysym = property(fget=_get_keysym, fset=_set_keysym)
1919     def _get_keysym(self):
1920         return self[1]
1921     def _set_keysym(self, val):
1922         self[1] = val
1923     keystring = property(fget=_get_keystring, fset=_set_keystring)
1924     def _get_keystring(self):
1925         return self[2]
1926     def _set_keystring(self, val):
1927         self[2] = val
1928     unused = property(fget=_get_unused, fset=_set_unused)
1929     def _get_unused(self):
1930         return self[3]
1931     def _set_unused(self, val):
1932         self[3] = val
1933
1934
1935 class KeyEventType(Enum):
1936     _enum_lookup = {
1937         0:'KEY_PRESSED',
1938         1:'KEY_RELEASED',
1939     }
1940
1941
1942 class KeySynthType(Enum):
1943     _enum_lookup = {
1944         0:'KEY_PRESS',
1945         1:'KEY_RELEASE',
1946         2:'KEY_PRESSRELEASE',
1947         3:'KEY_SYM',
1948         4:'KEY_STRING',
1949     }
1950
1951
1952 class LOCALE_TYPE(Enum):
1953     _enum_lookup = {
1954         0:'LOCALE_TYPE_MESSAGES',
1955         1:'LOCALE_TYPE_COLLATE',
1956         2:'LOCALE_TYPE_CTYPE',
1957         3:'LOCALE_TYPE_MONETARY',
1958         4:'LOCALE_TYPE_NUMERIC',
1959         5:'LOCALE_TYPE_TIME',
1960     }
1961
1962
1963 class LoginHelper(BaseProxy):
1964     
1965     
1966     """
1967     An interface for use by assistive technologies by which they
1968     can access system information and services on a 'need to know'
1969     basis while the screen is locked, during user authentication,
1970     or during other sensitive operations.     
1971     This interface is intended for use by assistive technologies
1972     and related user-enabling services, and by applications and utilities
1973     which may wish to restrict access to certain system devices and
1974     services during security-sensitive states, e.g. when the screen
1975     is locked or during authentication into some secure service.
1976     Such 'applications' (for instance, screen lock dialogs and security-enabled
1977     web browsers) use the LoginHelper client interfaces, and the
1978     bonobo-activation query service, to query for assistive technologies
1979     which advertise the LoginHelper service. The client then queries
1980     these assistive technologies for their device I/O requirements,
1981     via the getDeviceReqs call. The client may then issue the advisory
1982     request setSafe (TRUE), which requests that the LoginHelper -implementing
1983     service make a best-effort attempt to make itself more secure
1984     (for instance, an onscreen keyboard might turn off word prediction,
1985     and a screenreader may turn off keyboard echo via speech). The
1986     return value of setSafe is an advisory indication of whether
1987     this attempt was successful (no specific guarantees are implied).
1988     Once the 'security sensitive' state is exited, the client should
1989     call setSafe (FALSE).
1990     The return values from getDeviceReqs inform the client of which
1991     services the LoginHelper service (e. g. assistive technology)
1992     needs in order to do its job. The client may use this information
1993     to loosen any restrictions on access which it may currently have
1994     in place (for instance, keyboard grabs, etc.). If it does not
1995     do so, the likely outcome is that the end-user will experience
1996     loss of access to the system.
1997     """
1998     
1999     
2000     def getDeviceReqs(self, *args, **kwargs):
2001         """
2002         getDeviceReqs:
2003         Query a LoginHelper for the types of device I/O it requires,
2004         in order to do its job. For instance, a LoginHelper which needs
2005         to receive keyboard events will include Accessibility_LoginHelper_CORE_KEYBOARD
2006         in this list.
2007         @return : A sequence of LoginHelper_DeviceReq indicating the
2008         device I/O required in order to facilitate end-user access to
2009         the system.
2010         """
2011         func = self.get_dbus_method("getDeviceReqs")
2012         return func(*args, **kwargs)
2013     
2014     def getRaiseWindows(self, *args, **kwargs):
2015         """
2016         getRaiseWindows:
2017         Get a list of window IDs that need raising on login.
2018         @return : a sequence containing window IDS for toplevels which
2019         need to be raised/made visible during user authentication, in
2020         order for the LoginHelper to facilitate end-user access to the
2021         system.
2022         """
2023         func = self.get_dbus_method("getRaiseWindows")
2024         return func(*args, **kwargs)
2025     
2026     def setSafe(self, *args, **kwargs):
2027         """
2028         setSafe: 
2029         @param : safe_mode
2030         TRUE if the client is requesting that 'safe mode' be initiated,
2031         FALSE if the client is advising that 'safe mode' may be exited,
2032         i.e. normal operation may be resumed.
2033         Request a LoginHelper to enter "safe" mode, or inform LoginHelper
2034         that "safe" mode may be exited. If safe_mode is TRUE, but the
2035         return value is FALSE, the requesting client may wish to deny
2036         services to the LoginHelper, for instance avoid raising its toplevels.
2037         The return value is purely advisory, and no guarantees are intended
2038         about what the implementing LoginHelper will do to improve security
2039         when in "safe" mode.
2040         @return : whether the LoginHelper is now "safe" or not.
2041         """
2042         func = self.get_dbus_method("setSafe")
2043         return func(*args, **kwargs)
2044     
2045     def unImplemented(self, *args, **kwargs):
2046         func = self.get_dbus_method("unImplemented")
2047         return func(*args, **kwargs)
2048     
2049     def unImplemented2(self, *args, **kwargs):
2050         func = self.get_dbus_method("unImplemented2")
2051         return func(*args, **kwargs)
2052     
2053     def unImplemented3(self, *args, **kwargs):
2054         func = self.get_dbus_method("unImplemented3")
2055         return func(*args, **kwargs)
2056     
2057     def unImplemented4(self, *args, **kwargs):
2058         func = self.get_dbus_method("unImplemented4")
2059         return func(*args, **kwargs)
2060     
2061     AUDIO_IN = Accessibility.DeviceReq(6)
2062     
2063     AUDIO_OUT = Accessibility.DeviceReq(5)
2064     
2065     CORE_KEYBOARD = Accessibility.DeviceReq(1)
2066     
2067     CORE_POINTER = Accessibility.DeviceReq(2)
2068     
2069     class DeviceReq(Enum):
2070         _enum_lookup = {
2071             0:'GUI_EVENTS',
2072             1:'CORE_KEYBOARD',
2073             2:'CORE_POINTER',
2074             3:'EXT_INPUT',
2075             4:'POST_WINDOWS',
2076             5:'AUDIO_OUT',
2077             6:'AUDIO_IN',
2078             7:'NETWORK',
2079             8:'LOCALHOST',
2080             9:'SERIAL_OUT',
2081             10:'SERIAL_IN',
2082         }
2083     
2084     
2085     EXT_INPUT = Accessibility.DeviceReq(3)
2086     
2087     GUI_EVENTS = Accessibility.DeviceReq(0)
2088     
2089     LOCALHOST = Accessibility.DeviceReq(8)
2090     
2091     NETWORK = Accessibility.DeviceReq(7)
2092     
2093     POST_WINDOWS = Accessibility.DeviceReq(4)
2094     
2095     SERIAL_IN = Accessibility.DeviceReq(10)
2096     
2097     SERIAL_OUT = Accessibility.DeviceReq(9)
2098     
2099     class WindowInfo(list):
2100         def __new__(cls, winID):
2101             list.__new__(cls, (winID)
2102         def __init__(self, winID):
2103             list.__init__(self, (winID))
2104         
2105         winID = property(fget=_get_winID, fset=_set_winID)
2106         def _get_winID(self):
2107             return self[0]
2108         def _set_winID(self, val):
2109             self[0] = val
2110
2111
2112 class ModifierType(Enum):
2113     _enum_lookup = {
2114         0:'MODIFIER_SHIFT',
2115         1:'MODIFIER_SHIFTLOCK',
2116         2:'MODIFIER_CONTROL',
2117         3:'MODIFIER_ALT',
2118         4:'MODIFIER_META',
2119         5:'MODIFIER_META2',
2120         6:'MODIFIER_META3',
2121         7:'MODIFIER_NUMLOCK',
2122     }
2123
2124
2125 class Registry(EventListener):
2126     
2127     
2128     """
2129     The Registry is a service through which applications providing
2130     accessibility services (servers) can rendezvous with consumers
2131     of those services (Assistive Technologies). The Registry is the
2132     first "port of call" for accessible applications and for assistive
2133     technologies wishing to query and interact with those applications.
2134     The Registry service provides four basic functions to Assistive
2135     Technology (AT) clients: 
2136     it provides a list of the applications who have registered with
2137     the AT-SPI framework, thereby announcing their participation
2138     in the AT-SPI framework; 
2139     it allows AT clients to register for notification of changes
2140     in application state (at-spi Events); 
2141     it dispatches/relays said events from participating applications
2142     to the registered listeners; 
2143     it gives access to system device events via the associated DeviceEventController
2144     interface.
2145     From the point of view of accessible applications (i.e. AT-SPI
2146     service producers), the Registry is primarily a registration
2147     and event delivery service. Applications normally only call the
2148     registerApplication and deregisterApplication Registry methods,
2149     and its inherited EventListener::notifyEvent method.
2150     The Registry normally lives in its own process space; communication
2151     via Registry and both application services and AT clients takes
2152     place via IPC. A process space diagram illustrating the relationship
2153     between applications, Registry, and AT is shown below.
2154     """
2155     
2156     
2157     def deregisterApplication(self, *args, **kwargs):
2158         """
2159         De-register an application previously registered with the broker.
2160         deregisterApplication: 
2161         @param : app
2162         a reference to the Application to be deregistered.
2163         """
2164         func = self.get_dbus_method("deregisterApplication")
2165         return func(*args, **kwargs)
2166     
2167     def deregisterGlobalEventListener(self, *args, **kwargs):
2168         """
2169         deregisterGlobalEventListener: 
2170         @param : listener
2171         the requesting EventListener 
2172         @param : eventName
2173         a string indicating the type of events
2174         Request that a previously registered client stop receiving global
2175         notifications for events of a certain type.
2176         """
2177         func = self.get_dbus_method("deregisterGlobalEventListener")
2178         return func(*args, **kwargs)
2179     
2180     def deregisterGlobalEventListenerAll(self, *args, **kwargs):
2181         """
2182         deregisterGlobalEventListenerAll: 
2183         @param : listener
2184         the requesting EventListener
2185         Request that a previously registered client stop receiving global
2186         notifications for all events for which it was registered.
2187         """
2188         func = self.get_dbus_method("deregisterGlobalEventListenerAll")
2189         return func(*args, **kwargs)
2190     
2191     def getDesktop(self, *args, **kwargs):
2192         """
2193         getDesktop: 
2194         : the index of the requested Desktop.
2195         Get the nth accessible desktop.
2196         @return a reference to the requested Desktop.
2197         """
2198         func = self.get_dbus_method("getDesktop")
2199         return func(*args, **kwargs)
2200     
2201     def getDesktopCount(self, *args, **kwargs):
2202         """
2203         event types: "Window" "Desktop" "Window:Create" "Window:Destroy"
2204         "Window:Iconify" "Window:Restore" "Window:Fullscreen" "Window:Resize"
2205         "Desktop:Create" "Desktop:Destroy" "Desktop:Focus" "Desktop:Defocus"
2206         "Desktop:Reorder" "Focus" "GtkWidget:show" "GObject:notify:<propertyname>"
2207         ( not sure we should allow these last 2 forms, since they are
2208         toolkit-specific, but they're powerful ) getDesktopCount:
2209         Get the current number of desktops. 
2210         @return a short integer indicating the current number of Desktops.
2211         """
2212         func = self.get_dbus_method("getDesktopCount")
2213         return func(*args, **kwargs)
2214     
2215     def getDesktopList(self, *args, **kwargs):
2216         """
2217         Get a list of accessible desktops.
2218         @return : a sequence containing references to the Desktops.
2219         """
2220         func = self.get_dbus_method("getDesktopList")
2221         return func(*args, **kwargs)
2222     
2223     def getDeviceEventController(self, *args, **kwargs):
2224         """
2225         Obtain an object which can be used to request device event notifications.
2226         @return : an object implementing DeviceEventController
2227         """
2228         func = self.get_dbus_method("getDeviceEventController")
2229         return func(*args, **kwargs)
2230     
2231     def registerApplication(self, *args, **kwargs):
2232         """
2233         Register a new application with the accessibility broker. 
2234         @param : app
2235         a reference to the requesting Application
2236         """
2237         func = self.get_dbus_method("registerApplication")
2238         return func(*args, **kwargs)
2239     
2240     def registerGlobalEventListener(self, *args, **kwargs):
2241         """
2242         Register a client's interest in (all) application events of a
2243         certain type. 
2244         @param : listener
2245         a reference to the requesting EventListener. 
2246         @param : eventName
2247         a string which indicates the type of events about which the client
2248         desires notification.
2249         """
2250         func = self.get_dbus_method("registerGlobalEventListener")
2251         return func(*args, **kwargs)
2252     
2253     def unImplemented(self, *args, **kwargs):
2254         func = self.get_dbus_method("unImplemented")
2255         return func(*args, **kwargs)
2256     
2257     def unImplemented2(self, *args, **kwargs):
2258         func = self.get_dbus_method("unImplemented2")
2259         return func(*args, **kwargs)
2260     
2261     def unImplemented3(self, *args, **kwargs):
2262         func = self.get_dbus_method("unImplemented3")
2263         return func(*args, **kwargs)
2264     
2265     def unImplemented4(self, *args, **kwargs):
2266         func = self.get_dbus_method("unImplemented4")
2267         return func(*args, **kwargs)
2268     
2269     def unImplemented5(self, *args, **kwargs):
2270         func = self.get_dbus_method("unImplemented5")
2271         return func(*args, **kwargs)
2272     
2273     def unImplemented6(self, *args, **kwargs):
2274         func = self.get_dbus_method("unImplemented6")
2275         return func(*args, **kwargs)
2276
2277
2278 class Relation(BaseProxy):
2279     
2280     
2281     """
2282     An interface via which objects' non-hierarchical relationships
2283     to one another are indicated. An instance of Relations represents
2284     a "one-to-many" correspondance.
2285     """
2286     
2287     
2288     def getNTargets(self, *args, **kwargs):
2289         """
2290         @return the number of objects to which this relationship applies.
2291         """
2292         func = self.get_dbus_method("getNTargets")
2293         return func(*args, **kwargs)
2294     
2295     def getRelationType(self, *args, **kwargs):
2296         """
2297         @return the RelationType of this Relation.
2298         """
2299         func = self.get_dbus_method("getRelationType")
2300         return func(*args, **kwargs)
2301     
2302     def getRelationTypeName(self, *args, **kwargs):
2303         """
2304         @return an unlocalized string representing the relation type.
2305         """
2306         func = self.get_dbus_method("getRelationTypeName")
2307         return func(*args, **kwargs)
2308     
2309     def getTarget(self, *args, **kwargs):
2310         """
2311         @return an Object which is the 'nth'target of this Relation,
2312         e.g. the Object at index i in the list of Objects having the
2313         specified relationship to this Accessible.
2314         """
2315         func = self.get_dbus_method("getTarget")
2316         return func(*args, **kwargs)
2317     
2318     def unImplemented(self, *args, **kwargs):
2319         func = self.get_dbus_method("unImplemented")
2320         return func(*args, **kwargs)
2321     
2322     def unImplemented2(self, *args, **kwargs):
2323         func = self.get_dbus_method("unImplemented2")
2324         return func(*args, **kwargs)
2325     
2326     def unImplemented3(self, *args, **kwargs):
2327         func = self.get_dbus_method("unImplemented3")
2328         return func(*args, **kwargs)
2329     
2330     def unImplemented4(self, *args, **kwargs):
2331         func = self.get_dbus_method("unImplemented4")
2332         return func(*args, **kwargs)
2333
2334
2335 class RelationType(Enum):
2336     _enum_lookup = {
2337         0:'RELATION_NULL',
2338         1:'RELATION_LABEL_FOR',
2339         2:'RELATION_LABELLED_BY',
2340         3:'RELATION_CONTROLLER_FOR',
2341         4:'RELATION_CONTROLLED_BY',
2342         5:'RELATION_MEMBER_OF',
2343         6:'RELATION_TOOLTIP_FOR',
2344         7:'RELATION_NODE_CHILD_OF',
2345         8:'RELATION_EXTENDED',
2346         9:'RELATION_FLOWS_TO',
2347         10:'RELATION_FLOWS_FROM',
2348         11:'RELATION_SUBWINDOW_OF',
2349         12:'RELATION_EMBEDS',
2350         13:'RELATION_EMBEDDED_BY',
2351         14:'RELATION_POPUP_FOR',
2352         15:'RELATION_PARENT_WINDOW_OF',
2353         16:'RELATION_DESCRIPTION_FOR',
2354         17:'RELATION_DESCRIBED_BY',
2355         18:'RELATION_LAST_DEFINED',
2356     }
2357
2358
2359 class Role(Enum):
2360     _enum_lookup = {
2361         0:'ROLE_INVALID',
2362         1:'ROLE_ACCELERATOR_LABEL',
2363         2:'ROLE_ALERT',
2364         3:'ROLE_ANIMATION',
2365         4:'ROLE_ARROW',
2366         5:'ROLE_CALENDAR',
2367         6:'ROLE_CANVAS',
2368         7:'ROLE_CHECK_BOX',
2369         8:'ROLE_CHECK_MENU_ITEM',
2370         9:'ROLE_COLOR_CHOOSER',
2371         10:'ROLE_COLUMN_HEADER',
2372         11:'ROLE_COMBO_BOX',
2373         12:'ROLE_DATE_EDITOR',
2374         13:'ROLE_DESKTOP_ICON',
2375         14:'ROLE_DESKTOP_FRAME',
2376         15:'ROLE_DIAL',
2377         16:'ROLE_DIALOG',
2378         17:'ROLE_DIRECTORY_PANE',
2379         18:'ROLE_DRAWING_AREA',
2380         19:'ROLE_FILE_CHOOSER',
2381         20:'ROLE_FILLER',
2382         21:'ROLE_FOCUS_TRAVERSABLE',
2383         22:'ROLE_FONT_CHOOSER',
2384         23:'ROLE_FRAME',
2385         24:'ROLE_GLASS_PANE',
2386         25:'ROLE_HTML_CONTAINER',
2387         26:'ROLE_ICON',
2388         27:'ROLE_IMAGE',
2389         28:'ROLE_INTERNAL_FRAME',
2390         29:'ROLE_LABEL',
2391         30:'ROLE_LAYERED_PANE',
2392         31:'ROLE_LIST',
2393         32:'ROLE_LIST_ITEM',
2394         33:'ROLE_MENU',
2395         34:'ROLE_MENU_BAR',
2396         35:'ROLE_MENU_ITEM',
2397         36:'ROLE_OPTION_PANE',
2398         37:'ROLE_PAGE_TAB',
2399         38:'ROLE_PAGE_TAB_LIST',
2400         39:'ROLE_PANEL',
2401         40:'ROLE_PASSWORD_TEXT',
2402         41:'ROLE_POPUP_MENU',
2403         42:'ROLE_PROGRESS_BAR',
2404         43:'ROLE_PUSH_BUTTON',
2405         44:'ROLE_RADIO_BUTTON',
2406         45:'ROLE_RADIO_MENU_ITEM',
2407         46:'ROLE_ROOT_PANE',
2408         47:'ROLE_ROW_HEADER',
2409         48:'ROLE_SCROLL_BAR',
2410         49:'ROLE_SCROLL_PANE',
2411         50:'ROLE_SEPARATOR',
2412         51:'ROLE_SLIDER',
2413         52:'ROLE_SPIN_BUTTON',
2414         53:'ROLE_SPLIT_PANE',
2415         54:'ROLE_STATUS_BAR',
2416         55:'ROLE_TABLE',
2417         56:'ROLE_TABLE_CELL',
2418         57:'ROLE_TABLE_COLUMN_HEADER',
2419         58:'ROLE_TABLE_ROW_HEADER',
2420         59:'ROLE_TEAROFF_MENU_ITEM',
2421         60:'ROLE_TERMINAL',
2422         61:'ROLE_TEXT',
2423         62:'ROLE_TOGGLE_BUTTON',
2424         63:'ROLE_TOOL_BAR',
2425         64:'ROLE_TOOL_TIP',
2426         65:'ROLE_TREE',
2427         66:'ROLE_TREE_TABLE',
2428         67:'ROLE_UNKNOWN',
2429         68:'ROLE_VIEWPORT',
2430         69:'ROLE_WINDOW',
2431         70:'ROLE_EXTENDED',
2432         71:'ROLE_HEADER',
2433         72:'ROLE_FOOTER',
2434         73:'ROLE_PARAGRAPH',
2435         74:'ROLE_RULER',
2436         75:'ROLE_APPLICATION',
2437         76:'ROLE_AUTOCOMPLETE',
2438         77:'ROLE_EDITBAR',
2439         78:'ROLE_EMBEDDED',
2440         79:'ROLE_ENTRY',
2441         80:'ROLE_CHART',
2442         81:'ROLE_CAPTION',
2443         82:'ROLE_DOCUMENT_FRAME',
2444         83:'ROLE_HEADING',
2445         84:'ROLE_PAGE',
2446         85:'ROLE_SECTION',
2447         86:'ROLE_REDUNDANT_OBJECT',
2448         87:'ROLE_FORM',
2449         88:'ROLE_LINK',
2450         89:'ROLE_INPUT_METHOD_WINDOW',
2451         90:'ROLE_LAST_DEFINED',
2452     }
2453
2454
2455 class Selection(BaseProxy):
2456     
2457     
2458     """
2459     An interface which indicates that an object exposes a 'selection'
2460     model, allowing the selection of one or more of its children.
2461     Read-only Selection instances are possible, in which case the
2462     interface is used to programmatically determine the selected-ness
2463     of its children. A selected child has State::STATE_SELECTED,
2464     and a child which may hypothetically be selected (though possibly
2465     not programmatically selectable) has State::STATE_SELECTABLE.
2466     """
2467     
2468     
2469     def clearSelection(self, *args, **kwargs):
2470         """
2471         Attempt to clear all selections (i.e. deselect all children)
2472         of a Selection. Not all Selection implementations allow the removal
2473         of all selections.
2474         @return True if the selections were successfully cleared, False
2475         otherwise.
2476         """
2477         func = self.get_dbus_method("clearSelection")
2478         return func(*args, **kwargs)
2479     
2480     def deselectChild(self, *args, **kwargs):
2481         """
2482         Remove a child from the selected children list of a Selection,
2483         if the child is currently selected.
2484         @param : childIndex
2485         a long integer (the zero offset index into the Accessible object's
2486         list of children) indicating which child of the Selection is
2487         to be selected.
2488         @return True if the child was successfully selected, False otherwise.
2489         """
2490         func = self.get_dbus_method("deselectChild")
2491         return func(*args, **kwargs)
2492     
2493     def deselectSelectedChild(self, *args, **kwargs):
2494         """
2495         Remove a child to the selected children list of a Selection.
2496         @param : selectedChildIndex
2497         a long integer indicating which of the selected children of the
2498         Selection is to be deselected. The index is a zero-offset index
2499         into the 'selected child list', not a zero-offset index into
2500         the list of all children of the Selection.
2501         @return True if the child was successfully deselected, False
2502         otherwise.
2503         """
2504         func = self.get_dbus_method("deselectSelectedChild")
2505         return func(*args, **kwargs)
2506     
2507     def getSelectedChild(self, *args, **kwargs):
2508         """
2509         Get the i-th selected Accessible child of a Selection. 
2510         @param : selectedChildIndex
2511         a long integer indicating which of the selected children of an
2512         object is being requested. 
2513         @return a pointer to a selected Accessible child object, specified
2514         by selectedChildIndex.
2515         """
2516         func = self.get_dbus_method("getSelectedChild")
2517         return func(*args, **kwargs)
2518     
2519     def isChildSelected(self, *args, **kwargs):
2520         """
2521         Determine whether a particular child of an Selection implementor
2522         is currently selected. Note that childIndex is the zero-offset
2523         index into the standard Accessible container's list of children.
2524         @param : childIndex
2525         an index into the Selection's list of children.
2526         @return True if the specified child is currently selected, False
2527         otherwise.
2528         """
2529         func = self.get_dbus_method("isChildSelected")
2530         return func(*args, **kwargs)
2531     
2532     def selectAll(self, *args, **kwargs):
2533         """
2534         Attempt to select all of the children of a Selection implementor.
2535         Not all Selection implementors support this operation (for instance,
2536         implementations which support only "single selection" do not
2537         support this operation).
2538         @return True if successful, False otherwise.
2539         """
2540         func = self.get_dbus_method("selectAll")
2541         return func(*args, **kwargs)
2542     
2543     def selectChild(self, *args, **kwargs):
2544         """
2545         Add a child to the selected children list of a Selection. 
2546         @param : childIndex
2547         a long integer indicating which child of the Selection is to
2548         be selected.
2549         @return True if the child was successfully selected, False otherwise.
2550         """
2551         func = self.get_dbus_method("selectChild")
2552         return func(*args, **kwargs)
2553     
2554     def unImplemented(self, *args, **kwargs):
2555         """
2556         unImplemented:
2557         placeholders for future expansion.
2558         """
2559         func = self.get_dbus_method("unImplemented")
2560         return func(*args, **kwargs)
2561     
2562     def unImplemented2(self, *args, **kwargs):
2563         func = self.get_dbus_method("unImplemented2")
2564         return func(*args, **kwargs)
2565     
2566     def unImplemented3(self, *args, **kwargs):
2567         func = self.get_dbus_method("unImplemented3")
2568         return func(*args, **kwargs)
2569     
2570     def get_nSelectedChildren(self):
2571         self._pgetter(self._dbus_interface, "nSelectedChildren")
2572     def set_nSelectedChildren(self, value):
2573         self._psetter(self._dbus_interface, "nSelectedChildren", value)
2574     _nSelectedChildrenDoc = \
2575         """
2576         The number of children of a Selection implementor which are currently
2577         selected.
2578         """
2579     nSelectedChildren = property(fget=get_nSelectedChildren, fset=set_nSelectedChildren, doc=_nSelectedChildrenDoc)
2580
2581
2582 class Selector(BaseProxy):
2583     
2584     
2585     """
2586     This interface is intended for use by assistive technologies
2587     and related user-agents. Via this interface, an assistive technology
2588     or user agent may expose a series of choices or selections in
2589     textual form, which can be activated on demand by a client of
2590     the Selector interface.
2591     Examples of the use of this interface include voice-command and
2592     remote-control applications, in which the user interaction is
2593     wholly or partly delegated by the implementor to an external
2594     agent.
2595     """
2596     
2597     
2598     def activateCommand(self, *args, **kwargs):
2599         """
2600         Request that the Selector invoke the specified Command. 
2601         @param : cmd
2602         the Command to activate/invoke. 
2603         @return a CommandResult indicating whether the request was honored,
2604         and the reason for failure if the Command could not be activated
2605         or invoked.
2606         """
2607         func = self.get_dbus_method("activateCommand")
2608         return func(*args, **kwargs)
2609     
2610     def deregisterChangeListener(self, *args, **kwargs):
2611         """
2612         Tell the Selector instance to cease notifying the specified CommandListener
2613         of changes to the command list. 
2614         @param : listener
2615         the CommandListener to remove from the notification list.
2616         """
2617         func = self.get_dbus_method("deregisterChangeListener")
2618         return func(*args, **kwargs)
2619     
2620     def getCommands(self, *args, **kwargs):
2621         """
2622         Query the Selector for the current CommandList.
2623         @return the currently available CommandList
2624         """
2625         func = self.get_dbus_method("getCommands")
2626         return func(*args, **kwargs)
2627     
2628     def refreshCommands(self, *args, **kwargs):
2629         """
2630         Ask the Selector to re-calculate its CommandList. 
2631         @return TRUE if the CommandList changed.
2632         """
2633         func = self.get_dbus_method("refreshCommands")
2634         return func(*args, **kwargs)
2635     
2636     def registerChangeListener(self, *args, **kwargs):
2637         """
2638         Register a :CommandListener instance for notification of changes
2639         to the command set. 
2640         @param : listener
2641         the CommandListener to be notified of changes.
2642         """
2643         func = self.get_dbus_method("registerChangeListener")
2644         return func(*args, **kwargs)
2645     
2646     def replaceCommands(self, *args, **kwargs):
2647         """
2648         @return TRUE if the replacement request was successful, FALSE
2649         if the request could not be honored.
2650         """
2651         func = self.get_dbus_method("replaceCommands")
2652         return func(*args, **kwargs)
2653     
2654     def unImplemented(self, *args, **kwargs):
2655         func = self.get_dbus_method("unImplemented")
2656         return func(*args, **kwargs)
2657     
2658     def unImplemented2(self, *args, **kwargs):
2659         func = self.get_dbus_method("unImplemented2")
2660         return func(*args, **kwargs)
2661     
2662     def unImplemented3(self, *args, **kwargs):
2663         func = self.get_dbus_method("unImplemented3")
2664         return func(*args, **kwargs)
2665     
2666     def unImplemented4(self, *args, **kwargs):
2667         func = self.get_dbus_method("unImplemented4")
2668         return func(*args, **kwargs)
2669     
2670     def get_supportsReplace(self):
2671         self._pgetter(self._dbus_interface, "supportsReplace")
2672     def set_supportsReplace(self, value):
2673         self._psetter(self._dbus_interface, "supportsReplace", value)
2674     _supportsReplaceDoc = \
2675         """
2676         This attribute is TRUE if this Selector allows its CommandList
2677         to be specified by the client
2678         """
2679     supportsReplace = property(fget=get_supportsReplace, fset=set_supportsReplace, doc=_supportsReplaceDoc)
2680     
2681     COMMAND_RESULT_FAILED = Accessibility.CommandResult(2)
2682     
2683     COMMAND_RESULT_INVALID = Accessibility.CommandResult(0)
2684     
2685     COMMAND_RESULT_LAST_DEFINED = Accessibility.CommandResult(4)
2686     
2687     COMMAND_RESULT_OBSOLETE = Accessibility.CommandResult(3)
2688     
2689     COMMAND_RESULT_SUCCESS = Accessibility.CommandResult(1)
2690     
2691     class CommandResult(Enum):
2692         """
2693         A code returned by a call to activateCommand, indicating the
2694         result of the activation request.
2695         """
2696
2697         _enum_lookup = {
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',
2703         }
2704
2705 class StateSet(BaseProxy):
2706     """
2707     The StateSet interface encapsulates a collection of state information.
2708     It allows comparison of state information between object instances,
2709     and comparisons of an object's state with some hypothetical collection
2710     of states.
2711     """
2712     
2713     def add(self, *args, **kwargs):
2714         """
2715         Add a StateType to an existing StateSet, if not already present.
2716         """
2717         func = self.get_dbus_method("add")
2718         return func(*args, **kwargs)
2719     
2720     def compare(self, *args, **kwargs):
2721         """
2722         Compare two StateSet instances and obtain their differences.
2723         @return a 'difference set', i.e. a StateSet consisting of those
2724         states not shared by the two sets being compared.
2725         """
2726         func = self.get_dbus_method("compare")
2727         return func(*args, **kwargs)
2728     
2729     def contains(self, *args, **kwargs):
2730         """
2731         Query a StateSet for a specific StateType. 
2732         @param : state
2733         the StateType being queried for. 
2734         @return TRUE if the StateSet contains StateType state.
2735         """
2736         func = self.get_dbus_method("contains")
2737         return func(*args, **kwargs)
2738     
2739     def equals(self, *args, **kwargs):
2740         """
2741         Compare two statesets for equivalence. 
2742         @param : tarStateSet
2743         the StateSet to be compared with this one. 
2744         @return TRUE if the two StateSet objects are composed of the
2745         same StateTypes.
2746         """
2747         func = self.get_dbus_method("equals")
2748         return func(*args, **kwargs)
2749     
2750     def getStates(self, *args, **kwargs):
2751         func = self.get_dbus_method("getStates")
2752         return func(*args, **kwargs)
2753     
2754     def isEmpty(self, *args, **kwargs):
2755         """
2756         @return TRUE if the StateSet contains no states.
2757         """
2758         func = self.get_dbus_method("isEmpty")
2759         return func(*args, **kwargs)
2760     
2761     def remove(self, *args, **kwargs):
2762         """
2763         Remove a StateType to an existing StateSet, if it is present.
2764         """
2765         func = self.get_dbus_method("remove")
2766         return func(*args, **kwargs)
2767     
2768     def unImplemented(self, *args, **kwargs):
2769         func = self.get_dbus_method("unImplemented")
2770         return func(*args, **kwargs)
2771     
2772     def unImplemented2(self, *args, **kwargs):
2773         func = self.get_dbus_method("unImplemented2")
2774         return func(*args, **kwargs)
2775     
2776     def unImplemented3(self, *args, **kwargs):
2777         func = self.get_dbus_method("unImplemented3")
2778         return func(*args, **kwargs)
2779     
2780     def unImplemented4(self, *args, **kwargs):
2781         func = self.get_dbus_method("unImplemented4")
2782         return func(*args, **kwargs)
2783
2784
2785 class StateType(Enum):
2786     _enum_lookup = {
2787         0:'STATE_INVALID',
2788         1:'STATE_ACTIVE',
2789         2:'STATE_ARMED',
2790         3:'STATE_BUSY',
2791         4:'STATE_CHECKED',
2792         5:'STATE_COLLAPSED',
2793         6:'STATE_DEFUNCT',
2794         7:'STATE_EDITABLE',
2795         8:'STATE_ENABLED',
2796         9:'STATE_EXPANDABLE',
2797         10:'STATE_EXPANDED',
2798         11:'STATE_FOCUSABLE',
2799         12:'STATE_FOCUSED',
2800         13:'STATE_HAS_TOOLTIP',
2801         14:'STATE_HORIZONTAL',
2802         15:'STATE_ICONIFIED',
2803         16:'STATE_MODAL',
2804         17:'STATE_MULTI_LINE',
2805         18:'STATE_MULTISELECTABLE',
2806         19:'STATE_OPAQUE',
2807         20:'STATE_PRESSED',
2808         21:'STATE_RESIZABLE',
2809         22:'STATE_SELECTABLE',
2810         23:'STATE_SELECTED',
2811         24:'STATE_SENSITIVE',
2812         25:'STATE_SHOWING',
2813         26:'STATE_SINGLE_LINE',
2814         27:'STATE_STALE',
2815         28:'STATE_TRANSIENT',
2816         29:'STATE_VERTICAL',
2817         30:'STATE_VISIBLE',
2818         31:'STATE_MANAGES_DESCENDANTS',
2819         32:'STATE_INDETERMINATE',
2820         33:'STATE_REQUIRED',
2821         34:'STATE_TRUNCATED',
2822         35:'STATE_ANIMATED',
2823         36:'STATE_INVALID_ENTRY',
2824         37:'STATE_SUPPORTS_AUTOCOMPLETION',
2825         38:'STATE_SELECTABLE_TEXT',
2826         39:'STATE_IS_DEFAULT',
2827         40:'STATE_VISITED',
2828         41:'STATE_LAST_DEFINED',
2829     }
2830
2831
2832 class StreamableContent(BaseProxy):
2833     
2834     
2835     """
2836     An interface whereby an object allows its backing content to
2837     be streamed to clients. Negotiation of content type is allowed.
2838     Clients may examine the backing data and transform, convert,
2839     or parse the content in order to present it in an alternate form
2840     to end-users.
2841     """
2842     
2843     
2844     def getContent(self, *args, **kwargs):
2845         """
2846         DEPRECATED, use getStream instead. getContent: Retrieve this
2847         object's content, in a format appropriate to a requested mimetype.
2848                 long Bonobo::Stream:seek (in long offset, in SeekType
2849         whence)
2850                         raises (NoPermission, IOError)
2851                 void Bonobo::Stream:read (in long count, out iobuf buffer)
2852                         raises (NoPermission, IOError)
2853                
2854         @return a Bonobo::Stream whose mimetype matches contentType,
2855         if available, or NIL.
2856         """
2857         func = self.get_dbus_method("getContent")
2858         return func(*args, **kwargs)
2859     
2860     def getContentTypes(self, *args, **kwargs):
2861         """
2862         getContentTypes: 
2863         @return the list of available mimetypes for this object's content.
2864         """
2865         func = self.get_dbus_method("getContentTypes")
2866         return func(*args, **kwargs)
2867     
2868     def getStream(self, *args, **kwargs):
2869         """
2870         Retrieve this object's content, in a format appropriate to a
2871         requested mimetype, as a ContentStream instance.
2872         @param : contentType
2873         a string specifying the desired mimetype for the content stream.
2874         @return a Stream whose mimetype matches contentType, if available,
2875         or NIL.
2876         """
2877         func = self.get_dbus_method("getStream")
2878         return func(*args, **kwargs)
2879     
2880     def getURI(self, *args, **kwargs):
2881         """
2882         Get a URI pointing to the content of the specified type, if such
2883         a URI can be obtained. Not all streamable content providers have
2884         URI representations.
2885         @param : contentType
2886         a string specifying the desired mimetype for the content stream.
2887         If NULL, then a URI for the default content type will be returned,
2888         if available.
2889         @return a string which constitutes a URI for a stream of the
2890         specified content type, or NULL if no such URI can be obtained.
2891         """
2892         func = self.get_dbus_method("getURI")
2893         return func(*args, **kwargs)
2894     
2895     def unImplemented(self, *args, **kwargs):
2896         func = self.get_dbus_method("unImplemented")
2897         return func(*args, **kwargs)
2898     
2899     def unImplemented2(self, *args, **kwargs):
2900         func = self.get_dbus_method("unImplemented2")
2901         return func(*args, **kwargs)
2902
2903
2904 class TEXT_BOUNDARY_TYPE(Enum):
2905     _enum_lookup = {
2906         0:'TEXT_BOUNDARY_CHAR',
2907         1:'TEXT_BOUNDARY_WORD_START',
2908         2:'TEXT_BOUNDARY_WORD_END',
2909         3:'TEXT_BOUNDARY_SENTENCE_START',
2910         4:'TEXT_BOUNDARY_SENTENCE_END',
2911         5:'TEXT_BOUNDARY_LINE_START',
2912         6:'TEXT_BOUNDARY_LINE_END',
2913     }
2914
2915
2916 class TEXT_CLIP_TYPE(Enum):
2917     _enum_lookup = {
2918         0:'TEXT_CLIP_NONE',
2919         1:'TEXT_CLIP_MIN',
2920         2:'TEXT_CLIP_MAX',
2921         3:'TEXT_CLIP_BOTH',
2922     }
2923
2924
2925 class Table(BaseProxy):
2926     
2927     
2928     """
2929     An interface used by containers whose contained data is arranged
2930     in a "tabular" (i.e. row-column) fashion. Tables may resemble
2931     a two-dimensional grid, as in a spreadsheet, or may feature objects
2932     which span multiple rows and/or columns, but whose bounds are
2933     aligned on a row/column matrix. Thus, the Table interface may
2934     be used to represent "spreadsheets" as well as "frames".
2935     Objects within tables are children of the Table instance, and
2936     they may be referenced either via a child index or via a row/column
2937     pair. Their role may be ROLE_TABLE_CELL, but table 'cells' may
2938     have other roles as well. These 'cells' may implement other interfaces,
2939     such as Text, Action, Image, and Component, and should do so
2940     as appropriate to their onscreen representation and/or behavior.
2941     """
2942     
2943     
2944     def addColumnSelection(self, *args, **kwargs):
2945         """
2946         Select the specified column, adding it to the current column
2947         selection, if the table's selection model permits it.
2948         @param : column
2949         @return True if the specified column was successfully selected,
2950         False if not.
2951         """
2952         func = self.get_dbus_method("addColumnSelection")
2953         return func(*args, **kwargs)
2954     
2955     def addRowSelection(self, *args, **kwargs):
2956         """
2957         Select the specified row, adding it to the current row selection,
2958         if the table's selection model permits it.
2959         @param : row
2960         @return True if the specified row was successfully selected,
2961         False if not.
2962         """
2963         func = self.get_dbus_method("addRowSelection")
2964         return func(*args, **kwargs)
2965     
2966     def getAccessibleAt(self, *args, **kwargs):
2967         """
2968         Get the table cell at the specified row and column indices. 
2969         @param : row
2970         the specified table row, zero-indexed. 
2971         @param : column
2972         the specified table column, zero-indexed.
2973         @return an Accessible object representing the specified table
2974         cell.
2975         """
2976         func = self.get_dbus_method("getAccessibleAt")
2977         return func(*args, **kwargs)
2978     
2979     def getColumnAtIndex(self, *args, **kwargs):
2980         """
2981         Get the table column index occupied by the child at a particular
2982         1-D child index.
2983         @param : index
2984         the specified child index, zero-indexed.
2985         @return a long integer indicating the first column spanned by
2986         the child of a table, at the specified 1-D (zero-offset) index.
2987         """
2988         func = self.get_dbus_method("getColumnAtIndex")
2989         return func(*args, **kwargs)
2990     
2991     def getColumnDescription(self, *args, **kwargs):
2992         """
2993         Get a text description of a particular table column. This differs
2994         from AccessibleTable_getColumnHeader, which returns an Accessible.
2995         @param : column
2996         the specified table column, zero-indexed.
2997         @return a UTF-8 string describing the specified table column,
2998         if available.
2999         """
3000         func = self.get_dbus_method("getColumnDescription")
3001         return func(*args, **kwargs)
3002     
3003     def getColumnExtentAt(self, *args, **kwargs):
3004         """
3005         Get the number of columns spanned by the table cell at the specific
3006         row and column. (some tables can have cells which span multiple
3007         rows and/or columns).
3008         @param : row
3009         the specified table row, zero-indexed. 
3010         @param : column
3011         the specified table column, zero-indexed.
3012         @return a long integer indicating the number of columns spanned
3013         by the specified cell.
3014         """
3015         func = self.get_dbus_method("getColumnExtentAt")
3016         return func(*args, **kwargs)
3017     
3018     def getColumnHeader(self, *args, **kwargs):
3019         """
3020         Get the header associated with a table column, if available,
3021         as an instance of Accessible. This differs from getColumnDescription,
3022         which returns a string.
3023         @param : column
3024         the specified table column, zero-indexed.
3025         @return an Accessible representatin of the specified table column,
3026         if available.
3027         """
3028         func = self.get_dbus_method("getColumnHeader")
3029         return func(*args, **kwargs)
3030     
3031     def getIndexAt(self, *args, **kwargs):
3032         """
3033         Get the 1-D child index corresponding to the specified 2-D row
3034         and column indices. 
3035         @param : row
3036         the specified table row, zero-indexed. 
3037         @param : column
3038         the specified table column, zero-indexed.
3039         @return a long integer which serves as the index of a specified
3040         cell in the table, in a form usable by Accessible::getChildAtIndex.
3041         """
3042         func = self.get_dbus_method("getIndexAt")
3043         return func(*args, **kwargs)
3044     
3045     def getRowAtIndex(self, *args, **kwargs):
3046         """
3047         Get the table row index occupied by the child at a particular
3048         1-D child index.
3049         @param : index
3050         the specified child index, zero-indexed.
3051         @return a long integer indicating the first row spanned by the
3052         child of a table, at the specified 1-D (zero-offset) index.
3053         """
3054         func = self.get_dbus_method("getRowAtIndex")
3055         return func(*args, **kwargs)
3056     
3057     def getRowColumnExtentsAtIndex(self, *args, **kwargs):
3058         """
3059         Given a child index, determine the row and column indices and
3060         extents, and whether the cell is currently selected. If the child
3061         at index is not a cell (for instance, if it is a summary, caption,
3062         etc.), False is returned.
3063         @param : index
3064         the index of the Table child whose row/column extents are requested.
3065         @param : row
3066         back-filled with the first table row associated with the cell
3067         with child index index. 
3068         @param : col
3069         back-filled with the first table column associated with the cell
3070         with child index index. 
3071         @param : row_extents
3072         back-filled with the number of table rows across which child
3073         i extends. 
3074         @param : col_extents
3075         back-filled with the number of table columns across which child
3076         i extends. 
3077         @param : is_selected
3078         a boolean which is back-filled with True if the child at index
3079         i corresponds to a selected table cell, False otherwise.
3080         Example: If the Table child at index '6' extends across columns
3081         5 and 6 of row 2 of a Table instance, and is currently selected,
3082         then retval=table::getRowColumnExtentsAtIndex(6,row,col,
3083         row_extents,
3084         col_extents,
3085         is_selected);
3086          will return True, and after the call row, col, row_extents,
3087         col_extents, and is_selected will contain 2, 5, 1, 2, and True,
3088         respectively.
3089         @return True if the index is associated with a valid table cell,
3090         False if the index does not correspond to a cell. If False is
3091         returned, the values of the out parameters are undefined.
3092         """
3093         func = self.get_dbus_method("getRowColumnExtentsAtIndex")
3094         return func(*args, **kwargs)
3095     
3096     def getRowDescription(self, *args, **kwargs):
3097         """
3098         Get a text description of a particular table row. This differs
3099         from AccessibleTable_getRowHeader, which returns an Accessible.
3100         @param : row
3101         the specified table row, zero-indexed.
3102         @return a UTF-8 string describing the specified table row, if
3103         available.
3104         """
3105         func = self.get_dbus_method("getRowDescription")
3106         return func(*args, **kwargs)
3107     
3108     def getRowExtentAt(self, *args, **kwargs):
3109         """
3110         Get the number of rows spanned by the table cell at the specific
3111         row and column. (some tables can have cells which span multiple
3112         rows and/or columns).
3113         @param : row
3114         the specified table row, zero-indexed. 
3115         @param : column
3116         the specified table column, zero-indexed.
3117         @return a long integer indicating the number of rows spanned
3118         by the specified cell.
3119         """
3120         func = self.get_dbus_method("getRowExtentAt")
3121         return func(*args, **kwargs)
3122     
3123     def getRowHeader(self, *args, **kwargs):
3124         """
3125         Get the header associated with a table row, if available. This
3126         differs from getRowDescription, which returns a string.
3127         @param : row
3128         the specified table row, zero-indexed.
3129         @return an Accessible representatin of the specified table row,
3130         if available.
3131         """
3132         func = self.get_dbus_method("getRowHeader")
3133         return func(*args, **kwargs)
3134     
3135     def getSelectedColumns(self, *args, **kwargs):
3136         """
3137         Obtain the indices of all columns which are currently selected.
3138         @return a sequence of integers comprising the indices of columns
3139         currently selected.
3140         """
3141         func = self.get_dbus_method("getSelectedColumns")
3142         return func(*args, **kwargs)
3143     
3144     def getSelectedRows(self, *args, **kwargs):
3145         """
3146         Obtain the indices of all rows which are currently selected.
3147         @return a sequence of integers comprising the indices of rows
3148         currently selected.
3149         """
3150         func = self.get_dbus_method("getSelectedRows")
3151         return func(*args, **kwargs)
3152     
3153     def isColumnSelected(self, *args, **kwargs):
3154         """
3155         Determine whether a table column is selected. 
3156         @param : column
3157         the column being queried.
3158         @return True if the specified column is currently selected, False
3159         if not.
3160         """
3161         func = self.get_dbus_method("isColumnSelected")
3162         return func(*args, **kwargs)
3163     
3164     def isRowSelected(self, *args, **kwargs):
3165         """
3166         Determine whether a table row is selected. 
3167         @param : row
3168         the row being queried.
3169         @return True if the specified row is currently selected, False
3170         if not.
3171         """
3172         func = self.get_dbus_method("isRowSelected")
3173         return func(*args, **kwargs)
3174     
3175     def isSelected(self, *args, **kwargs):
3176         """
3177         Determine whether the cell at a specific row and column is selected.
3178         @param : row
3179         a row occupied by the cell whose state is being queried. 
3180         @param : column
3181         a column occupied by the cell whose state is being queried.
3182         @return True if the specified cell is currently selected, False
3183         if not.
3184         """
3185         func = self.get_dbus_method("isSelected")
3186         return func(*args, **kwargs)
3187     
3188     def removeColumnSelection(self, *args, **kwargs):
3189         """
3190         Remove the specified column from current column selection, if
3191         the table's selection model permits it.
3192         @param : column
3193         @return True if the specified column was successfully de-selected,
3194         False if not.
3195         """
3196         func = self.get_dbus_method("removeColumnSelection")
3197         return func(*args, **kwargs)
3198     
3199     def removeRowSelection(self, *args, **kwargs):
3200         """
3201         Remove the specified row from current row selection, if the table's
3202         selection model permits it.
3203         @param : row
3204         @return True if the specified row was successfully de-selected,
3205         False if not.
3206         """
3207         func = self.get_dbus_method("removeRowSelection")
3208         return func(*args, **kwargs)
3209     
3210     def unImplemented(self, *args, **kwargs):
3211         func = self.get_dbus_method("unImplemented")
3212         return func(*args, **kwargs)
3213     
3214     def unImplemented2(self, *args, **kwargs):
3215         func = self.get_dbus_method("unImplemented2")
3216         return func(*args, **kwargs)
3217     
3218     def unImplemented3(self, *args, **kwargs):
3219         func = self.get_dbus_method("unImplemented3")
3220         return func(*args, **kwargs)
3221     
3222     def unImplemented4(self, *args, **kwargs):
3223         func = self.get_dbus_method("unImplemented4")
3224         return func(*args, **kwargs)
3225     
3226     def unImplemented5(self, *args, **kwargs):
3227         func = self.get_dbus_method("unImplemented5")
3228         return func(*args, **kwargs)
3229     
3230     def unImplemented6(self, *args, **kwargs):
3231         func = self.get_dbus_method("unImplemented6")
3232         return func(*args, **kwargs)
3233     
3234     def unImplemented7(self, *args, **kwargs):
3235         func = self.get_dbus_method("unImplemented7")
3236         return func(*args, **kwargs)
3237     
3238     def get_caption(self):
3239         self._pgetter(self._dbus_interface, "caption")
3240     def set_caption(self, value):
3241         self._psetter(self._dbus_interface, "caption", value)
3242     _captionDoc = \
3243         """
3244         An Accessible which represents of a caption for a Table.
3245         """
3246     caption = property(fget=get_caption, fset=set_caption, doc=_captionDoc)
3247     
3248     def get_nColumns(self):
3249         self._pgetter(self._dbus_interface, "nColumns")
3250     def set_nColumns(self, value):
3251         self._psetter(self._dbus_interface, "nColumns", value)
3252     _nColumnsDoc = \
3253         """
3254         The total number of columns in this table (including empty columns),
3255         exclusive of columns which are programmatically hidden. Columns
3256         which are scrolled out of view or clipped by the current viewport
3257         are included.
3258         """
3259     nColumns = property(fget=get_nColumns, fset=set_nColumns, doc=_nColumnsDoc)
3260     
3261     def get_nRows(self):
3262         self._pgetter(self._dbus_interface, "nRows")
3263     def set_nRows(self, value):
3264         self._psetter(self._dbus_interface, "nRows", value)
3265     _nRowsDoc = \
3266         """
3267         The total number of rows in this table (including empty rows),
3268         exclusive of any rows which are programmatically hidden. Rows
3269         which are merely scrolled out of view are included.
3270         """
3271     nRows = property(fget=get_nRows, fset=set_nRows, doc=_nRowsDoc)
3272     
3273     def get_nSelectedColumns(self):
3274         self._pgetter(self._dbus_interface, "nSelectedColumns")
3275     def set_nSelectedColumns(self, value):
3276         self._psetter(self._dbus_interface, "nSelectedColumns", value)
3277     _nSelectedColumnsDoc = \
3278         """
3279         The number of columns currently selected. A selected column is
3280         one in which all included cells are selected.
3281         """
3282     nSelectedColumns = property(fget=get_nSelectedColumns, fset=set_nSelectedColumns, doc=_nSelectedColumnsDoc)
3283     
3284     def get_nSelectedRows(self):
3285         self._pgetter(self._dbus_interface, "nSelectedRows")
3286     def set_nSelectedRows(self, value):
3287         self._psetter(self._dbus_interface, "nSelectedRows", value)
3288     _nSelectedRowsDoc = \
3289         """
3290         The number of rows currently selected. A selected row is one
3291         in which all included cells are selected.
3292         """
3293     nSelectedRows = property(fget=get_nSelectedRows, fset=set_nSelectedRows, doc=_nSelectedRowsDoc)
3294     
3295     def get_summary(self):
3296         self._pgetter(self._dbus_interface, "summary")
3297     def set_summary(self, value):
3298         self._psetter(self._dbus_interface, "summary", value)
3299     _summaryDoc = \
3300         """
3301         An accessible object which summarizes the contents of a Table.
3302         This object is frequently itself a Table instance, albeit a simplified
3303         one.
3304         """
3305     summary = property(fget=get_summary, fset=set_summary, doc=_summaryDoc)
3306
3307
3308 class Text(BaseProxy):
3309     
3310     
3311     """
3312     The text interface should be implemented by objects which place
3313     textual information onscreen as character strings or glyphs.
3314     The text interface allows access to textual content, including
3315     display attributes and semantic hints associated with runs of
3316     text, and access to bounding box information for glyphs and substrings.
3317     It also allows portions of textual content to be selected, if
3318     the object's StateSet includes STATE_SELECTABLE_TEXT.
3319     In some cases a Text object may have, as its content, an empty
3320     string. In particular this can occur in the case of Hypertext
3321     objects which do not display explicitly textual information onscreen,
3322     as Hypertext is derived from the Text interface. 
3323     Typographic and semantic attributes of onscreen textual content,
3324     for instance typeface, weight, language, and such qualities as
3325     'emphasis' or 'blockquote', are represented as text attributes.
3326     Contiguous sequences of characters over which these attributes
3327     are unchanged are referred to as "attribute runs", and are available
3328     via Text::getAttributeRun. Where possible, implementing clients
3329     will report textual attributes which are the same over the entire
3330     text object, for instance those inherited from a default or document-scope
3331     style, via getDefaultAttributes instead of reporting them explicitly
3332     for each character. Therefore, for any span of text, the attributes
3333     in effect are the union of the set returned by Text::getDefaultAttributes,
3334     and the set returned at a particular character offset via Text::getAttributeRun.
3335     """
3336     
3337     
3338     def addSelection(self, *args, **kwargs):
3339         """
3340         The result of calling addSelection on objects which already have
3341         one selection present, and which do not include STATE_MULTISELECTABLE,
3342         is undefined, other than the return value. 
3343         @return True of the selection was successfully added, False otherwise.
3344         Selection may fail if the object does not support selection of
3345         text (see STATE_SELECTABLE_TEXT), if the object does not support
3346         multiple selections and a selection is already defined, or for
3347         other reasons (for instance if the user does not have permission
3348         to copy the text into the relevant selection buffer).
3349         """
3350         func = self.get_dbus_method("addSelection")
3351         return func(*args, **kwargs)
3352     
3353     def getAttributeRun(self, *args, **kwargs):
3354         """
3355         Query a particular text object for the text attributes defined
3356         at a given offset, obtaining the start and end of the "attribute
3357         run" over which these attributes are currently invariant. Text
3358         attributes are those presentational, typographic, or semantic
3359         attributes or qualitites which apply to a range of text specifyable
3360         by starting and ending offsets. Attributes relevant to localization
3361         should be provided in accordance with the w3c "Internationalization
3362         and Localization Markup Requirements", http://www.w3.org/TR/2005/WD-itsreq-20051122/
3363         Other text attributes should choose their names and value semantics
3364         in accordance with relevant standards such as CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512),
3365         XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and
3366         WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/). Those attributes
3367         from the aforementioned specifications and recommendations which
3368         do not concern typographic, presentational, or semantic aspects
3369         of text should be exposed via the more general Accessible::getAttributes()
3370         API (if at all).
3371         For example, CSS attributes which should be exposed on text (either
3372         as default attributes, or as explicitly-set attributes when non-default
3373         values are specified in the content view) include the Font attributes
3374         (i.e. "css2:font-weight", "css2:font-style"), the "css2:color"
3375         and "css2:background-color" attributes, and "css2:text-decoration"
3376         attribute.
3377         If includeDefaults is TRUE, then this AttributeSet should include
3378         the default attributes as well as those which are explicitly
3379         assigned to the attribute run in question. startOffset and endOffset
3380         will be back-filled to indicate the start and end of the attribute
3381         run which contains 'offset' - an attribute run is a contiguous
3382         section of text whose attributes are homogeneous. 
3383         @param : offset
3384         the offset of the character whose attributes will be reported.
3385         @param : startOffset
3386         backfilled with the starting offset of the character range over
3387         which all text attributes match those of offset, i.e. the start
3388         of the homogeneous attribute run including offset. 
3389         @param : endOffset
3390         backfilled with the offset of the first character past the character
3391         range over which all text attributes match those of offset, i.e.
3392         the character immediately after the homogeneous attribute run
3393         including offset. 
3394         @param : includeDefaults
3395         if False, the call should only return those attributes which
3396         are explicitly set on the current attribute run, omitting any
3397         attributes which are inherited from the default values. See also
3398         Text::getDefaultAttributes.
3399         @return the AttributeSet defined at offset, optionally including
3400         the 'default' attributes.
3401         """
3402         func = self.get_dbus_method("getAttributeRun")
3403         return func(*args, **kwargs)
3404     
3405     def getAttributeValue(self, *args, **kwargs):
3406         """
3407         Get the string value of a named attribute at a given offset,
3408         if defined. 
3409         @param : offset
3410         the offset of the character for which the attribute run is to
3411         be obtained. 
3412         @param : attributeName
3413         the name of the attribute for which the value is to be returned,
3414         if defined. 
3415         @param : startOffset
3416         back-filled with the offset of the first character in the attribute
3417         run containing the character at offset. 
3418         @param : endOffset
3419         back-filled with the offset of the first character past the end
3420         of the attribute run containing the character at offset. 
3421         @param : defined
3422         back-filled with True if the attributeName has a defined value
3423         at offset, False otherwise. 
3424         @return the value of attribute (name-value pair) corresponding
3425         to "name", if defined.
3426         """
3427         func = self.get_dbus_method("getAttributeValue")
3428         return func(*args, **kwargs)
3429     
3430     def getAttributes(self, *args, **kwargs):
3431         """
3432         getAttributes is deprecated in favor of getAttributeRun. 
3433         @return the attributes at offset, as a semicolon-delimited set
3434         of colon-delimited name-value pairs.
3435         """
3436         func = self.get_dbus_method("getAttributes")
3437         return func(*args, **kwargs)
3438     
3439     def getBoundedRanges(self, *args, **kwargs):
3440         """
3441         Return the text content within a bounding box, as a list of Range
3442         structures. Depending on the TEXT_CLIP_TYPE parameters, glyphs
3443         which are clipped by the bounding box (i.e. which lie partially
3444         inside and partially outside it) may or may not be included in
3445         the ranges returned. 
3446         @param : x
3447         the minimum x ( i.e. leftmost) coordinate of the bounding box.
3448         @param : y
3449         the minimum y coordinate of the bounding box. 
3450         @param : width
3451         the horizontal size of the bounding box. The rightmost bound
3452         of the bounding box is (x + width); 
3453         @param : height
3454         the vertical size of the bounding box. The maximum y value of
3455         the bounding box is (y + height); 
3456         @param : coordType
3457         If 0, the above coordinates are interpreted as pixels relative
3458         to corner of the screen; if 1, the coordinates are interpreted
3459         as pixels relative to the corner of the containing toplevel window.
3460         @param : xClipType
3461         determines whether text which intersects the bounding box in
3462         the x direction is included. 
3463         @param : yClipType
3464         determines whether text which intersects the bounding box in
3465         the y direction is included.
3466         """
3467         func = self.get_dbus_method("getBoundedRanges")
3468         return func(*args, **kwargs)
3469     
3470     def getCharacterAtOffset(self, *args, **kwargs):
3471         """
3472         @return an unsigned long integer whose value corresponds to the
3473         UCS-4 representation of the character at the specified text offset,
3474         or 0 if offset is out of range.
3475         """
3476         func = self.get_dbus_method("getCharacterAtOffset")
3477         return func(*args, **kwargs)
3478     
3479     def getCharacterExtents(self, *args, **kwargs):
3480         """
3481         Obtain a the bounding box, as x, y, width, and height, of the
3482         character or glyph at a particular character offset in this object's
3483         text content. The coordinate system in which the results are
3484         reported is specified by coordType. If an onscreen glyph corresponds
3485         to multiple character offsets, for instance if the glyph is a
3486         ligature, the bounding box reported will include the entire glyph
3487         and therefore may apply to more than one character offset. 
3488         @param : offset
3489         the character offset of the character or glyph being queried.
3490         @param : x
3491         the minimum horizontal coordinate of the bounding box of the
3492         glyph representing the character at offset. 
3493         @param : y
3494         the minimum vertical coordinate of the bounding box of the glyph
3495         representing the character at offset. 
3496         @param : width
3497         the horizontal extent of the bounding box of the glyph representing
3498         the character at offset. 
3499         @param : height
3500         the vertical extent of the bounding box of the glyph representing
3501         the character at offset. 
3502         @param : coordType
3503         If 0, the results will be reported in screen coordinates, i.e.
3504         in pixels relative to the upper-left corner of the screen, with
3505         the x axis pointing right and the y axis pointing down. If 1,
3506         the results will be reported relative to the containing toplevel
3507         window, with the x axis pointing right and the y axis pointing
3508         down.
3509         """
3510         func = self.get_dbus_method("getCharacterExtents")
3511         return func(*args, **kwargs)
3512     
3513     def getDefaultAttributeSet(self, *args, **kwargs):
3514         """
3515         Return an AttributeSet containing the text attributes which apply
3516         to all text in the object by virtue of the default settings of
3517         the document, view, or user agent; e.g. those attributes which
3518         are implied rather than explicitly applied to the text object.
3519         For instance, an object whose entire text content has been explicitly
3520         marked as 'bold' will report the 'bold' attribute via getAttributeRun(),
3521         whereas an object whose text weight is inspecified may report
3522         the default or implied text weight in the default AttributeSet.
3523         """
3524         func = self.get_dbus_method("getDefaultAttributeSet")
3525         return func(*args, **kwargs)
3526     
3527     def getDefaultAttributes(self, *args, **kwargs):
3528         """
3529         Deprecated in favor of getDefaultAttributeSet. 
3530         @return the attributes which apply to the entire text content,
3531         but which were not explicitly specified by the content creator.
3532         """
3533         func = self.get_dbus_method("getDefaultAttributes")
3534         return func(*args, **kwargs)
3535     
3536     def getNSelections(self, *args, **kwargs):
3537         """
3538         Obtain the number of separate, contiguous selections in the current
3539         Text object. Text objects which do not implement selection of
3540         discontiguous text regions will always return '0' or '1'. Note
3541         that "contiguous" is defined by continuity of the offsets, i.e.
3542         a text 'selection' is defined by a start/end offset pair. In
3543         the case of bidirectional text, this means that a continguous
3544         selection may appear visually discontiguous, and vice-versa.
3545         @return the number of contiguous selections in the current Text
3546         object.
3547         """
3548         func = self.get_dbus_method("getNSelections")
3549         return func(*args, **kwargs)
3550     
3551     def getOffsetAtPoint(self, *args, **kwargs):
3552         """
3553         Get the offset of the character at a given onscreen coordinate.
3554         The coordinate system used to interpret x and y is determined
3555         by parameter coordType. 
3556         @param : x
3557         @param : y
3558         @param : coordType
3559         if 0, the input coordinates are interpreted relative to the entire
3560         screen, if 1, they are relative to the toplevel window containing
3561         this Text object. 
3562         @return the text offset (as an offset into the character array)
3563         of the glyph whose onscreen bounds contain the point x,y, or
3564         -1 if the point is outside the bounds of any glyph.
3565         """
3566         func = self.get_dbus_method("getOffsetAtPoint")
3567         return func(*args, **kwargs)
3568     
3569     def getRangeExtents(self, *args, **kwargs):
3570         """
3571         Obtain the bounding box which entirely contains a given text
3572         range. Negative values may be returned for the bounding box parameters
3573         in the event that all or part of the text range is offscreen
3574         or not mapped to the screen. 
3575         @param : startOffset
3576         the offset of the first character in the specified range. 
3577         @param : endOffset
3578         the offset of the character immediately after the last character
3579         in the specified range. 
3580         @param : x
3581         an integer parameter which is back-filled with the minimum horizontal
3582         coordinate of the resulting bounding box. 
3583         @param : y
3584         an integer parameter which is back-filled with the minimum vertical
3585         coordinate of the resulting bounding box. 
3586         @param : width
3587         an integer parameter which is back-filled with the horizontal
3588         extent of the bounding box. 
3589         @param : height
3590         an integer parameter which is back-filled with the vertical extent
3591         of the bounding box. 
3592         @param : coordType
3593         If 0, the above coordinates are reported in pixels relative to
3594         corner of the screen; if 1, the coordinates are reported relative
3595         to the corner of the containing toplevel window.
3596         """
3597         func = self.get_dbus_method("getRangeExtents")
3598         return func(*args, **kwargs)
3599     
3600     def getSelection(self, *args, **kwargs):
3601         """
3602         The result of calling getSelection with an out-of-range selectionNum
3603         (i.e. for a selection which does not exist) is not strictly defined,
3604         but should set endOffset equal to startOffset.
3605         """
3606         func = self.get_dbus_method("getSelection")
3607         return func(*args, **kwargs)
3608     
3609     def getText(self, *args, **kwargs):
3610         """
3611         Obtain all or part of the onscreen textual content of a Text
3612         object. If endOffset is specified as "-1", then this method will
3613         return the entire onscreen textual contents of the Text object.
3614         @return the textual content of the current Text object beginning
3615         startOffset (inclusive) up to but not including the character
3616         at endOffset.
3617         """
3618         func = self.get_dbus_method("getText")
3619         return func(*args, **kwargs)
3620     
3621     def getTextAfterOffset(self, *args, **kwargs):
3622         """
3623         Obtain a subset of the text content of an object which entirely
3624         follows offset, delimited by character, word, line, or sentence
3625         boundaries as specified by type. The starting and ending offsets
3626         of the resulting substring are returned in startOffset and endOffset.
3627         By definition, if such a substring exists, startOffset must be
3628         greater than offset. 
3629         @param : offset
3630         the offset from which the substring search begins, and which
3631         must lie before the returned substring. 
3632         @param : type
3633         the text-boundary delimiter which determines whether the returned
3634         text constitures a character, word, line, or sentence (and possibly
3635         attendant whitespace), and whether the start or ending of such
3636         a substring forms the boundary condition. 
3637         @param : startOffset
3638         back-filled with the starting offset of the resulting substring,
3639         if one exists. 
3640         @param : endOffset
3641         back-filled with the offset of the character immediately following
3642         the resulting substring, if one exists. 
3643         @return a string which is a substring of the text content of
3644         the object, delimited by the specified boundary condition.
3645         """
3646         func = self.get_dbus_method("getTextAfterOffset")
3647         return func(*args, **kwargs)
3648     
3649     def getTextAtOffset(self, *args, **kwargs):
3650         """
3651         Obtain a subset of the text content of an object which includes
3652         the specified offset, delimited by character, word, line, or
3653         sentence boundaries as specified by type. The starting and ending
3654         offsets of the resulting substring are returned in startOffset
3655         and endOffset. 
3656         @param : offset
3657         the offset from which the substring search begins, and which
3658         must lie within the returned substring. 
3659         @param : type
3660         the text-boundary delimiter which determines whether the returned
3661         text constitures a character, word, line, or sentence (and possibly
3662         attendant whitespace), and whether the start or ending of such
3663         a substring forms the boundary condition. 
3664         @param : startOffset
3665         back-filled with the starting offset of the resulting substring,
3666         if one exists. 
3667         @param : endOffset
3668         back-filled with the offset of the character immediately following
3669         the resulting substring, if one exists. 
3670         @return a string which is a substring of the text content of
3671         the object, delimited by the specified boundary condition.
3672         """
3673         func = self.get_dbus_method("getTextAtOffset")
3674         return func(*args, **kwargs)
3675     
3676     def getTextBeforeOffset(self, *args, **kwargs):
3677         """
3678         Obtain a subset of the text content of an object which entirely
3679         precedes offset, delimited by character, word, line, or sentence
3680         boundaries as specified by type. The starting and ending offsets
3681         of the resulting substring are returned in startOffset and endOffset.
3682         By definition, if such a substring exists, endOffset is less
3683         than or equal to offset. 
3684         @param : offset
3685         the offset from which the substring search begins. 
3686         @param : type
3687         the text-boundary delimiter which determines whether the returned
3688         text constitures a character, word, line, or sentence (and possibly
3689         attendant whitespace), and whether the start or ending of such
3690         a substring forms the boundary condition. 
3691         @param : startOffset
3692         back-filled with the starting offset of the resulting substring,
3693         if one exists. 
3694         @param : endOffset
3695         back-filled with the offset of the character immediately following
3696         the resulting substring, if one exists. 
3697         @return a string which is a substring of the text content of
3698         the object, delimited by the specified boundary condition.
3699         """
3700         func = self.get_dbus_method("getTextBeforeOffset")
3701         return func(*args, **kwargs)
3702     
3703     def removeSelection(self, *args, **kwargs):
3704         """
3705         Deselect the text contained in the specified selectionNum, if
3706         such a selection exists, otherwise do nothing. Removal of a non-existant
3707         selectionNum has no effect. 
3708         @return True if the selection was successfully removed, False
3709         otherwise.
3710         """
3711         func = self.get_dbus_method("removeSelection")
3712         return func(*args, **kwargs)
3713     
3714     def setCaretOffset(self, *args, **kwargs):
3715         """
3716         Programmatically move the text caret (visible or virtual, as
3717         above) to a given position. 
3718         @param : offset
3719         a long int indicating the desired character offset. Not all implementations
3720         of Text will honor setCaretOffset requests, so the return value
3721         below should be checked by the client. 
3722         @return TRUE if the request was carried out, or FALSE if the
3723         caret could not be moved to the requested position.
3724         """
3725         func = self.get_dbus_method("setCaretOffset")
3726         return func(*args, **kwargs)
3727     
3728     def setSelection(self, *args, **kwargs):
3729         """
3730         Modify an existing selection's start or ending offset.
3731         Calling setSelection for a selectionNum that is not already defined
3732         has no effect. The result of calling setSelection with a selectionNum
3733         greater than 0 for objects that do not include STATE_MULTISELECTABLE
3734         is undefined. 
3735         @param : selectionNum
3736         indicates which of a set of non-contiguous selections to modify.
3737         @param : startOffset
3738         the new starting offset for the selection 
3739         @param : endOffset
3740         the new ending offset for the selection 
3741         @return True if the selection corresponding to selectionNum is
3742         successfully modified, False otherwise.
3743         """
3744         func = self.get_dbus_method("setSelection")
3745         return func(*args, **kwargs)
3746     
3747     def unImplemented(self, *args, **kwargs):
3748         func = self.get_dbus_method("unImplemented")
3749         return func(*args, **kwargs)
3750     
3751     def unImplemented2(self, *args, **kwargs):
3752         func = self.get_dbus_method("unImplemented2")
3753         return func(*args, **kwargs)
3754     
3755     def get_caretOffset(self):
3756         self._pgetter(self._dbus_interface, "caretOffset")
3757     def set_caretOffset(self, value):
3758         self._psetter(self._dbus_interface, "caretOffset", value)
3759     _caretOffsetDoc = \
3760         """
3761         The current offset of the text caret in the Text object. This
3762         caret may be virtual, e.g. non-visual and notional-only, but
3763         if an onscreen representation of the caret position is visible,
3764         it will correspond to this offset. The caret offset is given
3765         as a character offset, as opposed to a byte offset into a text
3766         buffer or a column offset.
3767         """
3768     caretOffset = property(fget=get_caretOffset, fset=set_caretOffset, doc=_caretOffsetDoc)
3769     
3770     def get_characterCount(self):
3771         self._pgetter(self._dbus_interface, "characterCount")
3772     def set_characterCount(self, value):
3773         self._psetter(self._dbus_interface, "characterCount", value)
3774     _characterCountDoc = \
3775         """
3776         The total current number of characters in the Text object, including
3777         whitespace and non-spacing characters.
3778         """
3779     characterCount = property(fget=get_characterCount, fset=set_characterCount, doc=_characterCountDoc)
3780     
3781     class Range(list):
3782         def __new__(cls, startOffset, endOffset, content, data):
3783             list.__new__(cls, (startOffset, endOffset, content, data)
3784         def __init__(self, startOffset, endOffset, content, data):
3785             list.__init__(self, (startOffset, endOffset, content, data))
3786         
3787         startOffset = property(fget=_get_startOffset, fset=_set_startOffset)
3788         def _get_startOffset(self):
3789             return self[0]
3790         def _set_startOffset(self, val):
3791             self[0] = val
3792         endOffset = property(fget=_get_endOffset, fset=_set_endOffset)
3793         def _get_endOffset(self):
3794             return self[1]
3795         def _set_endOffset(self, val):
3796             self[1] = val
3797         content = property(fget=_get_content, fset=_set_content)
3798         def _get_content(self):
3799             return self[2]
3800         def _set_content(self, val):
3801             self[2] = val
3802         data = property(fget=_get_data, fset=_set_data)
3803         def _get_data(self):
3804             return self[3]
3805         def _set_data(self, val):
3806             self[3] = val
3807
3808
3809 class Value(BaseProxy):
3810     
3811     
3812     """
3813     An interface supporting controls which allow a one-dimensional,
3814     scalar quantity to be modified or which reflect a scalar quantity.
3815     (If STATE_EDITABLE is not present, the valuator is treated as
3816     "read only".
3817     """
3818     
3819     
3820     def unImplemented(self, *args, **kwargs):
3821         func = self.get_dbus_method("unImplemented")
3822         return func(*args, **kwargs)
3823     
3824     def unImplemented2(self, *args, **kwargs):
3825         func = self.get_dbus_method("unImplemented2")
3826         return func(*args, **kwargs)
3827     
3828     def unImplemented3(self, *args, **kwargs):
3829         func = self.get_dbus_method("unImplemented3")
3830         return func(*args, **kwargs)
3831     
3832     def unImplemented4(self, *args, **kwargs):
3833         func = self.get_dbus_method("unImplemented4")
3834         return func(*args, **kwargs)
3835     
3836     def get_currentValue(self):
3837         self._pgetter(self._dbus_interface, "currentValue")
3838     def set_currentValue(self, value):
3839         self._psetter(self._dbus_interface, "currentValue", value)
3840     _currentValueDoc = \
3841         """
3842         The current value of the valuator.
3843         """
3844     currentValue = property(fget=get_currentValue, fset=set_currentValue, doc=_currentValueDoc)
3845     
3846     def get_maximumValue(self):
3847         self._pgetter(self._dbus_interface, "maximumValue")
3848     def set_maximumValue(self, value):
3849         self._psetter(self._dbus_interface, "maximumValue", value)
3850     _maximumValueDoc = \
3851         """
3852         The maximum value allowed by this valuator.
3853         """
3854     maximumValue = property(fget=get_maximumValue, fset=set_maximumValue, doc=_maximumValueDoc)
3855     
3856     def get_minimumIncrement(self):
3857         self._pgetter(self._dbus_interface, "minimumIncrement")
3858     def set_minimumIncrement(self, value):
3859         self._psetter(self._dbus_interface, "minimumIncrement", value)
3860     _minimumIncrementDoc = \
3861         """
3862         The smallest incremental change which this valuator allows. If
3863         0, the incremental changes to the valuator are limited only by
3864         the precision of a double precision value on the platform.
3865         """
3866     minimumIncrement = property(fget=get_minimumIncrement, fset=set_minimumIncrement, doc=_minimumIncrementDoc)
3867     
3868     def get_minimumValue(self):
3869         self._pgetter(self._dbus_interface, "minimumValue")
3870     def set_minimumValue(self, value):
3871         self._psetter(self._dbus_interface, "minimumValue", value)
3872     _minimumValueDoc = \
3873         """
3874         The minimum value allowed by this valuator.
3875         """
3876     minimumValue = property(fget=get_minimumValue, fset=set_minimumValue, doc=_minimumValueDoc)
3877