summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2016-01-13 11:56:25 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2016-01-13 12:09:21 +0100
commit3c7ef7e2145d1b29fffa9ddea390a1d830711f32 (patch)
tree21bfdeb411cad3492b7d0465cff248c16d362738
parent17553e2a3572d943ebe1a0aa72eba8ec29add857 (diff)
atspi: remove description set operation
description set and get functions are already implemented in base class.
-rw-r--r--src/lib/elm_atspi_app_object.c49
-rw-r--r--src/lib/elm_atspi_app_object.eo4
2 files changed, 20 insertions, 33 deletions
diff --git a/src/lib/elm_atspi_app_object.c b/src/lib/elm_atspi_app_object.c
index 11d5bb2f5..f1af9081f 100644
--- a/src/lib/elm_atspi_app_object.c
+++ b/src/lib/elm_atspi_app_object.c
@@ -10,23 +10,8 @@
10 10
11extern Eina_List *_elm_win_list; 11extern Eina_List *_elm_win_list;
12 12
13typedef struct _Elm_Atspi_App_Object_Data Elm_Atspi_App_Object_Data;
14
15struct _Elm_Atspi_App_Object_Data
16{
17 const char *descr;
18};
19
20EOLIAN static void
21_elm_atspi_app_object_eo_base_destructor(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd)
22{
23 if (_pd->descr) eina_stringshare_del(_pd->descr);
24
25 eo_do_super(obj, ELM_ATSPI_APP_OBJECT_CLASS, eo_destructor());
26}
27
28EOLIAN static Eina_List* 13EOLIAN static Eina_List*
29_elm_atspi_app_object_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED) 14_elm_atspi_app_object_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
30{ 15{
31 Eina_List *l, *accs = NULL; 16 Eina_List *l, *accs = NULL;
32 Evas_Object *win; 17 Evas_Object *win;
@@ -45,29 +30,33 @@ _elm_atspi_app_object_elm_interface_atspi_accessible_children_get(Eo *obj EINA_U
45} 30}
46 31
47EOLIAN static char* 32EOLIAN static char*
48_elm_atspi_app_object_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED) 33_elm_atspi_app_object_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
49{ 34{
50 const char *ret; 35 char *name;
51 ret = elm_app_name_get(); 36
52 return ret ? strdup(ret) : NULL; 37 eo_do_super(obj, ELM_ATSPI_APP_OBJECT_CLASS, name = elm_interface_atspi_accessible_name_get());
38 if (name) return name;
39
40 return strdup(elm_app_name_get());
53} 41}
54 42
55EOLIAN static const char* 43EOLIAN static Elm_Atspi_Role
56_elm_atspi_app_object_elm_interface_atspi_accessible_description_get(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd) 44_elm_atspi_app_object_elm_interface_atspi_accessible_role_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
57{ 45{
58 return _pd->descr; 46 return ELM_ATSPI_ROLE_APPLICATION;
59} 47}
60 48
61EOLIAN static void 49EOLIAN static void
62_elm_atspi_app_object_elm_interface_atspi_accessible_description_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED, const char *descr) 50_elm_atspi_app_object_eo_base_destructor(Eo *obj, void *pd EINA_UNUSED)
63{ 51{
64 eina_stringshare_replace(&_pd->descr, descr); 52 eo_do(obj,
65} 53 elm_interface_atspi_accessible_description_set(NULL),
54 elm_interface_atspi_accessible_name_set(NULL),
55 elm_interface_atspi_accessible_translation_domain_set(NULL),
56 elm_interface_atspi_accessible_relationships_clear()
57 );
66 58
67EOLIAN static Elm_Atspi_Role 59 eo_do_super(obj, ELM_ATSPI_APP_OBJECT_CLASS, eo_destructor());
68_elm_atspi_app_object_elm_interface_atspi_accessible_role_get(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED)
69{
70 return ELM_ATSPI_ROLE_APPLICATION;
71} 60}
72 61
73#include "elm_atspi_app_object.eo.c" 62#include "elm_atspi_app_object.eo.c"
diff --git a/src/lib/elm_atspi_app_object.eo b/src/lib/elm_atspi_app_object.eo
index 5371535db..ff19696ab 100644
--- a/src/lib/elm_atspi_app_object.eo
+++ b/src/lib/elm_atspi_app_object.eo
@@ -1,11 +1,9 @@
1class Elm_Atspi_App_Object (Eo.Base, Elm_Interface_Atspi_Accessible) 1class Elm_Atspi_App_Object (Eo.Base, Elm_Interface_Atspi_Accessible)
2{ 2{
3 data: Elm_Atspi_App_Object_Data; 3 data: null;
4 implements { 4 implements {
5 Eo.Base.destructor; 5 Eo.Base.destructor;
6 Elm_Interface_Atspi_Accessible.name.get; 6 Elm_Interface_Atspi_Accessible.name.get;
7 Elm_Interface_Atspi_Accessible.description.get;
8 Elm_Interface_Atspi_Accessible.description.set;
9 Elm_Interface_Atspi_Accessible.role.get; 7 Elm_Interface_Atspi_Accessible.role.get;
10 Elm_Interface_Atspi_Accessible.children.get; 8 Elm_Interface_Atspi_Accessible.children.get;
11 } 9 }