forked from enlightenment/efl
evas: remove Efl.VG.Image for now as it was not implemented.
This commit is contained in:
parent
2613d17844
commit
c1836b97ed
|
@ -39,8 +39,7 @@ evas_eolian_files = \
|
|||
lib/evas/canvas/efl_vg_root_node.eo \
|
||||
lib/evas/canvas/efl_vg_gradient.eo \
|
||||
lib/evas/canvas/efl_vg_gradient_radial.eo \
|
||||
lib/evas/canvas/efl_vg_gradient_linear.eo \
|
||||
lib/evas/canvas/efl_vg_image.eo
|
||||
lib/evas/canvas/efl_vg_gradient_linear.eo
|
||||
|
||||
evas_eolian_c = $(evas_eolian_files:%.eo=%.eo.c)
|
||||
evas_eolian_h = $(evas_eolian_files:%.eo=%.eo.h) \
|
||||
|
@ -222,7 +221,6 @@ lib/evas/canvas/evas_vg_gradient.c \
|
|||
lib/evas/canvas/evas_vg_gradient_linear.c \
|
||||
lib/evas/canvas/evas_vg_gradient_radial.c \
|
||||
lib/evas/canvas/evas_vg_utils.c \
|
||||
lib/evas/canvas/evas_vg_image.c \
|
||||
lib/evas/canvas/evas_vg_shape.c
|
||||
|
||||
# Engine
|
||||
|
|
|
@ -861,4 +861,3 @@ typedef enum _Evas_3D_Material_Attrib
|
|||
#include "canvas/efl_vg_gradient.eo.h"
|
||||
#include "canvas/efl_vg_gradient_linear.eo.h"
|
||||
#include "canvas/efl_vg_gradient_radial.eo.h"
|
||||
#include "canvas/efl_vg_image.eo.h"
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
class Efl.VG.Image (Efl.VG.Base, Efl.File)
|
||||
{
|
||||
legacy_prefix: evas_vg_image;
|
||||
properties {
|
||||
position {
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
int x;
|
||||
int y;
|
||||
}
|
||||
}
|
||||
size {
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
uint w;
|
||||
uint h;
|
||||
}
|
||||
}
|
||||
// FIXME: add aspect ratio following SVG specification
|
||||
}
|
||||
implements {
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
Efl.File.mmap.set;
|
||||
Efl.File.mmap.get;
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
#include "evas_common_private.h"
|
||||
#include "evas_private.h"
|
||||
|
||||
#include <strings.h>
|
||||
|
||||
#include "evas_vg_private.h"
|
||||
|
||||
typedef struct _Efl_VG_Image_Data Efl_VG_Image_Data;
|
||||
struct _Efl_VG_Image_Data
|
||||
{
|
||||
// FIXME: only manipulate Eina_File internally.
|
||||
Eina_File *f;
|
||||
Eina_Stringshare *key;
|
||||
|
||||
int x, y;
|
||||
unsigned int w, h;
|
||||
};
|
||||
|
||||
static void
|
||||
_efl_vg_image_position_set(Eo *obj, Efl_VG_Image_Data *pd, int x, int y)
|
||||
{
|
||||
pd->x = x;
|
||||
pd->y = y;
|
||||
|
||||
_efl_vg_base_changed(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_position_get(Eo *obj, Efl_VG_Image_Data *pd, int *x, int *y)
|
||||
{
|
||||
if (x) *x = pd->x;
|
||||
if (y) *y = pd->y;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_size_set(Eo *obj, Efl_VG_Image_Data *pd,
|
||||
unsigned int w, unsigned int h)
|
||||
{
|
||||
pd->w = w;
|
||||
pd->h = h;
|
||||
|
||||
_efl_vg_base_changed(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_size_get(Eo *obj, Efl_VG_Image_Data *pd,
|
||||
unsigned int *w, unsigned int *h)
|
||||
{
|
||||
if (w) *w = pd->w;
|
||||
if (h) *h = pd->h;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_efl_vg_image_efl_file_mmap_set(Eo *obj EINA_UNUSED, Efl_VG_Image_Data *pd,
|
||||
const Eina_File *f, const char *key)
|
||||
{
|
||||
Eina_File *tmp = pd->f;
|
||||
|
||||
pd->f = eina_file_dup(f);
|
||||
eina_file_close(tmp);
|
||||
eina_stringshare_replace(&pd->key, key);
|
||||
|
||||
_efl_vg_base_changed(obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_efl_file_mmap_get(Eo *obj EINA_UNUSED, Efl_VG_Image_Data *pd,
|
||||
const Eina_File **f, const char **key)
|
||||
{
|
||||
if (f) *f = pd->f;
|
||||
if (key) *key = pd->key;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_efl_vg_image_efl_file_file_set(Eo *obj, Efl_VG_Image_Data *pd,
|
||||
const char *file, const char *key)
|
||||
{
|
||||
Eina_File *tmp;
|
||||
Eina_Bool r;
|
||||
|
||||
tmp = eina_file_open(file, EINA_FALSE);
|
||||
r = _efl_vg_image_efl_file_mmap_set(obj, pd, tmp, key);
|
||||
eina_file_close(tmp);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_efl_file_file_get(Eo *obj EINA_UNUSED, Efl_VG_Image_Data *pd,
|
||||
const char **file, const char **key)
|
||||
{
|
||||
if (file) *file = eina_file_filename_get(pd->f);
|
||||
if (key) *key = pd->key;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_eo_base_constructor(Eo *obj, Efl_VG_Image_Data *pd)
|
||||
{
|
||||
eo_error_set(obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_vg_image_eo_base_destructor(Eo *obj, Efl_VG_Image_Data *pd)
|
||||
{
|
||||
eo_error_set(obj);
|
||||
}
|
||||
|
||||
#include "efl_vg_image.eo.c"
|
Loading…
Reference in New Issue