diff options
author | Amitesh Singh <amitesh.sh@samsung.com> | 2016-05-10 12:01:53 +0530 |
---|---|---|
committer | Amitesh Singh <amitesh.sh@samsung.com> | 2016-05-10 12:41:03 +0530 |
commit | be47c4b9c058ab4ff55060dfae082937d751fe7c (patch) | |
tree | 5091ec2d9472da9c40c1e2458e46c05aa07daabd | |
parent | 780b96442720af0e77d7e4da3209d88921e1b647 (diff) |
elm: rename Elm.Nstate to Efl.Ui.Nstate
-rw-r--r-- | config/default/base.src.in | 2 | ||||
-rw-r--r-- | config/mobile/base.src.in | 2 | ||||
-rw-r--r-- | config/standard/base.src.in | 2 | ||||
-rw-r--r-- | doc/widgets/widget_preview_nstate.c | 2 | ||||
-rw-r--r-- | src/Makefile_Elementary.am | 7 | ||||
-rw-r--r-- | src/bin/elementary/test_nstate.c | 2 | ||||
-rw-r--r-- | src/lib/elementary/Elementary.h.in | 2 | ||||
-rw-r--r-- | src/lib/elementary/Makefile.am | 7 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_nstate.c (renamed from src/lib/elementary/elm_nstate.c) | 54 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_nstate.eo (renamed from src/lib/elementary/elm_nstate.eo) | 4 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_nstate.h (renamed from src/lib/elementary/elm_nstate.h) | 2 | ||||
-rw-r--r-- | src/lib/elementary/elm_check.c | 8 | ||||
-rw-r--r-- | src/lib/elementary/elm_check.eo | 6 | ||||
-rw-r--r-- | src/lib/elementary/elm_widget_nstate.h | 38 |
14 files changed, 51 insertions, 87 deletions
diff --git a/config/default/base.src.in b/config/default/base.src.in index e5933f8706..b7270b328a 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in | |||
@@ -622,7 +622,7 @@ group "Elm_Config" struct { | |||
622 | } | 622 | } |
623 | } | 623 | } |
624 | group "Elm_Config_Bindings_Widget" struct { | 624 | group "Elm_Config_Bindings_Widget" struct { |
625 | value "name" string: "Elm_Nstate"; | 625 | value "name" string: "Efl.Ui.Nstate"; |
626 | group "key_bindings" list { | 626 | group "key_bindings" list { |
627 | group "Elm_Config_Binding_Key" struct { | 627 | group "Elm_Config_Binding_Key" struct { |
628 | value "context" int: 0; | 628 | value "context" int: 0; |
diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index 7ba03bc875..ace09b7aa3 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in | |||
@@ -626,7 +626,7 @@ group "Elm_Config" struct { | |||
626 | } | 626 | } |
627 | } | 627 | } |
628 | group "Elm_Config_Bindings_Widget" struct { | 628 | group "Elm_Config_Bindings_Widget" struct { |
629 | value "name" string: "Elm_Nstate"; | 629 | value "name" string: "Efl.Ui.Nstate"; |
630 | group "key_bindings" list { | 630 | group "key_bindings" list { |
631 | group "Elm_Config_Binding_Key" struct { | 631 | group "Elm_Config_Binding_Key" struct { |
632 | value "context" int: 0; | 632 | value "context" int: 0; |
diff --git a/config/standard/base.src.in b/config/standard/base.src.in index ba0d70067f..4b81b87670 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in | |||
@@ -623,7 +623,7 @@ group "Elm_Config" struct { | |||
623 | } | 623 | } |
624 | } | 624 | } |
625 | group "Elm_Config_Bindings_Widget" struct { | 625 | group "Elm_Config_Bindings_Widget" struct { |
626 | value "name" string: "Elm_Nstate"; | 626 | value "name" string: "Efl.Ui.Nstate"; |
627 | group "key_bindings" list { | 627 | group "key_bindings" list { |
628 | group "Elm_Config_Binding_Key" struct { | 628 | group "Elm_Config_Binding_Key" struct { |
629 | value "context" int: 0; | 629 | value "context" int: 0; |
diff --git a/doc/widgets/widget_preview_nstate.c b/doc/widgets/widget_preview_nstate.c index b53e998791..3c4b7216f8 100644 --- a/doc/widgets/widget_preview_nstate.c +++ b/doc/widgets/widget_preview_nstate.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "widget_preview_tmpl_head.c" | 1 | #include "widget_preview_tmpl_head.c" |
2 | 2 | ||
3 | Evas_Object *o = eo_add(ELM_NSTATE_CLASS, win); | 3 | Evas_Object *o = eo_add(EFL_UI_NSTATE_CLASS, win); |
4 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 4 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
5 | elm_win_resize_object_add(win, o); | 5 | elm_win_resize_object_add(win, o); |
6 | evas_object_show(o); | 6 | evas_object_show(o); |
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index b9affa28de..95b833409b 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am | |||
@@ -64,7 +64,7 @@ elm_public_eolian_files = \ | |||
64 | lib/elementary/elm_multibuttonentry.eo \ | 64 | lib/elementary/elm_multibuttonentry.eo \ |
65 | lib/elementary/elm_naviframe.eo \ | 65 | lib/elementary/elm_naviframe.eo \ |
66 | lib/elementary/elm_notify.eo \ | 66 | lib/elementary/elm_notify.eo \ |
67 | lib/elementary/elm_nstate.eo \ | 67 | lib/elementary/efl_ui_nstate.eo \ |
68 | lib/elementary/elm_pan.eo \ | 68 | lib/elementary/elm_pan.eo \ |
69 | lib/elementary/elm_panel.eo \ | 69 | lib/elementary/elm_panel.eo \ |
70 | lib/elementary/elm_panes.eo \ | 70 | lib/elementary/elm_panes.eo \ |
@@ -215,7 +215,6 @@ includesunstable_HEADERS = \ | |||
215 | lib/elementary/elm_widget_multibuttonentry.h \ | 215 | lib/elementary/elm_widget_multibuttonentry.h \ |
216 | lib/elementary/elm_widget_naviframe.h \ | 216 | lib/elementary/elm_widget_naviframe.h \ |
217 | lib/elementary/elm_widget_notify.h \ | 217 | lib/elementary/elm_widget_notify.h \ |
218 | lib/elementary/elm_widget_nstate.h \ | ||
219 | lib/elementary/elm_widget_panel.h \ | 218 | lib/elementary/elm_widget_panel.h \ |
220 | lib/elementary/elm_widget_panes.h \ | 219 | lib/elementary/elm_widget_panes.h \ |
221 | lib/elementary/elm_widget_photo.h \ | 220 | lib/elementary/elm_widget_photo.h \ |
@@ -419,7 +418,7 @@ includesub_HEADERS = \ | |||
419 | lib/elementary/elm_notify_common.h \ | 418 | lib/elementary/elm_notify_common.h \ |
420 | lib/elementary/elm_notify_eo.h \ | 419 | lib/elementary/elm_notify_eo.h \ |
421 | lib/elementary/elm_notify_legacy.h \ | 420 | lib/elementary/elm_notify_legacy.h \ |
422 | lib/elementary/elm_nstate.h \ | 421 | lib/elementary/efl_ui_nstate.h \ |
423 | lib/elementary/elm_object.h \ | 422 | lib/elementary/elm_object.h \ |
424 | lib/elementary/elm_object_item.h \ | 423 | lib/elementary/elm_object_item.h \ |
425 | lib/elementary/elm_panel.h \ | 424 | lib/elementary/elm_panel.h \ |
@@ -594,7 +593,7 @@ lib_elementary_libelementary_la_SOURCES = \ | |||
594 | lib/elementary/elm_menu.c \ | 593 | lib/elementary/elm_menu.c \ |
595 | lib/elementary/elm_module.c \ | 594 | lib/elementary/elm_module.c \ |
596 | lib/elementary/elm_notify.c \ | 595 | lib/elementary/elm_notify.c \ |
597 | lib/elementary/elm_nstate.c \ | 596 | lib/elementary/efl_ui_nstate.c \ |
598 | lib/elementary/elm_panel.c \ | 597 | lib/elementary/elm_panel.c \ |
599 | lib/elementary/elm_panes.c \ | 598 | lib/elementary/elm_panes.c \ |
600 | lib/elementary/elm_photo.c \ | 599 | lib/elementary/elm_photo.c \ |
diff --git a/src/bin/elementary/test_nstate.c b/src/bin/elementary/test_nstate.c index 8c66ae5c22..9444fb11d2 100644 --- a/src/bin/elementary/test_nstate.c +++ b/src/bin/elementary/test_nstate.c | |||
@@ -29,7 +29,7 @@ test_nstate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in | |||
29 | elm_win_resize_object_add(win, bx); | 29 | elm_win_resize_object_add(win, bx); |
30 | evas_object_show(bx); | 30 | evas_object_show(bx); |
31 | 31 | ||
32 | nstate = eo_add(ELM_NSTATE_CLASS, win); | 32 | nstate = eo_add(EFL_UI_NSTATE_CLASS, win); |
33 | efl_ui_nstate_count_set(nstate, 5); | 33 | efl_ui_nstate_count_set(nstate, 5); |
34 | elm_object_text_set(nstate, "nstate = 0"); | 34 | elm_object_text_set(nstate, "nstate = 0"); |
35 | elm_box_pack_end(bx, nstate); | 35 | elm_box_pack_end(bx, nstate); |
diff --git a/src/lib/elementary/Elementary.h.in b/src/lib/elementary/Elementary.h.in index 6439a82ee2..b85eaffaec 100644 --- a/src/lib/elementary/Elementary.h.in +++ b/src/lib/elementary/Elementary.h.in | |||
@@ -235,7 +235,7 @@ EAPI extern Elm_Version *elm_version; | |||
235 | #include <elm_mirroring.h> | 235 | #include <elm_mirroring.h> |
236 | #include <elm_need.h> | 236 | #include <elm_need.h> |
237 | #include <elm_notify.h> | 237 | #include <elm_notify.h> |
238 | #include <elm_nstate.h> | 238 | #include <efl_ui_nstate.h> |
239 | #include <elm_object.h> | 239 | #include <elm_object.h> |
240 | 240 | ||
241 | #include <elm_panel.h> | 241 | #include <elm_panel.h> |
diff --git a/src/lib/elementary/Makefile.am b/src/lib/elementary/Makefile.am index e84ac654c9..9138607f80 100644 --- a/src/lib/elementary/Makefile.am +++ b/src/lib/elementary/Makefile.am | |||
@@ -69,7 +69,7 @@ elm_eolian_files = \ | |||
69 | elm_multibuttonentry.eo \ | 69 | elm_multibuttonentry.eo \ |
70 | elm_naviframe.eo \ | 70 | elm_naviframe.eo \ |
71 | elm_notify.eo \ | 71 | elm_notify.eo \ |
72 | elm_nstate.eo \ | 72 | efl_ui_nstate.eo \ |
73 | elm_pan.eo \ | 73 | elm_pan.eo \ |
74 | elm_panel.eo \ | 74 | elm_panel.eo \ |
75 | elm_panes.eo \ | 75 | elm_panes.eo \ |
@@ -203,7 +203,6 @@ includesunstable_HEADERS = \ | |||
203 | elm_widget_multibuttonentry.h \ | 203 | elm_widget_multibuttonentry.h \ |
204 | elm_widget_naviframe.h \ | 204 | elm_widget_naviframe.h \ |
205 | elm_widget_notify.h \ | 205 | elm_widget_notify.h \ |
206 | elm_widget_nstate.h \ | ||
207 | elm_widget_panel.h \ | 206 | elm_widget_panel.h \ |
208 | elm_widget_panes.h \ | 207 | elm_widget_panes.h \ |
209 | elm_widget_photo.h \ | 208 | elm_widget_photo.h \ |
@@ -405,7 +404,7 @@ includesub_HEADERS = \ | |||
405 | elm_notify_common.h \ | 404 | elm_notify_common.h \ |
406 | elm_notify_eo.h \ | 405 | elm_notify_eo.h \ |
407 | elm_notify_legacy.h \ | 406 | elm_notify_legacy.h \ |
408 | elm_nstate.h \ | 407 | efl_ui_nstate.h \ |
409 | elm_object.h \ | 408 | elm_object.h \ |
410 | elm_object_item.h \ | 409 | elm_object_item.h \ |
411 | elm_panel.h \ | 410 | elm_panel.h \ |
@@ -580,7 +579,7 @@ libelementary_la_SOURCES = \ | |||
580 | elm_menu.c \ | 579 | elm_menu.c \ |
581 | elm_module.c \ | 580 | elm_module.c \ |
582 | elm_notify.c \ | 581 | elm_notify.c \ |
583 | elm_nstate.c \ | 582 | efl_ui_nstate.c \ |
584 | elm_panel.c \ | 583 | elm_panel.c \ |
585 | elm_panes.c \ | 584 | elm_panes.c \ |
586 | elm_photo.c \ | 585 | elm_photo.c \ |
diff --git a/src/lib/elementary/elm_nstate.c b/src/lib/elementary/efl_ui_nstate.c index dac44d328e..530def366b 100644 --- a/src/lib/elementary/elm_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c | |||
@@ -2,23 +2,29 @@ | |||
2 | # include "elementary_config.h" | 2 | # include "elementary_config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #define ELM_NSTATE_PROTECTED | 5 | #define EFL_UI_NSTATE_PROTECTED |
6 | #include "Elementary.h" | 6 | #include "Elementary.h" |
7 | #include "elm_priv.h" | 7 | #include "elm_priv.h" |
8 | #include "elm_widget_nstate.h" | 8 | #include "efl_ui_nstate.eo.h" |
9 | #include "elm_widget_button.h" | 9 | #include "elm_widget_button.h" |
10 | 10 | ||
11 | #define MY_CLASS ELM_NSTATE_CLASS | 11 | #define MY_CLASS EFL_UI_NSTATE_CLASS |
12 | 12 | ||
13 | #define MY_CLASS_NAME "Elm_Nstate" | 13 | #define MY_CLASS_NAME "Efl.Ui.Nstate" |
14 | #define MY_CLASS_NAME_LEGACY "elm_nstate" | 14 | |
15 | |||
16 | typedef struct | ||
17 | { | ||
18 | int nstate; | ||
19 | int state; | ||
20 | } Efl_Ui_Nstate_Data; | ||
15 | 21 | ||
16 | static const Evas_Smart_Cb_Description _smart_callbacks[] = { | 22 | static const Evas_Smart_Cb_Description _smart_callbacks[] = { |
17 | {NULL, NULL} | 23 | {NULL, NULL} |
18 | }; | 24 | }; |
19 | 25 | ||
20 | static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); | 26 | static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); |
21 | static void _state_active(Evas_Object *obj, Elm_Nstate_Data *sd); | 27 | static void _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd); |
22 | 28 | ||
23 | static const Elm_Action key_actions[] = { | 29 | static const Elm_Action key_actions[] = { |
24 | {"activate", _key_action_activate}, | 30 | {"activate", _key_action_activate}, |
@@ -26,10 +32,10 @@ static const Elm_Action key_actions[] = { | |||
26 | }; | 32 | }; |
27 | 33 | ||
28 | EOLIAN static Eo_Base * | 34 | EOLIAN static Eo_Base * |
29 | _elm_nstate_eo_base_constructor(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED) | 35 | _efl_ui_nstate_eo_base_constructor(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED) |
30 | { | 36 | { |
31 | obj = eo_constructor(eo_super(obj, MY_CLASS)); | 37 | obj = eo_constructor(eo_super(obj, MY_CLASS)); |
32 | evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY); | 38 | evas_obj_type_set(obj, MY_CLASS_NAME); |
33 | evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks); | 39 | evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks); |
34 | //TODO: Add ATSPI call here | 40 | //TODO: Add ATSPI call here |
35 | 41 | ||
@@ -37,14 +43,14 @@ _elm_nstate_eo_base_constructor(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED) | |||
37 | } | 43 | } |
38 | 44 | ||
39 | static void | 45 | static void |
40 | _next_state_set(Elm_Nstate_Data *sd) | 46 | _next_state_set(Efl_Ui_Nstate_Data *sd) |
41 | { | 47 | { |
42 | ++sd->state; | 48 | ++sd->state; |
43 | if (sd->state == sd->nstate) sd->state = 0; | 49 | if (sd->state == sd->nstate) sd->state = 0; |
44 | } | 50 | } |
45 | 51 | ||
46 | static void | 52 | static void |
47 | _state_active(Evas_Object *obj, Elm_Nstate_Data *sd) | 53 | _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd) |
48 | { | 54 | { |
49 | char buf[64]; | 55 | char buf[64]; |
50 | 56 | ||
@@ -52,7 +58,7 @@ _state_active(Evas_Object *obj, Elm_Nstate_Data *sd) | |||
52 | elm_layout_signal_emit(obj, buf, "elm"); | 58 | elm_layout_signal_emit(obj, buf, "elm"); |
53 | edje_object_message_signal_process(elm_layout_edje_get(obj)); | 59 | edje_object_message_signal_process(elm_layout_edje_get(obj)); |
54 | elm_obj_layout_sizing_eval(obj); | 60 | elm_obj_layout_sizing_eval(obj); |
55 | eo_event_callback_call(obj, ELM_NSTATE_EVENT_STATE_CHANGED, NULL); | 61 | eo_event_callback_call(obj, EFL_UI_NSTATE_EVENT_STATE_CHANGED, NULL); |
56 | } | 62 | } |
57 | 63 | ||
58 | static void | 64 | static void |
@@ -65,7 +71,7 @@ _on_state_changed(void *data, | |||
65 | } | 71 | } |
66 | 72 | ||
67 | EOLIAN static void | 73 | EOLIAN static void |
68 | _elm_nstate_evas_object_smart_add(Eo *obj, Elm_Nstate_Data *pd) | 74 | _efl_ui_nstate_evas_object_smart_add(Eo *obj, Efl_Ui_Nstate_Data *pd) |
69 | { | 75 | { |
70 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 76 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); |
71 | 77 | ||
@@ -84,19 +90,19 @@ _elm_nstate_evas_object_smart_add(Eo *obj, Elm_Nstate_Data *pd) | |||
84 | } | 90 | } |
85 | 91 | ||
86 | EOLIAN static void | 92 | EOLIAN static void |
87 | _elm_nstate_evas_object_smart_del(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED) | 93 | _efl_ui_nstate_evas_object_smart_del(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED) |
88 | { | 94 | { |
89 | evas_obj_smart_del(eo_super(obj, MY_CLASS)); | 95 | evas_obj_smart_del(eo_super(obj, MY_CLASS)); |
90 | } | 96 | } |
91 | 97 | ||
92 | EOLIAN static int | 98 | EOLIAN static int |
93 | _elm_nstate_count_get(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd) | 99 | _efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd) |
94 | { | 100 | { |
95 | return pd->nstate; | 101 | return pd->nstate; |
96 | } | 102 | } |
97 | 103 | ||
98 | EOLIAN static void | 104 | EOLIAN static void |
99 | _elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd, int nstate) | 105 | _efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd, int nstate) |
100 | { | 106 | { |
101 | if (pd->nstate == nstate) return; | 107 | if (pd->nstate == nstate) return; |
102 | 108 | ||
@@ -105,13 +111,13 @@ _elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd, int nstate) | |||
105 | } | 111 | } |
106 | 112 | ||
107 | EOLIAN static int | 113 | EOLIAN static int |
108 | _elm_nstate_value_get(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd) | 114 | _efl_ui_nstate_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd) |
109 | { | 115 | { |
110 | return pd->state; | 116 | return pd->state; |
111 | } | 117 | } |
112 | 118 | ||
113 | static Eina_Bool | 119 | static Eina_Bool |
114 | _is_valid_state(Elm_Nstate_Data *sd, int state) | 120 | _is_valid_state(Efl_Ui_Nstate_Data *sd, int state) |
115 | { | 121 | { |
116 | if (sd->state == state || (state < 0 || state >= sd->nstate)) | 122 | if (sd->state == state || (state < 0 || state >= sd->nstate)) |
117 | return EINA_FALSE; | 123 | return EINA_FALSE; |
@@ -120,7 +126,7 @@ _is_valid_state(Elm_Nstate_Data *sd, int state) | |||
120 | } | 126 | } |
121 | 127 | ||
122 | EOLIAN static void | 128 | EOLIAN static void |
123 | _elm_nstate_value_set(Eo *obj, Elm_Nstate_Data *pd, int state) | 129 | _efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state) |
124 | { | 130 | { |
125 | if (!_is_valid_state(pd, state)) return; | 131 | if (!_is_valid_state(pd, state)) return; |
126 | 132 | ||
@@ -129,7 +135,7 @@ _elm_nstate_value_set(Eo *obj, Elm_Nstate_Data *pd, int state) | |||
129 | } | 135 | } |
130 | 136 | ||
131 | EOLIAN static Eina_Bool | 137 | EOLIAN static Eina_Bool |
132 | _elm_nstate_elm_widget_theme_apply(Eo *obj, Elm_Nstate_Data *pd) | 138 | _efl_ui_nstate_elm_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd) |
133 | { | 139 | { |
134 | Eina_Bool int_ret; | 140 | Eina_Bool int_ret; |
135 | 141 | ||
@@ -149,7 +155,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) | |||
149 | } | 155 | } |
150 | 156 | ||
151 | EOLIAN static Eina_Bool | 157 | EOLIAN static Eina_Bool |
152 | _elm_nstate_elm_widget_event(Eo *obj, Elm_Nstate_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) | 158 | _efl_ui_nstate_elm_widget_event(Eo *obj, Efl_Ui_Nstate_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) |
153 | { | 159 | { |
154 | Evas_Event_Key_Down *ev = event_info; | 160 | Evas_Event_Key_Down *ev = event_info; |
155 | 161 | ||
@@ -164,16 +170,16 @@ _elm_nstate_elm_widget_event(Eo *obj, Elm_Nstate_Data *_pd EINA_UNUSED, Evas_Obj | |||
164 | } | 170 | } |
165 | 171 | ||
166 | EOLIAN static void | 172 | EOLIAN static void |
167 | _elm_nstate_activate(Eo *obj, Elm_Nstate_Data *_pd) | 173 | _efl_ui_nstate_activate(Eo *obj, Efl_Ui_Nstate_Data *_pd) |
168 | { | 174 | { |
169 | _next_state_set(_pd); | 175 | _next_state_set(_pd); |
170 | _state_active(obj, _pd); | 176 | _state_active(obj, _pd); |
171 | } | 177 | } |
172 | 178 | ||
173 | EOLIAN static void | 179 | EOLIAN static void |
174 | _elm_nstate_class_constructor(Eo_Class *klass) | 180 | _efl_ui_nstate_class_constructor(Eo_Class *klass) |
175 | { | 181 | { |
176 | evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); | 182 | evas_smart_legacy_type_register(MY_CLASS_NAME, klass); |
177 | } | 183 | } |
178 | 184 | ||
179 | #include "elm_nstate.eo.c" | 185 | #include "efl_ui_nstate.eo.c" |
diff --git a/src/lib/elementary/elm_nstate.eo b/src/lib/elementary/efl_ui_nstate.eo index 6ff0f89a1f..e21f83facc 100644 --- a/src/lib/elementary/elm_nstate.eo +++ b/src/lib/elementary/efl_ui_nstate.eo | |||
@@ -1,8 +1,6 @@ | |||
1 | class Elm.Nstate(Elm.Button) | 1 | class Efl.Ui.Nstate(Elm.Button) |
2 | { | 2 | { |
3 | eo_prefix: efl_ui_nstate; | ||
4 | legacy_prefix: null; | 3 | legacy_prefix: null; |
5 | data: Elm_Nstate_Data; | ||
6 | methods { | 4 | methods { |
7 | activate @protected { | 5 | activate @protected { |
8 | } | 6 | } |
diff --git a/src/lib/elementary/elm_nstate.h b/src/lib/elementary/efl_ui_nstate.h index 66d7aed1dc..5e69c19dce 100644 --- a/src/lib/elementary/elm_nstate.h +++ b/src/lib/elementary/efl_ui_nstate.h | |||
@@ -22,5 +22,5 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifdef EFL_EO_API_SUPPORT | 24 | #ifdef EFL_EO_API_SUPPORT |
25 | #include "elm_nstate.eo.h" | 25 | #include "efl_ui_nstate.eo.h" |
26 | #endif | 26 | #endif |
diff --git a/src/lib/elementary/elm_check.c b/src/lib/elementary/elm_check.c index 80d81ada57..a113bc523b 100644 --- a/src/lib/elementary/elm_check.c +++ b/src/lib/elementary/elm_check.c | |||
@@ -5,12 +5,12 @@ | |||
5 | #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED | 5 | #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED |
6 | #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED | 6 | #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED |
7 | #define ELM_LAYOUT_PROTECTED | 7 | #define ELM_LAYOUT_PROTECTED |
8 | #define ELM_NSTATE_PROTECTED | 8 | #define EFL_UI_NSTATE_PROTECTED |
9 | 9 | ||
10 | #include <Elementary.h> | 10 | #include <Elementary.h> |
11 | #include "elm_priv.h" | 11 | #include "elm_priv.h" |
12 | #include "efl_ui_nstate.eo.h" | ||
12 | #include "elm_widget_check.h" | 13 | #include "elm_widget_check.h" |
13 | #include "elm_widget_nstate.h" | ||
14 | 14 | ||
15 | #define MY_CLASS ELM_CHECK_CLASS | 15 | #define MY_CLASS ELM_CHECK_CLASS |
16 | 16 | ||
@@ -341,13 +341,13 @@ _elm_check_selected_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, Eina_Bool value | |||
341 | } | 341 | } |
342 | 342 | ||
343 | EOLIAN static void | 343 | EOLIAN static void |
344 | _elm_check_elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED) | 344 | _elm_check_efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED) |
345 | { | 345 | { |
346 | //NOP; | 346 | //NOP; |
347 | } | 347 | } |
348 | 348 | ||
349 | EOLIAN static void | 349 | EOLIAN static void |
350 | _elm_check_elm_nstate_value_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, int state) | 350 | _elm_check_efl_ui_nstate_value_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, int state) |
351 | { | 351 | { |
352 | Eina_Bool _state = !!state; | 352 | Eina_Bool _state = !!state; |
353 | if (_state == efl_ui_nstate_value_get(obj)) return; | 353 | if (_state == efl_ui_nstate_value_get(obj)) return; |
diff --git a/src/lib/elementary/elm_check.eo b/src/lib/elementary/elm_check.eo index 40c6fdc28b..31b67a84af 100644 --- a/src/lib/elementary/elm_check.eo +++ b/src/lib/elementary/elm_check.eo | |||
@@ -1,4 +1,4 @@ | |||
1 | class Elm.Check (Elm.Nstate, Elm.Interface_Atspi_Widget_Action) | 1 | class Elm.Check (Efl.Ui.Nstate, Elm.Interface_Atspi_Widget_Action) |
2 | { | 2 | { |
3 | [[Check widget | 3 | [[Check widget |
4 | 4 | ||
@@ -29,8 +29,8 @@ class Elm.Check (Elm.Nstate, Elm.Interface_Atspi_Widget_Action) | |||
29 | Elm.Widget.sub_object_del; | 29 | Elm.Widget.sub_object_del; |
30 | Elm.Widget.event; | 30 | Elm.Widget.event; |
31 | Elm.Layout.text_aliases.get; | 31 | Elm.Layout.text_aliases.get; |
32 | Elm.Nstate.count.set; | 32 | Efl.Ui.Nstate.count.set; |
33 | Elm.Nstate.value.set; | 33 | Efl.Ui.Nstate.value.set; |
34 | Elm.Interface_Atspi_Accessible.state_set.get; | 34 | Elm.Interface_Atspi_Accessible.state_set.get; |
35 | Elm.Interface_Atspi_Widget_Action.elm_actions.get; | 35 | Elm.Interface_Atspi_Widget_Action.elm_actions.get; |
36 | } | 36 | } |
diff --git a/src/lib/elementary/elm_widget_nstate.h b/src/lib/elementary/elm_widget_nstate.h deleted file mode 100644 index 6733d97f4c..0000000000 --- a/src/lib/elementary/elm_widget_nstate.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #ifndef ELM_WIDGET_NSTATE_H | ||
2 | #define ELM_WIDGET_NSTATE_H | ||
3 | |||
4 | #include "elm_nstate.eo.h" | ||
5 | |||
6 | typedef struct | ||
7 | { | ||
8 | int nstate; | ||
9 | int state; | ||
10 | } Elm_Nstate_Data; | ||
11 | |||
12 | |||
13 | #define ELM_NSTATE_DATA_GET(o, sd) \ | ||
14 | Elm_Nstate_Data * sd = eo_data_scope_get(o, ELM_NSTATE_CLASS) | ||
15 | |||
16 | #define ELM_NSTATE_DATA_GET_OR_RETURN(o, ptr) \ | ||
17 | ELM_NSTATE_DATA_GET(o, ptr); \ | ||
18 | if (EINA_UNLIKELY(!ptr)) \ | ||
19 | { \ | ||
20 | CRI("No widget data for object %p (%s)", \ | ||
21 | o, evas_object_type_get(o)); \ | ||
22 | return; \ | ||
23 | } | ||
24 | |||
25 | #define ELM_NSTATE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ | ||
26 | ELM_NSTATE_DATA_GET(o, ptr); \ | ||
27 | if (EINA_UNLIKELY(!ptr)) \ | ||
28 | { \ | ||
29 | CRI("No widget data for object %p (%s)", \ | ||
30 | o, evas_object_type_get(o)); \ | ||
31 | return val; \ | ||
32 | } | ||
33 | |||
34 | #define ELM_NSTATE_CHECK(obj) \ | ||
35 | if (EINA_UNLIKELY(!eo_isa((obj), ELM_NSTATE_CLASS))) \ | ||
36 | return | ||
37 | |||
38 | #endif | ||