summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2018-02-08 14:53:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-02-08 14:53:59 +0900
commit08d86d3941ee7d4f5e89520fb8d29870a903300b (patch)
tree1c7958045abf71a847ee88a866f011de873e75ef
parent48433efc43de9eeaf353e3da18c7109e434902da (diff)
efl_part: use efl_ui_widget's default_part_get
Summary: efl_part macros are using each widget's internally defined default_part_get() functions to get default part name. This might potentially cause errors when future widgets inherits the widget but not overriding Efl.Text.text and Efl.Content.content. Reviewers: jpeg, cedric, woohyun, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5797
-rw-r--r--src/lib/elementary/efl_ui_button.c4
-rw-r--r--src/lib/elementary/efl_ui_frame.c1
-rw-r--r--src/lib/elementary/efl_ui_popup.c3
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c4
-rw-r--r--src/lib/elementary/efl_ui_radio.c7
-rw-r--r--src/lib/elementary/efl_ui_radio.eo2
-rw-r--r--src/lib/elementary/efl_ui_slider.c4
-rw-r--r--src/lib/elementary/elc_popup.c4
-rw-r--r--src/lib/elementary/elm_part_helper.h38
9 files changed, 34 insertions, 33 deletions
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index 7f4f691386..b47fafd1bd 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -464,7 +464,9 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
464 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ 464 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \
465 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \ 465 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \
466 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_button), \ 466 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_button), \
467 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_button) 467 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_button), \
468 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_button), \
469 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_button)
468 470
469#include "efl_ui_button.eo.c" 471#include "efl_ui_button.eo.c"
470 472
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index d7dacda407..e4bb944733 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -217,6 +217,7 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_frame)
217#define EFL_UI_FRAME_EXTRA_OPS \ 217#define EFL_UI_FRAME_EXTRA_OPS \
218 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_frame), \ 218 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_frame), \
219 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_frame), \ 219 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_frame), \
220 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_frame), \
220 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_frame), \ 221 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_frame), \
221 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_frame) 222 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_frame)
222 223
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index ccb815ad5c..e5071daf4a 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -395,6 +395,7 @@ _efl_ui_popup_part_efl_file_file_set(Eo *obj, void *_pd EINA_UNUSED, const char
395/* Internal EO APIs and hidden overrides */ 395/* Internal EO APIs and hidden overrides */
396 396
397#define EFL_UI_POPUP_EXTRA_OPS \ 397#define EFL_UI_POPUP_EXTRA_OPS \
398 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup) 398 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup), \
399 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_popup)
399 400
400#include "efl_ui_popup.eo.c" 401#include "efl_ui_popup.eo.c"
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index b9000d6350..4506c5941d 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -737,7 +737,9 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_progressbar)
737 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_progressbar), \ 737 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_progressbar), \
738 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_progressbar), \ 738 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_progressbar), \
739 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_progressbar), \ 739 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_progressbar), \
740 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_progressbar) 740 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_progressbar), \
741 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_progressbar), \
742 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_progressbar)
741 743
742#include "efl_ui_progressbar.eo.c" 744#include "efl_ui_progressbar.eo.c"
743 745
diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c
index 8a3c537bda..0a49b3c5fc 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -357,11 +357,6 @@ _efl_ui_radio_efl_access_state_set_get(Eo *obj, Efl_Ui_Radio_Data *pd EINA_UNUSE
357 return ret; 357 return ret;
358} 358}
359 359
360/* Part APIs */
361
362ELM_PART_CONTENT_DEFAULT_GET(efl_ui_radio, "elm.swallow.content")
363ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_radio, Efl_Ui_Radio_Data)
364
365/* Internal EO APIs and hidden overrides */ 360/* Internal EO APIs and hidden overrides */
366 361
367ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_radio, Efl_Ui_Radio_Data) 362ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_radio, Efl_Ui_Radio_Data)
@@ -410,4 +405,4 @@ elm_radio_value_get(const Evas_Object *obj)
410 return efl_ui_nstate_value_get(obj); 405 return efl_ui_nstate_value_get(obj);
411} 406}
412 407
413#include "efl_ui_radio_legacy.eo.c" \ No newline at end of file 408#include "efl_ui_radio_legacy.eo.c"
diff --git a/src/lib/elementary/efl_ui_radio.eo b/src/lib/elementary/efl_ui_radio.eo
index f3ec5d60ee..c561eac409 100644
--- a/src/lib/elementary/efl_ui_radio.eo
+++ b/src/lib/elementary/efl_ui_radio.eo
@@ -66,8 +66,6 @@ class Efl.Ui.Radio (Efl.Ui.Check, Efl.Access.Widget.Action, Efl.Content)
66 Efl.Ui.Widget.widget_event; 66 Efl.Ui.Widget.widget_event;
67 Efl.Access.state_set { get; } 67 Efl.Access.state_set { get; }
68 Efl.Access.Widget.Action.elm_actions { get; } 68 Efl.Access.Widget.Action.elm_actions { get; }
69 Efl.Content.content { get; set; }
70 Efl.Content.content_unset;
71 Efl.Ui.Nstate.value { set; get; } 69 Efl.Ui.Nstate.value { set; get; }
72 } 70 }
73} 71}
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index b4a687f5b5..00e33fe42f 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1542,7 +1542,9 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_slider)
1542 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_slider), \ 1542 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_slider), \
1543 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_slider), \ 1543 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_slider), \
1544 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_slider), \ 1544 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_slider), \
1545 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider) 1545 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider), \
1546 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_slider), \
1547 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_slider)
1546 1548
1547#include "efl_ui_slider.eo.c" 1549#include "efl_ui_slider.eo.c"
1548 1550
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index b95482f0fc..2931ebbd47 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -1851,9 +1851,9 @@ ELM_PART_CONTENT_DEFAULT_GET(elm_popup, "default")
1851/* Internal EO APIs and hidden overrides */ 1851/* Internal EO APIs and hidden overrides */
1852 1852
1853#define ELM_POPUP_EXTRA_OPS \ 1853#define ELM_POPUP_EXTRA_OPS \
1854 ELM_PART_CONTENT_DEFAULT_OPS(elm_popup), \
1855 ELM_LAYOUT_SIZING_EVAL_OPS(elm_popup), \ 1854 ELM_LAYOUT_SIZING_EVAL_OPS(elm_popup), \
1856 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_popup) 1855 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_popup), \
1856 ELM_PART_CONTENT_DEFAULT_OPS(elm_popup)
1857 1857
1858#include "elm_popup.eo.c" 1858#include "elm_popup.eo.c"
1859#include "elm_popup_item.eo.c" 1859#include "elm_popup_item.eo.c"
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
index a77f3db078..9b63e94e62 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -34,21 +34,21 @@ struct _Elm_Part_Data
34 34
35#define ELM_PART_CONTENT_DEFAULT_IMPLEMENT(type, typedata) \ 35#define ELM_PART_CONTENT_DEFAULT_IMPLEMENT(type, typedata) \
36 EOLIAN static Eina_Bool \ 36 EOLIAN static Eina_Bool \
37 _ ## type ## _efl_content_content_set(Eo *obj, typedata *sd, Evas_Object *content) \ 37 _ ## type ## _efl_content_content_set(Eo *obj, typedata *sd EINA_UNUSED, Evas_Object *content) \
38 { \ 38 { \
39 return efl_content_set(efl_part(obj, _ ## type ## _default_content_part_get(obj, sd)), content); \ 39 return efl_content_set(efl_part(obj, efl_ui_widget_default_content_part_get(obj)), content); \
40 } \ 40 } \
41 \ 41 \
42 EOLIAN static Evas_Object* \ 42 EOLIAN static Evas_Object* \
43 _ ## type ## _efl_content_content_get(Eo *obj, typedata *sd) \ 43 _ ## type ## _efl_content_content_get(Eo *obj, typedata *sd EINA_UNUSED) \
44 { \ 44 { \
45 return efl_content_get(efl_part(obj, _ ## type ## _default_content_part_get(obj, sd))); \ 45 return efl_content_get(efl_part(obj, efl_ui_widget_default_content_part_get(obj))); \
46 } \ 46 } \
47 \ 47 \
48 EOLIAN static Evas_Object* \ 48 EOLIAN static Evas_Object* \
49 _ ## type ## _efl_content_content_unset(Eo *obj, typedata *sd) \ 49 _ ## type ## _efl_content_content_unset(Eo *obj, typedata *sd EINA_UNUSED) \
50 { \ 50 { \
51 return efl_content_unset(efl_part(obj, _ ## type ## _default_content_part_get(obj, sd))); \ 51 return efl_content_unset(efl_part(obj, efl_ui_widget_default_content_part_get(obj))); \
52 } 52 }
53 53
54static inline Eo * 54static inline Eo *
@@ -176,36 +176,36 @@ _ ## full ## _efl_text_markup_markup_set(Eo *obj, void *_pd EINA_UNUSED, const c
176 176
177#define ELM_PART_TEXT_DEFAULT_IMPLEMENT(type, typedata) \ 177#define ELM_PART_TEXT_DEFAULT_IMPLEMENT(type, typedata) \
178EOLIAN static void \ 178EOLIAN static void \
179_ ## type ## _efl_text_text_set(Eo *obj, typedata *sd, const char *text) \ 179_ ## type ## _efl_text_text_set(Eo *obj, typedata *sd EINA_UNUSED, const char *text) \
180{ \ 180{ \
181 efl_text_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), text); \ 181 efl_text_set(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj)), text); \
182} \ 182} \
183EOLIAN static const char * \ 183EOLIAN static const char * \
184_ ## type ## _efl_text_text_get(Eo *obj, typedata *sd) \ 184_ ## type ## _efl_text_text_get(Eo *obj, typedata *sd EINA_UNUSED) \
185{ \ 185{ \
186 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd))); \ 186 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj))); \
187} \ 187} \
188EOLIAN static void \ 188EOLIAN static void \
189_ ## type ## _efl_ui_translatable_translatable_text_set(Eo *obj, typedata *sd, const char *label, const char *domain) \ 189_ ## type ## _efl_ui_translatable_translatable_text_set(Eo *obj, typedata *sd EINA_UNUSED, const char *label, const char *domain) \
190{ \ 190{ \
191 efl_ui_translatable_text_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), label, domain); \ 191 efl_ui_translatable_text_set(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj)), label, domain); \
192} \ 192} \
193EOLIAN static const char * \ 193EOLIAN static const char * \
194_ ## type ## _efl_ui_translatable_translatable_text_get(Eo *obj, typedata *sd, const char **domain) \ 194_ ## type ## _efl_ui_translatable_translatable_text_get(Eo *obj, typedata *sd EINA_UNUSED, const char **domain) \
195{ \ 195{ \
196 return efl_ui_translatable_text_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), domain); \ 196 return efl_ui_translatable_text_get(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj)), domain); \
197} 197}
198 198
199#define ELM_PART_MARKUP_DEFAULT_IMPLEMENT(type, typedata) \ 199#define ELM_PART_MARKUP_DEFAULT_IMPLEMENT(type, typedata) \
200EOLIAN static const char * \ 200EOLIAN static const char * \
201_ ## type ## _efl_text_markup_markup_get(Eo *obj, typedata *sd) \ 201_ ## type ## _efl_text_markup_markup_get(Eo *obj, typedata *sd EINA_UNUSED) \
202{ \ 202{ \
203 return efl_text_markup_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd))); \ 203 return efl_text_markup_get(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj))); \
204} \ 204} \
205EOLIAN static void \ 205EOLIAN static void \
206_ ## type ## _efl_text_markup_markup_set(Eo *obj, typedata *sd, const char *markup) \ 206_ ## type ## _efl_text_markup_markup_set(Eo *obj, typedata *sd EINA_UNUSED, const char *markup) \
207{ \ 207{ \
208 efl_text_markup_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), markup); \ 208 efl_text_markup_set(efl_part(efl_super(obj, MY_CLASS), efl_ui_widget_default_text_part_get(obj)), markup); \
209} \ 209}
210 210
211#endif 211#endif