EFL_GRAPHICS_JOIN_LAST
} Efl_Graphics_Join;
+/**
+ * Type defining gradient stop.
+ * @since 1.13
+ */
+typedef struct _Efl_Graphics_Gradient_Stop Efl_Graphics_Gradient_Stop;
+struct _Efl_Graphics_Gradient_Stop
+{
+ double offset;
+ int r;
+ int g;
+ int b;
+ int a;
+};
+
+/**
+ * Type defining how the gradient spread after its limit.
+ * @since 1.13
+ */
+typedef enum _Efl_Graphics_Gradient_Spread
+{
+ EFL_GRAPHICS_GRADIENT_SPREAD_PAD,
+ EFL_GRAPHICS_GRADIENT_SPREAD_REFLECT,
+ EFL_GRAPHICS_GRADIENT_SPREAD_REPEAT,
+ EFL_GRAPHICS_GRADIENT_SPREAD_LAST
+} Efl_Graphics_Gradient_Spread;
+
#ifdef EFL_BETA_API_SUPPORT
/* Interfaces */
#include "interfaces/efl_text_properties.eo.h"
#include "interfaces/efl_graphics_shape.eo.h"
+#include "interfaces/efl_graphics_gradient.eo.h"
#endif
*/
typedef Eo Evas_VG_Node;
-typedef struct _Evas_VG_Gradient_Stop Evas_VG_Gradient_Stop;
-struct _Evas_VG_Gradient_Stop
-{
- double offset;
- int r;
- int g;
- int b;
- int a;
-};
-
-typedef enum _Evas_VG_Gradient_Spread
-{
- EVAS_VG_GRADIENT_SPREAD_PAD,
- EVAS_VG_GRADIENT_SPREAD_REFLECT,
- EVAS_VG_GRADIENT_SPREAD_REPEAT,
- EVAS_VG_GRADIENT_SPREAD_LAST
-} Evas_VG_Gradient_Spread;
-
/**
* @ingroup Evas_Object_VG
*
struct _Evas_VG_Gradient_Data
{
// FIXME: Later on we should deduplicate it somehow.
- Evas_VG_Gradient_Stop *colors;
+ Efl_Graphics_Gradient_Stop *colors;
unsigned int colors_count;
- Evas_VG_Gradient_Spread s;
+ Efl_Graphics_Gradient_Spread s;
};
void
-_evas_vg_gradient_stop_set(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Data *pd,
- const Evas_VG_Gradient_Stop *colors,
- unsigned int length)
+_evas_vg_gradient_efl_graphics_gradient_stop_set(Eo *obj EINA_UNUSED,
+ Evas_VG_Gradient_Data *pd,
+ const Efl_Graphics_Gradient_Stop *colors,
+ unsigned int length)
{
- pd->colors = realloc(pd->colors, length * sizeof(Evas_VG_Gradient_Stop));
+ pd->colors = realloc(pd->colors, length * sizeof(Efl_Graphics_Gradient_Stop));
if (!pd->colors)
{
pd->colors_count = 0;
return ;
}
- memcpy(pd->colors, colors, length * sizeof(Evas_VG_Gradient_Stop));
+ memcpy(pd->colors, colors, length * sizeof(Efl_Graphics_Gradient_Stop));
pd->colors_count = length;
}
void
-_evas_vg_gradient_stop_get(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Data *pd,
- const Evas_VG_Gradient_Stop **colors,
- unsigned int *length)
+_evas_vg_gradient_efl_graphics_gradient_stop_get(Eo *obj EINA_UNUSED,
+ Evas_VG_Gradient_Data *pd,
+ const Efl_Graphics_Gradient_Stop **colors,
+ unsigned int *length)
{
if (colors) *colors = pd->colors;
if (length) *length = pd->colors_count;
}
void
-_evas_vg_gradient_spread_set(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Data *pd,
- Evas_VG_Gradient_Spread s)
+_evas_vg_gradient_efl_graphics_gradient_spread_set(Eo *obj EINA_UNUSED,
+ Evas_VG_Gradient_Data *pd,
+ Efl_Graphics_Gradient_Spread s)
{
pd->s = s;
}
-Evas_VG_Gradient_Spread
-_evas_vg_gradient_spread_get(Eo *obj EINA_UNUSED,
- Evas_VG_Gradient_Data *pd)
+Efl_Graphics_Gradient_Spread
+_evas_vg_gradient_efl_graphics_gradient_spread_get(Eo *obj EINA_UNUSED,
+ Evas_VG_Gradient_Data *pd)
{
return pd->s;
}
-abstract Evas.VG_Gradient (Evas.VG_Node)
+abstract Evas.VG_Gradient (Evas.VG_Node, Efl.Graphics.Gradient)
{
eo_prefix: evas_vg_gradient;
legacy_prefix: null;
- properties {
- stop {
- set {
- }
- get {
- }
- values {
- const(Evas_VG_Gradient_Stop) *colors;
- uint length;
- }
- }
- spread {
- set {
- }
- get {
- }
- values {
- Evas_VG_Gradient_Spread s;
- }
- }
+ implements {
+ Efl.Graphics.Gradient.stop.set;
+ Efl.Graphics.Gradient.stop.get;
+ Efl.Graphics.Gradient.spread.set;
+ Efl.Graphics.Gradient.spread.get;
}
}