2009-06-11 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 <tp:enum name="ComponentLayer" type="u">
4   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
5     <p>The ComponentLayer of a Component instance indicates its relative stacking order
6       with respect to the onscreen visual representation of the UI.
7       ComponentLayer, in combination with Component bounds information, can be used
8       to compute the visibility of all or part of a component.  This is important in
9       programmatic determination of region-of-interest for magnification, and in
10       ¨flat screen review¨ models of the screen, as well as for other uses.
11       Objects residing in two of the ComponentLayer categories support
12       further z-ordering information, with respect to their peers in the same layer:
13       namely, LAYER_WINDOW and LAYER_MDI.  Relative stacking order for other objects within
14       the same layer is not available; the recommended heuristic is ¨first child paints first¨, 
15       in other words, assume that the first siblings in the child list are subject to being
16       overpainted by later siblings if their bounds intersect.  </p>
17
18     <p>The order of layers, from bottom to top, is:
19             <ol>
20                 <li>LAYER_BACKGROUND</li>
21                 <li>LAYER_WINDOW</li>
22                 <li>LAYER_MDI</li>
23                 <li>LAYER_CANVAS</li>
24                 <li>LAYER_WIDGET</li>
25                 <li>LAYER_POPUP</li>
26                 <li>LAYER_OVERLAY</li>
27             </ol>
28     </p>
29   </tp:docstring>
30   <tp:enumvalue suffix="LAYER_INVALID">
31   <tp:docstring>
32     Indicates an error condition or uninitialized value. 
33   </tp:docstring>
34   </tp:enumvalue>
35   <tp:enumvalue suffix="LAYER_BACKGROUND" value="1">
36   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
37     <p>The bottom-most layer, over which everything else is painted. 
38       The 'desktop background' is generally in this layer. </p>
39   </tp:docstring>
40   </tp:enumvalue>
41   <tp:enumvalue suffix="LAYER_CANVAS" value="2">
42   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
43     <p>The 'background' layer for most content renderers and UI Component 
44       containers. </p>
45   </tp:docstring>
46   </tp:enumvalue>
47   <tp:enumvalue suffix="LAYER_WIDGET" value="3">
48   <tp:docstring>
49     The layer in which the majority of ordinary 'foreground' widgets reside.
50   </tp:docstring>
51   </tp:enumvalue>
52   <tp:enumvalue suffix="LAYER_MDI" value="4">
53   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
54     <p>A special layer between LAYER_CANVAS and LAYER_WIDGET, in which the
55       'pseudo windows' (e.g. the MDI frames) reside. 
56       (See Component.getMDIZOrder) </p>
57   </tp:docstring>
58   </tp:enumvalue>
59   <tp:enumvalue suffix="LAYER_POPUP" value="5">
60   <tp:docstring>
61     A layer for popup window content, above LAYER_WIDGET. 
62   </tp:docstring>
63   </tp:enumvalue>
64   <tp:enumvalue suffix="LAYER_OVERLAY" value="6">
65   <tp:docstring>
66     The topmost layer. 
67   </tp:docstring>
68   </tp:enumvalue>
69   <tp:enumvalue suffix="LAYER_WINDOW" value="7">
70   <tp:docstring>
71     The layer in which a toplevel window background usually resides. 
72   </tp:docstring>
73   </tp:enumvalue>
74   <tp:enumvalue suffix="LAYER_LAST_DEFINED" value="8">
75   <tp:docstring>
76     Used only to determine the end of the enumeration. 
77   </tp:docstring>
78   </tp:enumvalue>
79 </tp:enum>
80 <interface name="org.freedesktop.atspi.Component">
81   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
82     <p>The Component interface is implemented by objects which occupy on-screen space, e.g. objects
83       which have onscreen visual representations.  The methods in Component allow clients to identify
84       where the objects lie in the onscreen coordinate system, their relative size, stacking order, and
85       position.  It also provides a mechanism whereby keyboard focus may be transferred to specific
86       user interface elements programmatically.  This is a 2D API, coordinates of 3D objects are projected into the
87       2-dimensional screen view for purposes of this interface.  </p>
88
89     <p>Events emitted by Component instances include:
90             <ol>
91                     <li><code>"object:bounds-changed"</code></li>
92                     <li><code>"object:visible-data-changed"</code></li>
93             </ol>
94     </p>
95   </tp:docstring>
96   <method name="contains">
97     <arg direction="in" name="x" type="i"/>
98     <arg direction="in" name="y" type="i"/>
99     <arg direction="in" name="coord_type" type="u" tp:type="COORD_TYPE"/>
100     <arg direction="out" type="b" tp:type="boolean">
101     <tp:docstring>
102             <code>True</code>if the specified point lies within the Component's bounding box, <code>False</code> otherwise. 
103     </tp:docstring>
104     </arg>
105   </method>
106   <method name="getAccessibleAtPoint">
107     <arg direction="in" name="x" type="i"/>
108     <arg direction="in" name="y" type="i"/>
109     <arg direction="in" name="coord_type" type="u" tp:type="COORD_TYPE"/>
110     <arg direction="out" type="o" tp:type="Accessible">
111     <tp:docstring>
112       The Accessible child whose bounding box contains the specified point. 
113     </tp:docstring>
114     </arg>
115   </method>
116   <method name="getExtents">
117     <tp:docstring>
118       Obtain the Component's bounding box, in pixels, relative to the specified coordinate system. 
119     </tp:docstring>
120     <arg direction="in" name="coord_type" type="u" tp:type="COORD_TYPE"/>
121     <arg direction="out" type="(iiii)" tp:type="BoundingBox">
122     <tp:docstring>
123       A BoundingBox which entirely contains the object's onscreen visual representation.
124     </tp:docstring>
125     </arg>
126   </method>
127   <method name="getPosition">
128     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
129       <p>Obtain the position of the current component in the coordinate system specified
130          by <code>coord_type.</code>
131       </p>
132     </tp:docstring>
133     <arg direction="in" name="coord_type" type="u" tp:type="COORD_TYPE">
134             <tp:docstring>
135             <ol>
136               <li>0 indicates coord_type_xy_screen, coordinates are relative to the display screen, in pixels.</li>
137               <li>1 indicates coord_type_xy_window, coordinates are relative to the current toplevel window, in pixels.</li>
138             </ol>
139             </tp:docstring>
140     </arg>
141     <arg direction="out" name="x" type="i">
142             <tp:docstring>
143                 An out parameter which will be back-filled with the returned x coordinate.
144             </tp:docstring>
145     </arg>
146     <arg direction="out" name="y" type="i">
147             <tp:docstring>
148                     <p>An out parameter which will be back-filled with the returned y coordinate.</p>
149             </tp:docstring>
150     </arg>
151   </method>
152   <method name="getSize">
153     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
154       <p>Obtain the size, in the coordinate system specified by \c coord_type, 
155         of the rectangular area which fully contains the object's 
156         visual representation, without accounting for viewport clipping. 
157       </p>
158     </tp:docstring>
159     <arg direction="out" name="width" type="i">
160             <tp:docstring>
161                 The object's horizontal extents in the specified coordinate system.
162             </tp:docstring>
163     </arg>
164     <arg direction="out" name="height" type="i">
165             <tp:docstring>
166                     <p>The object's vertical extents in the specified coordinate system.</p>
167             </tp:docstring>
168     </arg>
169   </method>
170   <method name="getLayer">
171     <arg direction="out" type="u" tp:type="ComponentLayer">
172     <tp:docstring>
173       The ComponentLayer in which this object resides. 
174     </tp:docstring>
175     </arg>
176   </method>
177   <method name="getMDIZOrder">
178     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
179       <p>Obtain the relative stacking order (i.e. 'Z' order) of an object.
180         Larger values indicate that an object is on "top" of the stack, therefore
181         objects with smaller MDIZOrder may be obscured by objects with a larger MDIZOrder,
182         but not vice-versa. This is only relevant for objects in LAYER_MDI or LAYER_WINDOW </p>
183     </tp:docstring>
184     <arg direction="out" type="n" tp:type="short">
185     <tp:docstring>
186       An integer indicating the object's place in the stacking order.
187     </tp:docstring>
188     </arg>
189   </method>
190   <method name="grabFocus">
191     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
192       <p>Request that the object obtain keyboard focus.</p>
193     </tp:docstring>
194     <arg direction="out" type="b" tp:type="boolean">
195     <tp:docstring>
196             <code>True</code> if keyboard focus was successfully transferred to the Component. 
197     </tp:docstring>
198     </arg>
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>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     </tp:docstring>
212     <arg direction="out" type="d"/>
213   </method>
214 </interface>
215 </node>