2008-12-04 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.Selector.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
3 <tp:struct name="Command">
4   <tp:docstring>
5     A structure which encapsulates both a string representation of a command and a unique command ID 
6   </tp:docstring>
7   <tp:member type="s" tp:name="name"/>
8   <tp:member type="i" tp:name="id"/>
9 </tp:struct>
10 <method name="notifyCommands">
11   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
12     <p>Notify the CommandListener instance of changes to the currently
13       available commands, by sending the current CommandList.  </p>
14   </tp:docstring>
15   <arg direction="in" name="commands" type="a(si)" tp:type="CommandList">
16           <tp:docstring>
17     <p>The newly-available list of Command objects which
18       may be invoked by the listener.</p>
19           </tp:docstring>
20   </arg>
21 </method>
22 <interface name="org.freedesktop.atspi.Selector">
23   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
24     <p>This interface is intended for use by assistive technologies
25       and related user-agents.  Via this interface, an assistive technology or
26       user agent may expose a series of choices or selections in textual form,
27       which can be activated on demand by a client of the Selector interface.  </p>
28
29     <p>Examples of the use of this interface include voice-command and remote-control
30       applications, in which the user interaction is wholly or partly delegated by the 
31       implementor to an external agent.</p>  
32   </tp:docstring>
33   <tp:enum name="CommandResult" type="u">
34     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
35       <p>A code returned by a call to activateCommand, indicating 
36         the result of the activation request.</p>
37     </tp:docstring>
38     <tp:enumvalue suffix="COMMAND_RESULT_INVALID">
39     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
40       <p>The command was invalid or ill-formed; usually indicates
41         an error condition. </p>
42     </tp:docstring>
43     </tp:enumvalue>
44     <tp:enumvalue suffix="COMMAND_RESULT_SUCCESS" value="1">
45     <tp:docstring>
46       The command was successfully activated. 
47     </tp:docstring>
48     </tp:enumvalue>
49     <tp:enumvalue suffix="COMMAND_RESULT_FAILED" value="2">
50     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
51       <p>The command was valid, but could not be activated.
52         This may be due to problems with permissions or error conditions.</p>
53     </tp:docstring>
54     </tp:enumvalue>
55     <tp:enumvalue suffix="COMMAND_RESULT_OBSOLETE" value="3">
56     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
57       <p>The command is no longer valid in the current program context. 
58         This may mean that the application has changed state in such a
59         way that the specified command it no longer applicable, or
60         because changes to the application state have rendered it
61         ambiguous.  Commands should be re-fetched and a new selection
62         made.</p>
63     </tp:docstring>
64     </tp:enumvalue>
65     <tp:enumvalue suffix="COMMAND_RESULT_LAST_DEFINED" value="4">
66     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
67       <p>Defines size of enumeration; 
68         do not use this value as a parameter.</p>
69     </tp:docstring>
70     </tp:enumvalue>
71   </tp:enum>
72   <tp:property name="supportsReplace" type="b" access="read">
73   <tp:docstring>
74           This attribute is <code>True</code> if this Selector allows its CommandList to be specified by the client 
75   </tp:docstring>
76   </tp:property>
77   <method name="getCommands">
78     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
79       <p>Query the Selector for the current CommandList.</p>
80     </tp:docstring>
81     <arg direction="out" type="a(si)" tp:type="CommandList">
82     <tp:docstring>
83       The currently available CommandList 
84     </tp:docstring>
85     </arg>
86   </method>
87   <method name="replaceCommands">
88     <arg direction="in" name="commands" type="a(si)" tp:type="CommandList"/>
89     <arg direction="out" type="b" tp:type="boolean">
90     <tp:docstring>
91             <code>True</code> if the replacement request was successful, <code>True</code> if the 
92             request could not be honored.
93     </tp:docstring>
94     </arg>
95   </method>
96   <method name="refreshCommands">
97     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
98             <p>Ask the Selector to re-calculate its CommandList.</p>
99             <p>In most cases the Selector will continuously
100         update its CommandList without recourse to this call.
101         This call is equivalent to getCommands, except that
102         after refreshCommands the new CommandList will be returned
103         via any registered CommandListener instances rather than
104         synchronously via this call.</p>
105     </tp:docstring>
106     <arg direction="out" type="b" tp:type="boolean">
107     <tp:docstring>
108             <code>True</code> if the CommandList changed.
109     </tp:docstring>
110     </arg>
111   </method>
112   <method name="activateCommand">
113     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
114             <p>Request that the Selector invoke the specified Command.</p>
115     </tp:docstring>
116     <arg direction="in" name="cmd" type="(si)" tp:type="Command">
117             <tp:docstring>
118             <p>The Command to activate/invoke.</p>
119             </tp:docstring>
120     </arg>
121     <arg direction="out" type="u" tp:type="CommandResult">
122     <tp:docstring>
123       A CommandResult indicating whether the request was honored, and the reason for failure if the Command could not be activated or invoked.
124     </tp:docstring>
125     </arg>
126   </method>
127   <method name="registerChangeListener">
128     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
129       <p>Register a :CommandListener instance for notification of 
130               changes to the command set.</p>
131     </tp:docstring>
132     <arg direction="in" name="listener" type="o" tp:type="CommandListener">
133             <tp:docstring>
134       <p>The CommandListener to be notified of changes.</p>
135             </tp:docstring>
136     </arg>
137   </method>
138   <method name="deregisterChangeListener">
139     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
140       <p>Tell the Selector instance to cease notifying the
141               specified CommandListener of changes to the command list.</p>
142     </tp:docstring>
143     <arg direction="in" name="listener" type="o" tp:type="CommandListener">
144             <tp:docstring>
145       <p>The CommandListener to remove from the
146         notification list.</p>
147             </tp:docstring>
148     </arg>
149   </method>
150 </interface>
151 </node>