2009-06-11 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.Selection.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
3 <interface name="org.freedesktop.atspi.Selection">
4   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
5     <p>An interface which indicates that an object exposes a 'selection' model,
6       allowing the selection of one or more of its children.  Read-only Selection
7       instances are possible, in which case the interface is used to programmatically
8       determine the selected-ness of its children.  A selected child has State.STATE_SELECTED,
9       and a child which may hypothetically be selected (though possibly not programmatically
10       selectable) has State.STATE_SELECTABLE.</p>
11       <p>Events emitted by implementors of Selection include:
12       <code>object:selection-changed</code> An instance of Selection has undergone a change in the
13       'selected-ness' of its children, i.e. had a selection added,
14       removed, and/or modified.  Usually accompanied by
15       corresponding <code>object:state-changed:selected</code> events
16       from the corresponding children, unless the children are
17       previously un-queried via AT-SPI and the Selection instance
18       has State.STATE_MANAGES_DESCENDANTS.</p>
19   </tp:docstring>
20   <tp:property name="nSelectedChildren" type="i" access="read">
21   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
22     <p>The number of children of a Selection implementor which are
23       currently selected.</p>
24   </tp:docstring>
25   </tp:property>
26   <method name="getSelectedChild">
27     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
28             <p>Get the i-th selected Accessible child of a Selection.</p>
29             <p><code>selectedChildIndex</code> refers to the index in the list of 
30         'selected' children as opposed to the more general 'child index'
31         of an object;  as such it generally differs from that used in
32         Accessible.getChildAtIndex() or returned by
33         Accessible.getIndexInParent(). 
34         <code>selectedChildIndex</code> must lie between 0
35         and Selection.nSelectedChildren-1, inclusive.</p>
36     </tp:docstring>
37     <arg direction="in" name="selectedChildIndex" type="i">
38     <tp:docstring>
39       A long integer indicating which of the selected children of an object is being requested.
40     </tp:docstring>
41     </arg>
42     <arg direction="out" type="o" tp:type="Accessible">
43     <tp:docstring>
44             A pointer to a selected Accessible child object,specified by <code>selectedChildIndex</code>.
45     </tp:docstring>
46     </arg>
47   </method>
48   <method name="selectChild">
49     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
50             <p>Add a child to the selected children list of a Selection.</p>
51             <p>For Selection implementors that only allow
52         single selections, this call may result in the
53         replacement of the (single) current
54         selection.  The call may return <code>False</code> if
55         the child is not selectable (i.e. does not have State.STATE_SELECTABLE), 
56         if the user does not have permission to change the selection, 
57         or if the Selection instance does not have State.STATE_SENSITIVE.    </p>
58     </tp:docstring>
59     <arg direction="in" name="childIndex" type="i">
60     <tp:docstring>
61       A long integer indicating which child of theSelection is to be selected.
62     </tp:docstring>
63     </arg>
64     <arg direction="out" type="b" tp:type="boolean">
65     <tp:docstring>
66             <code>True</code> if the child was successfully selected, <code>False</code> otherwise.
67     </tp:docstring>
68     </arg>
69   </method>
70   <method name="deselectSelectedChild">
71     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
72             <p>Remove a child to the selected children list of a Selection.</p>
73             <p><code>childIndex</code> is the index in the selected-children list,
74                     not the index in the parent container. <code>selectedChildIndex</code> in this
75                     method, and <code>childIndex</code> in Selection.selectChild
76                     are asymmettric.</p>
77     </tp:docstring>
78     <arg direction="in" name="selectedChildIndex" type="i">
79     <tp:docstring>
80       A long integer indicating which of the selected children of the Selection is to be deselected.  The indexis a zero-offset index into the 'selected child list', nota zero-offset index into the list of all children of the Selection.
81     </tp:docstring>
82     </arg>
83     <arg direction="out" type="b" tp:type="boolean">
84     <tp:docstring>
85             <code>True</code> if the child was successfully deselected, <code>False</code> otherwise, see deselectChild
86     </tp:docstring>
87     </arg>
88   </method>
89   <method name="isChildSelected">
90     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
91       <p>Determine whether a particular child of an Selection implementor
92               is currently selected.  Note that <code>childIndex</code> is the zero-offset
93         index into the standard Accessible container's list of children.    </p>
94     </tp:docstring>
95     <arg direction="in" name="childIndex" type="i">
96     <tp:docstring>
97       An index into the Selection's list of children.
98     </tp:docstring>
99     </arg>
100     <arg direction="out" type="b" tp:type="boolean">
101     <tp:docstring>
102             <code>True</code> if the specified child is currently selected,<code>False</code> otherwise.
103     </tp:docstring>
104     </arg>
105   </method>
106   <method name="selectAll">
107     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
108       <p>Attempt to select all of the children of a Selection implementor.
109         Not all Selection implementors support this operation (for instance, 
110         implementations which support only "single selection" do not support this operation).</p>
111     </tp:docstring>
112     <arg direction="out" type="b" tp:type="boolean">
113     <tp:docstring>
114       <code>True</code> if successful, <code>False</code> otherwise.
115     </tp:docstring>
116     </arg>
117   </method>
118   <method name="clearSelection">
119     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
120       <p>Attempt to clear all selections (i.e. deselect all children) of a Selection.
121         Not all Selection implementations allow the removal of all selections.    </p>
122
123       <p>This operation may fail if the object must have at least one selected child,
124         if the user does not have permission to change the selection, or if the Selection
125         does not have State.STATE_SENSITIVE.    </p>
126     </tp:docstring>
127     <arg direction="out" type="b" tp:type="boolean">
128     <tp:docstring>
129       <code>True</code> if the selections were successfully cleared, <code>False</code> otherwise.
130     </tp:docstring>
131     </arg>
132   </method>
133   <method name="deselectChild">
134     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
135       <p>Remove a child from the selected children list of a Selection,
136         if the child is currently selected.    </p>
137
138         <p>Unlike deselectSelectedChild, <code>childIndex</code> is the zero-offset
139         index into the Accessible instance's list of children,
140         not the index into the 'selected child list'.    </p>
141     </tp:docstring>
142     <arg direction="in" name="childIndex" type="i">
143     <tp:docstring>
144       a long integer (the zero offset index into the Accessibleobject's list of children) indicating which child of theSelection is to be selected.
145     </tp:docstring>
146     </arg>
147     <arg direction="out" type="b" tp:type="boolean">
148     <tp:docstring>
149       <code>True</code> if the child was successfully selected, <code>False</code> otherwise, see deselectSelectedChild.
150     </tp:docstring>
151     </arg>
152   </method>
153 </interface>
154 </node>