summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:16:07 -0800
commit0c45b94decc4441b9fbea85db8f33b7dc91b7c81 (patch)
tree60fe43675156065aa0da1cc8a782ea34c422226c /src
parent192bbfa5024bcbc054a62aedd1d54ba11a0e6c84 (diff)
elm_popup*: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8193
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am9
-rw-r--r--src/bin/elementary/test_entry.c2
-rw-r--r--src/lib/elementary/elc_popup.c4
-rw-r--r--src/lib/elementary/elc_popup_legacy.h2
-rw-r--r--src/lib/elementary/elm_popup.eo190
-rw-r--r--src/lib/elementary/elm_popup_eo.c243
-rw-r--r--src/lib/elementary/elm_popup_eo.h288
-rw-r--r--src/lib/elementary/elm_popup_eo.legacy.c84
-rw-r--r--src/lib/elementary/elm_popup_eo.legacy.h239
-rw-r--r--src/lib/elementary/elm_popup_item.eo15
-rw-r--r--src/lib/elementary/elm_popup_item_eo.c67
-rw-r--r--src/lib/elementary/elm_popup_item_eo.h24
-rw-r--r--src/lib/elementary/elm_popup_item_eo.legacy.h17
-rw-r--r--src/lib/elementary/elm_widget_popup.h4
-rw-r--r--src/lib/elementary/meson.build6
15 files changed, 979 insertions, 215 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 9087ef1..b39f7d6 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -183,7 +183,6 @@ elm_private_eolian_files = \
183# Legacy classes - not part of public EO API 183# Legacy classes - not part of public EO API
184elm_legacy_eolian_files = \ 184elm_legacy_eolian_files = \
185 lib/elementary/efl_ui_clock_legacy.eo \ 185 lib/elementary/efl_ui_clock_legacy.eo \
186 lib/elementary/elm_popup.eo \
187 lib/elementary/elm_route.eo \ 186 lib/elementary/elm_route.eo \
188 lib/elementary/elm_scroller.eo \ 187 lib/elementary/elm_scroller.eo \
189 lib/elementary/elm_sys_notify_interface.eo \ 188 lib/elementary/elm_sys_notify_interface.eo \
@@ -191,7 +190,6 @@ elm_legacy_eolian_files = \
191 lib/elementary/elm_sys_notify_dbus.eo \ 190 lib/elementary/elm_sys_notify_dbus.eo \
192 lib/elementary/elm_systray.eo \ 191 lib/elementary/elm_systray.eo \
193 lib/elementary/elm_widget_item_static_focus.eo \ 192 lib/elementary/elm_widget_item_static_focus.eo \
194 lib/elementary/elm_popup_item.eo \
195 lib/elementary/elm_ctxpopup_part.eo \ 193 lib/elementary/elm_ctxpopup_part.eo \
196 lib/elementary/elm_dayselector_part.eo \ 194 lib/elementary/elm_dayselector_part.eo \
197 lib/elementary/elm_entry_part.eo \ 195 lib/elementary/elm_entry_part.eo \
@@ -378,6 +376,9 @@ lib/elementary/elm_photo_eo.c \
378lib/elementary/elm_player_eo.c \ 376lib/elementary/elm_player_eo.c \
379lib/elementary/elm_plug_eo.c \ 377lib/elementary/elm_plug_eo.c \
380lib/elementary/elm_plug_eo.legacy.c \ 378lib/elementary/elm_plug_eo.legacy.c \
379lib/elementary/elm_popup_eo.c \
380lib/elementary/elm_popup_eo.legacy.c \
381lib/elementary/elm_popup_item_eo.c \
381$(NULL) 382$(NULL)
382 383
383elm_legacy_eo_headers = \ 384elm_legacy_eo_headers = \
@@ -543,6 +544,10 @@ lib/elementary/elm_player_eo.h \
543lib/elementary/elm_player_eo.legacy.h \ 544lib/elementary/elm_player_eo.legacy.h \
544lib/elementary/elm_plug_eo.h \ 545lib/elementary/elm_plug_eo.h \
545lib/elementary/elm_plug_eo.legacy.h \ 546lib/elementary/elm_plug_eo.legacy.h \
547lib/elementary/elm_popup_eo.h \
548lib/elementary/elm_popup_eo.legacy.h \
549lib/elementary/elm_popup_item_eo.h \
550lib/elementary/elm_popup_item_eo.legacy.h \
546$(NULL) 551$(NULL)
547 552
548 553
diff --git a/src/bin/elementary/test_entry.c b/src/bin/elementary/test_entry.c
index dde8927..56264cc 100644
--- a/src/bin/elementary/test_entry.c
+++ b/src/bin/elementary/test_entry.c
@@ -6,7 +6,7 @@
6 6
7// FIXME: elm_entry is not part of EO API, the below test cases may be useless 7// FIXME: elm_entry is not part of EO API, the below test cases may be useless
8#include "elm_entry_eo.h" 8#include "elm_entry_eo.h"
9#include "elm_popup.eo.h" 9#include "elm_popup_eo.h"
10 10
11static void 11static void
12my_entry_bt_1(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 12my_entry_bt_1(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 5c575b3..7c011b7 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -1867,5 +1867,5 @@ ELM_PART_OVERRIDE_TEXT_GET(elm_popup, ELM_POPUP, Elm_Popup_Data)
1867 ELM_LAYOUT_SIZING_EVAL_OPS(elm_popup), \ 1867 ELM_LAYOUT_SIZING_EVAL_OPS(elm_popup), \
1868 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_popup) 1868 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_popup)
1869 1869
1870#include "elm_popup.eo.c" 1870#include "elm_popup_eo.c"
1871#include "elm_popup_item.eo.c" 1871#include "elm_popup_item_eo.c"
diff --git a/src/lib/elementary/elc_popup_legacy.h b/src/lib/elementary/elc_popup_legacy.h
index 027edbd..3312928 100644
--- a/src/lib/elementary/elc_popup_legacy.h
+++ b/src/lib/elementary/elc_popup_legacy.h
@@ -8,4 +8,4 @@
8 */ 8 */
9EAPI Evas_Object *elm_popup_add(Evas_Object *parent) EINA_ARG_NONNULL(1); 9EAPI Evas_Object *elm_popup_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
10 10
11#include "elm_popup.eo.legacy.h" \ No newline at end of file 11#include "elm_popup_eo.legacy.h" \ No newline at end of file
diff --git a/src/lib/elementary/elm_popup.eo b/src/lib/elementary/elm_popup.eo
deleted file mode 100644
index ee95a8f..0000000
--- a/src/lib/elementary/elm_popup.eo
+++ /dev/null
@@ -1,190 +0,0 @@
1import elm_general;
2
3enum Elm.Popup.Orient
4{
5 [[Possible orient values for popup.
6
7 These values should be used in conjunction to elm_popup_orient_set() to
8 set the position in which the popup should appear(relative to its parent)
9 and in conjunction with elm_popup_orient_get() to know where the popup
10 is appearing.
11 ]]
12
13 top = 0, [[Popup should appear in the top of parent, default.]]
14 center, [[Popup should appear in the center of parent.]]
15 bottom, [[Popup should appear in the bottom of parent.]]
16 left, [[Popup should appear in the left of parent.]]
17 right, [[Popup should appear in the right of parent.]]
18 top_left, [[Popup should appear in the top left of parent.]]
19 top_right, [[Popup should appear in the top right of parent.]]
20 bottom_left, [[Popup should appear in the bottom left of parent.]]
21 bottom_right, [[Notify should appear in the bottom right of parent.]]
22 last [[Sentinel value to indicate last enum field during iteration]]
23}
24
25
26class Elm.Popup extends Efl.Ui.Layout_Base implements Efl.Access.Widget.Action, Efl.Ui.Legacy
27{
28 [[Elementary popup class]]
29 legacy_prefix: elm_popup;
30 eo_prefix: elm_obj_popup;
31 event_prefix: elm_popup;
32 methods {
33 @property align {
34 set {
35 [[Set the alignment of the popup object.
36
37 Sets the alignment in which the popup will appear in its parent.
38
39 @since 1.9
40 ]]
41 }
42 get {
43 [[Get the alignment of the popup object.
44
45 @since 1.9
46 ]]
47 }
48 values {
49 horizontal: double; [[The horizontal alignment of the popup.]]
50 vertical: double; [[The vertical alignment of the popup.]]
51 }
52 }
53 @property allow_events {
54 set {
55 [[Sets whether events should be passed to by a click outside.
56
57 Enabling allow event will remove the Blocked event area and
58 events will pass to the lower layer objects otherwise they
59 are blocked.
60
61 Note: The default value is $false.
62 ]]
63 }
64 get {
65 [[Returns value indicating whether allow event is enabled or not.]]
66 }
67 values {
68 allow: bool; [[If $true, events are passed to lower objects.]]
69 }
70 }
71 @property content_text_wrap_type {
72 [[Control the wrapping type of content text packed in content
73 area of popup object.
74 ]]
75 set {}
76 get {}
77 values {
78 wrap: Elm.Wrap.Type; [[Wrapping type of type Elm_Wrap_Type.]]
79 }
80 }
81 @property orient {
82 set {
83 [[Sets the orientation of the popup in the parent region.
84
85 Sets the position in which popup will appear in its parent.
86 By default, #ELM_POPUP_ORIENT_CENTER is set.
87 ]]
88 }
89 get {
90 [[Returns the orientation of the popup.]]
91 }
92 values {
93 orient: Elm.Popup.Orient; [[The orientation of the popup.]]
94 }
95 }
96 @property timeout {
97 set {
98 [[Sets a timeout to hide popup automatically
99
100 This function sets a timeout and starts the timer controlling
101 when the popup is hidden. Since calling \@ref evas_object_show
102 on a popup restarts the timer controlling when it is hidden,
103 setting this before the popup is shown will in effect mean
104 starting the timer when the popup is shown. Smart signal
105 "timeout" is called afterwards which can be handled
106 if needed.
107
108 Note: Set a value <= 0.0 to disable a running timer.
109
110 Note: If the value > 0.0 and the popup is previously visible,
111 the timer will be started with this value, canceling any
112 running timer.
113 ]]
114 }
115 get {
116 [[Returns the timeout value set to the popup (in seconds).]]
117 }
118 values {
119 timeout: double; [[The timeout in seconds.]]
120 }
121 }
122 @property scrollable {
123 set {
124 [[Enable or disable scroller in popup content area
125
126 Normally content area does not contain scroller.
127
128 @since 1.15.1
129 ]]
130 }
131 get {
132 [[Get the scrollable state of popup content area
133
134 Normally content area does not contain scroller.
135
136 @since 1.15.1
137 ]]
138 }
139 values {
140 scroll: bool; [[$true if it is to be scrollable, $false otherwise.]]
141 }
142 }
143 item_append {
144 [[Add a new item to a Popup object
145
146 Both an item list and a content could not be set at the same time!
147 once you add an item, the previous content will be removed.
148
149 Warning: When the first item is appended to popup object, any
150 previous content of the content area is deleted. At a time,
151 only one of content, content-text and item(s) can be there
152 in a popup content area.
153 ]]
154 return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
155 params {
156 @in label: string; [[The Label of the new item.]]
157 @in icon: Efl.Canvas.Object @optional; [[Icon to be set on new item.]]
158 @in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected.]]
159 @in data: const(void_ptr) @optional; [[Data passed to $func above.]]
160 }
161 }
162 dismiss {
163 [[Dismiss a Popup object.
164 @since 1.17
165 ]]
166 }
167 }
168 implements {
169 class.constructor;
170 Efl.Object.constructor;
171 Efl.Ui.Widget.theme_apply;
172 Efl.Ui.Widget.on_access_update;
173 Efl.Ui.Widget.widget_parent { set; }
174 Efl.Ui.L10n.translation_update;
175 Efl.Ui.Widget.widget_sub_object_del;
176 Efl.Ui.Widget.widget_input_event_handler;
177 Efl.Layout.Signal.signal_emit;
178 Efl.Access.Widget.Action.elm_actions { get; }
179 Efl.Access.Object.state_set { get; }
180 Efl.Access.Object.i18n_name { get; }
181 Efl.Part.part_get;
182 }
183 events {
184 block,clicked: void; [[Called when popup was clicked]]
185 timeout: void; [[Called when popup timed out]]
186 item,focused: Efl.Object; [[Called when popup got focus]]
187 item,unfocused: Efl.Object; [[Called when popup lost focus]]
188 dismissed: void; [[Called when popup was dismissed]]
189 }
190}
diff --git a/src/lib/elementary/elm_popup_eo.c b/src/lib/elementary/elm_popup_eo.c
new file mode 100644
index 0000000..6f2b478
--- /dev/null
+++ b/src/lib/elementary/elm_popup_eo.c
@@ -0,0 +1,243 @@
1EWAPI const Efl_Event_Description _ELM_POPUP_EVENT_BLOCK_CLICKED =
2 EFL_EVENT_DESCRIPTION("block,clicked");
3EWAPI const Efl_Event_Description _ELM_POPUP_EVENT_TIMEOUT =
4 EFL_EVENT_DESCRIPTION("timeout");
5EWAPI const Efl_Event_Description _ELM_POPUP_EVENT_ITEM_FOCUSED =
6 EFL_EVENT_DESCRIPTION("item,focused");
7EWAPI const Efl_Event_Description _ELM_POPUP_EVENT_ITEM_UNFOCUSED =
8 EFL_EVENT_DESCRIPTION("item,unfocused");
9EWAPI const Efl_Event_Description _ELM_POPUP_EVENT_DISMISSED =
10 EFL_EVENT_DESCRIPTION("dismissed");
11
12void _elm_popup_align_set(Eo *obj, Elm_Popup_Data *pd, double horizontal, double vertical);
13
14EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical);
15
16void _elm_popup_align_get(const Eo *obj, Elm_Popup_Data *pd, double *horizontal, double *vertical);
17
18EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_popup_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical);
19
20void _elm_popup_allow_events_set(Eo *obj, Elm_Popup_Data *pd, Eina_Bool allow);
21
22
23static Eina_Error
24__eolian_elm_popup_allow_events_set_reflect(Eo *obj, Eina_Value val)
25{
26 Eina_Error r = 0; Eina_Bool cval;
27 if (!eina_value_bool_convert(&val, &cval))
28 {
29 r = EINA_ERROR_VALUE_FAILED;
30 goto end;
31 }
32 elm_obj_popup_allow_events_set(obj, cval);
33 end:
34 eina_value_flush(&val);
35 return r;
36}
37
38EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_allow_events_set, EFL_FUNC_CALL(allow), Eina_Bool allow);
39
40Eina_Bool _elm_popup_allow_events_get(const Eo *obj, Elm_Popup_Data *pd);
41
42
43static Eina_Value
44__eolian_elm_popup_allow_events_get_reflect(Eo *obj)
45{
46 Eina_Bool val = elm_obj_popup_allow_events_get(obj);
47 return eina_value_bool_init(val);
48}
49
50EOAPI EFL_FUNC_BODY_CONST(elm_obj_popup_allow_events_get, Eina_Bool, 0);
51
52void _elm_popup_content_text_wrap_type_set(Eo *obj, Elm_Popup_Data *pd, Elm_Wrap_Type wrap);
53
54EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_content_text_wrap_type_set, EFL_FUNC_CALL(wrap), Elm_Wrap_Type wrap);
55
56Elm_Wrap_Type _elm_popup_content_text_wrap_type_get(const Eo *obj, Elm_Popup_Data *pd);
57
58EOAPI EFL_FUNC_BODY_CONST(elm_obj_popup_content_text_wrap_type_get, Elm_Wrap_Type, 0);
59
60void _elm_popup_orient_set(Eo *obj, Elm_Popup_Data *pd, Elm_Popup_Orient orient);
61
62EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_orient_set, EFL_FUNC_CALL(orient), Elm_Popup_Orient orient);
63
64Elm_Popup_Orient _elm_popup_orient_get(const Eo *obj, Elm_Popup_Data *pd);
65
66EOAPI EFL_FUNC_BODY_CONST(elm_obj_popup_orient_get, Elm_Popup_Orient, 0);
67
68void _elm_popup_timeout_set(Eo *obj, Elm_Popup_Data *pd, double timeout);
69
70
71static Eina_Error
72__eolian_elm_popup_timeout_set_reflect(Eo *obj, Eina_Value val)
73{
74 Eina_Error r = 0; double cval;
75 if (!eina_value_double_convert(&val, &cval))
76 {
77 r = EINA_ERROR_VALUE_FAILED;
78 goto end;
79 }
80 elm_obj_popup_timeout_set(obj, cval);
81 end:
82 eina_value_flush(&val);
83 return r;
84}
85
86EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_timeout_set, EFL_FUNC_CALL(timeout), double timeout);
87
88double _elm_popup_timeout_get(const Eo *obj, Elm_Popup_Data *pd);
89
90
91static Eina_Value
92__eolian_elm_popup_timeout_get_reflect(Eo *obj)
93{
94 double val = elm_obj_popup_timeout_get(obj);
95 return eina_value_double_init(val);
96}
97
98EOAPI EFL_FUNC_BODY_CONST(elm_obj_popup_timeout_get, double, 0);
99
100void _elm_popup_scrollable_set(Eo *obj, Elm_Popup_Data *pd, Eina_Bool scroll);
101
102
103static Eina_Error
104__eolian_elm_popup_scrollable_set_reflect(Eo *obj, Eina_Value val)
105{
106 Eina_Error r = 0; Eina_Bool cval;
107 if (!eina_value_bool_convert(&val, &cval))
108 {
109 r = EINA_ERROR_VALUE_FAILED;
110 goto end;
111 }
112 elm_obj_popup_scrollable_set(obj, cval);
113 end:
114 eina_value_flush(&val);
115 return r;
116}
117
118EOAPI EFL_VOID_FUNC_BODYV(elm_obj_popup_scrollable_set, EFL_FUNC_CALL(scroll), Eina_Bool scroll);
119
120Eina_Bool _elm_popup_scrollable_get(const Eo *obj, Elm_Popup_Data *pd);
121
122
123static Eina_Value
124__eolian_elm_popup_scrollable_get_reflect(Eo *obj)
125{
126 Eina_Bool val = elm_obj_popup_scrollable_get(obj);
127 return eina_value_bool_init(val);
128}
129
130EOAPI EFL_FUNC_BODY_CONST(elm_obj_popup_scrollable_get, Eina_Bool, 0);
131
132Elm_Widget_Item *_elm_popup_item_append(Eo *obj, Elm_Popup_Data *pd, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
133
134EOAPI EFL_FUNC_BODYV(elm_obj_popup_item_append, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(label, icon, func, data), const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
135
136void _elm_popup_dismiss(Eo *obj, Elm_Popup_Data *pd);
137
138EOAPI EFL_VOID_FUNC_BODY(elm_obj_popup_dismiss);
139
140Efl_Object *_elm_popup_efl_object_constructor(Eo *obj, Elm_Popup_Data *pd);
141
142
143Eina_Error _elm_popup_efl_ui_widget_theme_apply(Eo *obj, Elm_Popup_Data *pd);
144
145
146void _elm_popup_efl_ui_widget_on_access_update(Eo *obj, Elm_Popup_Data *pd, Eina_Bool enable);
147
148
149void _elm_popup_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Popup_Data *pd, Efl_Ui_Widget *parent);
150
151
152void _elm_popup_efl_ui_l10n_translation_update(Eo *obj, Elm_Popup_Data *pd);
153
154
155Eina_Bool _elm_popup_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Popup_Data *pd, Efl_Canvas_Object *sub_obj);
156
157
158Eina_Bool _elm_popup_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Popup_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
159
160
161void _elm_popup_efl_layout_signal_signal_emit(Eo *obj, Elm_Popup_Data *pd, const char *emission, const char *source);
162
163
164const Efl_Access_Action_Data *_elm_popup_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Popup_Data *pd);
165
166
167Efl_Access_State_Set _elm_popup_efl_access_object_state_set_get(const Eo *obj, Elm_Popup_Data *pd);
168
169
170const char *_elm_popup_efl_access_object_i18n_name_get(const Eo *obj, Elm_Popup_Data *pd);
171
172
173Efl_Object *_elm_popup_efl_part_part_get(const Eo *obj, Elm_Popup_Data *pd, const char *name);
174
175
176static Eina_Bool
177_elm_popup_class_initializer(Efl_Class *klass)
178{
179 const Efl_Object_Ops *opsp = NULL;
180
181 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
182
183#ifndef ELM_POPUP_EXTRA_OPS
184#define ELM_POPUP_EXTRA_OPS
185#endif
186
187 EFL_OPS_DEFINE(ops,
188 EFL_OBJECT_OP_FUNC(elm_obj_popup_align_set, _elm_popup_align_set),
189 EFL_OBJECT_OP_FUNC(elm_obj_popup_align_get, _elm_popup_align_get),
190 EFL_OBJECT_OP_FUNC(elm_obj_popup_allow_events_set, _elm_popup_allow_events_set),
191 EFL_OBJECT_OP_FUNC(elm_obj_popup_allow_events_get, _elm_popup_allow_events_get),
192 EFL_OBJECT_OP_FUNC(elm_obj_popup_content_text_wrap_type_set, _elm_popup_content_text_wrap_type_set),
193 EFL_OBJECT_OP_FUNC(elm_obj_popup_content_text_wrap_type_get, _elm_popup_content_text_wrap_type_get),
194 EFL_OBJECT_OP_FUNC(elm_obj_popup_orient_set, _elm_popup_orient_set),
195 EFL_OBJECT_OP_FUNC(elm_obj_popup_orient_get, _elm_popup_orient_get),
196 EFL_OBJECT_OP_FUNC(elm_obj_popup_timeout_set, _elm_popup_timeout_set),
197 EFL_OBJECT_OP_FUNC(elm_obj_popup_timeout_get, _elm_popup_timeout_get),
198 EFL_OBJECT_OP_FUNC(elm_obj_popup_scrollable_set, _elm_popup_scrollable_set),
199 EFL_OBJECT_OP_FUNC(elm_obj_popup_scrollable_get, _elm_popup_scrollable_get),
200 EFL_OBJECT_OP_FUNC(elm_obj_popup_item_append, _elm_popup_item_append),
201 EFL_OBJECT_OP_FUNC(elm_obj_popup_dismiss, _elm_popup_dismiss),
202 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_popup_efl_object_constructor),
203 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_popup_efl_ui_widget_theme_apply),
204 EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_popup_efl_ui_widget_on_access_update),
205 EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_popup_efl_ui_widget_widget_parent_set),
206 EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_popup_efl_ui_l10n_translation_update),
207 EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_popup_efl_ui_widget_widget_sub_object_del),
208 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_popup_efl_ui_widget_widget_input_event_handler),
209 EFL_OBJECT_OP_FUNC(efl_layout_signal_emit, _elm_popup_efl_layout_signal_signal_emit),
210 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_popup_efl_access_widget_action_elm_actions_get),
211 EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_popup_efl_access_object_state_set_get),
212 EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_popup_efl_access_object_i18n_name_get),
213 EFL_OBJECT_OP_FUNC(efl_part_get, _elm_popup_efl_part_part_get),
214 ELM_POPUP_EXTRA_OPS
215 );
216 opsp = &ops;
217
218 static const Efl_Object_Property_Reflection refl_table[] = {
219 {"allow_events", __eolian_elm_popup_allow_events_set_reflect, __eolian_elm_popup_allow_events_get_reflect},
220 {"timeout", __eolian_elm_popup_timeout_set_reflect, __eolian_elm_popup_timeout_get_reflect},
221 {"scrollable", __eolian_elm_popup_scrollable_set_reflect, __eolian_elm_popup_scrollable_get_reflect},
222 };
223 static const Efl_Object_Property_Reflection_Ops rops = {
224 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
225 };
226 ropsp = &rops;
227
228 return efl_class_functions_set(klass, opsp, ropsp);
229}
230
231static const Efl_Class_Description _elm_popup_class_desc = {
232 EO_VERSION,
233 "Elm.Popup",
234 EFL_CLASS_TYPE_REGULAR,
235 sizeof(Elm_Popup_Data),
236 _elm_popup_class_initializer,
237 _elm_popup_class_constructor,
238 NULL
239};
240
241EFL_DEFINE_CLASS(elm_popup_class_get, &_elm_popup_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
242
243#include "elm_popup_eo.legacy.c"
diff --git a/src/lib/elementary/elm_popup_eo.h b/src/lib/elementary/elm_popup_eo.h
new file mode 100644
index 0000000..e040fe6
--- /dev/null
+++ b/src/lib/elementary/elm_popup_eo.h
@@ -0,0 +1,288 @@
1#ifndef _ELM_POPUP_EO_H_
2#define _ELM_POPUP_EO_H_
3
4#ifndef _ELM_POPUP_EO_CLASS_TYPE
5#define _ELM_POPUP_EO_CLASS_TYPE
6
7typedef Eo Elm_Popup;
8
9#endif
10
11#ifndef _ELM_POPUP_EO_TYPES
12#define _ELM_POPUP_EO_TYPES
13
14/**
15 * @brief Possible orient values for popup.
16 *
17 * These values should be used in conjunction to elm_popup_orient_set() to set
18 * the position in which the popup should appear(relative to its parent) and in
19 * conjunction with elm_popup_orient_get() to know where the popup is
20 * appearing.
21 *
22 * @ingroup Elm_Popup
23 */
24typedef enum
25{
26 ELM_POPUP_ORIENT_TOP = 0, /**< Popup should appear in the top of parent,
27 * default. */
28 ELM_POPUP_ORIENT_CENTER, /**< Popup should appear in the center of parent. */
29 ELM_POPUP_ORIENT_BOTTOM, /**< Popup should appear in the bottom of parent. */
30 ELM_POPUP_ORIENT_LEFT, /**< Popup should appear in the left of parent. */
31 ELM_POPUP_ORIENT_RIGHT, /**< Popup should appear in the right of parent. */
32 ELM_POPUP_ORIENT_TOP_LEFT, /**< Popup should appear in the top left of parent.
33 */
34 ELM_POPUP_ORIENT_TOP_RIGHT, /**< Popup should appear in the top right of
35 * parent. */
36 ELM_POPUP_ORIENT_BOTTOM_LEFT, /**< Popup should appear in the bottom left of
37 * parent. */
38 ELM_POPUP_ORIENT_BOTTOM_RIGHT, /**< Notify should appear in the bottom right
39 * of parent. */
40 ELM_POPUP_ORIENT_LAST /**< Sentinel value to indicate last enum field during
41 * iteration */
42} Elm_Popup_Orient;
43
44
45#endif
46/** Elementary popup class
47 *
48 * @ingroup Elm_Popup
49 */
50#define ELM_POPUP_CLASS elm_popup_class_get()
51
52EWAPI const Efl_Class *elm_popup_class_get(void);
53
54/**
55 * @brief Set the alignment of the popup object.
56 *
57 * Sets the alignment in which the popup will appear in its parent.
58 *
59 * @param[in] obj The object.
60 * @param[in] horizontal The horizontal alignment of the popup.
61 * @param[in] vertical The vertical alignment of the popup.
62 *
63 * @since 1.9
64 *
65 * @ingroup Elm_Popup
66 */
67EOAPI void elm_obj_popup_align_set(Eo *obj, double horizontal, double vertical);
68
69/**
70 * @brief Get the alignment of the popup object.
71 *
72 * @param[in] obj The object.
73 * @param[out] horizontal The horizontal alignment of the popup.
74 * @param[out] vertical The vertical alignment of the popup.
75 *
76 * @since 1.9
77 *
78 * @ingroup Elm_Popup
79 */
80EOAPI void elm_obj_popup_align_get(const Eo *obj, double *horizontal, double *vertical);
81
82/**
83 * @brief Sets whether events should be passed to by a click outside.
84 *
85 * Enabling allow event will remove the Blocked event area and events will pass
86 * to the lower layer objects otherwise they are blocked.
87 *
88 * @note The default value is @c false.
89 *
90 * @param[in] obj The object.
91 * @param[in] allow If @c true, events are passed to lower objects.
92 *
93 * @ingroup Elm_Popup
94 */
95EOAPI void elm_obj_popup_allow_events_set(Eo *obj, Eina_Bool allow);
96
97/**
98 * @brief Returns value indicating whether allow event is enabled or not.
99 *
100 * @param[in] obj The object.
101 *
102 * @return If @c true, events are passed to lower objects.
103 *
104 * @ingroup Elm_Popup
105 */
106EOAPI Eina_Bool elm_obj_popup_allow_events_get(const Eo *obj);
107
108/**
109 * @brief Control the wrapping type of content text packed in content area of
110 * popup object.
111 *
112 * @param[in] obj The object.
113 * @param[in] wrap Wrapping type of type Elm_Wrap_Type.
114 *
115 * @ingroup Elm_Popup
116 */
117EOAPI void elm_obj_popup_content_text_wrap_type_set(Eo *obj, Elm_Wrap_Type wrap);
118
119/**
120 * @brief Control the wrapping type of content text packed in content area of
121 * popup object.
122 *
123 * @param[in] obj The object.
124 *
125 * @return Wrapping type of type Elm_Wrap_Type.
126 *
127 * @ingroup Elm_Popup
128 */
129EOAPI Elm_Wrap_Type elm_obj_popup_content_text_wrap_type_get(const Eo *obj);
130
131/**
132 * @brief Sets the orientation of the popup in the parent region.
133 *
134 * Sets the position in which popup will appear in its parent. By default,
135 * #ELM_POPUP_ORIENT_CENTER is set.
136 *
137 * @param[in] obj The object.
138 * @param[in] orient The orientation of the popup.
139 *
140 * @ingroup Elm_Popup
141 */
142EOAPI void elm_obj_popup_orient_set(Eo *obj, Elm_Popup_Orient orient);
143
144/**
145 * @brief Returns the orientation of the popup.
146 *
147 * @param[in] obj The object.
148 *
149 * @return The orientation of the popup.
150 *
151 * @ingroup Elm_Popup
152 */
153EOAPI Elm_Popup_Orient elm_obj_popup_orient_get(const Eo *obj);
154
155/**
156 * @brief Sets a timeout to hide popup automatically
157 *
158 * This function sets a timeout and starts the timer controlling when the popup
159 * is hidden. Since calling @ref evas_object_show on a popup restarts the timer
160 * controlling when it is hidden, setting this before the popup is shown will
161 * in effect mean starting the timer when the popup is shown. Smart signal
162 * "timeout" is called afterwards which can be handled if needed.
163 *
164 * @note Set a value <= 0.0 to disable a running timer.
165 *
166 * @note If the value > 0.0 and the popup is previously visible, the timer will
167 * be started with this value, canceling any running timer.
168 *
169 * @param[in] obj The object.
170 * @param[in] timeout The timeout in seconds.
171 *
172 * @ingroup Elm_Popup
173 */
174EOAPI void elm_obj_popup_timeout_set(Eo *obj, double timeout);
175
176/**
177 * @brief Returns the timeout value set to the popup (in seconds).
178 *
179 * @param[in] obj The object.
180 *
181 * @return The timeout in seconds.
182 *
183 * @ingroup Elm_Popup
184 */
185EOAPI double elm_obj_popup_timeout_get(const Eo *obj);
186
187/**
188 * @brief Enable or disable scroller in popup content area
189 *
190 * Normally content area does not contain scroller.
191 *
192 * @param[in] obj The object.
193 * @param[in] scroll @c true if it is to be scrollable, @c false otherwise.
194 *
195 * @since 1.15.1
196 *
197 * @ingroup Elm_Popup
198 */
199EOAPI void elm_obj_popup_scrollable_set(Eo *obj, Eina_Bool scroll);
200
201/**
202 * @brief Get the scrollable state of popup content area
203 *
204 * Normally content area does not contain scroller.
205 *
206 * @param[in] obj The object.
207 *
208 * @return @c true if it is to be scrollable, @c false otherwise.
209 *
210 * @since 1.15.1
211 *
212 * @ingroup Elm_Popup
213 */
214EOAPI Eina_Bool elm_obj_popup_scrollable_get(const Eo *obj);
215
216/**
217 * @brief Add a new item to a Popup object
218 *
219 * Both an item list and a content could not be set at the same time! once you
220 * add an item, the previous content will be removed.
221 *
222 * @warning When the first item is appended to popup object, any previous
223 * content of the content area is deleted. At a time, only one of content,
224 * content-text and item(s) can be there in a popup content area.
225 *
226 * @param[in] obj The object.
227 * @param[in] label The Label of the new item.
228 * @param[in] icon Icon to be set on new item.
229 * @param[in] func Convenience function called when item selected.
230 * @param[in] data Data passed to @c func above.
231 *
232 * @return A handle to the item added or @c null on errors.
233 *
234 * @ingroup Elm_Popup
235 */
236EOAPI Elm_Widget_Item *elm_obj_popup_item_append(Eo *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
237
238/** Dismiss a Popup object.
239 *
240 * @since 1.17
241 *
242 * @ingroup Elm_Popup
243 */
244EOAPI void elm_obj_popup_dismiss(Eo *obj);
245
246EWAPI extern const Efl_Event_Description _ELM_POPUP_EVENT_BLOCK_CLICKED;
247
248/** Called when popup was clicked
249 *
250 * @ingroup Elm_Popup
251 */
252#define ELM_POPUP_EVENT_BLOCK_CLICKED (&(_ELM_POPUP_EVENT_BLOCK_CLICKED))
253
254EWAPI extern const Efl_Event_Description _ELM_POPUP_EVENT_TIMEOUT;
255
256/** Called when popup timed out
257 *
258 * @ingroup Elm_Popup
259 */
260#define ELM_POPUP_EVENT_TIMEOUT (&(_ELM_POPUP_EVENT_TIMEOUT))
261
262EWAPI extern const Efl_Event_Description _ELM_POPUP_EVENT_ITEM_FOCUSED;
263
264/** Called when popup got focus
265 * @return Efl_Object *
266 *
267 * @ingroup Elm_Popup
268 */
269#define ELM_POPUP_EVENT_ITEM_FOCUSED (&(_ELM_POPUP_EVENT_ITEM_FOCUSED))
270
271EWAPI extern const Efl_Event_Description _ELM_POPUP_EVENT_ITEM_UNFOCUSED;
272
273/** Called when popup lost focus
274 * @return Efl_Object *
275 *
276 * @ingroup Elm_Popup
277 */
278#define ELM_POPUP_EVENT_ITEM_UNFOCUSED (&(_ELM_POPUP_EVENT_ITEM_UNFOCUSED))
279
280EWAPI extern const Efl_Event_Description _ELM_POPUP_EVENT_DISMISSED;
281
282/** Called when popup was dismissed
283 *
284 * @ingroup Elm_Popup
285 */
286#define ELM_POPUP_EVENT_DISMISSED (&(_ELM_POPUP_EVENT_DISMISSED))
287
288#endif
diff --git a/src/lib/elementary/elm_popup_eo.legacy.c b/src/lib/elementary/elm_popup_eo.legacy.c
new file mode 100644
index 0000000..271f6b9
--- /dev/null
+++ b/src/lib/elementary/elm_popup_eo.legacy.c
@@ -0,0 +1,84 @@
1
2EAPI void
3elm_popup_align_set(Elm_Popup *obj, double horizontal, double vertical)
4{
5 elm_obj_popup_align_set(obj, horizontal, vertical);
6}
7
8EAPI void
9elm_popup_align_get(const Elm_Popup *obj, double *horizontal, double *vertical)
10{
11 elm_obj_popup_align_get(obj, horizontal, vertical);
12}
13
14EAPI void
15elm_popup_allow_events_set(Elm_Popup *obj, Eina_Bool allow)
16{
17 elm_obj_popup_allow_events_set(obj, allow);
18}
19
20EAPI Eina_Bool
21elm_popup_allow_events_get(const Elm_Popup *obj)
22{
23 return elm_obj_popup_allow_events_get(obj);
24}
25
26EAPI void
27elm_popup_content_text_wrap_type_set(Elm_Popup *obj, Elm_Wrap_Type wrap)
28{
29 elm_obj_popup_content_text_wrap_type_set(obj, wrap);
30}
31
32EAPI Elm_Wrap_Type
33elm_popup_content_text_wrap_type_get(const Elm_Popup *obj)
34{
35 return elm_obj_popup_content_text_wrap_type_get(obj);
36}
37
38EAPI void
39elm_popup_orient_set(Elm_Popup *obj, Elm_Popup_Orient orient)
40{
41 elm_obj_popup_orient_set(obj, orient);
42}
43
44EAPI Elm_Popup_Orient
45elm_popup_orient_get(const Elm_Popup *obj)
46{
47 return elm_obj_popup_orient_get(obj);
48}
49
50EAPI void
51elm_popup_timeout_set(Elm_Popup *obj, double timeout)
52{
53 elm_obj_popup_timeout_set(obj, timeout);
54}
55
56EAPI double
57elm_popup_timeout_get(const Elm_Popup *obj)
58{
59 return elm_obj_popup_timeout_get(obj);
60}
61
62EAPI void
63elm_popup_scrollable_set(Elm_Popup *obj, Eina_Bool scroll)
64{
65 elm_obj_popup_scrollable_set(obj, scroll);
66}
67
68EAPI Eina_Bool
69elm_popup_scrollable_get(const Elm_Popup *obj)
70{
71 return elm_obj_popup_scrollable_get(obj);
72}
73
74EAPI Elm_Widget_Item *
75elm_popup_item_append(Elm_Popup *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data)
76{
77 return elm_obj_popup_item_append(obj, label, icon, func, data);
78}
79
80EAPI void
81elm_popup_dismiss(Elm_Popup *obj)
82{
83 elm_obj_popup_dismiss(obj);
84}
diff --git a/src/lib/elementary/elm_popup_eo.legacy.h b/src/lib/elementary/elm_popup_eo.legacy.h
new file mode 100644
index 0000000..debf944
--- /dev/null
+++ b/src/lib/elementary/elm_popup_eo.legacy.h
@@ -0,0 +1,239 @@
1#ifndef _ELM_POPUP_EO_LEGACY_H_
2#define _ELM_POPUP_EO_LEGACY_H_
3
4#ifndef _ELM_POPUP_EO_CLASS_TYPE
5#define _ELM_POPUP_EO_CLASS_TYPE
6
7typedef Eo Elm_Popup;
8
9#endif
10
11#ifndef _ELM_POPUP_EO_TYPES
12#define _ELM_POPUP_EO_TYPES
13
14/**
15 * @brief Possible orient values for popup.
16 *
17 * These values should be used in conjunction to elm_popup_orient_set() to set
18 * the position in which the popup should appear(relative to its parent) and in
19 * conjunction with elm_popup_orient_get() to know where the popup is
20 * appearing.
21 *
22 * @ingroup Elm_Popup
23 */
24typedef enum
25{
26 ELM_POPUP_ORIENT_TOP = 0, /**< Popup should appear in the top of parent,
27 * default. */
28 ELM_POPUP_ORIENT_CENTER, /**< Popup should appear in the center of parent. */
29 ELM_POPUP_ORIENT_BOTTOM, /**< Popup should appear in the bottom of parent. */
30 ELM_POPUP_ORIENT_LEFT, /**< Popup should appear in the left of parent. */
31 ELM_POPUP_ORIENT_RIGHT, /**< Popup should appear in the right of parent. */
32 ELM_POPUP_ORIENT_TOP_LEFT, /**< Popup should appear in the top left of parent.
33 */
34 ELM_POPUP_ORIENT_TOP_RIGHT, /**< Popup should appear in the top right of
35 * parent. */
36 ELM_POPUP_ORIENT_BOTTOM_LEFT, /**< Popup should appear in the bottom left of
37 * parent. */
38 ELM_POPUP_ORIENT_BOTTOM_RIGHT, /**< Notify should appear in the bottom right
39 * of parent. */
40 ELM_POPUP_ORIENT_LAST /**< Sentinel value to indicate last enum field during
41 * iteration */
42} Elm_Popup_Orient;
43
44
45#endif
46
47/**
48 * @brief Set the alignment of the popup object.
49 *
50 * Sets the alignment in which the popup will appear in its parent.
51 *
52 * @param[in] obj The object.
53 * @param[in] horizontal The horizontal alignment of the popup.
54 * @param[in] vertical The vertical alignment of the popup.
55 *
56 * @since 1.9
57 *
58 * @ingroup Elm_Popup_Group
59 */
60EAPI void elm_popup_align_set(Elm_Popup *obj, double horizontal, double vertical);
61
62/**
63 * @brief Get the alignment of the popup object.
64 *
65 * @param[in] obj The object.
66 * @param[out] horizontal The horizontal alignment of the popup.
67 * @param[out] vertical The vertical alignment of the popup.
68 *
69 * @since 1.9
70 *
71 * @ingroup Elm_Popup_Group
72 */
73EAPI void elm_popup_align_get(const Elm_Popup *obj, double *horizontal, double *vertical);
74
75/**
76 * @brief Sets whether events should be passed to by a click outside.
77 *
78 * Enabling allow event will remove the Blocked event area and events will pass
79 * to the lower layer objects otherwise they are blocked.
80 *
81 * @note The default value is @c false.
82 *
83 * @param[in] obj The object.
84 * @param[in] allow If @c true, events are passed to lower objects.
85 *
86 * @ingroup Elm_Popup_Group
87 */
88EAPI void elm_popup_allow_events_set(Elm_Popup *obj, Eina_Bool allow);
89
90/**
91 * @brief Returns value indicating whether allow event is enabled or not.
92 *
93 * @param[in] obj The object.
94 *
95 * @return If @c true, events are passed to lower objects.
96 *
97 * @ingroup Elm_Popup_Group
98 */
99EAPI Eina_Bool elm_popup_allow_events_get(const Elm_Popup *obj);
100
101/**
102 * @brief Control the wrapping type of content text packed in content area of
103 * popup object.
104 *
105 * @param[in] obj The object.
106 * @param[in] wrap Wrapping type of type Elm_Wrap_Type.
107 *
108 * @ingroup Elm_Popup_Group
109 */
110EAPI void elm_popup_content_text_wrap_type_set(Elm_Popup *obj, Elm_Wrap_Type wrap);
111
112/**
113 * @brief Control the wrapping type of content text packed in content area of
114 * popup object.
115 *
116 * @param[in] obj The object.
117 *
118 * @return Wrapping type of type Elm_Wrap_Type.
119 *
120 * @ingroup Elm_Popup_Group
121 */
122EAPI Elm_Wrap_Type elm_popup_content_text_wrap_type_get(const Elm_Popup *obj);
123
124/**
125 * @brief Sets the orientation of the popup in the parent region.
126 *
127 * Sets the position in which popup will appear in its parent. By default,
128 * #ELM_POPUP_ORIENT_CENTER is set.
129 *
130 * @param[in] obj The object.
131 * @param[in] orient The orientation of the popup.
132 *
133 * @ingroup Elm_Popup_Group
134 */
135EAPI void elm_popup_orient_set(Elm_Popup *obj, Elm_Popup_Orient orient);
136
137/**
138 * @brief Returns the orientation of the popup.
139 *
140 * @param[in] obj The object.
141 *
142 * @return The orientation of the popup.
143 *
144 * @ingroup Elm_Popup_Group
145 */
146EAPI Elm_Popup_Orient elm_popup_orient_get(const Elm_Popup *obj);
147
148/**
149 * @brief Sets a timeout to hide popup automatically
150 *
151 * This function sets a timeout and starts the timer controlling when the popup
152 * is hidden. Since calling @ref evas_object_show on a popup restarts the timer
153 * controlling when it is hidden, setting this before the popup is shown will
154 * in effect mean starting the timer when the popup is shown. Smart signal
155 * "timeout" is called afterwards which can be handled if needed.
156 *
157 * @note Set a value <= 0.0 to disable a running timer.
158 *
159 * @note If the value > 0.0 and the popup is previously visible, the timer will
160 * be started with this value, canceling any running timer.
161 *
162 * @param[in] obj The object.
163 * @param[in] timeout The timeout in seconds.
164 *
165 * @ingroup Elm_Popup_Group
166 */
167EAPI void elm_popup_timeout_set(Elm_Popup *obj, double timeout);
168
169/**
170 * @brief Returns the timeout value set to the popup (in seconds).
171 *
172 * @param[in] obj The object.
173 *
174 * @return The timeout in seconds.
175 *
176 * @ingroup Elm_Popup_Group
177 */
178EAPI double elm_popup_timeout_get(const Elm_Popup *obj);
179
180/**
181 * @brief Enable or disable scroller in popup content area
182 *
183 * Normally content area does not contain scroller.
184 *
185 * @param[in] obj The object.
186 * @param[in] scroll @c true if it is to be scrollable, @c false otherwise.
187 *
188 * @since 1.15.1
189 *
190 * @ingroup Elm_Popup_Group
191 */
192EAPI void elm_popup_scrollable_set(Elm_Popup *obj, Eina_Bool scroll);
193
194/**
195 * @brief Get the scrollable state of popup content area
196 *
197 * Normally content area does not contain scroller.
198 *
199 * @param[in] obj The object.
200 *
201 * @return @c true if it is to be scrollable, @c false otherwise.
202 *
203 * @since 1.15.1
204 *
205 * @ingroup Elm_Popup_Group
206 */
207EAPI Eina_Bool elm_popup_scrollable_get(const Elm_Popup *obj);
208
209/**
210 * @brief Add a new item to a Popup object
211 *
212 * Both an item list and a content could not be set at the same time! once you
213 * add an item, the previous content will be removed.
214 *
215 * @warning When the first item is appended to popup object, any previous
216 * content of the content area is deleted. At a time, only one of content,
217 * content-text and item(s) can be there in a popup content area.
218 *
219 * @param[in] obj The object.
220 * @param[in] label The Label of the new item.
221 * @param[in] icon Icon to be set on new item.
222 * @param[in] func Convenience function called when item selected.
223 * @param[in] data Data passed to @c func above.
224 *
225 * @return A handle to the item added or @c null on errors.
226 *
227 * @ingroup Elm_Popup_Group
228 */
229EAPI Elm_Widget_Item *elm_popup_item_append(Elm_Popup *obj, const char *label, Efl_Canvas_Object *icon, Evas_Smart_Cb func, const void *data);
230
231/** Dismiss a Popup object.
232 *
233 * @since 1.17
234 *
235 * @ingroup Elm_Popup_Group
236 */
237EAPI void elm_popup_dismiss(Elm_Popup *obj);
238
239#endif
diff --git a/src/lib/elementary/elm_popup_item.eo b/src/lib/elementary/elm_popup_item.eo
deleted file mode 100644
index b3a408f..0000000
--- a/src/lib/elementary/elm_popup_item.eo
+++ /dev/null
@@ -1,15 +0,0 @@
1class Elm.Popup.Item extends Elm.Widget.Item implements Efl.Ui.Legacy
2{
3 [[Elementary popup item class]]
4 legacy_prefix: elm_popup_item;
5 eo_prefix: elm_obj_popup_item;
6 implements {
7 Efl.Object.constructor;
8 Efl.Object.destructor;
9 Elm.Widget.Item.disable;
10 Elm.Widget.Item.signal_emit;
11 Elm.Widget.Item.part_text { get; set; }
12 Elm.Widget.Item.part_content { get; set; }
13 Elm.Widget.Item.part_content_unset;
14 }
15}
diff --git a/src/lib/elementary/elm_popup_item_eo.c b/src/lib/elementary/elm_popup_item_eo.c
new file mode 100644
index 0000000..07e161b
--- /dev/null
+++ b/src/lib/elementary/elm_popup_item_eo.c
@@ -0,0 +1,67 @@
1
2Efl_Object *_elm_popup_item_efl_object_constructor(Eo *obj, Elm_Popup_Item_Data *pd);
3
4
5void _elm_popup_item_efl_object_destructor(Eo *obj, Elm_Popup_Item_Data *pd);
6
7
8void _elm_popup_item_elm_widget_item_disable(Eo *obj, Elm_Popup_Item_Data *pd);
9
10
11void _elm_popup_item_elm_widget_item_signal_emit(Eo *obj, Elm_Popup_Item_Data *pd, const char *emission, const char *source);
12
13
14void _elm_popup_item_elm_widget_item_part_text_set(Eo *obj, Elm_Popup_Item_Data *pd, const char *part, const char *label);
15
16
17const char *_elm_popup_item_elm_widget_item_part_text_get(const Eo *obj, Elm_Popup_Item_Data *pd, const char *part);
18
19
20void _elm_popup_item_elm_widget_item_part_content_set(Eo *obj, Elm_Popup_Item_Data *pd, const char *part, Efl_Canvas_Object *content);
21
22
23Efl_Canvas_Object *_elm_popup_item_elm_widget_item_part_content_get(const Eo *obj, Elm_Popup_Item_Data *pd, const char *part);
24
25
26Efl_Canvas_Object *_elm_popup_item_elm_widget_item_part_content_unset(Eo *obj, Elm_Popup_Item_Data *pd, const char *part);
27
28
29static Eina_Bool
30_elm_popup_item_class_initializer(Efl_Class *klass)
31{
32 const Efl_Object_Ops *opsp = NULL;
33
34 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
35
36#ifndef ELM_POPUP_ITEM_EXTRA_OPS
37#define ELM_POPUP_ITEM_EXTRA_OPS
38#endif
39
40 EFL_OPS_DEFINE(ops,
41 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_popup_item_efl_object_constructor),
42 EFL_OBJECT_OP_FUNC(efl_destructor, _elm_popup_item_efl_object_destructor),
43 EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_popup_item_elm_widget_item_disable),
44 EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_popup_item_elm_widget_item_signal_emit),
45 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_popup_item_elm_widget_item_part_text_set),
46 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_popup_item_elm_widget_item_part_text_get),
47 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_popup_item_elm_widget_item_part_content_set),
48 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_popup_item_elm_widget_item_part_content_get),
49 EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_unset, _elm_popup_item_elm_widget_item_part_content_unset),
50 ELM_POPUP_ITEM_EXTRA_OPS
51 );
52 opsp = &ops;
53
54 return efl_class_functions_set(klass, opsp, ropsp);
55}
56
57static const Efl_Class_Description _elm_popup_item_class_desc = {
58 EO_VERSION,
59 "Elm.Popup.Item",
60 EFL_CLASS_TYPE_REGULAR,
61 sizeof(Elm_Popup_Item_Data),
62 _elm_popup_item_class_initializer,
63 NULL,
64 NULL
65};
66
67EFL_DEFINE_CLASS(elm_popup_item_class_get, &_elm_popup_item_class_desc, ELM_WIDGET_ITEM_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
diff --git a/src/lib/elementary/elm_popup_item_eo.h b/src/lib/elementary/elm_popup_item_eo.h
new file mode 100644
index 0000000..46d6534
--- /dev/null
+++ b/src/lib/elementary/elm_popup_item_eo.h
@@ -0,0 +1,24 @@
1#ifndef _ELM_POPUP_ITEM_EO_H_
2#define _ELM_POPUP_ITEM_EO_H_
3
4#ifndef _ELM_POPUP_ITEM_EO_CLASS_TYPE
5#define _ELM_POPUP_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Popup_Item;
8
9#endif
10
11#ifndef _ELM_POPUP_ITEM_EO_TYPES
12#define _ELM_POPUP_ITEM_EO_TYPES
13
14
15#endif
16/** Elementary popup item class
17 *
18 * @ingroup Elm_Popup_Item
19 */
20#define ELM_POPUP_ITEM_CLASS elm_popup_item_class_get()
21
22EWAPI const Efl_Class *elm_popup_item_class_get(void);
23
24#endif
diff --git a/src/lib/elementary/elm_popup_item_eo.legacy.h b/src/lib/elementary/elm_popup_item_eo.legacy.h
new file mode 100644
index 0000000..5360e3d
--- /dev/null
+++ b/src/lib/elementary/elm_popup_item_eo.legacy.h
@@ -0,0 +1,17 @@
1#ifndef _ELM_POPUP_ITEM_EO_LEGACY_H_
2#define _ELM_POPUP_ITEM_EO_LEGACY_H_
3
4#ifndef _ELM_POPUP_ITEM_EO_CLASS_TYPE
5#define _ELM_POPUP_ITEM_EO_CLASS_TYPE
6
7typedef Eo Elm_Popup_Item;
8
9#endif
10
11#ifndef _ELM_POPUP_ITEM_EO_TYPES
12#define _ELM_POPUP_ITEM_EO_TYPES
13
14
15#endif
16
17#endif
diff --git a/src/lib/elementary/elm_widget_popup.h b/src/lib/elementary/elm_widget_popup.h
index 0ede3e5..6c16a76 100644
--- a/src/lib/elementary/elm_widget_popup.h
+++ b/src/lib/elementary/elm_widget_popup.h
@@ -4,8 +4,8 @@
4#include "Elementary.h" 4#include "Elementary.h"
5#include "elm_widget_layout.h" 5#include "elm_widget_layout.h"
6#include "elm_notify_eo.h" 6#include "elm_notify_eo.h"
7#include "elm_popup_item.eo.h" 7#include "elm_popup_item_eo.h"
8#include "elm_popup.eo.h" 8#include "elm_popup_eo.h"
9 9
10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR 10/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
11 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT 11 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 004c7a7..3b840e0 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -1,6 +1,5 @@
1pub_legacy_eo_files = [ 1pub_legacy_eo_files = [
2 'efl_ui_clock_legacy.eo', 2 'efl_ui_clock_legacy.eo',
3 'elm_popup.eo',
4 'elm_route.eo', 3 'elm_route.eo',
5 'elm_scroller.eo', 4 'elm_scroller.eo',
6 'elm_sys_notify_interface.eo', 5 'elm_sys_notify_interface.eo',
@@ -8,7 +7,6 @@ pub_legacy_eo_files = [
8 'elm_sys_notify_dbus.eo', 7 'elm_sys_notify_dbus.eo',
9 'elm_systray.eo', 8 'elm_systray.eo',
10 'elm_widget_item_static_focus.eo', 9 'elm_widget_item_static_focus.eo',
11 'elm_popup_item.eo',
12 'elm_ctxpopup_part.eo', 10 'elm_ctxpopup_part.eo',
13 'elm_dayselector_part.eo', 11 'elm_dayselector_part.eo',
14 'elm_entry_part.eo', 12 'elm_entry_part.eo',
@@ -783,6 +781,10 @@ elementary_pub_headers = [
783 'elm_player_eo.legacy.h', 781 'elm_player_eo.legacy.h',
784 'elm_plug_eo.h', 782 'elm_plug_eo.h',
785 'elm_plug_eo.legacy.h', 783 'elm_plug_eo.legacy.h',
784 'elm_popup_eo.h',
785 'elm_popup_eo.legacy.h',
786 'elm_popup_item_eo.h',
787 'elm_popup_item_eo.legacy.h',
786] 788]
787 789
788elementary_header_src = [ 790elementary_header_src = [