summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_gradient_linear.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:30:59 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:30:59 +0200
commiteb2bd9a8d8ff79bb30a1888969bb5960e8fed066 (patch)
tree441470b05dc400cb8f76c806909ef67f6c2de13a /src/lib/evas/canvas/evas_vg_gradient_linear.c
parentdd1cae7329c933d48c488a99d297706d29d4521a (diff)
evas: move Evas.VG_* to Efl.VG.*
This also introduce legacy API for all of them.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_gradient_linear.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c90
1 files changed, 57 insertions, 33 deletions
diff --git a/src/lib/evas/canvas/evas_vg_gradient_linear.c b/src/lib/evas/canvas/evas_vg_gradient_linear.c
index c1d8ffc461..d29038c579 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_linear.c
@@ -5,10 +5,10 @@
5 5
6#include <strings.h> 6#include <strings.h>
7 7
8#define MY_CLASS EVAS_VG_GRADIENT_LINEAR_CLASS 8#define MY_CLASS EFL_VG_GRADIENT_LINEAR_CLASS
9 9
10typedef struct _Evas_VG_Gradient_Linear_Data Evas_VG_Gradient_Linear_Data; 10typedef struct _Efl_VG_Gradient_Linear_Data Efl_VG_Gradient_Linear_Data;
11struct _Evas_VG_Gradient_Linear_Data 11struct _Efl_VG_Gradient_Linear_Data
12{ 12{
13 struct { 13 struct {
14 double x, y; 14 double x, y;
@@ -16,60 +16,60 @@ struct _Evas_VG_Gradient_Linear_Data
16}; 16};
17 17
18static void 18static void
19_evas_vg_gradient_linear_efl_gfx_gradient_linear_start_set(Eo *obj EINA_UNUSED, 19_efl_vg_gradient_linear_efl_gfx_gradient_linear_start_set(Eo *obj EINA_UNUSED,
20 Evas_VG_Gradient_Linear_Data *pd, 20 Efl_VG_Gradient_Linear_Data *pd,
21 double x, double y) 21 double x, double y)
22{ 22{
23 pd->start.x = x; 23 pd->start.x = x;
24 pd->start.y = y; 24 pd->start.y = y;
25 25
26 _evas_vg_node_changed(obj); 26 _efl_vg_base_changed(obj);
27} 27}
28 28
29static void 29static void
30_evas_vg_gradient_linear_efl_gfx_gradient_linear_start_get(Eo *obj EINA_UNUSED, 30_efl_vg_gradient_linear_efl_gfx_gradient_linear_start_get(Eo *obj EINA_UNUSED,
31 Evas_VG_Gradient_Linear_Data *pd, 31 Efl_VG_Gradient_Linear_Data *pd,
32 double *x, double *y) 32 double *x, double *y)
33{ 33{
34 if (x) *x = pd->start.x; 34 if (x) *x = pd->start.x;
35 if (y) *y = pd->start.y; 35 if (y) *y = pd->start.y;
36} 36}
37 37
38static void 38static void
39_evas_vg_gradient_linear_efl_gfx_gradient_linear_end_set(Eo *obj EINA_UNUSED, 39_efl_vg_gradient_linear_efl_gfx_gradient_linear_end_set(Eo *obj EINA_UNUSED,
40 Evas_VG_Gradient_Linear_Data *pd, 40 Efl_VG_Gradient_Linear_Data *pd,
41 double x, double y) 41 double x, double y)
42{ 42{
43 pd->end.x = x; 43 pd->end.x = x;
44 pd->end.y = y; 44 pd->end.y = y;
45 45
46 _evas_vg_node_changed(obj); 46 _efl_vg_base_changed(obj);
47} 47}
48 48
49static void 49static void
50_evas_vg_gradient_linear_efl_gfx_gradient_linear_end_get(Eo *obj EINA_UNUSED, 50_efl_vg_gradient_linear_efl_gfx_gradient_linear_end_get(Eo *obj EINA_UNUSED,
51 Evas_VG_Gradient_Linear_Data *pd, 51 Efl_VG_Gradient_Linear_Data *pd,
52 double *x, double *y) 52 double *x, double *y)
53{ 53{
54 if (x) *x = pd->end.x; 54 if (x) *x = pd->end.x;
55 if (y) *y = pd->end.y; 55 if (y) *y = pd->end.y;
56} 56}
57 57
58static void 58static void
59_evas_vg_gradient_linear_render_pre(Eo *obj, 59_efl_vg_gradient_linear_render_pre(Eo *obj,
60 Eina_Matrix3 *parent, 60 Eina_Matrix3 *parent,
61 Ector_Surface *s, 61 Ector_Surface *s,
62 void *data, 62 void *data,
63 Evas_VG_Node_Data *nd) 63 Efl_VG_Base_Data *nd)
64{ 64{
65 Evas_VG_Gradient_Linear_Data *pd = data; 65 Efl_VG_Gradient_Linear_Data *pd = data;
66 Evas_VG_Gradient_Data *gd; 66 Efl_VG_Gradient_Data *gd;
67 67
68 if (!nd->changed) return ; 68 if (!nd->changed) return ;
69 nd->changed = EINA_FALSE; 69 nd->changed = EINA_FALSE;
70 70
71 gd = eo_data_scope_get(obj, EVAS_VG_GRADIENT_CLASS); 71 gd = eo_data_scope_get(obj, EFL_VG_GRADIENT_CLASS);
72 EVAS_VG_COMPUTE_MATRIX(current, parent, nd); 72 EFL_VG_COMPUTE_MATRIX(current, parent, nd);
73 73
74 if (!nd->renderer) 74 if (!nd->renderer)
75 { 75 {
@@ -89,22 +89,46 @@ _evas_vg_gradient_linear_render_pre(Eo *obj,
89} 89}
90 90
91static void 91static void
92_evas_vg_gradient_linear_eo_base_constructor(Eo *obj, 92_efl_vg_gradient_linear_eo_base_constructor(Eo *obj,
93 Evas_VG_Gradient_Linear_Data *pd) 93 Efl_VG_Gradient_Linear_Data *pd)
94{ 94{
95 Evas_VG_Node_Data *nd; 95 Efl_VG_Base_Data *nd;
96 96
97 eo_do_super(obj, MY_CLASS, eo_constructor()); 97 eo_do_super(obj, MY_CLASS, eo_constructor());
98 98
99 nd = eo_data_scope_get(obj, EVAS_VG_NODE_CLASS); 99 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
100 nd->render_pre = _evas_vg_gradient_linear_render_pre; 100 nd->render_pre = _efl_vg_gradient_linear_render_pre;
101 nd->data = pd; 101 nd->data = pd;
102} 102}
103 103
104void 104void
105_evas_vg_gradient_linear_eo_base_destructor(Eo *obj, Evas_VG_Gradient_Linear_Data *pd EINA_UNUSED) 105_efl_vg_gradient_linear_eo_base_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data *pd EINA_UNUSED)
106{ 106{
107 eo_do_super(obj, MY_CLASS, eo_destructor()); 107 eo_do_super(obj, MY_CLASS, eo_destructor());
108} 108}
109 109
110#include "evas_vg_gradient_linear.eo.c" 110EAPI void
111evas_vg_gradient_linear_start_set(Eo *obj, double x, double y)
112{
113 eo_do(obj, efl_gfx_gradient_linear_start_set(x, y));
114}
115
116EAPI void
117evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y)
118{
119 eo_do(obj, efl_gfx_gradient_linear_start_get(x, y));
120}
121
122EAPI void
123evas_vg_gradient_linear_end_set(Eo *obj, double x, double y)
124{
125 eo_do(obj, efl_gfx_gradient_linear_end_set(x, y));
126}
127
128EAPI void
129evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y)
130{
131 eo_do(obj, efl_gfx_gradient_linear_end_get(x, y));
132}
133
134#include "efl_vg_gradient_linear.eo.c"