Following 'Maintenance Models Supported by GBS'
[platform/upstream/atk.git] / packaging / 0004-get_highlight_index-callback-added-to-the-AtkCompone.patch
1 From: Maciej Florek <m.florek@samsung.com>
2 Date: Wed, 17 Jun 2015 16:29:59 +0200
3 Subject: get_highlight_index callback added to the AtkComponentInterface
4
5 Change-Id: Ia428b9f52d9fe684660b2f817ab48317299ec007
6 Signed-off-by: Maciej Florek <m.florek@samsung.com>
7 ---
8  atk/atk.symbols    |  1 +
9  atk/atkcomponent.c | 22 ++++++++++++++++++++++
10  atk/atkcomponent.h |  3 +++
11  3 files changed, 26 insertions(+)
12
13 diff --git a/atk/atk.symbols b/atk/atk.symbols
14 index 09e9f40..2410d54 100644
15 --- a/atk/atk.symbols
16 +++ b/atk/atk.symbols
17 @@ -25,6 +25,7 @@
18         atk_component_grab_focus
19         atk_component_grab_highlight
20         atk_component_clear_highlight
21 +       atk_component_get_highlight_index
22         atk_component_ref_accessible_at_point
23         atk_component_remove_focus_handler
24         atk_component_set_extents
25 diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c
26 index 822bd62..6955fc9 100755
27 --- a/atk/atkcomponent.c
28 +++ b/atk/atkcomponent.c
29 @@ -513,6 +513,28 @@ atk_component_clear_highlight (AtkComponent    *component)
30  }
31  
32  /**
33 + * atk_component_get_highlight_index:
34 + * @component: an #AtkComponent
35 + *
36 + * Returns: highlight index of the @component (if >0),
37 + * 0 if highlight index is not set or -1 if an error occured.
38 + *
39 + **/
40 +gint
41 +atk_component_get_highlight_index (AtkComponent    *component)
42 +{
43 +  AtkComponentIface *iface = NULL;
44 +  g_return_val_if_fail (ATK_IS_COMPONENT (component), -1);
45 +
46 +  iface = ATK_COMPONENT_GET_IFACE (component);
47 +
48 +  if (iface->get_highlight_index)
49 +    return (iface->get_highlight_index) (component);
50 +  else
51 +    return -1;
52 +}
53 +
54 +/**
55   * atk_component_set_extents:
56   * @component: an #AtkComponent
57   * @x: x coordinate
58 diff --git a/atk/atkcomponent.h b/atk/atkcomponent.h
59 index 33096c6..a19a23e 100755
60 --- a/atk/atkcomponent.h
61 +++ b/atk/atkcomponent.h
62 @@ -133,6 +133,8 @@ struct _AtkComponentIface
63    gboolean                 (* grab_focus)               (AtkComponent   *component);
64    gboolean                 (* grab_highlight)           (AtkComponent   *component);
65    gboolean                 (* clear_highlight)          (AtkComponent   *component);
66 +  gint                     (* get_highlight_index)      (AtkComponent   *component);
67 +
68    void                     (* remove_focus_handler)      (AtkComponent  *component,
69                                                            guint         handler_id);
70    gboolean                 (* set_extents)      (AtkComponent   *component,
71 @@ -194,6 +196,7 @@ gint                  atk_component_get_mdi_zorder         (AtkComponent    *com
72  gboolean              atk_component_grab_focus             (AtkComponent    *component);
73  gboolean              atk_component_grab_highlight         (AtkComponent    *component);
74  gboolean              atk_component_clear_highlight        (AtkComponent    *component);
75 +gint                  atk_component_get_highlight_index    (AtkComponent    *component);
76  G_DEPRECATED
77  void                  atk_component_remove_focus_handler   (AtkComponent    *component,
78                                                              guint           handler_id);