summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-19 21:46:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-21 12:27:34 +0900
commit28b387821df6f017352b5062cd78f490c0963b9b (patch)
treea94512dab87a32f365539a865b07b1cbbc34b5c3 /src/lib/elementary
parent0339ad7740b169683990aa8ce0dbf7c9489ab505 (diff)
elm: Split off text and content for efl_part
This is VERY tricky. For legacy, just create an internal class that has both. It's easier this way. For parts that are handled by Layout directly, we know from Edje which type to return. For EO objects we should know from the part name which kind of part we are dealing with: - text (overridden by the widget) - content (overridden by the widget) - special (new efl_part based functions) - generic (handled by Layout) Note: Efl.Ui.Slider was handling "span size" on ALL parts. That's bad... This is now limited to "span" only.
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/Elementary.h5
-rw-r--r--src/lib/elementary/efl_ui_button.c4
-rw-r--r--src/lib/elementary/efl_ui_button_part.eo2
-rw-r--r--src/lib/elementary/efl_ui_frame.c15
-rw-r--r--src/lib/elementary/efl_ui_layout.c40
-rw-r--r--src/lib/elementary/efl_ui_layout_pack.c2
-rw-r--r--src/lib/elementary/efl_ui_layout_part.eo5
-rw-r--r--src/lib/elementary/efl_ui_layout_part_box.eo3
-rw-r--r--src/lib/elementary/efl_ui_layout_part_content.eo9
-rw-r--r--src/lib/elementary/efl_ui_layout_part_legacy.eo10
-rw-r--r--src/lib/elementary/efl_ui_layout_part_table.eo1
-rw-r--r--src/lib/elementary/efl_ui_layout_part_text.eo8
-rw-r--r--src/lib/elementary/efl_ui_panes.c6
-rw-r--r--src/lib/elementary/efl_ui_panes_part.eo2
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c18
-rw-r--r--src/lib/elementary/efl_ui_progressbar_part.eo2
-rw-r--r--src/lib/elementary/efl_ui_slider.c45
-rw-r--r--src/lib/elementary/efl_ui_slider_part.eo3
-rw-r--r--src/lib/elementary/efl_ui_textpath_part.eo2
-rw-r--r--src/lib/elementary/elm_actionslider_part.eo2
-rw-r--r--src/lib/elementary/elm_bubble_part.eo2
-rw-r--r--src/lib/elementary/elm_ctxpopup_part.eo2
-rw-r--r--src/lib/elementary/elm_dayselector_part.eo2
-rw-r--r--src/lib/elementary/elm_entry_part.eo2
-rw-r--r--src/lib/elementary/elm_fileselector_entry_part.eo2
-rw-r--r--src/lib/elementary/elm_fileselector_part.eo2
-rw-r--r--src/lib/elementary/elm_hover_part.eo2
-rw-r--r--src/lib/elementary/elm_label_part.eo2
-rw-r--r--src/lib/elementary/elm_multibuttonentry_part.eo2
-rw-r--r--src/lib/elementary/elm_naviframe_part.eo2
-rw-r--r--src/lib/elementary/elm_part_helper.h80
-rw-r--r--src/lib/elementary/elm_player_part.eo2
-rw-r--r--src/lib/elementary/elm_popup_part.eo2
-rw-r--r--src/lib/elementary/elm_scroller_part.eo2
-rw-r--r--src/lib/elementary/elm_widget.c4
35 files changed, 180 insertions, 114 deletions
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 6a7e3c83e4..a40e36501d 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -265,6 +265,11 @@ EAPI extern Elm_Version *elm_version;
265#ifdef EFL_EO_API_SUPPORT 265#ifdef EFL_EO_API_SUPPORT
266# include <efl_config_global.eo.h> 266# include <efl_config_global.eo.h>
267# include <efl_ui_widget_part.eo.h> 267# include <efl_ui_widget_part.eo.h>
268# include <efl_ui_layout_part.eo.h>
269# include <efl_ui_layout_part_box.eo.h>
270# include <efl_ui_layout_part_content.eo.h>
271# include <efl_ui_layout_part_text.eo.h>
272# include <efl_ui_layout_part_table.eo.h>
268# include <efl_ui_box.eo.h> 273# include <efl_ui_box.eo.h>
269# include <efl_ui_box_flow.eo.h> 274# include <efl_ui_box_flow.eo.h>
270# include <efl_ui_box_stack.eo.h> 275# include <efl_ui_box_stack.eo.h>
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index d7322be42a..85367a7c29 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -420,11 +420,11 @@ _efl_ui_button_class_constructor(Efl_Class *klass)
420/* Standard widget overrides */ 420/* Standard widget overrides */
421 421
422ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data) 422ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data)
423EFL_TEXT_PART_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data) 423ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data)
424 424
425/* Efl.Part begin */ 425/* Efl.Part begin */
426 426
427ELM_PART_OVERRIDE(efl_ui_button, EFL_UI_BUTTON, Efl_Ui_Button_Data) 427ELM_PART_OVERRIDE_ONLY_ALIASES(efl_ui_button, EFL_UI_BUTTON, Efl_Ui_Button_Data, _content_aliases)
428ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_button, EFL_UI_BUTTON, Efl_Ui_Button_Data) 428ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_button, EFL_UI_BUTTON, Efl_Ui_Button_Data)
429#include "efl_ui_button_part.eo.c" 429#include "efl_ui_button_part.eo.c"
430 430
diff --git a/src/lib/elementary/efl_ui_button_part.eo b/src/lib/elementary/efl_ui_button_part.eo
index 4f5952f0d9..3e30788a0a 100644
--- a/src/lib/elementary/efl_ui_button_part.eo
+++ b/src/lib/elementary/efl_ui_button_part.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Button.Part (Efl.Ui.Layout.Part) 1class Efl.Ui.Button.Part (Efl.Ui.Layout.Part_Content)
2{ 2{
3 [[Elementary button internal part class]] 3 [[Elementary button internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index b1f8f051cb..5f07ba8e23 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -9,6 +9,7 @@
9#include "elm_priv.h" 9#include "elm_priv.h"
10#include "efl_ui_widget_frame.h" 10#include "efl_ui_widget_frame.h"
11#include "elm_widget_layout.h" 11#include "elm_widget_layout.h"
12#include "elm_part_helper.h"
12 13
13#define MY_CLASS EFL_UI_FRAME_CLASS 14#define MY_CLASS EFL_UI_FRAME_CLASS
14#define MY_CLASS_PFX efl_ui_frame 15#define MY_CLASS_PFX efl_ui_frame
@@ -198,18 +199,6 @@ _efl_ui_frame_efl_object_constructor(Eo *obj, Efl_Ui_Frame_Data *_pd EINA_UNUSED
198} 199}
199 200
200EOLIAN static void 201EOLIAN static void
201_efl_ui_frame_efl_text_text_set(Eo *obj, Efl_Ui_Frame_Data *pd EINA_UNUSED, const char *text)
202{
203 efl_text_set(efl_part(obj, _text_aliases[0].real_part), text);
204}
205
206EOLIAN static const char *
207_efl_ui_frame_efl_text_text_get(Eo *obj, Efl_Ui_Frame_Data *pd EINA_UNUSED)
208{
209 return efl_text_get(efl_part(obj, _text_aliases[0].real_part));
210}
211
212EOLIAN static void
213_efl_ui_frame_autocollapse_set(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *sd, Eina_Bool autocollapse) 202_efl_ui_frame_autocollapse_set(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *sd, Eina_Bool autocollapse)
214{ 203{
215 204
@@ -267,6 +256,8 @@ _efl_ui_frame_class_constructor(Efl_Class *klass)
267 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 256 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
268} 257}
269 258
259ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data)
260
270/* Internal EO APIs and hidden overrides */ 261/* Internal EO APIs and hidden overrides */
271 262
272ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX) 263ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 05a6e890c8..24130d71b4 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -9,8 +9,6 @@
9 9
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_layout.h" 11#include "elm_widget_layout.h"
12
13#include "efl_ui_layout_part.eo.h"
14#include "elm_part_helper.h" 12#include "elm_part_helper.h"
15 13
16#define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 14#define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT
@@ -1246,7 +1244,7 @@ _efl_ui_layout_efl_container_content_count(Eo *eo_obj EINA_UNUSED, Efl_Ui_Layout
1246 return eina_list_count(sd->subs); 1244 return eina_list_count(sd->subs);
1247} 1245}
1248 1246
1249EOLIAN static Eina_Bool 1247static Eina_Bool
1250_efl_ui_layout_text_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, const char *text) 1248_efl_ui_layout_text_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, const char *text)
1251{ 1249{
1252 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 1250 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -1321,7 +1319,7 @@ _efl_ui_layout_text_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, const
1321 return EINA_TRUE; 1319 return EINA_TRUE;
1322} 1320}
1323 1321
1324EOLIAN static const char* 1322static const char*
1325_efl_ui_layout_text_get(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED, const char *part) 1323_efl_ui_layout_text_get(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED, const char *part)
1326{ 1324{
1327 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 1325 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
@@ -2489,7 +2487,13 @@ _efl_ui_layout_efl_part_part(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED,
2489 if ((type == EDJE_PART_TYPE_BOX) || (type == EDJE_PART_TYPE_TABLE)) 2487 if ((type == EDJE_PART_TYPE_BOX) || (type == EDJE_PART_TYPE_TABLE))
2490 return _efl_ui_layout_pack_proxy_get((Eo *) obj, type, part); 2488 return _efl_ui_layout_pack_proxy_get((Eo *) obj, type, part);
2491 2489
2492 ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT); 2490 if ((type == EDJE_PART_TYPE_TEXT) || (type == EDJE_PART_TYPE_TEXTBLOCK))
2491 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_TEXT_CLASS);
2492
2493 if (type == EDJE_PART_TYPE_SWALLOW)
2494 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_CONTENT_CLASS);
2495
2496 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_CLASS);
2493} 2497}
2494 2498
2495static const char * 2499static const char *
@@ -2510,6 +2514,8 @@ _efl_ui_layout_default_text_part_get(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_
2510 return part; 2514 return part;
2511} 2515}
2512 2516
2517/* Efl.Ui.Layout.Part (common) */
2518
2513EOLIAN static Eina_Bool 2519EOLIAN static Eina_Bool
2514_efl_ui_layout_part_efl_ui_cursor_cursor_set(Eo *obj, void *_pd EINA_UNUSED, const char *cursor) 2520_efl_ui_layout_part_efl_ui_cursor_cursor_set(Eo *obj, void *_pd EINA_UNUSED, const char *cursor)
2515{ 2521{
@@ -2558,12 +2564,26 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_theme_search_enabled_get(Eo *obj, void
2558 ELM_PART_RETURN_VAL(!_efl_ui_layout_part_cursor_engine_only_get(sd, pd->part)); 2564 ELM_PART_RETURN_VAL(!_efl_ui_layout_part_cursor_engine_only_get(sd, pd->part));
2559} 2565}
2560 2566
2561ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2567/* Efl.Ui.Layout.Part_Content */
2562ELM_PART_OVERRIDE_CONTENT_GET(efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2568ELM_PART_OVERRIDE_CONTENT_GET_FULL(efl_ui_layout_part_content, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2563ELM_PART_OVERRIDE_CONTENT_UNSET(efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2569ELM_PART_OVERRIDE_CONTENT_SET_FULL(efl_ui_layout_part_content, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2564ELM_PART_OVERRIDE_TEXT_SET(efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2570ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(efl_ui_layout_part_content, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2565ELM_PART_OVERRIDE_TEXT_GET(efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2571
2572/* Efl.Ui.Layout.Part_Text */
2573ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2574ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2575
2576/* Efl.Ui.Layout.Part_Legacy */
2577ELM_PART_OVERRIDE_CONTENT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2578ELM_PART_OVERRIDE_CONTENT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2579ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2580ELM_PART_OVERRIDE_TEXT_GET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2581ELM_PART_OVERRIDE_TEXT_SET_FULL(efl_ui_layout_part_legacy, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2582
2566#include "efl_ui_layout_part.eo.c" 2583#include "efl_ui_layout_part.eo.c"
2584#include "efl_ui_layout_part_content.eo.c"
2585#include "efl_ui_layout_part_text.eo.c"
2586#include "efl_ui_layout_part_legacy.eo.c"
2567 2587
2568/* Efl.Part end */ 2588/* Efl.Part end */
2569 2589
diff --git a/src/lib/elementary/efl_ui_layout_pack.c b/src/lib/elementary/efl_ui_layout_pack.c
index 234ae5ad8a..76a1315504 100644
--- a/src/lib/elementary/efl_ui_layout_pack.c
+++ b/src/lib/elementary/efl_ui_layout_pack.c
@@ -12,8 +12,6 @@
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13#include "elm_part_helper.h" 13#include "elm_part_helper.h"
14 14
15#include "efl_ui_layout_part_box.eo.h"
16#include "efl_ui_layout_part_table.eo.h"
17#include "../evas/canvas/evas_box.eo.h" 15#include "../evas/canvas/evas_box.eo.h"
18#include "../evas/canvas/evas_table.eo.h" 16#include "../evas/canvas/evas_table.eo.h"
19 17
diff --git a/src/lib/elementary/efl_ui_layout_part.eo b/src/lib/elementary/efl_ui_layout_part.eo
index 4903679e8a..86a70d8b5c 100644
--- a/src/lib/elementary/efl_ui_layout_part.eo
+++ b/src/lib/elementary/efl_ui_layout_part.eo
@@ -1,11 +1,8 @@
1class Efl.Ui.Layout.Part (Efl.Ui.Widget.Part, Efl.Container, Efl.Text, Efl.Ui.Cursor) 1class Efl.Ui.Layout.Part (Efl.Ui.Widget.Part, Efl.Ui.Cursor)
2{ 2{
3 [[Elementary layout internal part class]] 3 [[Elementary layout internal part class]]
4 data: null; 4 data: null;
5 implements { 5 implements {
6 Efl.Container.content { get; set; }
7 Efl.Container.content_unset;
8 Efl.Text.text { set; get; }
9 Efl.Ui.Cursor.cursor { get; set; } 6 Efl.Ui.Cursor.cursor { get; set; }
10 Efl.Ui.Cursor.cursor_style { get; set; } 7 Efl.Ui.Cursor.cursor_style { get; set; }
11 Efl.Ui.Cursor.cursor_theme_search_enabled { get; set; } 8 Efl.Ui.Cursor.cursor_theme_search_enabled { get; set; }
diff --git a/src/lib/elementary/efl_ui_layout_part_box.eo b/src/lib/elementary/efl_ui_layout_part_box.eo
index 02e2be0e90..7fba7b795a 100644
--- a/src/lib/elementary/efl_ui_layout_part_box.eo
+++ b/src/lib/elementary/efl_ui_layout_part_box.eo
@@ -6,8 +6,9 @@ class Efl.Ui.Layout.Part.Box (Efl.Object, Efl.Pack.Linear,
6 Can not be deleted, this is only a representation of an internal object 6 Can not be deleted, this is only a representation of an internal object
7 of an EFL layout. 7 of an EFL layout.
8 ]] 8 ]]
9 data: Efl_Ui_Layout_Table_Data; 9 data: Efl_Ui_Layout_Box_Data;
10 methods { 10 methods {
11 /* FIXME: Remove this. */
11 @property real_part @protected { 12 @property real_part @protected {
12 [[Real part property]] 13 [[Real part property]]
13 set {} 14 set {}
diff --git a/src/lib/elementary/efl_ui_layout_part_content.eo b/src/lib/elementary/efl_ui_layout_part_content.eo
new file mode 100644
index 0000000000..50b6aeacb6
--- /dev/null
+++ b/src/lib/elementary/efl_ui_layout_part_content.eo
@@ -0,0 +1,9 @@
1class Efl.Ui.Layout.Part_Content (Efl.Ui.Layout.Part, Efl.Container)
2{
3 [[Elementary layout internal part class]]
4 data: null;
5 implements {
6 Efl.Container.content { get; set; }
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/efl_ui_layout_part_legacy.eo b/src/lib/elementary/efl_ui_layout_part_legacy.eo
new file mode 100644
index 0000000000..8904b90222
--- /dev/null
+++ b/src/lib/elementary/efl_ui_layout_part_legacy.eo
@@ -0,0 +1,10 @@
1class Efl.Ui.Layout.Part_Legacy (Efl.Ui.Layout.Part, Efl.Container, Efl.Text)
2{
3 [[Elementary layout internal part class]]
4 data: null;
5 implements {
6 Efl.Container.content { get; set; }
7 Efl.Container.content_unset;
8 Efl.Text.text { set; get; }
9 }
10}
diff --git a/src/lib/elementary/efl_ui_layout_part_table.eo b/src/lib/elementary/efl_ui_layout_part_table.eo
index 495aa6eff4..e5d5caf2eb 100644
--- a/src/lib/elementary/efl_ui_layout_part_table.eo
+++ b/src/lib/elementary/efl_ui_layout_part_table.eo
@@ -7,6 +7,7 @@ class Efl.Ui.Layout.Part.Table (Efl.Object, Efl.Pack.Grid)
7 ]] 7 ]]
8 data: Efl_Ui_Layout_Table_Data; 8 data: Efl_Ui_Layout_Table_Data;
9 methods { 9 methods {
10 /* FIXME: Remove this. */
10 @property real_part @protected { 11 @property real_part @protected {
11 [[Real part property]] 12 [[Real part property]]
12 set {} 13 set {}
diff --git a/src/lib/elementary/efl_ui_layout_part_text.eo b/src/lib/elementary/efl_ui_layout_part_text.eo
new file mode 100644
index 0000000000..ce53d49f00
--- /dev/null
+++ b/src/lib/elementary/efl_ui_layout_part_text.eo
@@ -0,0 +1,8 @@
1class Efl.Ui.Layout.Part_Text (Efl.Ui.Layout.Part, Efl.Text)
2{
3 [[Elementary layout internal part class]]
4 data: null;
5 implements {
6 Efl.Text.text { set; get; }
7 }
8}
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index 1dc0c60d03..bf03b20a7c 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -531,7 +531,7 @@ _efl_ui_panes_class_constructor(Efl_Class *klass)
531 531
532/* Efl.Part begin */ 532/* Efl.Part begin */
533 533
534ELM_PART_OVERRIDE(efl_ui_panes, EFL_UI_PANES, Efl_Ui_Panes_Data) 534ELM_PART_OVERRIDE_ONLY_ALIASES(efl_ui_panes, EFL_UI_PANES, Efl_Ui_Panes_Data, _content_aliases)
535 535
536EOLIAN static void 536EOLIAN static void
537_efl_ui_panes_part_hint_min_allow_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool allow) 537_efl_ui_panes_part_hint_min_allow_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool allow)
@@ -613,11 +613,11 @@ _efl_ui_panes_part_split_ratio_min_set(Eo *obj, void *_pd EINA_UNUSED, double ra
613 613
614/* Internal EO APIs and hidden overrides */ 614/* Internal EO APIs and hidden overrides */
615 615
616ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX); 616ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(efl_ui_panes)
617 617
618#define EFL_UI_PANES_EXTRA_OPS \ 618#define EFL_UI_PANES_EXTRA_OPS \
619 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_panes), \ 619 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_panes), \
620 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ 620 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_panes), \
621 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_panes) 621 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_panes)
622 622
623/* Legacy APIs */ 623/* Legacy APIs */
diff --git a/src/lib/elementary/efl_ui_panes_part.eo b/src/lib/elementary/efl_ui_panes_part.eo
index 9630c68744..9e16dcd8e8 100644
--- a/src/lib/elementary/efl_ui_panes_part.eo
+++ b/src/lib/elementary/efl_ui_panes_part.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Panes.Part (Efl.Ui.Layout.Part) 1class Efl.Ui.Panes.Part (Efl.Ui.Layout.Part_Content)
2{ 2{
3 [[Elementary Panes internal part class]] 3 [[Elementary Panes internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index af235a4e74..38cba9635a 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -641,15 +641,9 @@ _efl_ui_progressbar_class_constructor(Efl_Class *klass)
641} 641}
642 642
643/* Efl.Part begin */ 643/* Efl.Part begin */
644ELM_PART_OVERRIDE(efl_ui_progressbar, EFL_UI_PROGRESSBAR, Efl_Ui_Progressbar_Data)
645 644
646static EOLIAN Eina_Bool 645ELM_PART_OVERRIDE_ONLY_ALIASES(efl_ui_progressbar, EFL_UI_PROGRESSBAR, Efl_Ui_Progressbar_Data, _content_aliases)
647_efl_ui_progressbar_part_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content) 646ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_progressbar, EFL_UI_PROGRESSBAR, Efl_Ui_Progressbar_Data)
648{
649 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
650 Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS);
651 ELM_PART_RETURN_VAL(_efl_ui_progressbar_content_set(pd->obj, sd, pd->part, content));
652}
653 647
654EOLIAN static void 648EOLIAN static void
655_efl_ui_progressbar_part_efl_ui_range_range_value_set(Eo *obj, void *_pd EINA_UNUSED, double val) 649_efl_ui_progressbar_part_efl_ui_range_range_value_set(Eo *obj, void *_pd EINA_UNUSED, double val)
@@ -675,12 +669,12 @@ _efl_ui_progressbar_part_efl_ui_range_range_value_get(Eo *obj, void *_pd EINA_UN
675 669
676/* Internal EO APIs and hidden overrides */ 670/* Internal EO APIs and hidden overrides */
677 671
678ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX) 672ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(efl_ui_progressbar)
679ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX) 673ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_progressbar)
680 674
681#define EFL_UI_PROGRESSBAR_EXTRA_OPS \ 675#define EFL_UI_PROGRESSBAR_EXTRA_OPS \
682 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ 676 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_progressbar), \
683 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \ 677 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_progressbar), \
684 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_progressbar), \ 678 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_progressbar), \
685 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_progressbar) 679 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_progressbar)
686 680
diff --git a/src/lib/elementary/efl_ui_progressbar_part.eo b/src/lib/elementary/efl_ui_progressbar_part.eo
index 2263a6a73a..0eb21412ea 100644
--- a/src/lib/elementary/efl_ui_progressbar_part.eo
+++ b/src/lib/elementary/efl_ui_progressbar_part.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Progressbar.Part (Efl.Ui.Layout.Part, Efl.Ui.Range) 1class Efl.Ui.Progressbar.Part (Efl.Ui.Layout.Part_Content, Efl.Ui.Range)
2{ 2{
3 [[Elementary progressbar internal part class]] 3 [[Elementary progressbar internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 409fbe2398..76c3839014 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1237,9 +1237,9 @@ EOLIAN static void
1237_efl_ui_slider_efl_ui_range_span_size_set(Eo *obj, Efl_Ui_Slider_Data *sd, Evas_Coord size) 1237_efl_ui_slider_efl_ui_range_span_size_set(Eo *obj, Efl_Ui_Slider_Data *sd, Evas_Coord size)
1238{ 1238{
1239 if (_is_horizontal(sd->dir)) 1239 if (_is_horizontal(sd->dir))
1240 efl_gfx_size_hint_min_set(efl_part(obj, "elm.swallow.bar"), EINA_SIZE2D(size, 1)); 1240 efl_gfx_size_hint_min_set(efl_part(obj, "span"), EINA_SIZE2D(size, 1));
1241 else 1241 else
1242 efl_gfx_size_hint_min_set(efl_part(obj, "elm.swallow.bar"), EINA_SIZE2D(1, size)); 1242 efl_gfx_size_hint_min_set(efl_part(obj, "span"), EINA_SIZE2D(1, size));
1243} 1243}
1244 1244
1245EOLIAN static Evas_Coord 1245EOLIAN static Evas_Coord
@@ -1507,28 +1507,19 @@ _efl_ui_slider_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UN
1507 1507
1508/* Standard widget overrides */ 1508/* Standard widget overrides */
1509 1509
1510EFL_TEXT_PART_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data) 1510ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data)
1511 1511
1512/* Efl.Part begin */ 1512/* Efl.Part begin */
1513ELM_PART_OVERRIDE(efl_ui_slider, EFL_UI_SLIDER, Efl_Ui_Slider_Data)
1514 1513
1515static Eina_Bool 1514EOLIAN static Eo *
1516_efl_ui_slider_content_set(Eo *obj, Efl_Ui_Slider_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 1515_efl_ui_slider_efl_part_part(const Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED, const char *part)
1517{ 1516{
1518 Eina_Bool int_ret; 1517 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
1519 1518
1520 int_ret = efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content); 1519 if (eina_streq(part, "span"))
1521 if (!int_ret) return EINA_FALSE; 1520 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_SLIDER_PART_CLASS);
1522 1521
1523 return EINA_TRUE; 1522 return efl_part(efl_super(obj, MY_CLASS), part);
1524}
1525
1526static EOLIAN Eina_Bool
1527_efl_ui_slider_part_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content)
1528{
1529 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
1530 Efl_Ui_Slider_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_SLIDER_CLASS);
1531 ELM_PART_RETURN_VAL(_efl_ui_slider_content_set(pd->obj, sd, pd->part, content));
1532} 1523}
1533 1524
1534static void 1525static void
@@ -1570,6 +1561,7 @@ _efl_ui_slider_part_efl_gfx_size_hint_hint_min_set(Eo *obj, void *_pd EINA_UNUSE
1570 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 1561 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
1571 Efl_Ui_Slider_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_SLIDER_CLASS); 1562 Efl_Ui_Slider_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_SLIDER_CLASS);
1572 1563
1564 EINA_SAFETY_ON_FALSE_RETURN(eina_streq(pd->part, "span"));
1573 _span_size_set(pd->obj, sd, sz.w, sz.h); 1565 _span_size_set(pd->obj, sd, sz.w, sz.h);
1574} 1566}
1575 1567
@@ -1578,11 +1570,16 @@ _efl_ui_slider_part_efl_gfx_size_hint_hint_min_get(Eo *obj, void *_pd EINA_UNUSE
1578{ 1570{
1579 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 1571 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
1580 Efl_Ui_Slider_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_SLIDER_CLASS); 1572 Efl_Ui_Slider_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_SLIDER_CLASS);
1573 Eina_Size2D ret = { 0, 0 };
1581 1574
1575 EINA_SAFETY_ON_FALSE_GOTO(eina_streq(pd->part, "span"), end);
1582 if (_is_horizontal(sd->dir)) 1576 if (_is_horizontal(sd->dir))
1583 return EINA_SIZE2D(sd->size, 1); 1577 ret = EINA_SIZE2D(sd->size, 1);
1584 else 1578 else
1585 return EINA_SIZE2D(1, sd->size); 1579 ret = EINA_SIZE2D(1, sd->size);
1580
1581end:
1582 return ret;
1586} 1583}
1587 1584
1588#include "efl_ui_slider_part.eo.c" 1585#include "efl_ui_slider_part.eo.c"
@@ -1750,12 +1747,12 @@ elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max)
1750 1747
1751/* Internal EO APIs and hidden overrides */ 1748/* Internal EO APIs and hidden overrides */
1752 1749
1753ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX) 1750ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(efl_ui_slider)
1754ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX) 1751ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_slider)
1755 1752
1756#define EFL_UI_SLIDER_EXTRA_OPS \ 1753#define EFL_UI_SLIDER_EXTRA_OPS \
1757 ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ 1754 ELM_LAYOUT_CONTENT_ALIASES_OPS(efl_ui_slider), \
1758 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \ 1755 ELM_LAYOUT_TEXT_ALIASES_OPS(efl_ui_slider), \
1759 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_slider), \ 1756 ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_slider), \
1760 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider) 1757 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider)
1761 1758
diff --git a/src/lib/elementary/efl_ui_slider_part.eo b/src/lib/elementary/efl_ui_slider_part.eo
index d7b58ddf18..30b34c8675 100644
--- a/src/lib/elementary/efl_ui_slider_part.eo
+++ b/src/lib/elementary/efl_ui_slider_part.eo
@@ -1,9 +1,8 @@
1class Efl.Ui.Slider.Part (Efl.Ui.Layout.Part, Efl.Gfx.Size.Hint) 1class Efl.Ui.Slider.Part (Efl.Ui.Layout.Part_Content, Efl.Gfx.Size.Hint)
2{ 2{
3 [[Elementary slider internal part class]] 3 [[Elementary slider internal part class]]
4 data: null; 4 data: null;
5 implements { 5 implements {
6 Efl.Container.content { set; }
7 Efl.Gfx.Size.Hint.hint_min { set; get; } 6 Efl.Gfx.Size.Hint.hint_min { set; get; }
8 } 7 }
9} 8}
diff --git a/src/lib/elementary/efl_ui_textpath_part.eo b/src/lib/elementary/efl_ui_textpath_part.eo
index 026f9b6800..22ec019ea8 100644
--- a/src/lib/elementary/efl_ui_textpath_part.eo
+++ b/src/lib/elementary/efl_ui_textpath_part.eo
@@ -1,4 +1,4 @@
1class Efl.Ui.Textpath.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Efl.Ui.Textpath.Part (Efl.Ui.Layout.Part_Text)
2{ 2{
3 [[Efl UI Textpath internal part class]] 3 [[Efl UI Textpath internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_actionslider_part.eo b/src/lib/elementary/elm_actionslider_part.eo
index 038332c1c7..ef44426d23 100644
--- a/src/lib/elementary/elm_actionslider_part.eo
+++ b/src/lib/elementary/elm_actionslider_part.eo
@@ -1,4 +1,4 @@
1class Elm_Actionslider.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm_Actionslider.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary Actionslider internal part class]] 3 [[Elementary Actionslider internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_bubble_part.eo b/src/lib/elementary/elm_bubble_part.eo
index 3822913bc3..44911d69c1 100644
--- a/src/lib/elementary/elm_bubble_part.eo
+++ b/src/lib/elementary/elm_bubble_part.eo
@@ -1,4 +1,4 @@
1class Elm_Bubble.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm_Bubble.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary Bubble internal part class]] 3 [[Elementary Bubble internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_ctxpopup_part.eo b/src/lib/elementary/elm_ctxpopup_part.eo
index da725aa3b2..4228ce2176 100644
--- a/src/lib/elementary/elm_ctxpopup_part.eo
+++ b/src/lib/elementary/elm_ctxpopup_part.eo
@@ -1,4 +1,4 @@
1class Elm.Ctxpopup.Part (Efl.Ui.Layout.Part) 1class Elm.Ctxpopup.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary contex popup internal part class]] 3 [[Elementary contex popup internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_dayselector_part.eo b/src/lib/elementary/elm_dayselector_part.eo
index fad25580dc..665aacdd32 100644
--- a/src/lib/elementary/elm_dayselector_part.eo
+++ b/src/lib/elementary/elm_dayselector_part.eo
@@ -1,4 +1,4 @@
1class Elm.Dayselector.Part (Efl.Ui.Layout.Part) 1class Elm.Dayselector.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary dayselector internal part class]] 3 [[Elementary dayselector internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_entry_part.eo b/src/lib/elementary/elm_entry_part.eo
index 454ba7c32c..8ad6754241 100644
--- a/src/lib/elementary/elm_entry_part.eo
+++ b/src/lib/elementary/elm_entry_part.eo
@@ -1,4 +1,4 @@
1class Elm.Entry.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm.Entry.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary entry internal part class]] 3 [[Elementary entry internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_fileselector_entry_part.eo b/src/lib/elementary/elm_fileselector_entry_part.eo
index 75e301b09b..deee04c739 100644
--- a/src/lib/elementary/elm_fileselector_entry_part.eo
+++ b/src/lib/elementary/elm_fileselector_entry_part.eo
@@ -1,4 +1,4 @@
1class Elm.Fileselector.Entry.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm.Fileselector.Entry.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary fileselector entry internal part class]] 3 [[Elementary fileselector entry internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_fileselector_part.eo b/src/lib/elementary/elm_fileselector_part.eo
index 6b2dff7ed2..bdc00c7905 100644
--- a/src/lib/elementary/elm_fileselector_part.eo
+++ b/src/lib/elementary/elm_fileselector_part.eo
@@ -1,4 +1,4 @@
1class Elm.Fileselector.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm.Fileselector.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary fileselector entry internal part class]] 3 [[Elementary fileselector entry internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_hover_part.eo b/src/lib/elementary/elm_hover_part.eo
index a8920fe2fd..d2811c7820 100644
--- a/src/lib/elementary/elm_hover_part.eo
+++ b/src/lib/elementary/elm_hover_part.eo
@@ -1,4 +1,4 @@
1class Elm.Hover.Part (Efl.Ui.Layout.Part) 1class Elm.Hover.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[elementary hover internal part class]] 3 [[elementary hover internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_label_part.eo b/src/lib/elementary/elm_label_part.eo
index 36b0e03fe7..e62729a056 100644
--- a/src/lib/elementary/elm_label_part.eo
+++ b/src/lib/elementary/elm_label_part.eo
@@ -1,4 +1,4 @@
1class Elm_Label.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm_Label.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary button internal part class]] 3 [[Elementary button internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_multibuttonentry_part.eo b/src/lib/elementary/elm_multibuttonentry_part.eo
index 737915fcb2..cd2f84943e 100644
--- a/src/lib/elementary/elm_multibuttonentry_part.eo
+++ b/src/lib/elementary/elm_multibuttonentry_part.eo
@@ -1,4 +1,4 @@
1class Elm.Multibuttonentry.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm.Multibuttonentry.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary multibuttonentry internal part class]] 3 [[Elementary multibuttonentry internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_naviframe_part.eo b/src/lib/elementary/elm_naviframe_part.eo
index de62c47d1f..429dee6e64 100644
--- a/src/lib/elementary/elm_naviframe_part.eo
+++ b/src/lib/elementary/elm_naviframe_part.eo
@@ -1,4 +1,4 @@
1class Elm.Naviframe.Part (Efl.Ui.Layout.Part) 1class Elm.Naviframe.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary naviframe internal part class]] 3 [[Elementary naviframe internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
index 3cd5c5f98b..08612ff1df 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -1,7 +1,7 @@
1#ifndef _ELM_PART_HELPER_H 1#ifndef _ELM_PART_HELPER_H
2#define _ELM_PART_HELPER_H 2#define _ELM_PART_HELPER_H
3 3
4#include "efl_ui_layout_part.eo.h" 4#include "efl_ui_layout_part_legacy.eo.h"
5 5
6//#define ELM_PART_HOOK do { ERR("%s@%p:%s [%d]", efl_class_name_get(pd->obj), pd->obj, pd->part, (int) pd->temp); } while(0) 6//#define ELM_PART_HOOK do { ERR("%s@%p:%s [%d]", efl_class_name_get(pd->obj), pd->obj, pd->part, (int) pd->temp); } while(0)
7#define ELM_PART_HOOK do {} while(0) 7#define ELM_PART_HOOK do {} while(0)
@@ -39,8 +39,19 @@ struct _Elm_Part_Data
39 39
40// For any widget that has specific part handling 40// For any widget that has specific part handling
41 41
42#define ELM_PART_OVERRIDE_IMPLEMENT(TYPE) \ 42static inline Eina_Bool
43 Eo *proxy = efl_add(TYPE ## _PART_CLASS, (Eo *) obj); \ 43_elm_part_alias_find(const Elm_Layout_Part_Alias_Description *aliases, const char *part)
44{
45 const Elm_Layout_Part_Alias_Description *alias;
46
47 for (alias = aliases; alias && alias->alias; alias++)
48 if (eina_streq(alias->real_part, part))
49 return EINA_TRUE;
50 return EINA_FALSE;
51}
52
53#define ELM_PART_OVERRIDE_IMPLEMENT(PART_CLASS) ({ \
54 Eo *proxy = efl_add(PART_CLASS, (Eo *) obj); \
44 Elm_Part_Data *pd = efl_data_scope_get(proxy, EFL_UI_WIDGET_PART_CLASS); \ 55 Elm_Part_Data *pd = efl_data_scope_get(proxy, EFL_UI_WIDGET_PART_CLASS); \
45 if (pd) \ 56 if (pd) \
46 { \ 57 { \
@@ -48,46 +59,56 @@ struct _Elm_Part_Data
48 pd->part = eina_tmpstr_add(part); \ 59 pd->part = eina_tmpstr_add(part); \
49 pd->temp = 1; \ 60 pd->temp = 1; \
50 } \ 61 } \
51 return proxy; 62 proxy; })
63
64#define ELM_PART_OVERRIDE_ONLY_ALIASES(type, TYPE, typedata, aliases) \
65 EOLIAN static Efl_Object * \
66 _ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
67 { \
68 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
69 if (_elm_part_alias_find(aliases, part)) \
70 return ELM_PART_OVERRIDE_IMPLEMENT(TYPE ## _PART_CLASS); \
71 return efl_part(efl_super(obj, MY_CLASS), part); \
72 }
52 73
53#define ELM_PART_OVERRIDE(type, TYPE, typedata) \ 74#define ELM_PART_OVERRIDE(type, TYPE, typedata) \
54static EOLIAN Efl_Object * \ 75EOLIAN static Efl_Object * \
55_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \ 76_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
56{ \ 77{ \
57 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \ 78 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
58 ELM_PART_OVERRIDE_IMPLEMENT(TYPE); \ 79 return ELM_PART_OVERRIDE_IMPLEMENT(TYPE ## _PART_CLASS); \
59} 80}
60 81
61#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \ 82#define ELM_PART_OVERRIDE_CONTENT_SET_FULL(full, type, TYPE, typedata) \
62static EOLIAN Eina_Bool \ 83EOLIAN static Eina_Bool \
63_ ## type ## _part_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content) \ 84_ ## full ## _efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content) \
64{ \ 85{ \
65 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 86 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
66 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 87 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
67 ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, sd, pd->part, content)); \ 88 ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, sd, pd->part, content)); \
68} 89}
69 90
70#define ELM_PART_OVERRIDE_CONTENT_GET(type, TYPE, typedata) \ 91#define ELM_PART_OVERRIDE_CONTENT_GET_FULL(full, type, TYPE, typedata) \
71static EOLIAN Efl_Gfx * \ 92EOLIAN static Efl_Gfx * \
72_ ## type ## _part_efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED) \ 93_ ## full ## _efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED) \
73{ \ 94{ \
74 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 95 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
75 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 96 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
76 ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, sd, pd->part)); \ 97 ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, sd, pd->part)); \
77} 98}
78 99
79#define ELM_PART_OVERRIDE_CONTENT_UNSET(type, TYPE, typedata) \ 100#define ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(full, type, TYPE, typedata) \
80static EOLIAN Efl_Gfx * \ 101EOLIAN static Efl_Gfx * \
81_ ## type ## _part_efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED) \ 102_ ## full ## _efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED) \
82{ \ 103{ \
83 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 104 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
84 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 105 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
85 ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, sd, pd->part)); \ 106 ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, sd, pd->part)); \
86} 107}
87 108
88#define ELM_PART_OVERRIDE_TEXT_SET(type, TYPE, typedata) \ 109#define ELM_PART_OVERRIDE_TEXT_SET_FULL(full, type, TYPE, typedata) \
89static EOLIAN void \ 110EOLIAN static void \
90_ ## type ## _part_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text) \ 111_ ## full ## _efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text) \
91{ \ 112{ \
92 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 113 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
93 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 114 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
@@ -95,16 +116,31 @@ _ ## type ## _part_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char
95 ELM_PART_RETURN_VOID; \ 116 ELM_PART_RETURN_VOID; \
96} 117}
97 118
98#define ELM_PART_OVERRIDE_TEXT_GET(type, TYPE, typedata) \ 119#define ELM_PART_OVERRIDE_TEXT_GET_FULL(full, type, TYPE, typedata) \
99static EOLIAN const char *\ 120EOLIAN static const char *\
100_ ## type ## _part_efl_text_text_get(Eo *obj, void *_pd EINA_UNUSED) \ 121_ ## full ## _efl_text_text_get(Eo *obj, void *_pd EINA_UNUSED) \
101{ \ 122{ \
102 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 123 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
103 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 124 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
104 ELM_PART_RETURN_VAL(_ ## type ## _text_get(pd->obj, sd, pd->part)); \ 125 ELM_PART_RETURN_VAL(_ ## type ## _text_get(pd->obj, sd, pd->part)); \
105} 126}
106 127
107#define EFL_TEXT_PART_DEFAULT_IMPLEMENT(type, Type) \ 128#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \
129 ELM_PART_OVERRIDE_CONTENT_SET_FULL(type ## _part, type, TYPE, typedata)
130
131#define ELM_PART_OVERRIDE_CONTENT_GET(type, TYPE, typedata) \
132 ELM_PART_OVERRIDE_CONTENT_GET_FULL(type ## _part, type, TYPE, typedata)
133
134#define ELM_PART_OVERRIDE_CONTENT_UNSET(type, TYPE, typedata) \
135 ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(type ## _part, type, TYPE, typedata)
136
137#define ELM_PART_OVERRIDE_TEXT_SET(type, TYPE, typedata) \
138 ELM_PART_OVERRIDE_TEXT_SET_FULL(type ## _part, type, TYPE, typedata)
139
140#define ELM_PART_OVERRIDE_TEXT_GET(type, TYPE, typedata) \
141 ELM_PART_OVERRIDE_TEXT_GET_FULL(type ## _part, type, TYPE, typedata)
142
143#define ELM_PART_TEXT_DEFAULT_IMPLEMENT(type, Type) \
108EOLIAN static void \ 144EOLIAN static void \
109_ ## type ## _efl_text_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *text) \ 145_ ## type ## _efl_text_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *text) \
110{ \ 146{ \
diff --git a/src/lib/elementary/elm_player_part.eo b/src/lib/elementary/elm_player_part.eo
index bfa1eaf891..4d15aa7a7c 100644
--- a/src/lib/elementary/elm_player_part.eo
+++ b/src/lib/elementary/elm_player_part.eo
@@ -1,4 +1,4 @@
1class Elm.Player.Part (Efl.Ui.Layout.Part) 1class Elm.Player.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary player internal part class]] 3 [[Elementary player internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_popup_part.eo b/src/lib/elementary/elm_popup_part.eo
index ff7ef972ec..2a18fbeb54 100644
--- a/src/lib/elementary/elm_popup_part.eo
+++ b/src/lib/elementary/elm_popup_part.eo
@@ -1,4 +1,4 @@
1class Elm.Popup.Part (Efl.Ui.Layout.Part, Efl.Text) 1class Elm.Popup.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary popup internal part class]] 3 [[Elementary popup internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_scroller_part.eo b/src/lib/elementary/elm_scroller_part.eo
index 1f17665007..cf51bfaaed 100644
--- a/src/lib/elementary/elm_scroller_part.eo
+++ b/src/lib/elementary/elm_scroller_part.eo
@@ -1,4 +1,4 @@
1class Elm.Scroller.Part (Efl.Ui.Layout.Part) 1class Elm.Scroller.Part (Efl.Ui.Layout.Part_Legacy)
2{ 2{
3 [[Elementary scroller internal part class]] 3 [[Elementary scroller internal part class]]
4 data: null; 4 data: null;
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 0ac956eed6..344da643cd 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -6638,7 +6638,7 @@ elm_widget_signal_callback_del(Eo *obj, const char *emission, const char *source
6638 6638
6639/* Efl.Part implementation */ 6639/* Efl.Part implementation */
6640 6640
6641static EOLIAN Efl_Object * 6641EOLIAN static Efl_Object *
6642_elm_widget_efl_part_part(const Eo *obj, Elm_Widget_Smart_Data *wd EINA_UNUSED, const char *part) 6642_elm_widget_efl_part_part(const Eo *obj, Elm_Widget_Smart_Data *wd EINA_UNUSED, const char *part)
6643{ 6643{
6644 Elm_Part_Data *pd; 6644 Elm_Part_Data *pd;
@@ -6659,7 +6659,7 @@ _elm_widget_efl_part_part(const Eo *obj, Elm_Widget_Smart_Data *wd EINA_UNUSED,
6659 return proxy; 6659 return proxy;
6660} 6660}
6661 6661
6662static EOLIAN void \ 6662EOLIAN static void \
6663_efl_ui_widget_part_efl_object_destructor(Eo *obj, Elm_Part_Data *pd) 6663_efl_ui_widget_part_efl_object_destructor(Eo *obj, Elm_Part_Data *pd)
6664{ 6664{
6665 ELM_PART_HOOK; 6665 ELM_PART_HOOK;