aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_vg_gradient_radial.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_radial.c
parentevas: initial implementation of a dumb SVG parser. (diff)
downloadefl-eb2bd9a8d8ff79bb30a1888969bb5960e8fed066.tar.gz
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_radial.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_radial.c110
1 files changed, 74 insertions, 36 deletions
diff --git a/src/lib/evas/canvas/evas_vg_gradient_radial.c b/src/lib/evas/canvas/evas_vg_gradient_radial.c
index ead0a49d98..b0743e5750 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_radial.c
@@ -3,10 +3,10 @@
#include "evas_vg_private.h"
-#define MY_CLASS EVAS_VG_GRADIENT_RADIAL_CLASS
+#define MY_CLASS EFL_VG_GRADIENT_RADIAL_CLASS
-typedef struct _Evas_VG_Gradient_Radial_Data Evas_VG_Gradient_Radial_Data;
-struct _Evas_VG_Gradient_Radial_Data
+typedef struct _Efl_VG_Gradient_Radial_Data Efl_VG_Gradient_Radial_Data;
+struct _Efl_VG_Gradient_Radial_Data
{
struct {
double x, y;
@@ -15,77 +15,77 @@ struct _Evas_VG_Gradient_Radial_Data
};
static void
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_center_set(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd,
- double x, double y)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_center_set(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd,
+ double x, double y)
{
pd->center.x = x;
pd->center.y = y;
- _evas_vg_node_changed(obj);
+ _efl_vg_base_changed(obj);
}
static void
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_center_get(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd,
- double *x, double *y)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_center_get(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd,
+ double *x, double *y)
{
if (x) *x = pd->center.x;
if (y) *y = pd->center.y;
}
static void
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_radius_set(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd,
- double r)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_radius_set(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd,
+ double r)
{
pd->radius = r;
- _evas_vg_node_changed(obj);
+ _efl_vg_base_changed(obj);
}
static double
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_radius_get(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_radius_get(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd)
{
return pd->radius;
}
static void
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_focal_set(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd,
- double x, double y)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_focal_set(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd,
+ double x, double y)
{
pd->focal.x = x;
pd->focal.y = y;
- _evas_vg_node_changed(obj);
+ _efl_vg_base_changed(obj);
}
static void
-_evas_vg_gradient_radial_efl_gfx_gradient_radial_focal_get(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Radial_Data *pd,
- double *x, double *y)
+_efl_vg_gradient_radial_efl_gfx_gradient_radial_focal_get(Eo *obj EINA_UNUSED,
+ Efl_VG_Gradient_Radial_Data *pd,
+ double *x, double *y)
{
if (x) *x = pd->focal.x;
if (y) *y = pd->focal.y;
}
static void
-_evas_vg_gradient_radial_render_pre(Eo *obj,
+_efl_vg_gradient_radial_render_pre(Eo *obj,
Eina_Matrix3 *parent,
Ector_Surface *s,
void *data,
- Evas_VG_Node_Data *nd)
+ Efl_VG_Base_Data *nd)
{
- Evas_VG_Gradient_Radial_Data *pd = data;
- Evas_VG_Gradient_Data *gd;
+ Efl_VG_Gradient_Radial_Data *pd = data;
+ Efl_VG_Gradient_Data *gd;
if (!nd->changed) return ;
nd->changed = EINA_FALSE;
- gd = eo_data_scope_get(obj, EVAS_VG_GRADIENT_CLASS);
- EVAS_VG_COMPUTE_MATRIX(current, parent, nd);
+ gd = eo_data_scope_get(obj, EFL_VG_GRADIENT_CLASS);
+ EFL_VG_COMPUTE_MATRIX(current, parent, nd);
if (!nd->renderer)
{
@@ -106,22 +106,60 @@ _evas_vg_gradient_radial_render_pre(Eo *obj,
}
static void
-_evas_vg_gradient_radial_eo_base_constructor(Eo *obj, Evas_VG_Gradient_Radial_Data *pd)
+_efl_vg_gradient_radial_eo_base_constructor(Eo *obj, Efl_VG_Gradient_Radial_Data *pd)
{
- Evas_VG_Node_Data *nd;
+ Efl_VG_Base_Data *nd;
eo_do_super(obj, MY_CLASS, eo_constructor());
- nd = eo_data_scope_get(obj, EVAS_VG_NODE_CLASS);
- nd->render_pre = _evas_vg_gradient_radial_render_pre;
+ nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
+ nd->render_pre = _efl_vg_gradient_radial_render_pre;
nd->data = pd;
}
static void
-_evas_vg_gradient_radial_eo_base_destructor(Eo *obj,
- Evas_VG_Gradient_Radial_Data *pd EINA_UNUSED)
+_efl_vg_gradient_radial_eo_base_destructor(Eo *obj,
+ Efl_VG_Gradient_Radial_Data *pd EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_destructor());
}
-#include "evas_vg_gradient_radial.eo.c"
+EAPI void
+evas_vg_gradient_radial_center_set(Eo *obj, double x, double y)
+{
+ eo_do(obj, efl_gfx_gradient_radial_center_set(x, y));
+}
+
+EAPI void
+evas_vg_gradient_radial_center_get(Eo *obj, double *x, double *y)
+{
+ eo_do(obj, efl_gfx_gradient_radial_center_get(x, y));
+}
+
+EAPI void
+evas_vg_gradient_radial_radius_set(Eo *obj, double r)
+{
+ eo_do(obj, efl_gfx_gradient_radial_radius_set(r));
+}
+
+EAPI double
+evas_vg_gradient_radial_radius_get(Eo *obj)
+{
+ double ret;
+
+ return eo_do_ret(obj, ret, efl_gfx_gradient_radial_radius_get());
+}
+
+EAPI void
+evas_vg_gradient_radial_focal_set(Eo *obj, double x, double y)
+{
+ eo_do(obj, efl_gfx_gradient_radial_focal_set(x, y));
+}
+
+EAPI void
+evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y)
+{
+ eo_do(obj, efl_gfx_gradient_radial_focal_get(x, y));
+}
+
+#include "efl_vg_gradient_radial.eo.c"