[prevent][42870] Fix for null pointer dereference
[platform/upstream/at-spi2-core.git] / idl / component.didl
1
2 using org.freestandards.atspi.Accessible.Reference = Reference;
3
4 /*
5   The Component interface is implemented by objects which occupy on-screen space, e.g. objects
6   which have onscreen visual representations. The methods in Component allow clients to identify
7   where the objects lie in the onscreen coordinate system, their relative size, stacking order, and
8   position.  It also provides a mechanism whereby keyboard focus may be transferred to specific
9   user interface elements programmatically.  This is a 2D API, coordinates of 3D objects are projected into the
10   2-dimensional screen view for purposes of this interface.
11 */
12 interface org.freestandards.atspi.Component {
13
14         /* 
15            Used by Component, Image and Text interfaces to specify whether coordinates are
16            relative to the window or screen.
17         */
18         enum <uint32> CoordType {
19                 COORD_TYPE_SCREEN = 0,
20                 COORD_TYPE_WINDOW = 1
21         }
22
23         /*
24           Used by Component and Text interfaces, a struct defining a bounding rectange.
25           The coordinate system is determined by the context of the API call.
26         */
27         struct BoundingBox {
28                 int32 x;
29                 int32 y;
30                 int32 width;
31                 int32 height;
32         }
33
34         /*
35           Indicates the relative stacking order with respect to the onscreen visual representation.
36
37           The order of layers, from bottom to top is:
38                 LAYER_BACKGROUND
39                 LAYER_WINDOW
40                 LAYER_MDI
41                 LAYER_CANVAS
42                 LAYER_WIDGET
43                 LAYER_POPUP
44                 LAYER_OVERLAY
45         */
46         enum <uint32> ComponentLayer {
47                 LAYER_INVALID,
48                 LAYER_BACKGROUND,
49                 LAYER_CANVAS,
50                 LAYER_WIDGET,
51                 LAYER_MDI,
52                 LAYER_POPUP,
53                 LAYER_OVERLAY,
54                 LAYER_WINDOW,
55                 LAYER_LAST_DEFINED
56         }
57         
58         /*
59           True if the specified point lies within the components bounding box.
60          */ 
61         method Contains {
62                 int32 x;
63                 int32 y;
64                 CoordType coord_type;
65         } reply {
66                 boolean within;
67         }
68
69         /*
70           Return the accessible child whose bounding box contains the specified point.
71          */
72         method GetAccessibleAtPoint {
73                 int32 x;
74                 int32 y;
75                 CoordType coord_type;
76         } reply {
77                 Reference child;
78         }
79
80         /*
81           Obtain the components bounding box, in pixels, relative to the specified coordinate system.
82         */
83         method GetExtents {
84                 CoordType cood_type;
85         } reply {
86                 BoundingBox box;
87         }
88
89         /*
90           Obtain the position of the current component in the specified coordinate system.
91         */
92         method GetPosition {
93                 CoordType coord_type;
94         } reply {
95                 int32 x;
96                 int32 y;
97         }
98
99         /*
100           Obtain the size in the specified coordinate system.
101           Fully contains teh object's visual representation without accounting for viewport clipping.
102         */
103         method GetSize reply {
104                 int32 width;
105                 int32 height;
106         }
107
108         /*
109           The component layer in which this object resides.
110         */
111         method GetLayer reply {
112                 ComponentLayer layer;
113         }
114
115         /*
116           Obtain the relative stacking order (i.e 'Z' order) of an object.
117           Larger values indicate that an object is on 'top' of the stack.
118           Only relevenat for objects in LAYER_MDI or LAYER_WINDOW.
119         */
120         method GetMDIZOrder reply {
121                 int16 order;
122         }
123
124         /*
125           Request that an object obtain keyboard focus.
126         */
127         method GrabFocus reply {
128                 boolean success;
129         }
130
131         /*
132           Obtain the alpha value of the component.
133           Alpha values are used with Z-Order to determine whether an obeject obscures
134           anothers visual representation.
135         */
136         method GetAlpha reply {
137                 double alpha;
138         }
139 }