forked from enlightenment/efl
eolian: move efl eo files over to the new ctor syntax
This commit is contained in:
parent
21530bd5d8
commit
46715c3574
|
@ -4,11 +4,11 @@ class Colourable (Eo.Base)
|
|||
legacy_prefix: legacy;
|
||||
data: Colourable_Data;
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Default constructor. */
|
||||
legacy: null;
|
||||
}
|
||||
rgb_composite_constructor @constructor {
|
||||
rgb_composite_constructor {
|
||||
/*@ Composite RGB Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -17,7 +17,7 @@ class Colourable (Eo.Base)
|
|||
@in int b; /*@ The blue component. */
|
||||
}
|
||||
}
|
||||
rgb_24bits_constructor @constructor {
|
||||
rgb_24bits_constructor {
|
||||
/*@ RGB Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -59,6 +59,11 @@ class Colourable (Eo.Base)
|
|||
}
|
||||
}
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
.rgb_composite_constructor;
|
||||
.rgb_24bits_constructor;
|
||||
}
|
||||
events {
|
||||
colour_changed: int;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ class ColourableSquare (Colourable)
|
|||
legacy_prefix: legacy;
|
||||
data: ColourableSquare_Data;
|
||||
properties {
|
||||
size_constructor @constructor {
|
||||
size_constructor {
|
||||
legacy: null;
|
||||
params {
|
||||
@in int size;
|
||||
|
@ -24,4 +24,7 @@ class ColourableSquare (Colourable)
|
|||
methods {
|
||||
size_print { /*@ Show the square. */ }
|
||||
}
|
||||
constructors {
|
||||
.size_constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Animator (Eo.Base)
|
|||
{
|
||||
eo_prefix: ecore_animator;
|
||||
methods {
|
||||
timeline_constructor @constructor {
|
||||
timeline_constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -11,7 +11,7 @@ class Ecore.Animator (Eo.Base)
|
|||
@in const(void)* data;
|
||||
}
|
||||
}
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -26,4 +26,8 @@ class Ecore.Animator (Eo.Base)
|
|||
Eo.Base.event_freeze;
|
||||
Eo.Base.event_thaw;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
.timeline_constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Exe (Eo.Base, Efl.Control)
|
|||
{
|
||||
eo_prefix: ecore_obj_exe;
|
||||
properties {
|
||||
command @constructor {
|
||||
command {
|
||||
/*@ Control the command that's executed. FIXME: May need a split/rename. */
|
||||
set {
|
||||
legacy: null;
|
||||
|
@ -24,6 +24,9 @@ class Ecore.Exe (Eo.Base, Efl.Control)
|
|||
Eo.Base.finalize;
|
||||
Efl.Control.suspend.set;
|
||||
}
|
||||
constructors {
|
||||
.command;
|
||||
}
|
||||
events {
|
||||
data,get: Ecore_Exe_Event_Data;
|
||||
data,error: Ecore_Exe_Event_Data;
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Idle.Enterer (Eo.Base)
|
|||
{
|
||||
eo_prefix: ecore_idle_enterer;
|
||||
methods {
|
||||
before_constructor @constructor {
|
||||
before_constructor {
|
||||
/*@ Contructor. Will insert the handler at the beginning of the list. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -10,7 +10,7 @@ class Ecore.Idle.Enterer (Eo.Base)
|
|||
@in const(void)* data;
|
||||
}
|
||||
}
|
||||
after_constructor @constructor {
|
||||
after_constructor {
|
||||
/*@ Contructor. Will insert the handler at the end of the list. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -23,4 +23,8 @@ class Ecore.Idle.Enterer (Eo.Base)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.before_constructor;
|
||||
.after_constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Idle.Exiter (Eo.Base)
|
|||
{
|
||||
eo_prefix: ecore_idle_exiter;
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -15,4 +15,7 @@ class Ecore.Idle.Exiter (Eo.Base)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Idler (Eo.Base)
|
|||
{
|
||||
eo_prefix: ecore_idler;
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -15,4 +15,7 @@ class Ecore.Idler (Eo.Base)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ class Ecore.Job (Eo.Base)
|
|||
{
|
||||
eo_prefix: ecore_job;
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -15,4 +15,7 @@ class Ecore.Job (Eo.Base)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class Ecore.Poller (Eo.Base)
|
||||
{
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor with parameters for Ecore Poller. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -41,4 +41,7 @@ class Ecore.Poller (Eo.Base)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class Ecore.Timer (Eo.Base)
|
|||
}
|
||||
}
|
||||
methods {
|
||||
loop_constructor @constructor {
|
||||
loop_constructor {
|
||||
/*@ Create a timer to call in a given time from now */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -39,7 +39,7 @@ class Ecore.Timer (Eo.Base)
|
|||
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
|
||||
}
|
||||
}
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Create a timer to call in a given time from when the mainloop woke up from sleep */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -100,5 +100,9 @@ class Ecore.Timer (Eo.Base)
|
|||
*
|
||||
* @see ecore_timer_freeze()
|
||||
*/
|
||||
}
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
.loop_constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ Return event freeze count. */
|
|||
}
|
||||
}
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Call the object's constructor.
|
||||
Should not be used with #eo_do. Only use it with #eo_do_super. */
|
||||
legacy: null;
|
||||
|
@ -178,6 +178,9 @@ callbacks of the same priority are called in reverse order of creation. */
|
|||
class.constructor;
|
||||
class.destructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
events {
|
||||
callback,add; /*@ A callback was added. */
|
||||
callback,del; /*@ A callback was deleted. */
|
||||
|
|
|
@ -1529,7 +1529,10 @@ parse_implement(Eo_Lexer *ls, Eina_Bool iface)
|
|||
check_next(ls, '.');
|
||||
if ((ls->t.token != TOK_VALUE) || (ls->t.kw == KW_get || ls->t.kw == KW_set))
|
||||
eo_lexer_syntax_error(ls, "name expected");
|
||||
impl->full_name = eina_stringshare_add(ls->t.value.s);
|
||||
if (impl->is_virtual)
|
||||
impl->full_name = eina_stringshare_ref(ls->t.value.s);
|
||||
else
|
||||
impl->full_name = eina_stringshare_printf(".%s", ls->t.value.s);
|
||||
eo_lexer_get(ls);
|
||||
if (ls->t.token == '.')
|
||||
{
|
||||
|
@ -1613,7 +1616,7 @@ parse_constructor(Eo_Lexer *ls)
|
|||
check_next(ls, '.');
|
||||
if (ls->t.token != TOK_VALUE)
|
||||
eo_lexer_syntax_error(ls, "name expected");
|
||||
ctor->full_name = eina_stringshare_add(ls->t.value.s);
|
||||
ctor->full_name = eina_stringshare_printf(".%s", ls->t.value.s);
|
||||
eo_lexer_get(ls);
|
||||
check_next(ls, ';');
|
||||
return;
|
||||
|
|
|
@ -3,7 +3,7 @@ class Evas_3D_Node (Evas_3D_Object, Evas.Common_Interface)
|
|||
legacy_prefix: null;
|
||||
data: Evas_3D_Node_Data;
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
/*@ Constructor. */
|
||||
legacy: null;
|
||||
params {
|
||||
|
@ -582,4 +582,7 @@ class Evas_3D_Node (Evas_3D_Object, Evas.Common_Interface)
|
|||
Evas_3D_Object.update_notify;
|
||||
Evas_3D_Object.change_notify;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Base {
|
||||
methods {
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
}
|
||||
destructor {
|
||||
}
|
||||
|
@ -8,4 +8,7 @@ class Base {
|
|||
implements {
|
||||
@virtual .constructor;
|
||||
}
|
||||
constructors {
|
||||
.constructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
class Ctor_Dtor (Base) {
|
||||
methods {
|
||||
custom_constructor_1 @constructor {
|
||||
custom_constructor_1 {
|
||||
params {
|
||||
@in int a;
|
||||
@in char b;
|
||||
}
|
||||
}
|
||||
custom_constructor_2 @constructor {
|
||||
custom_constructor_2 {
|
||||
}
|
||||
}
|
||||
implements {
|
||||
|
@ -15,4 +15,8 @@ class Ctor_Dtor (Base) {
|
|||
Base.constructor;
|
||||
Base.destructor;
|
||||
}
|
||||
constructors {
|
||||
.custom_constructor_1;
|
||||
.custom_constructor_2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,13 +26,13 @@ class Object_Impl (Base) {
|
|||
}
|
||||
}
|
||||
methods {
|
||||
constructor_1 @constructor {
|
||||
constructor_1 {
|
||||
params {
|
||||
@in int a;
|
||||
@in char b;
|
||||
}
|
||||
}
|
||||
constructor_2 @constructor {
|
||||
constructor_2 {
|
||||
}
|
||||
foo1 {
|
||||
/*@ comment foo */
|
||||
|
@ -62,4 +62,8 @@ class Object_Impl (Base) {
|
|||
@virtual .pure_foo3;
|
||||
@virtual .b.get;
|
||||
}
|
||||
constructors {
|
||||
.constructor_1;
|
||||
.constructor_2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,6 +208,7 @@ START_TEST(eolian_ctor_dtor)
|
|||
const Eolian_Function *impl_func = NULL;
|
||||
const Eolian_Class *class, *base;
|
||||
const Eolian_Implement *impl;
|
||||
const Eolian_Constructor *ctor;
|
||||
void *dummy;
|
||||
|
||||
eolian_init();
|
||||
|
@ -237,13 +238,20 @@ START_TEST(eolian_ctor_dtor)
|
|||
eina_iterator_free(iter);
|
||||
|
||||
/* Custom ctors/dtors */
|
||||
fail_if(!(impl_func = eolian_class_function_get_by_name(base, "constructor", EOLIAN_METHOD)));
|
||||
fail_if(!eolian_function_is_constructing(impl_func));
|
||||
fail_if(!eolian_class_function_get_by_name(base, "destructor", EOLIAN_METHOD));
|
||||
fail_if(!(impl_func = eolian_class_function_get_by_name(class, "custom_constructor_1", EOLIAN_METHOD)));
|
||||
fail_if(!eolian_function_is_constructing(impl_func));
|
||||
fail_if(!(impl_func = eolian_class_function_get_by_name(class, "custom_constructor_2", EOLIAN_METHOD)));
|
||||
fail_if(!eolian_function_is_constructing(impl_func));
|
||||
fail_if(!(iter = eolian_class_constructors_get(class)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&ctor)));
|
||||
fail_if(!(impl_class = eolian_constructor_class_get(ctor)));
|
||||
fail_if(!(impl_func = eolian_constructor_function_get(ctor)));
|
||||
fail_if(impl_class != class);
|
||||
fail_if(strcmp(eolian_function_name_get(impl_func), "custom_constructor_1"));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)&ctor)));
|
||||
fail_if(!(impl_class = eolian_constructor_class_get(ctor)));
|
||||
fail_if(!(impl_func = eolian_constructor_function_get(ctor)));
|
||||
fail_if(impl_class != class);
|
||||
fail_if(strcmp(eolian_function_name_get(impl_func), "custom_constructor_2"));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
||||
eolian_shutdown();
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@ class Callback (Eo.Base)
|
|||
legacy_prefix: null;
|
||||
data: Callback_Data;
|
||||
methods {
|
||||
default_constructor @constructor {
|
||||
default_constructor {
|
||||
}
|
||||
constructor @constructor {
|
||||
constructor {
|
||||
params {
|
||||
@in Ecore_Cb cb;
|
||||
@in void* data;
|
||||
}
|
||||
}
|
||||
constructor2 @constructor {
|
||||
constructor2 {
|
||||
params {
|
||||
@in Ecore_Cb cb;
|
||||
@in void* data;
|
||||
|
@ -32,6 +32,11 @@ class Callback (Eo.Base)
|
|||
}
|
||||
}
|
||||
}
|
||||
constructors {
|
||||
.default_constructor;
|
||||
.constructor;
|
||||
.constructor2;
|
||||
}
|
||||
events {
|
||||
call_on_add;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue