summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-05-15 14:40:54 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-05-15 14:40:54 +0900
commit8725359a78528d8114e836022079155944d5a69f (patch)
tree6d3f764297ae56a5581489a2e3b13064e4e56541
parentab0c0e1fa101b61878625fa15bcd5189d89602e8 (diff)
make eo compatible to latest EFL
-rw-r--r--eo/smartobj/CMakeLists.txt6
-rw-r--r--eo/smartobj/rect_smart.c47
-rw-r--r--eo/smartobj/rect_smart.eo19
3 files changed, 22 insertions, 50 deletions
diff --git a/eo/smartobj/CMakeLists.txt b/eo/smartobj/CMakeLists.txt
index 4fff446..0d9db04 100644
--- a/eo/smartobj/CMakeLists.txt
+++ b/eo/smartobj/CMakeLists.txt
@@ -16,11 +16,11 @@ pkg_check_modules(ELEMENTARY REQUIRED elementary)
16include_directories(${ELEMENTARY_INCLUDE_DIRS}) 16include_directories(${ELEMENTARY_INCLUDE_DIRS})
17 17
18add_custom_command(OUTPUT rect_smart.eo.c 18add_custom_command(OUTPUT rect_smart.eo.c
19 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} --gc -o rect_smart.eo.c rect_smart.eo) 19 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gc rect_smart.eo)
20add_custom_command(OUTPUT rect_smart.eo.h 20add_custom_command(OUTPUT rect_smart.eo.h
21 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} --gh -o rect_smart.eo.h rect_smart.eo) 21 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gh rect_smart.eo)
22add_custom_command(OUTPUT rect_smart.c 22add_custom_command(OUTPUT rect_smart.c
23 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} --gi -o rect_smart.c rect_smart.eo) 23 COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gi -o rect_smart rect_smart.eo)
24 24
25add_custom_target(eo_file ALL 25add_custom_target(eo_file ALL
26 DEPENDS rect_smart.eo.c rect_smart.eo.h rect_smart.c) 26 DEPENDS rect_smart.eo.c rect_smart.eo.h rect_smart.c)
diff --git a/eo/smartobj/rect_smart.c b/eo/smartobj/rect_smart.c
index fc7b579..36ccc81 100644
--- a/eo/smartobj/rect_smart.c
+++ b/eo/smartobj/rect_smart.c
@@ -1,30 +1,15 @@
1#define EFL_BETA_API_SUPPORT 1#define EFL_BETA_API_SUPPORT
2#include <Eo.h> 2#include <Eo.h>
3#include <Eina.h>
3#include <Evas.h> 4#include <Evas.h>
4#include <Elementary.h> 5#include <Elementary.h>
5#include "efl_canvas_group.eo.h"
6#include "efl_canvas_group_clipped.eo.h" 6#include "efl_canvas_group_clipped.eo.h"
7#include "efl_canvas_object.eo.h"
8#include "rect_smart.eo.h" 7#include "rect_smart.eo.h"
9 8
10#define MY_CLASS RECT_SMART_CLASS
11
12typedef struct 9typedef struct
13{ 10{
14 Eo *rect;
15} Evas_Object_RectSmart_Data;
16
17EOLIAN static void
18_rect_smart_efl_canvas_group_group_add(Eo *obj, Evas_Object_RectSmart_Data *pd)
19{
20 efl_canvas_group_add(eo_super(obj, MY_CLASS));
21
22 //create your children here
23 pd->rect = evas_object_rectangle_add(evas_object_evas_get(obj));
24 11
25 // pdf->rect becomes smart member of obj 12} Evas_Object_RectSmart_Data;
26 evas_object_smart_member_add(pd->rect, obj);
27}
28 13
29EOLIAN static void 14EOLIAN static void
30_rect_smart_rect1_color_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int r, int g, int b, int a) 15_rect_smart_rect1_color_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int r, int g, int b, int a)
@@ -50,46 +35,40 @@ _rect_smart_rect2_color_get(Eo *obj, Evas_Object_RectSmart_Data *pd, int *r, int
50 35
51} 36}
52 37
53EOLIAN static Eo * 38EOLIAN static Efl_Object *
54_rect_smart_eo_base_constructor(Eo *obj, Evas_Object_RectSmart_Data *pd) 39_rect_smart_efl_object_constructor(Eo *obj, Evas_Object_RectSmart_Data *pd)
55{ 40{
56 obj = eo_constructor(eo_super(obj, MY_CLASS));
57 efl_canvas_object_type_set(obj, "rect_smart");
58 41
59 return obj;
60} 42}
61 43
62EOLIAN static void 44EOLIAN static void
63_rect_smart_efl_canvas_group_group_move(Eo *obj, Evas_Object_RectSmart_Data *pd, Evas_Coord x, Evas_Coord y) 45_rect_smart_efl_gfx_visible_set(Eo *obj, Evas_Object_RectSmart_Data *pd, Eina_Bool v)
64{ 46{
65 evas_object_move(pd->rect, x, y);
66 47
67 efl_canvas_group_move(eo_super(obj, MY_CLASS), x, y);
68} 48}
69 49
70EOLIAN static void 50EOLIAN static void
71_rect_smart_efl_canvas_group_group_resize(Eo *obj, Evas_Object_RectSmart_Data *pd, Evas_Coord w, Evas_Coord h) 51_rect_smart_efl_gfx_position_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int x, int y)
72{ 52{
73 evas_object_resize(pd->rect, w, h);
74 53
75 efl_canvas_group_resize(eo_super(obj, MY_CLASS), w, h);
76} 54}
77 55
78EOLIAN static void 56EOLIAN static void
79_rect_smart_efl_canvas_group_group_show(Eo *obj, Evas_Object_RectSmart_Data *pd) 57_rect_smart_efl_gfx_size_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int w, int h)
80{ 58{
81 evas_object_show(pd->rect);
82 59
83 efl_canvas_group_show(eo_super(obj, MY_CLASS));
84} 60}
85 61
86EOLIAN static void 62EOLIAN static void
87_rect_smart_efl_canvas_group_group_del(Eo *obj, Evas_Object_RectSmart_Data *pd) 63_rect_smart_efl_canvas_group_group_member_add(Eo *obj, Evas_Object_RectSmart_Data *pd, Efl_Canvas_Object *sub_obj)
88{ 64{
89 eo_del(pd->rect);
90 65
91 efl_canvas_group_del(eo_super(obj, MY_CLASS));
92} 66}
93 67
68EOLIAN static void
69_rect_smart_efl_canvas_group_group_member_del(Eo *obj, Evas_Object_RectSmart_Data *pd, Efl_Canvas_Object *sub_obj)
70{
71
72}
94 73
95#include "rect_smart.eo.c" 74#include "rect_smart.eo.c"
diff --git a/eo/smartobj/rect_smart.eo b/eo/smartobj/rect_smart.eo
index 17ec2a4..d0e4c6c 100644
--- a/eo/smartobj/rect_smart.eo
+++ b/eo/smartobj/rect_smart.eo
@@ -32,18 +32,11 @@ class Rect_Smart(Efl.Canvas.Group.Clipped)
32 } 32 }
33 33
34 implements { 34 implements {
35 Eo.Base.constructor; 35 Efl.Object.constructor;
36 Efl.Canvas.Group.group_add; 36 Efl.Gfx.visible { set; }
37 Efl.Canvas.Group.group_show; 37 Efl.Gfx.position { set; }
38 Efl.Canvas.Group.group_move; 38 Efl.Gfx.size { set; }
39 Efl.Canvas.Group.group_resize; 39 Efl.Canvas.Group.group_member_add;
40 Efl.Canvas.Group.group_del; 40 Efl.Canvas.Group.group_member_del;
41 //Evas.Object_Smart.add;
42 //Evas.Object_Smart.hide;
43 //Evas.Object_Smart.show;
44 //Evas.Object_Smart.move;
45 //Evas.Object_Smart.del;
46 //Evas.Object_Smart.resize;
47 //Evas.Object_Smart.calculate;
48 } 41 }
49} 42}