diff options
author | tasn <tasn> | 2012-06-27 03:58:45 +0000 |
---|---|---|
committer | tasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2012-06-27 03:58:45 +0000 |
commit | 5dcf131e399f46b0040379bc55d0363b58cf3995 (patch) | |
tree | 2e3248f07098dc33692bafda0967af96ebfe45f2 /src/examples | |
parent | e87e099e05a80164e153ea4b28b6f2835c04dec2 (diff) | |
download | eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.tar.gz eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.tar.bz2 eobj-5dcf131e399f46b0040379bc55d0363b58cf3995.zip |
Eo: Removed the const op concept.
Too ambiguous to be worth it...
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@72914 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/eo_isa/interface.c | 2 | ||||
-rw-r--r-- | src/examples/eo_isa/mixin.c | 8 | ||||
-rw-r--r-- | src/examples/eo_isa/simple.c | 10 | ||||
-rw-r--r-- | src/examples/evas/evas_obj.c | 6 | ||||
-rw-r--r-- | src/examples/evas/evas_obj.h | 2 | ||||
-rw-r--r-- | src/examples/simple/interface.c | 2 | ||||
-rw-r--r-- | src/examples/simple/mixin.c | 8 | ||||
-rw-r--r-- | src/examples/simple/simple.c | 10 |
8 files changed, 24 insertions, 24 deletions
diff --git a/src/examples/eo_isa/interface.c b/src/examples/eo_isa/interface.c index 763316a..52ef1d3 100644 --- a/src/examples/eo_isa/interface.c +++ b/src/examples/eo_isa/interface.c @@ -8,7 +8,7 @@ EAPI Eo_Op INTERFACE_BASE_ID = 0; #define MY_CLASS INTERFACE_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), + EO_OP_DESCRIPTION(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/eo_isa/mixin.c b/src/examples/eo_isa/mixin.c index df89fce..cd3cfb5 100644 --- a/src/examples/eo_isa/mixin.c +++ b/src/examples/eo_isa/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_a_square_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_a_square_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a; - eo_query(obj, simple_a_get(&a)); + eo_do(obj, simple_a_get(&a)); int *ret = va_arg(*list, int *); if (ret) *ret = a * a; @@ -23,7 +23,7 @@ static void _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), EO_OP_FUNC_SENTINEL }; @@ -32,7 +32,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/eo_isa/simple.c b/src/examples/eo_isa/simple.c index 7a32757..6bf3fbf 100644 --- a/src/examples/eo_isa/simple.c +++ b/src/examples/eo_isa/simple.c @@ -13,7 +13,7 @@ typedef struct #define MY_CLASS SIMPLE_CLASS static void -_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *a; @@ -33,7 +33,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_power_3_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_power_3_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *ret; @@ -48,8 +48,8 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), - EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), EO_OP_FUNC_SENTINEL }; @@ -58,7 +58,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/evas/evas_obj.c b/src/examples/evas/evas_obj.c index 3ce0c82..24bcb75 100644 --- a/src/examples/evas/evas_obj.c +++ b/src/examples/evas/evas_obj.c @@ -47,7 +47,7 @@ _color_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list) } static void -_color_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_color_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { Evas_Object *evas_obj = eo_evas_object_get(obj); int *r, *g, *b, *a; @@ -111,7 +111,7 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_POSITION_SET), _position_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_SIZE_SET), _size_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_SET), _color_set), - EO_OP_FUNC_CONST(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), _color_get), + EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_COLOR_GET), _color_get), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET), _visibility_set), EO_OP_FUNC(EXEVAS_OBJ_ID(EXEVAS_OBJ_SUB_ID_CHILD_ADD), _child_add), EO_OP_FUNC_SENTINEL @@ -124,7 +124,7 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_POSITION_SET, "Position of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_SIZE_SET, "Size of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_COLOR_SET, "Color of an evas object."), - EO_OP_DESCRIPTION_CONST(EXEVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."), + EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_COLOR_GET, "Color of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_VISIBILITY_SET, "Visibility of an evas object."), EO_OP_DESCRIPTION(EXEVAS_OBJ_SUB_ID_CHILD_ADD, "Add a child eo."), EO_OP_DESCRIPTION_SENTINEL diff --git a/src/examples/evas/evas_obj.h b/src/examples/evas/evas_obj.h index 24084d5..7aa761c 100644 --- a/src/examples/evas/evas_obj.h +++ b/src/examples/evas/evas_obj.h @@ -76,7 +76,7 @@ static inline Evas_Object * eo_evas_object_get(const Eo *obj) { void *data; - eo_query(obj, eo_base_data_get(EXEVAS_OBJ_STR, &data)); + eo_do((Eo *) obj, eo_base_data_get(EXEVAS_OBJ_STR, &data)); return data; } diff --git a/src/examples/simple/interface.c b/src/examples/simple/interface.c index 763316a..52ef1d3 100644 --- a/src/examples/simple/interface.c +++ b/src/examples/simple/interface.c @@ -8,7 +8,7 @@ EAPI Eo_Op INTERFACE_BASE_ID = 0; #define MY_CLASS INTERFACE_CLASS static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), + EO_OP_DESCRIPTION(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/simple/mixin.c b/src/examples/simple/mixin.c index df89fce..cd3cfb5 100644 --- a/src/examples/simple/mixin.c +++ b/src/examples/simple/mixin.c @@ -9,10 +9,10 @@ EAPI Eo_Op MIXIN_BASE_ID = 0; #define MY_CLASS MIXIN_CLASS static void -_a_square_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list) +_a_square_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) { int a; - eo_query(obj, simple_a_get(&a)); + eo_do(obj, simple_a_get(&a)); int *ret = va_arg(*list, int *); if (ret) *ret = a * a; @@ -23,7 +23,7 @@ static void _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), + EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), EO_OP_FUNC_SENTINEL }; @@ -32,7 +32,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), + EO_OP_DESCRIPTION(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), EO_OP_DESCRIPTION_SENTINEL }; diff --git a/src/examples/simple/simple.c b/src/examples/simple/simple.c index 7a32757..6bf3fbf 100644 --- a/src/examples/simple/simple.c +++ b/src/examples/simple/simple.c @@ -13,7 +13,7 @@ typedef struct #define MY_CLASS SIMPLE_CLASS static void -_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *a; @@ -33,7 +33,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) } static void -_a_power_3_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) +_a_power_3_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) { const Private_Data *pd = class_data; int *ret; @@ -48,8 +48,8 @@ _class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), - EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), - EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), + EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), + EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), EO_OP_FUNC_SENTINEL }; @@ -58,7 +58,7 @@ _class_constructor(Eo_Class *klass) static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), - EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"), + EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), EO_OP_DESCRIPTION_SENTINEL }; |