grab_highlight callback added to the AtkComponentInterface
authorMaciej Florek <m.florek@samsung.com>
Wed, 27 May 2015 08:34:37 +0000 (10:34 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Wed, 21 Sep 2016 14:20:30 +0000 (16:20 +0200)
Change-Id: I3c66a9017f74403d38bd4d3b07949c3134f345cc
Signed-off-by: Maciej Florek <m.florek@samsung.com>
Conflicts:
atk/atkcomponent.h

atk/atkcomponent.c
atk/atkcomponent.h

index fc7f34c..0c4704d 100755 (executable)
@@ -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
index 9cc85ee..a077828 100755 (executable)
@@ -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);