forked from enlightenment/efl
eolian-cxx: Update examples syntax and fix implementation accordingly.
This commit is contained in:
parent
b2d8a216f1
commit
1eb8967dee
|
@ -27,7 +27,7 @@ struct _Colourable_Data
|
|||
typedef struct _Colourable_Data Colourable_Data;
|
||||
|
||||
void
|
||||
_colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
{
|
||||
if(!_colourable_impl_logdomain)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
|||
}
|
||||
|
||||
void
|
||||
_colourable_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
{
|
||||
if(_colourable_impl_logdomain)
|
||||
{
|
||||
|
|
|
@ -4,10 +4,6 @@ class Colourable (Eo.Base)
|
|||
legacy_prefix: legacy;
|
||||
data: Colourable_Data;
|
||||
methods {
|
||||
constructor {
|
||||
/*@ Default constructor. */
|
||||
legacy: null;
|
||||
}
|
||||
rgb_composite_constructor {
|
||||
/*@ Composite RGB Constructor. */
|
||||
legacy: null;
|
||||
|
@ -59,8 +55,11 @@ class Colourable (Eo.Base)
|
|||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
.rgb_composite_constructor;
|
||||
.rgb_24bits_constructor;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ extern "C"
|
|||
static efl::eina::log_domain domain("colourable");
|
||||
|
||||
void
|
||||
_colourable_constructor(Eo *obj, Colourable_Data *self)
|
||||
_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self)
|
||||
{
|
||||
EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
|
||||
self->r = self->g = self->b = 0;
|
||||
|
@ -28,7 +28,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self)
|
|||
}
|
||||
|
||||
void
|
||||
_colourable_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
_colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||
{
|
||||
EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
|
||||
eo_do_super(obj, MY_CLASS, eo_destructor());
|
||||
|
|
|
@ -13,7 +13,8 @@ struct _Colourable_Data
|
|||
};
|
||||
typedef struct _Colourable_Data Colourable_Data;
|
||||
|
||||
void _colourable_constructor(Eo *obj, Colourable_Data *self);
|
||||
void _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self);
|
||||
void _colourable_eo_base_destructor(Eo *obj, Colourable_Data *self);
|
||||
void _colourable_rgb_composite_constructor(Eo *obj, Colourable_Data *self, int r, int g, int b);
|
||||
void _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb);
|
||||
void _colourable_print_colour(Eo *obj, Colourable_Data *self);
|
||||
|
|
|
@ -3,12 +3,6 @@ class ColourableSquare (Colourable)
|
|||
legacy_prefix: legacy;
|
||||
data: ColourableSquare_Data;
|
||||
properties {
|
||||
size_constructor {
|
||||
legacy: null;
|
||||
params {
|
||||
@in int size;
|
||||
}
|
||||
}
|
||||
size {
|
||||
set {
|
||||
/*@ Sets size. */
|
||||
|
@ -22,6 +16,12 @@ class ColourableSquare (Colourable)
|
|||
}
|
||||
}
|
||||
methods {
|
||||
size_constructor {
|
||||
legacy: null;
|
||||
params {
|
||||
@in int size;
|
||||
}
|
||||
}
|
||||
size_print { /*@ Show the square. */ }
|
||||
}
|
||||
constructors {
|
||||
|
|
Loading…
Reference in New Issue