summaryrefslogtreecommitdiff
path: root/eo/smartobj/rect_smart.c
blob: fc7b5792f88d9ebbec42db4436f10b4e5b977dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#define EFL_BETA_API_SUPPORT
#include <Eo.h>
#include <Evas.h>
#include <Elementary.h>
#include "efl_canvas_group.eo.h"
#include "efl_canvas_group_clipped.eo.h"
#include "efl_canvas_object.eo.h"
#include "rect_smart.eo.h"

#define MY_CLASS RECT_SMART_CLASS

typedef struct
{
   Eo *rect;
} Evas_Object_RectSmart_Data;

EOLIAN static void
_rect_smart_efl_canvas_group_group_add(Eo *obj, Evas_Object_RectSmart_Data *pd)
{
   efl_canvas_group_add(eo_super(obj, MY_CLASS));

   //create your children here
   pd->rect = evas_object_rectangle_add(evas_object_evas_get(obj));

   // pdf->rect becomes smart member of obj
   evas_object_smart_member_add(pd->rect, obj);
}

EOLIAN static void
_rect_smart_rect1_color_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int r, int g, int b, int a)
{

}

EOLIAN static void
_rect_smart_rect1_color_get(Eo *obj, Evas_Object_RectSmart_Data *pd, int *r, int *g, int *b, int *a)
{

}

EOLIAN static void
_rect_smart_rect2_color_set(Eo *obj, Evas_Object_RectSmart_Data *pd, int r, int g, int b, int a)
{

}

EOLIAN static void
_rect_smart_rect2_color_get(Eo *obj, Evas_Object_RectSmart_Data *pd, int *r, int *g, int *b, int *a)
{

}

EOLIAN static Eo *
_rect_smart_eo_base_constructor(Eo *obj, Evas_Object_RectSmart_Data *pd)
{
   obj = eo_constructor(eo_super(obj, MY_CLASS));
   efl_canvas_object_type_set(obj, "rect_smart");

   return obj;
}

EOLIAN static void
_rect_smart_efl_canvas_group_group_move(Eo *obj, Evas_Object_RectSmart_Data *pd, Evas_Coord x, Evas_Coord y)
{
   evas_object_move(pd->rect, x, y);

   efl_canvas_group_move(eo_super(obj, MY_CLASS), x, y);
}

EOLIAN static void
_rect_smart_efl_canvas_group_group_resize(Eo *obj, Evas_Object_RectSmart_Data *pd, Evas_Coord w, Evas_Coord h)
{
   evas_object_resize(pd->rect, w, h);

   efl_canvas_group_resize(eo_super(obj, MY_CLASS), w, h);
}

EOLIAN static void
_rect_smart_efl_canvas_group_group_show(Eo *obj, Evas_Object_RectSmart_Data *pd)
{
   evas_object_show(pd->rect);

   efl_canvas_group_show(eo_super(obj, MY_CLASS));
}

EOLIAN static void
_rect_smart_efl_canvas_group_group_del(Eo *obj, Evas_Object_RectSmart_Data *pd)
{
   eo_del(pd->rect);

   efl_canvas_group_del(eo_super(obj, MY_CLASS));
}


#include "rect_smart.eo.c"