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:15:27 -0800
commit641de5be242116a68ae5293b7e1f7167342bbccd (patch)
tree81bccacd83b975f665aefede3bbed45d9784639f /src
parent3a1c4229f4fb811e78333ba3e53a3abb6b4e8aed (diff)
elm_grid: 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/D8174
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/elm_grid.c4
-rw-r--r--src/lib/elementary/elm_grid.eo63
-rw-r--r--src/lib/elementary/elm_grid_eo.c75
-rw-r--r--src/lib/elementary/elm_grid_eo.h96
-rw-r--r--src/lib/elementary/elm_grid_eo.legacy.c36
-rw-r--r--src/lib/elementary/elm_grid_eo.legacy.h89
-rw-r--r--src/lib/elementary/elm_grid_legacy.h2
-rw-r--r--src/lib/elementary/meson.build3
9 files changed, 305 insertions, 68 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 68eabc0..9d173f4 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -227,7 +227,6 @@ elm_legacy_eolian_files = \
227 lib/elementary/elm_actionslider_part.eo \ 227 lib/elementary/elm_actionslider_part.eo \
228 lib/elementary/elm_bubble_part.eo \ 228 lib/elementary/elm_bubble_part.eo \
229 lib/elementary/elm_fileselector_part.eo \ 229 lib/elementary/elm_fileselector_part.eo \
230 lib/elementary/elm_grid.eo \
231 lib/elementary/elm_icon.eo \ 230 lib/elementary/elm_icon.eo \
232 lib/elementary/elm_inwin.eo \ 231 lib/elementary/elm_inwin.eo \
233 lib/elementary/elm_mapbuf.eo \ 232 lib/elementary/elm_mapbuf.eo \
@@ -355,6 +354,8 @@ lib/elementary/elm_gesture_layer_eo.legacy.c \
355lib/elementary/elm_gesture_layer_eo.c \ 354lib/elementary/elm_gesture_layer_eo.c \
356lib/elementary/elm_glview_eo.legacy.c \ 355lib/elementary/elm_glview_eo.legacy.c \
357lib/elementary/elm_glview_eo.c \ 356lib/elementary/elm_glview_eo.c \
357lib/elementary/elm_grid_eo.legacy.c \
358lib/elementary/elm_grid_eo.c \
358lib/elementary/elm_hoversel_eo.c \ 359lib/elementary/elm_hoversel_eo.c \
359lib/elementary/elm_hoversel_item_eo.c \ 360lib/elementary/elm_hoversel_item_eo.c \
360lib/elementary/elm_hoversel_item_eo.legacy.c 361lib/elementary/elm_hoversel_item_eo.legacy.c
@@ -468,6 +469,8 @@ lib/elementary/elm_gesture_layer_eo.h \
468lib/elementary/elm_gesture_layer_eo.legacy.h \ 469lib/elementary/elm_gesture_layer_eo.legacy.h \
469lib/elementary/elm_glview_eo.h \ 470lib/elementary/elm_glview_eo.h \
470lib/elementary/elm_glview_eo.legacy.h \ 471lib/elementary/elm_glview_eo.legacy.h \
472lib/elementary/elm_grid_eo.h \
473lib/elementary/elm_grid_eo.legacy.h \
471lib/elementary/elm_hoversel_eo.h \ 474lib/elementary/elm_hoversel_eo.h \
472lib/elementary/elm_hoversel_eo.legacy.h \ 475lib/elementary/elm_hoversel_eo.legacy.h \
473lib/elementary/elm_hoversel_item_eo.h \ 476lib/elementary/elm_hoversel_item_eo.h \
diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c
index 16b3e2d..40b636e 100644
--- a/src/lib/elementary/elm_grid.c
+++ b/src/lib/elementary/elm_grid.c
@@ -6,7 +6,7 @@
6#define EFL_UI_FOCUS_COMPOSITION_PROTECTED 6#define EFL_UI_FOCUS_COMPOSITION_PROTECTED
7 7
8#include <Elementary.h> 8#include <Elementary.h>
9#include <elm_grid.eo.h> 9#include <elm_grid_eo.h>
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_grid.h" 11#include "elm_widget_grid.h"
12 12
@@ -217,4 +217,4 @@ _elm_grid_class_constructor(Efl_Class *klass)
217#define ELM_GRID_EXTRA_OPS \ 217#define ELM_GRID_EXTRA_OPS \
218 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_grid) 218 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_grid)
219 219
220#include "elm_grid.eo.c" 220#include "elm_grid_eo.c"
diff --git a/src/lib/elementary/elm_grid.eo b/src/lib/elementary/elm_grid.eo
deleted file mode 100644
index 157d875..0000000
--- a/src/lib/elementary/elm_grid.eo
+++ /dev/null
@@ -1,63 +0,0 @@
1class Elm.Grid extends Efl.Ui.Widget implements Efl.Ui.Focus.Composition, Efl.Ui.Legacy
2{
3 [[Elementary grid class]]
4 legacy_prefix: elm_grid;
5 eo_prefix: elm_obj_grid;
6 data: null;
7 methods {
8 @property grid_size {
9 set {
10 [[Set the virtual size of the grid]]
11 legacy: elm_grid_size_set;
12 }
13 get {
14 [[Get the virtual size of the grid]]
15 legacy: elm_grid_size_get;
16 }
17 values {
18 w: int; [[The virtual width of the grid]]
19 h: int; [[The virtual height of the grid]]
20 }
21 }
22 @property children {
23 get {
24 [[Get the list of the children for the grid.
25
26 Note: This is a duplicate of the list kept by the grid internally.
27 It's up to the user to destroy it when it no longer needs it.
28 It's possible to remove objects from the grid when walking this
29 list, but these removals won't be reflected on it.
30 ]]
31 return: list<Efl.Canvas.Object> @owned @warn_unused; [[List of children]]
32 }
33 }
34 clear {
35 [[Faster way to remove all child objects from a grid object.]]
36 params {
37 @in clear: bool; [[If $true, it will delete just removed children]]
38 }
39 }
40 unpack {
41 [[Unpack a child from a grid object]]
42 params {
43 @in subobj: Efl.Canvas.Object; [[The child to unpack]]
44 }
45 }
46 pack {
47 [[Pack child at given position and size]]
48 params {
49 @in subobj: Efl.Canvas.Object; [[The child to pack.]]
50 @in x: int; [[The virtual x coord at which to pack it.]]
51 @in y: int; [[The virtual y coord at which to pack it.]]
52 @in w: int; [[The virtual width at which to pack it.]]
53 @in h: int; [[The virtual height at which to pack it.]]
54 }
55 }
56 }
57 implements {
58 class.constructor;
59 Efl.Object.constructor;
60 Efl.Ui.Widget.theme_apply;
61 Efl.Ui.Focus.Composition.prepare;
62 }
63}
diff --git a/src/lib/elementary/elm_grid_eo.c b/src/lib/elementary/elm_grid_eo.c
new file mode 100644
index 0000000..9502a45
--- /dev/null
+++ b/src/lib/elementary/elm_grid_eo.c
@@ -0,0 +1,75 @@
1
2void _elm_grid_grid_size_set(Eo *obj, void *pd, int w, int h);
3
4EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
5
6void _elm_grid_grid_size_get(const Eo *obj, void *pd, int *w, int *h);
7
8EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
9
10Eina_List *_elm_grid_children_get(const Eo *obj, void *pd);
11
12EOAPI EFL_FUNC_BODY_CONST(elm_obj_grid_children_get, Eina_List *, NULL);
13
14void _elm_grid_clear(Eo *obj, void *pd, Eina_Bool clear);
15
16EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
17
18void _elm_grid_unpack(Eo *obj, void *pd, Efl_Canvas_Object *subobj);
19
20EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_unpack, EFL_FUNC_CALL(subobj), Efl_Canvas_Object *subobj);
21
22void _elm_grid_pack(Eo *obj, void *pd, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
23
24EOAPI EFL_VOID_FUNC_BODYV(elm_obj_grid_pack, EFL_FUNC_CALL(subobj, x, y, w, h), Efl_Canvas_Object *subobj, int x, int y, int w, int h);
25
26Efl_Object *_elm_grid_efl_object_constructor(Eo *obj, void *pd);
27
28
29Eina_Error _elm_grid_efl_ui_widget_theme_apply(Eo *obj, void *pd);
30
31
32void _elm_grid_efl_ui_focus_composition_prepare(Eo *obj, void *pd);
33
34
35static Eina_Bool
36_elm_grid_class_initializer(Efl_Class *klass)
37{
38 const Efl_Object_Ops *opsp = NULL;
39
40 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
41
42#ifndef ELM_GRID_EXTRA_OPS
43#define ELM_GRID_EXTRA_OPS
44#endif
45
46 EFL_OPS_DEFINE(ops,
47 EFL_OBJECT_OP_FUNC(elm_obj_grid_size_set, _elm_grid_grid_size_set),
48 EFL_OBJECT_OP_FUNC(elm_obj_grid_size_get, _elm_grid_grid_size_get),
49 EFL_OBJECT_OP_FUNC(elm_obj_grid_children_get, _elm_grid_children_get),
50 EFL_OBJECT_OP_FUNC(elm_obj_grid_clear, _elm_grid_clear),
51 EFL_OBJECT_OP_FUNC(elm_obj_grid_unpack, _elm_grid_unpack),
52 EFL_OBJECT_OP_FUNC(elm_obj_grid_pack, _elm_grid_pack),
53 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_grid_efl_object_constructor),
54 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_grid_efl_ui_widget_theme_apply),
55 EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_grid_efl_ui_focus_composition_prepare),
56 ELM_GRID_EXTRA_OPS
57 );
58 opsp = &ops;
59
60 return efl_class_functions_set(klass, opsp, ropsp);
61}
62
63static const Efl_Class_Description _elm_grid_class_desc = {
64 EO_VERSION,
65 "Elm.Grid",
66 EFL_CLASS_TYPE_REGULAR,
67 0,
68 _elm_grid_class_initializer,
69 _elm_grid_class_constructor,
70 NULL
71};
72
73EFL_DEFINE_CLASS(elm_grid_class_get, &_elm_grid_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
74
75#include "elm_grid_eo.legacy.c"
diff --git a/src/lib/elementary/elm_grid_eo.h b/src/lib/elementary/elm_grid_eo.h
new file mode 100644
index 0000000..d9ae0a8
--- /dev/null
+++ b/src/lib/elementary/elm_grid_eo.h
@@ -0,0 +1,96 @@
1#ifndef _ELM_GRID_EO_H_
2#define _ELM_GRID_EO_H_
3
4#ifndef _ELM_GRID_EO_CLASS_TYPE
5#define _ELM_GRID_EO_CLASS_TYPE
6
7typedef Eo Elm_Grid;
8
9#endif
10
11#ifndef _ELM_GRID_EO_TYPES
12#define _ELM_GRID_EO_TYPES
13
14
15#endif
16/** Elementary grid class
17 *
18 * @ingroup Elm_Grid
19 */
20#define ELM_GRID_CLASS elm_grid_class_get()
21
22EWAPI const Efl_Class *elm_grid_class_get(void);
23
24/**
25 * @brief Set the virtual size of the grid
26 *
27 * @param[in] obj The object.
28 * @param[in] w The virtual width of the grid
29 * @param[in] h The virtual height of the grid
30 *
31 * @ingroup Elm_Grid
32 */
33EOAPI void elm_obj_grid_size_set(Eo *obj, int w, int h);
34
35/**
36 * @brief Get the virtual size of the grid
37 *
38 * @param[in] obj The object.
39 * @param[out] w The virtual width of the grid
40 * @param[out] h The virtual height of the grid
41 *
42 * @ingroup Elm_Grid
43 */
44EOAPI void elm_obj_grid_size_get(const Eo *obj, int *w, int *h);
45
46/**
47 * @brief Get the list of the children for the grid.
48 *
49 * @note This is a duplicate of the list kept by the grid internally. It's up
50 * to the user to destroy it when it no longer needs it. It's possible to
51 * remove objects from the grid when walking this list, but these removals
52 * won't be reflected on it.
53 *
54 * @param[in] obj The object.
55 *
56 * @return List of children
57 *
58 * @ingroup Elm_Grid
59 */
60EOAPI Eina_List *elm_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
61
62/**
63 * @brief Faster way to remove all child objects from a grid object.
64 *
65 * @param[in] obj The object.
66 * @param[in] clear If @c true, it will delete just removed children
67 *
68 * @ingroup Elm_Grid
69 */
70EOAPI void elm_obj_grid_clear(Eo *obj, Eina_Bool clear);
71
72/**
73 * @brief Unpack a child from a grid object
74 *
75 * @param[in] obj The object.
76 * @param[in] subobj The child to unpack
77 *
78 * @ingroup Elm_Grid
79 */
80EOAPI void elm_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *subobj);
81
82/**
83 * @brief Pack child at given position and size
84 *
85 * @param[in] obj The object.
86 * @param[in] subobj The child to pack.
87 * @param[in] x The virtual x coord at which to pack it.
88 * @param[in] y The virtual y coord at which to pack it.
89 * @param[in] w The virtual width at which to pack it.
90 * @param[in] h The virtual height at which to pack it.
91 *
92 * @ingroup Elm_Grid
93 */
94EOAPI void elm_obj_grid_pack(Eo *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
95
96#endif
diff --git a/src/lib/elementary/elm_grid_eo.legacy.c b/src/lib/elementary/elm_grid_eo.legacy.c
new file mode 100644
index 0000000..074d488
--- /dev/null
+++ b/src/lib/elementary/elm_grid_eo.legacy.c
@@ -0,0 +1,36 @@
1
2EAPI void
3elm_grid_size_set(Elm_Grid *obj, int w, int h)
4{
5 elm_obj_grid_size_set(obj, w, h);
6}
7
8EAPI void
9elm_grid_size_get(const Elm_Grid *obj, int *w, int *h)
10{
11 elm_obj_grid_size_get(obj, w, h);
12}
13
14EAPI Eina_List *
15elm_grid_children_get(const Elm_Grid *obj)
16{
17 return elm_obj_grid_children_get(obj);
18}
19
20EAPI void
21elm_grid_clear(Elm_Grid *obj, Eina_Bool clear)
22{
23 elm_obj_grid_clear(obj, clear);
24}
25
26EAPI void
27elm_grid_unpack(Elm_Grid *obj, Efl_Canvas_Object *subobj)
28{
29 elm_obj_grid_unpack(obj, subobj);
30}
31
32EAPI void
33elm_grid_pack(Elm_Grid *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h)
34{
35 elm_obj_grid_pack(obj, subobj, x, y, w, h);
36}
diff --git a/src/lib/elementary/elm_grid_eo.legacy.h b/src/lib/elementary/elm_grid_eo.legacy.h
new file mode 100644
index 0000000..7dae7b5
--- /dev/null
+++ b/src/lib/elementary/elm_grid_eo.legacy.h
@@ -0,0 +1,89 @@
1#ifndef _ELM_GRID_EO_LEGACY_H_
2#define _ELM_GRID_EO_LEGACY_H_
3
4#ifndef _ELM_GRID_EO_CLASS_TYPE
5#define _ELM_GRID_EO_CLASS_TYPE
6
7typedef Eo Elm_Grid;
8
9#endif
10
11#ifndef _ELM_GRID_EO_TYPES
12#define _ELM_GRID_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Set the virtual size of the grid
19 *
20 * @param[in] obj The object.
21 * @param[in] w The virtual width of the grid
22 * @param[in] h The virtual height of the grid
23 *
24 * @ingroup Elm_Grid_Group
25 */
26EAPI void elm_grid_size_set(Elm_Grid *obj, int w, int h);
27
28/**
29 * @brief Get the virtual size of the grid
30 *
31 * @param[in] obj The object.
32 * @param[out] w The virtual width of the grid
33 * @param[out] h The virtual height of the grid
34 *
35 * @ingroup Elm_Grid_Group
36 */
37EAPI void elm_grid_size_get(const Elm_Grid *obj, int *w, int *h);
38
39/**
40 * @brief Get the list of the children for the grid.
41 *
42 * @note This is a duplicate of the list kept by the grid internally. It's up
43 * to the user to destroy it when it no longer needs it. It's possible to
44 * remove objects from the grid when walking this list, but these removals
45 * won't be reflected on it.
46 *
47 * @param[in] obj The object.
48 *
49 * @return List of children
50 *
51 * @ingroup Elm_Grid_Group
52 */
53EAPI Eina_List *elm_grid_children_get(const Elm_Grid *obj) EINA_WARN_UNUSED_RESULT;
54
55/**
56 * @brief Faster way to remove all child objects from a grid object.
57 *
58 * @param[in] obj The object.
59 * @param[in] clear If @c true, it will delete just removed children
60 *
61 * @ingroup Elm_Grid_Group
62 */
63EAPI void elm_grid_clear(Elm_Grid *obj, Eina_Bool clear);
64
65/**
66 * @brief Unpack a child from a grid object
67 *
68 * @param[in] obj The object.
69 * @param[in] subobj The child to unpack
70 *
71 * @ingroup Elm_Grid_Group
72 */
73EAPI void elm_grid_unpack(Elm_Grid *obj, Efl_Canvas_Object *subobj);
74
75/**
76 * @brief Pack child at given position and size
77 *
78 * @param[in] obj The object.
79 * @param[in] subobj The child to pack.
80 * @param[in] x The virtual x coord at which to pack it.
81 * @param[in] y The virtual y coord at which to pack it.
82 * @param[in] w The virtual width at which to pack it.
83 * @param[in] h The virtual height at which to pack it.
84 *
85 * @ingroup Elm_Grid_Group
86 */
87EAPI void elm_grid_pack(Elm_Grid *obj, Efl_Canvas_Object *subobj, int x, int y, int w, int h);
88
89#endif
diff --git a/src/lib/elementary/elm_grid_legacy.h b/src/lib/elementary/elm_grid_legacy.h
index d67c921..6884fb1 100644
--- a/src/lib/elementary/elm_grid_legacy.h
+++ b/src/lib/elementary/elm_grid_legacy.h
@@ -34,4 +34,4 @@ EAPI void elm_grid_pack_set(Evas_Object *subobj, Evas_Coord x, Evas_Coor
34 */ 34 */
35EAPI void elm_grid_pack_get(Evas_Object *subobj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); 35EAPI void elm_grid_pack_get(Evas_Object *subobj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
36 36
37#include "elm_grid.eo.legacy.h" \ No newline at end of file 37#include "elm_grid_eo.legacy.h" \ No newline at end of file
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 9691f54..c54c632 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -41,7 +41,6 @@ pub_legacy_eo_files = [
41 'elm_actionslider_part.eo', 41 'elm_actionslider_part.eo',
42 'elm_bubble_part.eo', 42 'elm_bubble_part.eo',
43 'elm_fileselector_part.eo', 43 'elm_fileselector_part.eo',
44 'elm_grid.eo',
45 'elm_icon.eo', 44 'elm_icon.eo',
46 'elm_inwin.eo', 45 'elm_inwin.eo',
47 'elm_mapbuf.eo', 46 'elm_mapbuf.eo',
@@ -754,6 +753,8 @@ elementary_pub_headers = [
754 'elm_gesture_layer_eo.legacy.h', 753 'elm_gesture_layer_eo.legacy.h',
755 'elm_glview_eo.h', 754 'elm_glview_eo.h',
756 'elm_glview_eo.legacy.h', 755 'elm_glview_eo.legacy.h',
756 'elm_grid_eo.h',
757 'elm_grid_eo.legacy.h',
757 'elm_hoversel_eo.h', 758 'elm_hoversel_eo.h',
758 'elm_hoversel_eo.legacy.h', 759 'elm_hoversel_eo.legacy.h',
759 'elm_hoversel_item_eo.h', 760 'elm_hoversel_item_eo.h',