eo: migrate constructors sections to constructing methods

This commit is contained in:
Daniel Kolesa 2014-08-27 15:01:09 +01:00
parent a65c531429
commit 77d148cec9
15 changed files with 83 additions and 84 deletions

View File

@ -3,26 +3,27 @@ class Colourable (Eo.Base)
/*@ Colourable class. */
legacy_prefix: legacy;
data: Colourable_Data;
constructors {
constructor {
methods {
constructor @constructor {
/*@ Default constructor. */
legacy: null;
}
rgb_composite_constructor {
rgb_composite_constructor @constructor {
/*@ Composite RGB Constructor. */
legacy: null;
params {
@in int r; /*@ The red component. */
@in int g; /*@ The green component. */
@in int b; /*@ The blue component. */
}
}
rgb_24bits_constructor {
rgb_24bits_constructor @constructor {
/*@ RGB Constructor. */
legacy: null;
params {
@in int rgb; /*@ 24-bit RGB Component. */
}
}
}
methods {
print_colour { /*@ Print the RGB colour. */ }
colour_mask {
/*@ The masked RGB value. */

View File

@ -2,14 +2,13 @@ class ColourableSquare (Colourable)
{
legacy_prefix: legacy;
data: ColourableSquare_Data;
constructors {
size_constructor {
properties {
size_constructor @constructor {
legacy: null;
params {
@in int size;
}
}
}
properties {
size {
set {
/*@ Sets size. */

View File

@ -1,17 +1,19 @@
class Ecore.Animator (Eo.Base)
{
eo_prefix: ecore_animator;
constructors {
timeline_constructor {
/*@ Contructor. */
methods {
timeline_constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in double runtime;
@in Ecore_Timeline_Cb func;
@in const(void)* data;
}
}
constructor {
/*@ Contructor. */
constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in Ecore_Task_Cb func;
@in const(void)* data;

View File

@ -1,16 +1,18 @@
class Ecore.Idle.Enterer (Eo.Base)
{
eo_prefix: ecore_idle_enterer;
constructors {
before_constructor {
methods {
before_constructor @constructor {
/*@ Contructor. Will insert the handler at the beginning of the list. */
legacy: null;
params {
@in Ecore_Task_Cb func;
@in const(void)* data;
}
}
after_constructor {
after_constructor @constructor {
/*@ Contructor. Will insert the handler at the end of the list. */
legacy: null;
params {
@in Ecore_Task_Cb func;
@in const(void)* data;

View File

@ -1,9 +1,10 @@
class Ecore.Idle.Exiter (Eo.Base)
{
eo_prefix: ecore_idle_exiter;
constructors {
constructor {
/*@ Contructor. */
methods {
constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in Ecore_Task_Cb func;
@in const(void)* data;

View File

@ -1,9 +1,10 @@
class Ecore.Idler (Eo.Base)
{
eo_prefix: ecore_idler;
constructors {
constructor {
/*@ Contructor. */
methods {
constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in Ecore_Task_Cb func;
@in const(void)* data;

View File

@ -1,9 +1,10 @@
class Ecore.Job (Eo.Base)
{
eo_prefix: ecore_job;
constructors {
constructor {
/*@ Contructor. */
methods {
constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in Ecore_Cb func;
@in const(void)* data;

View File

@ -1,8 +1,9 @@
class Ecore.Poller (Eo.Base)
{
constructors {
constructor {
/*@ Contructor with parameters for Ecore Poller. */
methods {
constructor @constructor {
/*@ Constructor with parameters for Ecore Poller. */
legacy: null;
params {
@in Ecore_Poller_Type type;
@in int interval;

View File

@ -8,24 +8,6 @@ class Ecore.Timer (Eo.Base)
* guarantee exact timing, but try to work on a "best effort basis.
*/
eo_prefix: ecore_obj_timer;
constructors {
loop_constructor {
/*@ Create a timer to call in a given time from now */
params {
@in double in; /*@ The time, in seconds, from now when to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
constructor {
/*@ Create a timer to call in a given time from when the mainloop woke up from sleep */
params {
@in double in; /*@ The time, in seconds, from when the main loop woke up, to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
}
properties {
interval {
set {
@ -48,6 +30,24 @@ class Ecore.Timer (Eo.Base)
}
}
methods {
loop_constructor @constructor {
/*@ Create a timer to call in a given time from now */
legacy: null;
params {
@in double in; /*@ The time, in seconds, from now when to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
constructor @constructor {
/*@ Create a timer to call in a given time from when the mainloop woke up from sleep */
legacy: null;
params {
@in double in; /*@ The time, in seconds, from when the main loop woke up, to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
reset {
/*@ Reset a timer to its full interval. This effectively makes
* the timer start ticking off from zero now.

View File

@ -3,12 +3,6 @@ abstract Eo.Base ()
eo_prefix: eo;
legacy_prefix: null;
constructors {
constructor {
/*@ Call the object's constructor.
Should not be used with #eo_do. Only use it with #eo_do_super. */
}
}
properties {
parent {
set {
@ -42,6 +36,11 @@ Return event freeze count. */
}
}
methods {
constructor @constructor {
/*@ Call the object's constructor.
Should not be used with #eo_do. Only use it with #eo_do_super. */
legacy: null;
}
event_callback_forwarder_del {
/*@ Remove an event callback forwarder for an event and an object. */
params {

View File

@ -2,15 +2,14 @@ class Evas_3D_Node (Evas_3D_Object, Evas.Common_Interface)
{
legacy_prefix: null;
data: Evas_3D_Node_Data;
constructors {
constructor {
/*@ Contructor. */
methods {
constructor @constructor {
/*@ Constructor. */
legacy: null;
params {
@in Evas_3D_Node_Type type;
}
}
}
methods {
type_get @const {
/*
Get the type of the given node.

View File

@ -1,9 +1,7 @@
class Base {
constructors {
constructor {
}
}
methods {
constructor @constructor {
}
destructor {
}
}

View File

@ -1,12 +1,12 @@
class Ctor_Dtor (Base) {
constructors {
custom_constructor_1 {
methods {
custom_constructor_1 @constructor {
params {
@in int a;
@in char b;
}
}
custom_constructor_2 {
custom_constructor_2 @constructor {
}
}
implements {

View File

@ -1,14 +1,4 @@
class Object_Impl (Base) {
constructors {
constructor_1 {
params {
@in int a;
@in char b;
}
}
constructor_2 {
}
}
properties {
a {
set {
@ -36,6 +26,14 @@ class Object_Impl (Base) {
}
}
methods {
constructor_1 @constructor {
params {
@in int a;
@in char b;
}
}
constructor_2 @constructor {
}
foo1 {
/*@ comment foo */
params {

View File

@ -2,24 +2,22 @@ class Callback (Eo.Base)
{
legacy_prefix: null;
data: Callback_Data;
constructors {
default_constructor {
methods {
default_constructor @constructor {
}
constructor {
constructor @constructor {
params {
@in Ecore_Cb cb;
@in void* data;
}
}
constructor2 {
constructor2 @constructor {
params {
@in Ecore_Cb cb;
@in void* data;
@in Ecore_Cb cb2;
}
}
}
methods {
onecallback {
params {
@in Ecore_Cb cb;
@ -37,5 +35,4 @@ class Callback (Eo.Base)
events {
call_on_add;
}
}
}