ector: starting decoralating surface and parent by adding a property to access the surface independently.

NOTE: It would be nice to be able to protect independently the setter from the getter in eolian.
This commit is contained in:
Cedric BAIL 2015-11-15 22:57:48 +01:00
parent 412191e5f8
commit 4f0ef04788
3 changed files with 26 additions and 0 deletions

View File

@ -82,6 +82,7 @@ typedef struct _Ector_Renderer_Generic_Shape_Data Ector_Renderer_Generic_Shape_D
struct _Ector_Renderer_Generic_Base_Data
{
Ector_Generic_Surface *surface;
Eina_Matrix3 *m;
struct {

View File

@ -11,9 +11,23 @@ static void
_ector_renderer_generic_base_eo_base_destructor(Eo *obj, Ector_Renderer_Generic_Base_Data *pd)
{
if (pd->m) free(pd->m);
eo_unref(pd->surface);
eo_do_super(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, eo_destructor());
}
static Ector_Generic_Surface *
_ector_renderer_generic_base_surface_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Base_Data *pd)
{
return pd->surface;
}
static void
_ector_renderer_generic_base_surface_set(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Base_Data *pd, Ector_Generic_Surface *s)
{
pd->surface = eo_xref(s, obj);
}
static void
_ector_renderer_generic_base_transformation_set(Eo *obj EINA_UNUSED,
Ector_Renderer_Generic_Base_Data *pd,

View File

@ -5,6 +5,17 @@ abstract Ector.Renderer.Generic.Base (Eo.Base)
eo_prefix: ector_renderer;
legacy_prefix: null;
methods {
@property surface {
set {
[[Do not use.]]
}
get {
[[Get the surface associated to this renderer. Can not be set.]]
}
values {
s: Ector.Generic.Surface *;
}
}
@property transformation {
set {
}