From 757a24c80fd3b592f56fdcd71f9823a7e64cc35a Mon Sep 17 00:00:00 2001 From: Maciej Florek Date: Wed, 27 May 2015 10:34:37 +0200 Subject: [PATCH] grab_highlight callback added to the AtkComponentInterface Change-Id: I3c66a9017f74403d38bd4d3b07949c3134f345cc Signed-off-by: Maciej Florek Conflicts: atk/atkcomponent.h --- atk/atkcomponent.c | 22 ++++++++++++++++++++++ atk/atkcomponent.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c index fc7f34c..0c4704d 100755 --- a/atk/atkcomponent.c +++ b/atk/atkcomponent.c @@ -469,6 +469,28 @@ atk_component_grab_focus (AtkComponent *component) } /** + * atk_component_grab_highlight: + * @component: an #AtkComponent + * + * Grabs highlight for this @component. + * + * Returns: %TRUE if successful, %FALSE otherwise. + **/ +gboolean +atk_component_grab_highlight (AtkComponent *component) +{ + AtkComponentIface *iface = NULL; + g_return_val_if_fail (ATK_IS_COMPONENT (component), FALSE); + + iface = ATK_COMPONENT_GET_IFACE (component); + + if (iface->grab_highlight) + return (iface->grab_highlight) (component); + else + return FALSE; +} + +/** * atk_component_set_extents: * @component: an #AtkComponent * @x: x coordinate diff --git a/atk/atkcomponent.h b/atk/atkcomponent.h index 9cc85ee..a077828 100755 --- a/atk/atkcomponent.h +++ b/atk/atkcomponent.h @@ -131,6 +131,7 @@ struct _AtkComponentIface gint *width, gint *height); gboolean (* grab_focus) (AtkComponent *component); + gboolean (* grab_highlight) (AtkComponent *component); void (* remove_focus_handler) (AtkComponent *component, guint handler_id); gboolean (* set_extents) (AtkComponent *component, @@ -197,6 +198,8 @@ ATK_AVAILABLE_IN_ALL gint atk_component_get_mdi_zorder (AtkComponent *component); ATK_AVAILABLE_IN_ALL gboolean atk_component_grab_focus (AtkComponent *component); +ATK_AVAILABLE_IN_ALL +gboolean atk_component_grab_highlight (AtkComponent *component); ATK_DEPRECATED_IN_2_10 void atk_component_remove_focus_handler (AtkComponent *component, guint handler_id); -- 2.7.4