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:05 -0800
commit192bbfa5024bcbc054a62aedd1d54ba11a0e6c84 (patch)
tree2b6891be134b8f1b1710ab8450fe041847a131e1 /src
parentd3be7698e379cdda44c44f00539036c97a45aa51 (diff)
elm_plug: 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/D8192
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/efl_ui_win.c2
-rw-r--r--src/lib/elementary/elm_plug.c2
-rw-r--r--src/lib/elementary/elm_plug.eo43
-rw-r--r--src/lib/elementary/elm_plug_eo.c59
-rw-r--r--src/lib/elementary/elm_plug_eo.h73
-rw-r--r--src/lib/elementary/elm_plug_eo.legacy.c12
-rw-r--r--src/lib/elementary/elm_plug_eo.legacy.h49
-rw-r--r--src/lib/elementary/elm_plug_legacy.h2
-rw-r--r--src/lib/elementary/elm_widget_plug.h2
-rw-r--r--src/lib/elementary/meson.build3
11 files changed, 203 insertions, 49 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 7a35107..9087ef1 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_plug.eo \
187 lib/elementary/elm_popup.eo \ 186 lib/elementary/elm_popup.eo \
188 lib/elementary/elm_route.eo \ 187 lib/elementary/elm_route.eo \
189 lib/elementary/elm_scroller.eo \ 188 lib/elementary/elm_scroller.eo \
@@ -377,6 +376,8 @@ lib/elementary/elm_pan_eo.c \
377lib/elementary/elm_pan_eo.legacy.c \ 376lib/elementary/elm_pan_eo.legacy.c \
378lib/elementary/elm_photo_eo.c \ 377lib/elementary/elm_photo_eo.c \
379lib/elementary/elm_player_eo.c \ 378lib/elementary/elm_player_eo.c \
379lib/elementary/elm_plug_eo.c \
380lib/elementary/elm_plug_eo.legacy.c \
380$(NULL) 381$(NULL)
381 382
382elm_legacy_eo_headers = \ 383elm_legacy_eo_headers = \
@@ -540,6 +541,8 @@ lib/elementary/elm_photo_eo.h \
540lib/elementary/elm_photo_eo.legacy.h \ 541lib/elementary/elm_photo_eo.legacy.h \
541lib/elementary/elm_player_eo.h \ 542lib/elementary/elm_player_eo.h \
542lib/elementary/elm_player_eo.legacy.h \ 543lib/elementary/elm_player_eo.legacy.h \
544lib/elementary/elm_plug_eo.h \
545lib/elementary/elm_plug_eo.legacy.h \
543$(NULL) 546$(NULL)
544 547
545 548
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 410eeb8..24b88f6 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -31,7 +31,7 @@
31 31
32#include "elm_part_helper.h" 32#include "elm_part_helper.h"
33#include "efl_ui_win_part.eo.h" 33#include "efl_ui_win_part.eo.h"
34#include "elm_plug.eo.h" 34#include "elm_plug_eo.h"
35#include "efl_ui_win_legacy_eo.h" 35#include "efl_ui_win_legacy_eo.h"
36#include "efl_ui_win_socket_legacy_eo.h" 36#include "efl_ui_win_socket_legacy_eo.h"
37#include "efl_ui_win_inlined_legacy_eo.h" 37#include "efl_ui_win_inlined_legacy_eo.h"
diff --git a/src/lib/elementary/elm_plug.c b/src/lib/elementary/elm_plug.c
index 8eec937..f55c616 100644
--- a/src/lib/elementary/elm_plug.c
+++ b/src/lib/elementary/elm_plug.c
@@ -193,4 +193,4 @@ _elm_plug_class_constructor(Efl_Class *klass)
193#define ELM_PLUG_EXTRA_OPS \ 193#define ELM_PLUG_EXTRA_OPS \
194 EFL_CANVAS_GROUP_ADD_OPS(elm_plug) 194 EFL_CANVAS_GROUP_ADD_OPS(elm_plug)
195 195
196#include "elm_plug.eo.c" 196#include "elm_plug_eo.c"
diff --git a/src/lib/elementary/elm_plug.eo b/src/lib/elementary/elm_plug.eo
deleted file mode 100644
index 5954a8c..0000000
--- a/src/lib/elementary/elm_plug.eo
+++ /dev/null
@@ -1,43 +0,0 @@
1class Elm.Plug extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Legacy
2{
3 [[Elementary plug class]]
4 legacy_prefix: elm_plug;
5 eo_prefix: elm_obj_plug;
6 event_prefix: elm_plug;
7 data: null;
8 methods {
9 @property image_object {
10 get {
11 [[Get the basic Evas_Image object from this object (widget).
12
13 This function allows one to get the underlying Evas object of type
14 Image from this elementary widget. It can be useful to do things
15 like get the pixel data, save the image to a file, etc.
16
17 Note: Be careful to not manipulate it, as it is under control of
18 elementary.
19 ]]
20 return: Efl.Canvas.Object; [[The inlined image object or $null.]]
21 }
22 }
23 connect {
24 [[Connect a plug widget to service provided by socket image.]]
25 return: bool; [[$true on success, $false on error.]]
26 params {
27 @in svcname: string; [[The service name to connect to set up by the socket.]]
28 @in svcnum: int; [[The service number to connect to (set up by socket).]]
29 @in svcsys: bool; [[Boolean to set if the service is a system one or not (set up by socket).]]
30 }
31 }
32 }
33 implements {
34 class.constructor;
35 Efl.Object.constructor;
36 Efl.Ui.Widget.theme_apply;
37 Efl.Ui.Focus.Object.on_focus_update;
38 }
39 events {
40 image,deleted: void; [[Called when image was deleted]]
41 image,resized: Eina.Position2D; [[Called when image was resized]]
42 }
43}
diff --git a/src/lib/elementary/elm_plug_eo.c b/src/lib/elementary/elm_plug_eo.c
new file mode 100644
index 0000000..7dc8c4d
--- /dev/null
+++ b/src/lib/elementary/elm_plug_eo.c
@@ -0,0 +1,59 @@
1EWAPI const Efl_Event_Description _ELM_PLUG_EVENT_IMAGE_DELETED =
2 EFL_EVENT_DESCRIPTION("image,deleted");
3EWAPI const Efl_Event_Description _ELM_PLUG_EVENT_IMAGE_RESIZED =
4 EFL_EVENT_DESCRIPTION("image,resized");
5
6Efl_Canvas_Object *_elm_plug_image_object_get(const Eo *obj, void *pd);
7
8EOAPI EFL_FUNC_BODY_CONST(elm_obj_plug_image_object_get, Efl_Canvas_Object *, NULL);
9
10Eina_Bool _elm_plug_connect(Eo *obj, void *pd, const char *svcname, int svcnum, Eina_Bool svcsys);
11
12EOAPI EFL_FUNC_BODYV(elm_obj_plug_connect, Eina_Bool, 0, EFL_FUNC_CALL(svcname, svcnum, svcsys), const char *svcname, int svcnum, Eina_Bool svcsys);
13
14Efl_Object *_elm_plug_efl_object_constructor(Eo *obj, void *pd);
15
16
17Eina_Error _elm_plug_efl_ui_widget_theme_apply(Eo *obj, void *pd);
18
19
20Eina_Bool _elm_plug_efl_ui_focus_object_on_focus_update(Eo *obj, void *pd);
21
22
23static Eina_Bool
24_elm_plug_class_initializer(Efl_Class *klass)
25{
26 const Efl_Object_Ops *opsp = NULL;
27
28 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
29
30#ifndef ELM_PLUG_EXTRA_OPS
31#define ELM_PLUG_EXTRA_OPS
32#endif
33
34 EFL_OPS_DEFINE(ops,
35 EFL_OBJECT_OP_FUNC(elm_obj_plug_image_object_get, _elm_plug_image_object_get),
36 EFL_OBJECT_OP_FUNC(elm_obj_plug_connect, _elm_plug_connect),
37 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_plug_efl_object_constructor),
38 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_plug_efl_ui_widget_theme_apply),
39 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_plug_efl_ui_focus_object_on_focus_update),
40 ELM_PLUG_EXTRA_OPS
41 );
42 opsp = &ops;
43
44 return efl_class_functions_set(klass, opsp, ropsp);
45}
46
47static const Efl_Class_Description _elm_plug_class_desc = {
48 EO_VERSION,
49 "Elm.Plug",
50 EFL_CLASS_TYPE_REGULAR,
51 0,
52 _elm_plug_class_initializer,
53 _elm_plug_class_constructor,
54 NULL
55};
56
57EFL_DEFINE_CLASS(elm_plug_class_get, &_elm_plug_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
58
59#include "elm_plug_eo.legacy.c"
diff --git a/src/lib/elementary/elm_plug_eo.h b/src/lib/elementary/elm_plug_eo.h
new file mode 100644
index 0000000..f27785f
--- /dev/null
+++ b/src/lib/elementary/elm_plug_eo.h
@@ -0,0 +1,73 @@
1#ifndef _ELM_PLUG_EO_H_
2#define _ELM_PLUG_EO_H_
3
4#ifndef _ELM_PLUG_EO_CLASS_TYPE
5#define _ELM_PLUG_EO_CLASS_TYPE
6
7typedef Eo Elm_Plug;
8
9#endif
10
11#ifndef _ELM_PLUG_EO_TYPES
12#define _ELM_PLUG_EO_TYPES
13
14
15#endif
16/** Elementary plug class
17 *
18 * @ingroup Elm_Plug
19 */
20#define ELM_PLUG_CLASS elm_plug_class_get()
21
22EWAPI const Efl_Class *elm_plug_class_get(void);
23
24/**
25 * @brief Get the basic Evas_Image object from this object (widget).
26 *
27 * This function allows one to get the underlying Evas object of type Image
28 * from this elementary widget. It can be useful to do things like get the
29 * pixel data, save the image to a file, etc.
30 *
31 * @note Be careful to not manipulate it, as it is under control of elementary.
32 *
33 * @param[in] obj The object.
34 *
35 * @return The inlined image object or @c null.
36 *
37 * @ingroup Elm_Plug
38 */
39EOAPI Efl_Canvas_Object *elm_obj_plug_image_object_get(const Eo *obj);
40
41/**
42 * @brief Connect a plug widget to service provided by socket image.
43 *
44 * @param[in] obj The object.
45 * @param[in] svcname The service name to connect to set up by the socket.
46 * @param[in] svcnum The service number to connect to (set up by socket).
47 * @param[in] svcsys Boolean to set if the service is a system one or not (set
48 * up by socket).
49 *
50 * @return @c true on success, @c false on error.
51 *
52 * @ingroup Elm_Plug
53 */
54EOAPI Eina_Bool elm_obj_plug_connect(Eo *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
55
56EWAPI extern const Efl_Event_Description _ELM_PLUG_EVENT_IMAGE_DELETED;
57
58/** Called when image was deleted
59 *
60 * @ingroup Elm_Plug
61 */
62#define ELM_PLUG_EVENT_IMAGE_DELETED (&(_ELM_PLUG_EVENT_IMAGE_DELETED))
63
64EWAPI extern const Efl_Event_Description _ELM_PLUG_EVENT_IMAGE_RESIZED;
65
66/** Called when image was resized
67 * @return Eina_Position2D
68 *
69 * @ingroup Elm_Plug
70 */
71#define ELM_PLUG_EVENT_IMAGE_RESIZED (&(_ELM_PLUG_EVENT_IMAGE_RESIZED))
72
73#endif
diff --git a/src/lib/elementary/elm_plug_eo.legacy.c b/src/lib/elementary/elm_plug_eo.legacy.c
new file mode 100644
index 0000000..04e3277
--- /dev/null
+++ b/src/lib/elementary/elm_plug_eo.legacy.c
@@ -0,0 +1,12 @@
1
2EAPI Efl_Canvas_Object *
3elm_plug_image_object_get(const Elm_Plug *obj)
4{
5 return elm_obj_plug_image_object_get(obj);
6}
7
8EAPI Eina_Bool
9elm_plug_connect(Elm_Plug *obj, const char *svcname, int svcnum, Eina_Bool svcsys)
10{
11 return elm_obj_plug_connect(obj, svcname, svcnum, svcsys);
12}
diff --git a/src/lib/elementary/elm_plug_eo.legacy.h b/src/lib/elementary/elm_plug_eo.legacy.h
new file mode 100644
index 0000000..8d772cb
--- /dev/null
+++ b/src/lib/elementary/elm_plug_eo.legacy.h
@@ -0,0 +1,49 @@
1#ifndef _ELM_PLUG_EO_LEGACY_H_
2#define _ELM_PLUG_EO_LEGACY_H_
3
4#ifndef _ELM_PLUG_EO_CLASS_TYPE
5#define _ELM_PLUG_EO_CLASS_TYPE
6
7typedef Eo Elm_Plug;
8
9#endif
10
11#ifndef _ELM_PLUG_EO_TYPES
12#define _ELM_PLUG_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Get the basic Evas_Image object from this object (widget).
19 *
20 * This function allows one to get the underlying Evas object of type Image
21 * from this elementary widget. It can be useful to do things like get the
22 * pixel data, save the image to a file, etc.
23 *
24 * @note Be careful to not manipulate it, as it is under control of elementary.
25 *
26 * @param[in] obj The object.
27 *
28 * @return The inlined image object or @c null.
29 *
30 * @ingroup Elm_Plug_Group
31 */
32EAPI Efl_Canvas_Object *elm_plug_image_object_get(const Elm_Plug *obj);
33
34/**
35 * @brief Connect a plug widget to service provided by socket image.
36 *
37 * @param[in] obj The object.
38 * @param[in] svcname The service name to connect to set up by the socket.
39 * @param[in] svcnum The service number to connect to (set up by socket).
40 * @param[in] svcsys Boolean to set if the service is a system one or not (set
41 * up by socket).
42 *
43 * @return @c true on success, @c false on error.
44 *
45 * @ingroup Elm_Plug_Group
46 */
47EAPI Eina_Bool elm_plug_connect(Elm_Plug *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
48
49#endif
diff --git a/src/lib/elementary/elm_plug_legacy.h b/src/lib/elementary/elm_plug_legacy.h
index 5c04ec3..58bc854 100644
--- a/src/lib/elementary/elm_plug_legacy.h
+++ b/src/lib/elementary/elm_plug_legacy.h
@@ -8,4 +8,4 @@
8 */ 8 */
9EAPI Evas_Object *elm_plug_add(Evas_Object *parent); 9EAPI Evas_Object *elm_plug_add(Evas_Object *parent);
10 10
11#include "elm_plug.eo.legacy.h" \ No newline at end of file 11#include "elm_plug_eo.legacy.h" \ No newline at end of file
diff --git a/src/lib/elementary/elm_widget_plug.h b/src/lib/elementary/elm_widget_plug.h
index 8798fee..8fb923c 100644
--- a/src/lib/elementary/elm_widget_plug.h
+++ b/src/lib/elementary/elm_widget_plug.h
@@ -2,7 +2,7 @@
2#define ELM_WIDGET_PLUG_H 2#define ELM_WIDGET_PLUG_H
3 3
4#include "Elementary.h" 4#include "Elementary.h"
5#include "elm_plug.eo.h" 5#include "elm_plug_eo.h"
6 6
7/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR 7/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
8 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT 8 * 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 3dab571..004c7a7 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_plug.eo',
4 'elm_popup.eo', 3 'elm_popup.eo',
5 'elm_route.eo', 4 'elm_route.eo',
6 'elm_scroller.eo', 5 'elm_scroller.eo',
@@ -782,6 +781,8 @@ elementary_pub_headers = [
782 'elm_photo_eo.legacy.h', 781 'elm_photo_eo.legacy.h',
783 'elm_player_eo.h', 782 'elm_player_eo.h',
784 'elm_player_eo.legacy.h', 783 'elm_player_eo.legacy.h',
784 'elm_plug_eo.h',
785 'elm_plug_eo.legacy.h',
785] 786]
786 787
787elementary_header_src = [ 788elementary_header_src = [