3 * AccessibleComponent function implementations
7 #include <cspi/spi-private.h>
10 * AccessibleComponent_ref:
11 * @obj: a pointer to an object implementing #AccessibleComponent on which to operate.
13 * Increment the reference count for an #AccessibleComponent.
15 * Returns: (no return code implemented yet).
19 AccessibleComponent_ref (AccessibleComponent *obj)
21 cspi_object_ref (obj);
26 * AccessibleComponent_unref:
27 * @obj: a pointer to the object implementing #AccessibleComponent on which to operate.
29 * Decrement the reference count for an #AccessibleComponent.
31 * Returns: (no return code implemented yet).
35 AccessibleComponent_unref (AccessibleComponent *obj)
37 cspi_object_unref (obj);
42 * AccessibleComponent_contains:
43 * @obj: a pointer to the #AccessibleComponent to query.
44 * @x: a #long specifying the x coordinate in question.
45 * @y: a #long specifying the y coordinate in question.
46 * @ctype: the desired coordinate system of the point (@x, @y)
47 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
49 * Query whether a given #AccessibleComponent contains a particular point.
51 * Returns: a #TRUE if the specified component contains the point (@x, @y),
55 AccessibleComponent_contains (AccessibleComponent *obj,
58 AccessibleCoordType ctype)
60 return Accessibility_Component_contains (CSPI_OBJREF (obj),
68 * AccessibleComponent_getAccessibleAtPoint:
69 * @obj: a pointer to the #AccessibleComponent to query.
70 * @x: a #long specifying the x coordinate of the point in question.
71 * @y: a #long specifying the y coordinate of the point in question.
72 * @ctype: the coordinate system of the point (@x, @y)
73 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
75 * Get the accessible child at a given coordinate within an #AccessibleComponent.
77 * Returns: a pointer to an #Accessible child of the specified component which
78 * contains the point (@x, @y), or NULL of no child contains the point.
81 AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
84 AccessibleCoordType ctype)
86 Accessibility_Accessible child;
88 child = Accessibility_Component_getAccessibleAtPoint(CSPI_OBJREF (obj),
93 return cspi_object_add (child);
97 * AccessibleComponent_getExtents:
98 * @obj: a pointer to the #AccessibleComponent to query.
99 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
100 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
101 * @width: a pointer to a #long into which the x extents (width) will be returned.
102 * @height: a pointer to a #long into which the y extents (height) will be returned.
103 * @ctype: the desired coordinate system into which to return the results,
104 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
106 * Get the bounding box of the specified #AccessibleComponent.
110 AccessibleComponent_getExtents (AccessibleComponent *obj,
115 AccessibleCoordType ctype)
117 Accessibility_BoundingBox bbox;
118 bbox = Accessibility_Component_getExtents (CSPI_OBJREF (obj),
121 cspi_warn_ev (cspi_ev (), "AccessibleComponent_getExtents");
125 *height = bbox.height;
129 * AccessibleComponent_getPosition:
130 * @obj: a pointer to the #AccessibleComponent to query.
131 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
132 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
133 * @ctype: the desired coordinate system into which to return the results,
134 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
136 * Get the minimum x and y coordinates of the specified #AccessibleComponent.
140 AccessibleComponent_getPosition (AccessibleComponent *obj,
143 AccessibleCoordType ctype)
145 Accessibility_Component_getPosition (CSPI_OBJREF (obj),
153 * AccessibleComponent_getSize:
154 * @obj: a pointer to the #AccessibleComponent to query.
155 * @width: a pointer to a #long into which the x extents (width) will be returned.
156 * @height: a pointer to a #long into which the y extents (height) will be returned.
158 * Get the size of the specified #AccessibleComponent.
162 AccessibleComponent_getSize (AccessibleComponent *obj,
166 Accessibility_Component_getSize (CSPI_OBJREF (obj),
167 (CORBA_long *) width,
168 (CORBA_long *) height,
173 * AccessibleComponent_getLayer:
174 * @obj: a pointer to the #AccessibleComponent to query.
176 * Query which layer the component is painted into, to help determine its
177 * visibility in terms of stacking order.
179 * Returns: the #AccessibleComponentLayer into which this component is painted.
181 AccessibleComponentLayer
182 AccessibleComponent_getLayer (AccessibleComponent *obj)
184 Accessibility_ComponentLayer zlayer;
185 AccessibleComponentLayer retval;
187 zlayer = Accessibility_Component_getLayer (CSPI_OBJREF (obj),
191 case Accessibility_LAYER_BACKGROUND:
192 retval = SPI_LAYER_BACKGROUND;
194 case Accessibility_LAYER_CANVAS:
195 retval = SPI_LAYER_CANVAS;
197 case Accessibility_LAYER_WIDGET:
198 retval = SPI_LAYER_WIDGET;
200 case Accessibility_LAYER_MDI:
201 retval = SPI_LAYER_MDI;
203 case Accessibility_LAYER_POPUP:
204 retval = SPI_LAYER_POPUP;
206 case Accessibility_LAYER_OVERLAY:
207 retval = SPI_LAYER_OVERLAY;
210 retval = SPI_LAYER_INVALID;
216 * AccessibleComponent_getMDIZOrder:
217 * @obj: a pointer to the #AccessibleComponent to query.
219 * Query the z stacking order of a component which is in the MDI layer.
220 * (Bigger z-order numbers mean nearer the top)
222 * Returns: a short integer indicating the stacking order of the component
223 * in the MDI layer, or -1 if the component is not in the MDI layer.
226 AccessibleComponent_getMDIZOrder (AccessibleComponent *obj)
228 return (short) Accessibility_Component_getMDIZOrder (CSPI_OBJREF (obj),
233 * AccessibleComponent_grabFocus:
234 * @obj: a pointer to the #AccessibleComponent on which to operate.
236 * Attempt to set the keyboard input focus to the specified
237 * #AccessibleComponent.
241 AccessibleComponent_grabFocus (AccessibleComponent *obj)