X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=atspi%2Fatspi-component.c;h=f6f72f8296573dc925bb359aaede9c25e4a5d02d;hb=d17bd107e0b8774c280aa8bf7682ec850ed9c439;hp=a3755675a85dd59fd7e2da683141fd925e6f7b9e;hpb=644a50e6b09324e03478ebe821927e2aaf73f759;p=platform%2Fupstream%2Fat-spi2-core.git diff --git a/atspi/atspi-component.c b/atspi/atspi-component.c index a375567..f6f72f8 100644 --- a/atspi/atspi-component.c +++ b/atspi/atspi-component.c @@ -122,6 +122,7 @@ atspi_component_get_accessible_at_point (AtspiComponent *obj, return _atspi_dbus_return_accessible_from_message (reply); } + /** * atspi_component_get_extents: * @obj: a pointer to the #AtspiComponent to query. @@ -215,7 +216,7 @@ atspi_component_get_size (AtspiComponent *obj, GError **error) * atspi_component_get_layer: * @obj: a pointer to the #AtspiComponent to query. * - * Queries which layer the component is painted into, to help determine its + * Queries which layer the component is painted into, to help determine its * visibility in terms of stacking order. * * Returns: the #AtspiComponentLayer into which this component is painted. @@ -237,7 +238,7 @@ atspi_component_get_layer (AtspiComponent *obj, GError **error) * Queries the z stacking order of a component which is in the MDI or window * layer. (Bigger z-order numbers mean nearer the top) * - * Returns: a #gshort indicating the stacking order of the component + * Returns: a #gshort indicating the stacking order of the component * in the MDI layer, or -1 if the component is not in the MDI layer. **/ gshort @@ -271,14 +272,54 @@ atspi_component_grab_focus (AtspiComponent *obj, GError **error) } /** + * atspi_component_grab_highlight: + * @obj: a pointer to the #AtspiComponent on which to operate. + * + * Attempts to set highlight to the specified + * #AtspiComponent. + * + * Returns: #TRUE if successful, #FALSE otherwise. + * + **/ +gboolean +atspi_component_grab_highlight (AtspiComponent *obj, GError **error) +{ + dbus_bool_t retval = FALSE; + + _atspi_dbus_call (obj, atspi_interface_component, "GrabHighlight", error, "=>b", &retval); + + return retval; +} + +/** + * atspi_component_clear_highlight: + * @obj: a pointer to the #AtspiComponent on which to operate. + * + * Attempts to clear highlight on the specified + * #AtspiComponent. + * + * Returns: #TRUE if successful, #FALSE otherwise. + * + **/ +gboolean +atspi_component_clear_highlight (AtspiComponent *obj, GError **error) +{ + dbus_bool_t retval = FALSE; + + _atspi_dbus_call (obj, atspi_interface_component, "ClearHighlight", error, "=>b", &retval); + + return retval; +} + +/** * atspi_component_get_alpha: * @obj: The #AtspiComponent to be queried. * * Gets the opacity/alpha value of a component, if alpha blending is in use. * - * Returns: the opacity value of a component, as a #gdouble between 0.0 and 1.0. + * Returns: the opacity value of a component, as a #gdouble between 0.0 and 1.0. **/ -gdouble +gdouble atspi_component_get_alpha (AtspiComponent *obj, GError **error) { double retval = 1; @@ -362,9 +403,9 @@ atspi_component_set_extents (AtspiComponent *obj, * @ctype: the coordinate system in which the position is specified. * (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). * - * Returns: #TRUE if successful; #FALSE otherwise. - * * Moves the component to the specified position. + * + * Returns: #TRUE if successful; #FALSE otherwise. **/ gboolean atspi_component_set_position (AtspiComponent *obj, @@ -391,9 +432,9 @@ atspi_component_set_position (AtspiComponent *obj, * @width: the width to which the component should be resized. * @height: the height to which the component should be resized. * - * Returns: #TRUE if successful; #FALSE otherwise. - * * Resizes the specified component to the given coordinates. + * + * Returns: #TRUE if successful; #FALSE otherwise. **/ gboolean atspi_component_set_size (AtspiComponent *obj, @@ -412,6 +453,81 @@ atspi_component_set_size (AtspiComponent *obj, return ret; } +/** +<<<<<<< HEAD + * atspi_component_scroll_to: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @type: a #AtspiScrollType indicating where the object should be placed on the + * screen. + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to (AtspiComponent *obj, + AtspiScrollType type, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollTo", error, "u=>b", type, &retval); + + return retval; +} + +/** + * atspi_component_scroll_to_point: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @coords: a #AtspiCoordType indicating whether the coordinates are relative to + * the screen, to the window, or to the parent object. + * @x: the x coordinate of the point to reach + * @y: the y coordinate of the point to reach + * @error: return location for a #GError + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen at a given position. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to_point (AtspiComponent *obj, + AtspiCoordType coords, + gint x, + gint y, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollToPoint", error, "uii=>b", coords, x, y, &retval); + + return retval; +} + +/** + * atspi_component_get_highlight_index + * @obj: a pointer to the #AtspiComponent to query. + * + * Returns: highlight index of object if (>0), 0 if highlight index is not set + * or -1 if an error occured. + **/ +int +atspi_component_get_highlight_index (AtspiComponent *obj, GError **error) +{ + gint ret = -1; + g_return_val_if_fail (obj != NULL, -1); + _atspi_dbus_get_property (obj, atspi_interface_component, + "HighlightIndex", error, "i", &ret); + return ret; +} + static void atspi_component_base_init (AtspiComponent *klass) {