2008-08-15 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.Component.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
3
4
5
6
7
8 <tp:enum name="ComponentLayer" type="u">
9   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
10     <p>The ComponentLayer of a Component instance indicates its relative stacking order
11       with respect to the onscreen visual representation of the UI.
12       ComponentLayer, in combination with Component bounds information, can be used
13       to compute the visibility of all or part of a component.  This is important in
14       programmatic determination of region-of-interest for magnification, and in
15       ¨flat screen review¨ models of the screen, as well as for other uses.
16       Objects residing in two of the ComponentLayer categories support
17       further z-ordering information, with respect to their peers in the same layer:
18       namely, LAYER_WINDOW and LAYER_MDI.  Relative stacking order for other objects within
19       the same layer is not available; the recommended heuristic is ¨first child paints first¨, 
20       in other words, assume that the first siblings in the child list are subject to being
21       overpainted by later siblings if their bounds intersect.  </p>
22
23     <p>The order of layers, from bottom to top, is:
24       \li LAYER_BACKGROUND
25       \li LAYER_WINDOW
26       \li LAYER_MDI
27       \li LAYER_CANVAS
28       \li LAYER_WIDGET
29       \li LAYER_POPUP
30       \li LAYER_OVERLAY</p>
31   </tp:docstring>
32   <tp:enumvalue suffix="LAYER_INVALID">
33   <tp:docstring>
34     &lt; Indicates an error condition or uninitialized value. 
35   </tp:docstring>
36   </tp:enumvalue>
37   <tp:enumvalue suffix="LAYER_BACKGROUND" value="1">
38   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
39     <p>&lt; The bottom-most layer, over which everything else is painted. 
40       The 'desktop background' is generally in this layer. </p>
41   </tp:docstring>
42   </tp:enumvalue>
43   <tp:enumvalue suffix="LAYER_CANVAS" value="2">
44   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
45     <p>&lt; The 'background' layer for most content renderers and UI Component 
46       containers. </p>
47   </tp:docstring>
48   </tp:enumvalue>
49   <tp:enumvalue suffix="LAYER_WIDGET" value="3">
50   <tp:docstring>
51     &lt; The layer in which the majority of ordinary 'foreground' widgets reside.
52   </tp:docstring>
53   </tp:enumvalue>
54   <tp:enumvalue suffix="LAYER_MDI" value="4">
55   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
56     <p>&lt; A special layer between LAYER_CANVAS and LAYER_WIDGET, in which the
57       'pseudo windows' (e.g. the MDI frames) reside. 
58       @see Component::getMDIZOrder </p>
59   </tp:docstring>
60   </tp:enumvalue>
61   <tp:enumvalue suffix="LAYER_POPUP" value="5">
62   <tp:docstring>
63     &lt; A layer for popup window content, above LAYER_WIDGET. 
64   </tp:docstring>
65   </tp:enumvalue>
66   <tp:enumvalue suffix="LAYER_OVERLAY" value="6">
67   <tp:docstring>
68     &lt; The topmost layer. 
69   </tp:docstring>
70   </tp:enumvalue>
71   <tp:enumvalue suffix="LAYER_WINDOW" value="7">
72   <tp:docstring>
73     &lt; The layer in which a toplevel window background usually resides. 
74   </tp:docstring>
75   </tp:enumvalue>
76   <tp:enumvalue suffix="LAYER_LAST_DEFINED" value="8">
77   <tp:docstring>
78     &lt; Used only to determine the end of the enumeration. 
79   </tp:docstring>
80   </tp:enumvalue>
81 </tp:enum>
82 <interface name="org.freedesktop.atspi.Component">
83   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
84     <p>The Component interface is implemented by objects which occupy on-screen space, e.g. objects
85       which have onscreen visual representations.  The methods in Component allow clients to identify
86       where the objects lie in the onscreen coordinate system, their relative size, stacking order, and
87       position.  It also provides a mechanism whereby keyboard focus may be transferred to specific
88       user interface elements programmatically.  This is a 2D API, coordinates of 3D objects are projected into the
89       2-dimensional screen view for purposes of this interface.  </p>
90
91     <p>@note the meaning and defined values of the \c short \c coord_type parameter used by some
92       Component methods is as follows:
93       \li 0 indicates coord_type_xy_screen, coordinates are relative to the display screen, in pixels.
94       \li 1 indicates coord_type_xy_window, coordinates are relative to the current toplevel window, in pixels.  </p>
95
96     <p>@note Events emitted by Component instances include:
97       \li \c "object:bounds-changed"
98       \li \c "object:visible-data-changed"</p>
99   </tp:docstring>
100   <method name="contains">
101     <arg direction="in" name="x" type="i"/>
102     <arg direction="in" name="y" type="i"/>
103     <arg direction="in" name="coord_type" type="n" tp:type="short"/>
104     <arg direction="out" type="b" tp:type="boolean">
105     <tp:docstring>
106       \c True if the specified point lies within the Component's bounding box, \c False otherwise. 
107     </tp:docstring>
108     </arg>
109   </method>
110   <method name="getAccessibleAtPoint">
111     <arg direction="in" name="x" type="i"/>
112     <arg direction="in" name="y" type="i"/>
113     <arg direction="in" name="coord_type" type="n" tp:type="short"/>
114     <arg direction="out" type="o" tp:type="Accessible">
115     <tp:docstring>
116       the Accessible child whose bounding box contains the specified point. 
117     </tp:docstring>
118     </arg>
119   </method>
120   <method name="getExtents">
121     <tp:docstring>
122       Obtain the Component's bounding box, in pixels, relative to the specified coordinate system. 
123     </tp:docstring>
124     <arg direction="in" name="coord_type" type="n" tp:type="short"/>
125     <arg direction="out" type="(iiii)" tp:type="BoundingBox">
126     <tp:docstring>
127       a BoundingBox which entirely contains the object's onscreen visual representation.
128     </tp:docstring>
129     </arg>
130   </method>
131   <method name="getPosition">
132     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
133       <p>Obtain the position of the current component in the coordinate system specified
134         by \c coord_type.
135         @param coord_type
136         @param x an out parameter which will be back-filled with the returned x coordinate.
137         @param y an out parameter which will be back-filled with the returned y coordinate.</p>
138     </tp:docstring>
139     <arg direction="out" name="x" type="i"/>
140     <arg direction="out" name="y" type="i"/>
141     <arg direction="in" name="coord_type" type="n" tp:type="short"/>
142   </method>
143   <method name="getSize">
144     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
145       <p>Obtain the size, in the coordinate system specified by \c coord_type, 
146         of the rectangular area which fully contains the object's 
147         visual representation, without accounting for viewport clipping. 
148         @param width the object's horizontal extents in the specified coordinate system.
149         @param height the object's vertical extents in the specified coordinate system.</p>
150     </tp:docstring>
151     <arg direction="out" name="width" type="i"/>
152     <arg direction="out" name="height" type="i"/>
153   </method>
154   <method name="getLayer">
155     <arg direction="out" type="u" tp:type="ComponentLayer">
156     <tp:docstring>
157       the ComponentLayer in which this object resides. 
158     </tp:docstring>
159     </arg>
160   </method>
161   <method name="getMDIZOrder">
162     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
163       <p>Obtain the relative stacking order (i.e. 'Z' order) of an object.
164         Larger values indicate that an object is on "top" of the stack, therefore
165         objects with smaller MDIZOrder may be obscured by objects with a larger MDIZOrder,
166         but not vice-versa. 
167         @note only relevant for objects in LAYER_MDI or LAYER_WINDOW </p>
168     </tp:docstring>
169     <arg direction="out" type="n" tp:type="short">
170     <tp:docstring>
171       an integer indicating the object's place in the stacking order.
172     </tp:docstring>
173     </arg>
174   </method>
175   <method name="grabFocus">
176     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
177       <p>Request that the object obtain keyboard focus.    </p>
178     </tp:docstring>
179     <arg direction="out" type="b" tp:type="boolean">
180     <tp:docstring>
181       \c True if keyboard focus was successfully transferred to the Component. 
182     </tp:docstring>
183     </arg>
184   </method>
185   <method name="registerFocusHandler">
186     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
187       <p>Register an EventListener for notification when this object receives keyboard focus.
188         @note you probably want to register for ¨focus:¨ events via 
189         Registry::registerGlobalEventListener instead. </p>
190     </tp:docstring>
191     <arg direction="in" name="handler" type="o" tp:type="EventListener"/>
192   </method>
193   <method name="deregisterFocusHandler">
194     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
195       <p>Request that an EventListener registered via registerFocusHandler no longer be notified 
196         when this object receives keyboard focus.</p>
197     </tp:docstring>
198     <arg direction="in" name="handler" type="o" tp:type="EventListener"/>
199   </method>
200   <method name="getAlpha">
201     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
202       <p>Obtain the alpha value of the component.  An alpha value of 1.0 or greater
203         indicates that the object is fully opaque, and an alpha value of 0.0 indicates
204         that the object is fully transparent.  Negative alpha values have no defined
205         meaning at this time.    </p>
206
207       <p>@note alpha values are used in conjunction with Z-order calculations to
208         determine whether an object wholly or partially obscures another object's 
209         visual intersection, in the event that their bounds intersect.    </p>
210
211       <p>@see STATE_OPAQUE    </p>
212
213       <p>@since AT-SPI 1.7.0</p>
214     </tp:docstring>
215     <arg direction="out" type="d"/>
216   </method>
217   <method name="unImplemented">
218     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
219       <p>\cond
220         unImplemented:    </p>
221
222       <p>placeholders for future expansion.</p>
223     </tp:docstring>
224   </method>
225   <method name="unImplemented2">
226   </method>
227   <method name="unImplemented3">
228   </method>
229 </interface>
230 </node>