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;
|
typedef struct _Colourable_Data Colourable_Data;
|
||||||
|
|
||||||
void
|
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)
|
if(!_colourable_impl_logdomain)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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)
|
if(_colourable_impl_logdomain)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,6 @@ class Colourable (Eo.Base)
|
||||||
legacy_prefix: legacy;
|
legacy_prefix: legacy;
|
||||||
data: Colourable_Data;
|
data: Colourable_Data;
|
||||||
methods {
|
methods {
|
||||||
constructor {
|
|
||||||
/*@ Default constructor. */
|
|
||||||
legacy: null;
|
|
||||||
}
|
|
||||||
rgb_composite_constructor {
|
rgb_composite_constructor {
|
||||||
/*@ Composite RGB Constructor. */
|
/*@ Composite RGB Constructor. */
|
||||||
legacy: null;
|
legacy: null;
|
||||||
|
@ -59,8 +55,11 @@ class Colourable (Eo.Base)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
implements {
|
||||||
|
Eo.Base.constructor;
|
||||||
|
Eo.Base.destructor;
|
||||||
|
}
|
||||||
constructors {
|
constructors {
|
||||||
.constructor;
|
|
||||||
.rgb_composite_constructor;
|
.rgb_composite_constructor;
|
||||||
.rgb_24bits_constructor;
|
.rgb_24bits_constructor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ extern "C"
|
||||||
static efl::eina::log_domain domain("colourable");
|
static efl::eina::log_domain domain("colourable");
|
||||||
|
|
||||||
void
|
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;
|
EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
|
||||||
self->r = self->g = self->b = 0;
|
self->r = self->g = self->b = 0;
|
||||||
|
@ -28,7 +28,7 @@ _colourable_constructor(Eo *obj, Colourable_Data *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
EINA_CXX_DOM_LOG_DBG(domain) << __func__ << std::endl;
|
||||||
eo_do_super(obj, MY_CLASS, eo_destructor());
|
eo_do_super(obj, MY_CLASS, eo_destructor());
|
||||||
|
|
|
@ -13,7 +13,8 @@ struct _Colourable_Data
|
||||||
};
|
};
|
||||||
typedef struct _Colourable_Data 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_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_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb);
|
||||||
void _colourable_print_colour(Eo *obj, Colourable_Data *self);
|
void _colourable_print_colour(Eo *obj, Colourable_Data *self);
|
||||||
|
|
|
@ -3,12 +3,6 @@ class ColourableSquare (Colourable)
|
||||||
legacy_prefix: legacy;
|
legacy_prefix: legacy;
|
||||||
data: ColourableSquare_Data;
|
data: ColourableSquare_Data;
|
||||||
properties {
|
properties {
|
||||||
size_constructor {
|
|
||||||
legacy: null;
|
|
||||||
params {
|
|
||||||
@in int size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
size {
|
size {
|
||||||
set {
|
set {
|
||||||
/*@ Sets size. */
|
/*@ Sets size. */
|
||||||
|
@ -22,6 +16,12 @@ class ColourableSquare (Colourable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
methods {
|
methods {
|
||||||
|
size_constructor {
|
||||||
|
legacy: null;
|
||||||
|
params {
|
||||||
|
@in int size;
|
||||||
|
}
|
||||||
|
}
|
||||||
size_print { /*@ Show the square. */ }
|
size_print { /*@ Show the square. */ }
|
||||||
}
|
}
|
||||||
constructors {
|
constructors {
|
||||||
|
|
Loading…
Reference in New Issue