summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 16:02:33 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 19:35:54 +0900
commit001fa5af11c3ca3d5530fdc568350de8889e62a7 (patch)
tree77a2a082cd2b48a317660fa88ffdaebc5bba7399
parenta92186be6ab7ba6b8ba0b2bedeaec51dcb4a3898 (diff)
edje: add invalid part handler
-rw-r--r--src/Makefile_Edje.am4
-rw-r--r--src/lib/edje/edje_part.c3
-rw-r--r--src/lib/edje/edje_part_helper.h19
-rw-r--r--src/lib/edje/edje_part_invalid.c95
-rw-r--r--src/lib/edje/edje_private.h18
-rw-r--r--src/lib/edje/edje_util.c22
-rw-r--r--src/lib/edje/efl_canvas_layout_part_invalid.eo76
-rw-r--r--src/lib/elementary/efl_ui_layout.c5
8 files changed, 207 insertions, 35 deletions
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index c57f11130e..cd16f24ee5 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -19,6 +19,7 @@ edje_eolian_type_files = \
19 19
20edje_eolian_priv_files = \ 20edje_eolian_priv_files = \
21 lib/edje/edje_global.eo \ 21 lib/edje/edje_global.eo \
22 lib/edje/efl_canvas_layout_part_invalid.eo \
22 $(NULL) 23 $(NULL)
23 24
24edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c) 25edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c)
@@ -108,7 +109,8 @@ lib/edje/edje_part_external.c \
108lib/edje/edje_part_swallow.c \ 109lib/edje/edje_part_swallow.c \
109lib/edje/edje_part_table.c \ 110lib/edje/edje_part_table.c \
110lib/edje/edje_part_box.c \ 111lib/edje/edje_part_box.c \
111lib/edje/edje_part_text.c 112lib/edje/edje_part_text.c \
113lib/edje/edje_part_invalid.c
112 114
113lib_edje_libedje_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl $(EDJE_COMMON_CPPFLAGS) 115lib_edje_libedje_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl $(EDJE_COMMON_CPPFLAGS)
114lib_edje_libedje_la_LIBADD = @EDJE_LIBS@ @EDJE_LUA_LIBS@ 116lib_edje_libedje_la_LIBADD = @EDJE_LIBS@ @EDJE_LUA_LIBS@
diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index 98e9f20e82..b63a1fbae2 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -64,6 +64,7 @@ PROXY_INIT(swallow)
64PROXY_INIT(external) 64PROXY_INIT(external)
65PROXY_INIT(text) 65PROXY_INIT(text)
66PROXY_INIT(other) 66PROXY_INIT(other)
67PROXY_INIT(invalid)
67 68
68void 69void
69_edje_internal_proxy_shutdown(void) 70_edje_internal_proxy_shutdown(void)
@@ -73,6 +74,7 @@ _edje_internal_proxy_shutdown(void)
73 _swallow_shutdown(); 74 _swallow_shutdown();
74 _external_shutdown(); 75 _external_shutdown();
75 _text_shutdown(); 76 _text_shutdown();
77 _invalid_shutdown();
76 _other_shutdown(); 78 _other_shutdown();
77} 79}
78 80
@@ -93,7 +95,6 @@ EOLIAN static Efl_Object *
93_efl_canvas_layout_part_efl_object_finalize(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Part_Data *pd) 95_efl_canvas_layout_part_efl_object_finalize(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Part_Data *pd)
94{ 96{
95 EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL); 97 EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL);
96 // Do not use return here!
97 return efl_finalize(efl_super(obj, MY_CLASS)); 98 return efl_finalize(efl_super(obj, MY_CLASS));
98} 99}
99 100
diff --git a/src/lib/edje/edje_part_helper.h b/src/lib/edje/edje_part_helper.h
index 671bf657ae..0af166aef7 100644
--- a/src/lib/edje/edje_part_helper.h
+++ b/src/lib/edje/edje_part_helper.h
@@ -1,5 +1,4 @@
1#include "edje_private.h" 1#include "edje_private.h"
2#include "efl_canvas_layout_part.eo.h"
3 2
4typedef struct _Efl_Canvas_Layout_Part_Data Efl_Canvas_Layout_Part_Data; 3typedef struct _Efl_Canvas_Layout_Part_Data Efl_Canvas_Layout_Part_Data;
5 4
@@ -80,24 +79,22 @@ _ ## type ## _shutdown(void) \
80} \ 79} \
81\ 80\
82Eo * \ 81Eo * \
83_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) \ 82_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp, const char *part) \
84{ \ 83{ \
85 Efl_Canvas_Layout_Part_Data *pd; \ 84 Efl_Canvas_Layout_Part_Data *pd; \
86 Eo *proxy = PROXY_STATIC_VAR(type); \ 85 Eo *proxy = PROXY_STATIC_VAR(type); \
87 \
88 pd = proxy ? efl_data_scope_get(proxy, EFL_CANVAS_LAYOUT_PART_CLASS) : NULL; \ 86 pd = proxy ? efl_data_scope_get(proxy, EFL_CANVAS_LAYOUT_PART_CLASS) : NULL; \
89 if (!pd) \ 87 if (!pd) \
90 { \ 88 { \
91 if (EINA_UNLIKELY(PROXY_STATIC_VAR(type) != NULL)) \ 89 if (EINA_UNLIKELY(proxy != NULL)) \
92 ERR("Found invalid handle for efl_part. Reset."); \ 90 ERR("Found invalid handle for efl_part. Reset."); \
93 proxy = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \ 91 proxy = efl_add(KLASS, ed->obj, _edje_real_part_set(efl_added, ed, rp, part)); \
94 goto end ; \ 92 } \
93 else \
94 { \
95 PROXY_STATIC_VAR(type) = NULL; \
96 _edje_real_part_set(proxy, ed, rp, part); \
95 } \ 97 } \
96 else PROXY_STATIC_VAR(type) = NULL; \
97 \
98 _edje_real_part_set(proxy, ed, rp, rp->part->name); \
99 \
100end: \
101 __VA_ARGS__; \ 98 __VA_ARGS__; \
102 if (!no_del_cb) efl_del_intercept_set(proxy, _ ## type ## _del_cb); \ 99 if (!no_del_cb) efl_del_intercept_set(proxy, _ ## type ## _del_cb); \
103 efl_allow_parent_unref_set(proxy, 1); \ 100 efl_allow_parent_unref_set(proxy, 1); \
diff --git a/src/lib/edje/edje_part_invalid.c b/src/lib/edje/edje_part_invalid.c
new file mode 100644
index 0000000000..d14022d1f5
--- /dev/null
+++ b/src/lib/edje/edje_part_invalid.c
@@ -0,0 +1,95 @@
1#include "edje_private.h"
2#include "edje_part_helper.h"
3#define MY_CLASS EFL_CANVAS_LAYOUT_PART_INVALID_CLASS
4
5PROXY_IMPLEMENTATION(invalid, MY_CLASS, EINA_FALSE)
6#undef PROXY_IMPLEMENTATION
7
8static void
9_edje_part_invalid_call(Eo *proxy, const char *function)
10{
11 PROXY_DATA_GET(proxy, pd);
12
13 // FIXME: Add if (!optional)
14 WRN("No such part '%s' in group '%s' in call to %s().",
15 pd->part, pd->ed ? pd->ed->group : NULL, function);
16}
17
18#pragma GCC diagnostic push
19#pragma GCC diagnostic ignored "-Wunused-parameter"
20
21#define EDJE_PART_INVALID_VOID(api, impl, ...) \
22 EOLIAN static void impl(Eo *proxy, void *_pd EINA_UNUSED, ## __VA_ARGS__) { _edje_part_invalid_call(proxy, #api); }
23
24#define EDJE_PART_INVALID(type, ret, api, impl, ...) \
25 EOLIAN static type impl(Eo *proxy, void *_pd EINA_UNUSED, ## __VA_ARGS__) { _edje_part_invalid_call(proxy, #api); return (type)ret; }
26
27EOLIAN static void
28_efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(Eo *proxy, void *_pd EINA_UNUSED, const char **state, double *val)
29{
30 if (state) *state = "default";
31 if (val) *val = 0.0;
32}
33
34EDJE_PART_INVALID(Efl_Canvas_Layout_Part_Type, 0, efl_canvas_layout_part_type_get, _efl_canvas_layout_part_invalid_efl_canvas_layout_part_part_type_get)
35EDJE_PART_INVALID(Eina_Rect, EINA_RECT_ZERO(), efl_gfx_geometry_get, _efl_canvas_layout_part_invalid_efl_gfx_geometry_get)
36EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_value_set, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_value_set, double dx, double dy)
37EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_value_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_value_get, double *dx, double *dy)
38EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_size_set, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_size_set, double dw, double dh)
39EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_size_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_size_get, double *dw, double *dh)
40EDJE_PART_INVALID(Efl_Ui_Drag_Dir, 0, efl_ui_drag_dir_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_dir_get)
41EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_step_set, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_step_set, double dx, double dy)
42EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_step_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_step_get, double *dx, double *dy)
43EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_step_move, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_step_move, double dx, double dy)
44EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_page_set, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_page_set, double dx, double dy)
45EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_page_get, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_page_get, double *dx, double *dy)
46EDJE_PART_INVALID(Eina_Bool, 0, efl_ui_drag_page_move, _efl_canvas_layout_part_invalid_efl_ui_drag_drag_page_move, double dx, double dy)
47EDJE_PART_INVALID(Eina_Bool, 0, efl_content_set, _efl_canvas_layout_part_invalid_efl_content_content_set, Efl_Gfx *content)
48EDJE_PART_INVALID(Eo *, 0, efl_content_get, _efl_canvas_layout_part_invalid_efl_content_content_get)
49EDJE_PART_INVALID(Eo *, 0, efl_content_unset, _efl_canvas_layout_part_invalid_efl_content_content_unset)
50EDJE_PART_INVALID_VOID(efl_text_set, _efl_canvas_layout_part_invalid_efl_text_text_set, const char *text)
51EDJE_PART_INVALID(const char *, 0, efl_text_get, _efl_canvas_layout_part_invalid_efl_text_text_get)
52EDJE_PART_INVALID_VOID(efl_text_markup_set, _efl_canvas_layout_part_invalid_efl_text_markup_markup_set, const char *text)
53EDJE_PART_INVALID(const char *, 0, efl_text_markup_get, _efl_canvas_layout_part_invalid_efl_text_markup_markup_get)
54EDJE_PART_INVALID(Efl_Text_Cursor_Cursor *, 0, efl_text_cursor_get, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_get, Efl_Text_Cursor_Cursor_Get_Type get_type)
55EDJE_PART_INVALID_VOID(efl_text_cursor_paragraph_first, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_paragraph_first, Efl_Text_Cursor_Cursor *cur)
56EDJE_PART_INVALID_VOID(efl_text_cursor_paragraph_last, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_paragraph_last, Efl_Text_Cursor_Cursor *cur)
57EDJE_PART_INVALID_VOID(efl_text_cursor_position_set, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_position_set, Efl_Text_Cursor_Cursor *cur, int position)
58EDJE_PART_INVALID(int, 0, efl_text_cursor_position_get, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_position_get, Efl_Text_Cursor_Cursor *cur)
59EDJE_PART_INVALID_VOID(efl_text_cursor_coord_set, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_coord_set, Efl_Text_Cursor_Cursor *cur, int x, int y)
60EDJE_PART_INVALID_VOID(efl_text_cursor_line_char_first, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_line_char_first, Efl_Text_Cursor_Cursor *cur)
61EDJE_PART_INVALID_VOID(efl_text_cursor_line_char_last, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_line_char_last, Efl_Text_Cursor_Cursor *cur)
62EDJE_PART_INVALID_VOID(efl_text_cursor_char_next, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_char_next, Efl_Text_Cursor_Cursor *cur)
63EDJE_PART_INVALID_VOID(efl_text_cursor_char_prev, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_char_prev, Efl_Text_Cursor_Cursor *cur)
64EDJE_PART_INVALID_VOID(efl_text_cursor_line_jump_by, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_line_jump_by, Efl_Text_Cursor_Cursor *cur, int by)
65EDJE_PART_INVALID_VOID(efl_text_cursor_copy, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_copy, Efl_Text_Cursor_Cursor *dst, const Efl_Text_Cursor_Cursor *src)
66EDJE_PART_INVALID(Eina_Unicode, 0, efl_text_cursor_content_get, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_content_get, const Efl_Text_Cursor_Cursor *cur)
67EDJE_PART_INVALID(Eina_Bool, 0, efl_text_cursor_geometry_get, _efl_canvas_layout_part_invalid_efl_text_cursor_cursor_geometry_get, const Efl_Text_Cursor_Cursor *cur, Efl_Text_Cursor_Cursor_Type ctype, int *cx, int *cy, int *cw, int *ch, int *cx2, int *cy2, int *cw2, int *ch2)
68EDJE_PART_INVALID_VOID(efl_text_markup_cursor_markup_insert, _efl_canvas_layout_part_invalid_efl_text_markup_cursor_markup_insert, Efl_Text_Cursor_Cursor *cur, const char *markup)
69EDJE_PART_INVALID(Eina_Iterator *, 0, efl_content_iterate, _efl_canvas_layout_part_invalid_efl_container_content_iterate)
70EDJE_PART_INVALID(int, 0, efl_content_count, _efl_canvas_layout_part_invalid_efl_container_content_count)
71EDJE_PART_INVALID(Eina_Bool, 0, efl_content_remove, _efl_canvas_layout_part_invalid_efl_container_content_remove, Efl_Gfx *content)
72EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_clear, _efl_canvas_layout_part_invalid_efl_pack_pack_clear)
73EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_unpack_all, _efl_canvas_layout_part_invalid_efl_pack_unpack_all)
74EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_unpack, _efl_canvas_layout_part_invalid_efl_pack_unpack, Efl_Gfx *subobj)
75EDJE_PART_INVALID(Eina_Bool, 0, efl_pack, _efl_canvas_layout_part_invalid_efl_pack_pack, Efl_Gfx *subobj)
76EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_begin, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_begin, Efl_Gfx *subobj)
77EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_end, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_end, Efl_Gfx *subobj)
78EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_before, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_before, Efl_Gfx *subobj, const Efl_Gfx *existing)
79EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_after, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_after, Efl_Gfx *subobj, const Efl_Gfx *existing)
80EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_at, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_at, Efl_Gfx *subobj, int index)
81EDJE_PART_INVALID(Efl_Gfx *, 0, efl_pack_content_get, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_content_get, int index)
82EDJE_PART_INVALID(Efl_Gfx *, 0, efl_pack_unpack_at, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_unpack_at, int index)
83EDJE_PART_INVALID(int, 0, efl_pack_index_get, _efl_canvas_layout_part_invalid_efl_pack_linear_pack_index_get, const Efl_Gfx *subobj)
84EDJE_PART_INVALID(Efl_Ui_Dir, 0, efl_ui_direction_get, _efl_canvas_layout_part_invalid_efl_ui_direction_direction_get)
85EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_table, _efl_canvas_layout_part_invalid_efl_pack_table_pack_table, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
86EDJE_PART_INVALID(Efl_Gfx *, 0, efl_pack_table_content_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_content_get, int col, int row)
87EDJE_PART_INVALID(Eina_Iterator *, 0, efl_pack_table_contents_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_contents_get, int col, int row, Eina_Bool below)
88EDJE_PART_INVALID(Eina_Bool, 0, efl_pack_table_position_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_position_get, Efl_Gfx *subobj, int *col, int *row, int *colspan, int *rowspan)
89EDJE_PART_INVALID_VOID(efl_pack_table_size_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_size_get, int *cols, int *rows)
90EDJE_PART_INVALID(int, 0, efl_pack_table_columns_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_columns_get)
91EDJE_PART_INVALID(int, 0, efl_pack_table_rows_get, _efl_canvas_layout_part_invalid_efl_pack_table_table_rows_get)
92
93#pragma GCC diagnostic pop
94
95#include "efl_canvas_layout_part_invalid.eo.c"
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 79737c12a7..3906314213 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -3134,10 +3134,11 @@ Eina_Bool _edje_object_part_drag_step(Edje *ed, const char *part, double dx, dou
3134Eina_Bool _edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy); 3134Eina_Bool _edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy);
3135 3135
3136/* part proxy */ 3136/* part proxy */
3137Eo *_edje_other_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3137Eo *_edje_other_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3138Eo *_edje_invalid_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3138 3139
3139/* part containers: box */ 3140/* part containers: box */
3140Eo *_edje_box_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3141Eo *_edje_box_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3141Eina_Bool _edje_part_box_append(Edje *ed, const char *part, Evas_Object *child); 3142Eina_Bool _edje_part_box_append(Edje *ed, const char *part, Evas_Object *child);
3142Eina_Bool _edje_part_box_prepend(Edje *ed, const char *part, Evas_Object *child); 3143Eina_Bool _edje_part_box_prepend(Edje *ed, const char *part, Evas_Object *child);
3143Eina_Bool _edje_part_box_insert_before(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference); 3144Eina_Bool _edje_part_box_insert_before(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference);
@@ -3149,7 +3150,7 @@ Evas_Object *_edje_part_box_remove_at(Edje *ed, const char *part, unsigned int p
3149Eina_Bool _edje_part_box_remove_all(Edje *ed, const char *part, Eina_Bool clear); 3150Eina_Bool _edje_part_box_remove_all(Edje *ed, const char *part, Eina_Bool clear);
3150 3151
3151/* part containers: table */ 3152/* part containers: table */
3152Eo *_edje_table_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3153Eo *_edje_table_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3153Evas_Object *_edje_part_table_child_get(Edje *ed, const char *part, unsigned int col, unsigned int row); 3154Evas_Object *_edje_part_table_child_get(Edje *ed, const char *part, unsigned int col, unsigned int row);
3154Eina_Bool _edje_part_table_pack(Edje *ed, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan); 3155Eina_Bool _edje_part_table_pack(Edje *ed, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
3155Eina_Bool _edje_part_table_unpack(Edje *ed, const char *part, Evas_Object *child_obj); 3156Eina_Bool _edje_part_table_unpack(Edje *ed, const char *part, Evas_Object *child_obj);
@@ -3157,12 +3158,12 @@ Eina_Bool _edje_part_table_col_row_size_get(Edje *ed, const char *part, int *col
3157Eina_Bool _edje_part_table_clear(Edje *ed, const char *part, Eina_Bool clear); 3158Eina_Bool _edje_part_table_clear(Edje *ed, const char *part, Eina_Bool clear);
3158 3159
3159/* part containers: swallow */ 3160/* part containers: swallow */
3160Eo *_edje_swallow_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3161Eo *_edje_swallow_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3161Efl_Gfx *_edje_efl_content_content_get(Edje *ed, const char *part); 3162Efl_Gfx *_edje_efl_content_content_get(Edje *ed, const char *part);
3162Eina_Bool _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx *obj_swallow); 3163Eina_Bool _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx *obj_swallow);
3163 3164
3164/* part containers: external */ 3165/* part containers: external */
3165Eo *_edje_external_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3166Eo *_edje_external_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3166Eina_Bool _edje_object_part_external_param_set(Edje *ed, const char *part, const Edje_External_Param *param); 3167Eina_Bool _edje_object_part_external_param_set(Edje *ed, const char *part, const Edje_External_Param *param);
3167Eina_Bool _edje_object_part_external_param_get(Edje *ed, const char *part, Edje_External_Param *param); 3168Eina_Bool _edje_object_part_external_param_get(Edje *ed, const char *part, Edje_External_Param *param);
3168Edje_External_Param_Type _edje_object_part_external_param_type_get(Edje *ed, const char *part, const char *param); 3169Edje_External_Param_Type _edje_object_part_external_param_type_get(Edje *ed, const char *part, const char *param);
@@ -3170,7 +3171,7 @@ Evas_Object *_edje_object_part_external_object_get(Edje *ed, const char *part);
3170Evas_Object *_edje_object_part_external_content_get(Edje *ed, const char *part, const char *content); 3171Evas_Object *_edje_object_part_external_content_get(Edje *ed, const char *part, const char *content);
3171 3172
3172/* part text */ 3173/* part text */
3173Eo *_edje_text_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3174Eo *_edje_text_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3174Eina_Bool _edje_efl_text_set(Eo *obj, Edje *ed, const char *part, const char *text, Eina_Bool legacy, Eina_Bool set_markup); 3175Eina_Bool _edje_efl_text_set(Eo *obj, Edje *ed, const char *part, const char *text, Eina_Bool legacy, Eina_Bool set_markup);
3175const char *_edje_efl_text_get(Eo *obj, Edje *ed, const char *part, Eina_Bool legacy, Eina_Bool get_markup); 3176const char *_edje_efl_text_get(Eo *obj, Edje *ed, const char *part, Eina_Bool legacy, Eina_Bool get_markup);
3176Eina_Bool _edje_efl_text_markup_set(Eo *obj, Edje *ed, const char *part, const char *markup); 3177Eina_Bool _edje_efl_text_markup_set(Eo *obj, Edje *ed, const char *part, const char *markup);
@@ -3270,12 +3271,9 @@ extern Edje_Ephysics *_edje_ephysics;
3270 3271
3271#endif 3272#endif
3272 3273
3273
3274
3275#ifdef HAVE_LIBREMIX 3274#ifdef HAVE_LIBREMIX
3276#include <remix/remix.h> 3275#include <remix/remix.h>
3277#endif 3276#endif
3278#include <Eina.h>
3279 3277
3280typedef struct _Edje_Multisense_Env Edje_Multisense_Env; 3278typedef struct _Edje_Multisense_Env Edje_Multisense_Env;
3281 3279
@@ -3291,6 +3289,8 @@ typedef Eina_Bool (*MULTISENSE_FACTORY_INIT_FUNC) (Edje_Multisense_Env *);
3291typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *); 3289typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *);
3292#endif 3290#endif
3293 3291
3292#include "efl_canvas_layout_part_invalid.eo.h"
3293
3294#undef EAPI 3294#undef EAPI
3295#define EAPI 3295#define EAPI
3296 3296
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index cfbccd6c26..313258deee 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -3297,26 +3297,28 @@ _efl_canvas_layout_efl_part_part(Eo *obj, Edje *ed, const char *part)
3297 if ((!ed) || (!part)) return NULL; 3297 if ((!ed) || (!part)) return NULL;
3298 3298
3299 rp = _edje_real_part_recursive_get(&ed, part); 3299 rp = _edje_real_part_recursive_get(&ed, part);
3300 if (EINA_UNLIKELY(!rp)) 3300 if (!rp)
3301 { 3301 {
3302 WRN("No such part '%s' in group '%s'.", part, ed->group); 3302 // Note: This could be disabled if debug is not required.
3303 return NULL; 3303 static const Edje_Real_Part _invalid_part = {};
3304 rp = (Edje_Real_Part *) &_invalid_part;
3305 return _edje_invalid_internal_proxy_get(obj, ed, rp, part);
3304 } 3306 }
3305 3307
3306 if (rp->part->type == EDJE_PART_TYPE_BOX) 3308 if (rp->part->type == EDJE_PART_TYPE_BOX)
3307 return _edje_box_internal_proxy_get(obj, ed, rp); 3309 return _edje_box_internal_proxy_get(obj, ed, rp, rp->part->name);
3308 else if (rp->part->type == EDJE_PART_TYPE_TABLE) 3310 else if (rp->part->type == EDJE_PART_TYPE_TABLE)
3309 return _edje_table_internal_proxy_get(obj, ed, rp); 3311 return _edje_table_internal_proxy_get(obj, ed, rp, rp->part->name);
3310 else if (rp->part->type == EDJE_PART_TYPE_SWALLOW) 3312 else if (rp->part->type == EDJE_PART_TYPE_SWALLOW)
3311 return _edje_swallow_internal_proxy_get(obj, ed, rp); 3313 return _edje_swallow_internal_proxy_get(obj, ed, rp, rp->part->name);
3312 else if (rp->part->type == EDJE_PART_TYPE_EXTERNAL) 3314 else if (rp->part->type == EDJE_PART_TYPE_EXTERNAL)
3313 return _edje_external_internal_proxy_get(obj, ed, rp); 3315 return _edje_external_internal_proxy_get(obj, ed, rp, rp->part->name);
3314 else if (rp->part->type == EDJE_PART_TYPE_TEXT) 3316 else if (rp->part->type == EDJE_PART_TYPE_TEXT)
3315 return _edje_text_internal_proxy_get(obj, ed, rp); 3317 return _edje_text_internal_proxy_get(obj, ed, rp, rp->part->name);
3316 else if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) 3318 else if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
3317 return _edje_text_internal_proxy_get(obj, ed, rp); 3319 return _edje_text_internal_proxy_get(obj, ed, rp, rp->part->name);
3318 else 3320 else
3319 return _edje_other_internal_proxy_get(obj, ed, rp); 3321 return _edje_other_internal_proxy_get(obj, ed, rp, rp->part->name);
3320} 3322}
3321 3323
3322EOLIAN Eina_Size2D 3324EOLIAN Eina_Size2D
diff --git a/src/lib/edje/efl_canvas_layout_part_invalid.eo b/src/lib/edje/efl_canvas_layout_part_invalid.eo
new file mode 100644
index 0000000000..3288ed09b8
--- /dev/null
+++ b/src/lib/edje/efl_canvas_layout_part_invalid.eo
@@ -0,0 +1,76 @@
1import edje_types;
2
3class Efl.Canvas.Layout.Part_Invalid (Efl.Canvas.Layout.Part, Efl.Content,
4 Efl.Pack.Linear, Efl.Ui.Direction,
5 Efl.Pack.Table, Efl.Text,
6 Efl.Text.Markup, Efl.Text.Cursor)
7{
8 [[Common class for part proxy objects for @Efl.Canvas.Layout.
9
10 As an @Efl.Part implementation class, all objects of this class are meant
11 to be used for one and only one function call. In pseudo-code, the use
12 of object of this type looks like the following:
13 rect = layout.part("somepart").geometry_get();
14
15 @since 1.20
16 ]]
17 data: null;
18 implements {
19 // Efl.Canvas.Layout.Part
20 Efl.Canvas.Layout.Part.state { get; }
21 Efl.Canvas.Layout.Part.part_type { get; }
22 Efl.Gfx.geometry { get; }
23 Efl.Ui.Drag.drag_value { set; get; }
24 Efl.Ui.Drag.drag_size { set; get; }
25 Efl.Ui.Drag.drag_dir { get; }
26 Efl.Ui.Drag.drag_step { set; get; }
27 Efl.Ui.Drag.drag_step_move;
28 Efl.Ui.Drag.drag_page { set; get; }
29 Efl.Ui.Drag.drag_page_move;
30 // Efl.Canvas.Layout.Part_Swallow & External
31 Efl.Content.content { get; set; }
32 Efl.Content.content_unset;
33 // Efl.Canvas.Layout.Part_Text
34 Efl.Text.text { set; get; }
35 Efl.Text.Markup.markup { get; set; }
36 Efl.Text.Cursor.cursor { get; }
37 Efl.Text.Cursor.cursor_paragraph_first;
38 Efl.Text.Cursor.cursor_paragraph_last;
39 Efl.Text.Cursor.cursor_position { set; get; }
40 Efl.Text.Cursor.cursor_coord_set;
41 Efl.Text.Cursor.cursor_line_char_first;
42 Efl.Text.Cursor.cursor_line_char_last;
43 Efl.Text.Cursor.cursor_char_next;
44 Efl.Text.Cursor.cursor_char_prev;
45 Efl.Text.Cursor.cursor_line_jump_by;
46 Efl.Text.Cursor.cursor_copy;
47 Efl.Text.Cursor.cursor_content { get; }
48 Efl.Text.Cursor.cursor_geometry { get; }
49 Efl.Text.Markup.cursor_markup_insert;
50 // Efl.Canvas.Layout.Part_Box
51 Efl.Container.content_iterate;
52 Efl.Container.content_count;
53 Efl.Container.content_remove;
54 Efl.Pack.pack_clear;
55 Efl.Pack.unpack_all;
56 Efl.Pack.unpack;
57 Efl.Pack.pack;
58 Efl.Pack.Linear.pack_begin;
59 Efl.Pack.Linear.pack_end;
60 Efl.Pack.Linear.pack_before;
61 Efl.Pack.Linear.pack_after;
62 Efl.Pack.Linear.pack_at;
63 Efl.Pack.Linear.pack_content_get;
64 Efl.Pack.Linear.pack_unpack_at;
65 Efl.Pack.Linear.pack_index_get;
66 Efl.Ui.Direction.direction { get; [[Returns $default if unknown.]] }
67 // Efl.Canvas.Layout.Part_Table
68 Efl.Pack.Table.pack_table;
69 Efl.Pack.Table.table_content_get;
70 Efl.Pack.Table.table_contents_get;
71 Efl.Pack.Table.table_position { get; }
72 Efl.Pack.Table.table_size { get; }
73 Efl.Pack.Table.table_columns { get; }
74 Efl.Pack.Table.table_rows { get; }
75 }
76}
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 06849d167c..8762892a2e 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2462,9 +2462,8 @@ _efl_ui_layout_efl_part_part(const Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED,
2462 2462
2463 if (!efl_layout_group_part_exist_get(wd->resize_obj, part)) 2463 if (!efl_layout_group_part_exist_get(wd->resize_obj, part))
2464 { 2464 {
2465 WRN("No such part '%s' in group '%s'", 2465 // edje part will handle the error message
2466 part, elm_widget_theme_element_get(obj)); 2466 return efl_part(wd->resize_obj, part);
2467 return NULL;
2468 } 2467 }
2469 2468
2470 type = efl_canvas_layout_part_type_get(efl_part(wd->resize_obj, part)); 2469 type = efl_canvas_layout_part_type_get(efl_part(wd->resize_obj, part));