#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
};
#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;
_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
};
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
};
#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;
}
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;
{
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
};
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
};
}
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;
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
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
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;
}
#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
};
#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;
_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
};
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
};
#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;
}
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;
{
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
};
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
};
{
EO_OP_TYPE_INVALID = -1, /**< Invalid op. */
EO_OP_TYPE_REGULAR = 0, /**< Regular op. */
- EO_OP_TYPE_CONST, /**< Const op - object should not change. */
EO_OP_TYPE_CLASS, /**< Class op - a class op. Like static in Java/C++. */
};
* The type of the Op functions. This is the type of the functions used by
* Eo.
*
- * @see eo_op_func_type_const
+ * @see eo_op_func_type_class
*/
typedef void (*eo_op_func_type)(Eo *, void *class_data, va_list *list);
/**
- * @typedef eo_op_func_type_const
- * The type of the const Op functions. This is the type of the functions used
- * by Eo. This is the same as #eo_op_func_type, except that this should
- * be used with functions that don't modify the data.
- *
- * @see eo_op_func_type
- */
-typedef void (*eo_op_func_type_const)(const Eo *, const void *class_data, va_list *list);
-
-/**
* @typedef eo_op_func_type_class
* The type of the class Op functions. This is the same as #eo_op_func_type,\
* exepct that it's for usage with class functions, and not with object
* @def EO_OP_FUNC(op, func)
* A convenience macro to be used when populating the #Eo_Op_Func_Description
* array.
- *
- * @see EO_OP_FUNC_CONST
*/
#define EO_OP_FUNC(op, func) { op, EO_TYPECHECK(eo_op_func_type, func), EO_OP_TYPE_REGULAR }
/**
- * @def EO_OP_FUNC_CONST(op, func)
- * A convenience macro to be used when populating the #Eo_Op_Func_Description
- * array.
- * The same as #EO_OP_FUNC but for const functions.
- *
- * @see EO_OP_FUNC
- */
-#define EO_OP_FUNC_CONST(op, func) { op, (eo_op_func_type) EO_TYPECHECK(eo_op_func_type_const, func), EO_OP_TYPE_CONST }
-
-/**
* @def EO_OP_FUNC_CLASS(op, func)
* A convenience macro to be used when populating the #Eo_Op_Func_Description
* array.
* @param doc Additional doc for the op.
* @see Eo_Op_Description
* @see EO_OP_DESCRIPTION_CLASS
- * @see EO_OP_DESCRIPTION_CONST
* @see EO_OP_DESCRIPTION_SENTINEL
*/
#define EO_OP_DESCRIPTION(sub_id, doc) { sub_id, #sub_id, doc, EO_OP_TYPE_REGULAR }
/**
- * @def EO_OP_DESCRIPTION_CONST(op, doc)
- * An helper macro to help populating #Eo_Op_Description
- * This macro is the same as EO_OP_DESCRIPTION but indicates that the op's
- * implementation should not change the object.
- * @param sub_id The sub id of the op being described.
- * @param doc Additional doc for the op.
- * @see Eo_Op_Description
- * @see EO_OP_DESCRIPTION
- * @see EO_OP_DESCRIPTION_SENTINEL
- */
-#define EO_OP_DESCRIPTION_CONST(sub_id, doc) { sub_id, #sub_id, doc, EO_OP_TYPE_CONST }
-
-/**
* @def EO_OP_DESCRIPTION_CLASS(op, doc)
* An helper macro to help populating #Eo_Op_Description
* This macro is the same as EO_OP_DESCRIPTION but indicates that the op's
#define eo_do(obj, ...) eo_do_internal(obj, EO_OP_TYPE_REGULAR, __VA_ARGS__, EO_NOOP)
/**
- * @def eo_query
- * Same as #eo_do but only for const ops.
- * @see eo_do
- */
-#define eo_query(obj, ...) eo_do_internal((Eo *) EO_TYPECHECK(const Eo *, obj), EO_OP_TYPE_CONST, __VA_ARGS__, EO_NOOP)
-
-/**
* @def eo_class_do
* A convenience wrapper around eo_class_do_internal()
* @see eo_class_do_internal
* @param ... list of parameters.
* @return @c EINA_TRUE on success.
*
- * Unlike eo_do() and eo_query(), this function only accepts one op.
- *
- * Use the helper macros, don't pass the parameters manually.
- *
- * Same as eo_do_super() just for const objects.
- *
- * @see #eo_query
- * @see eo_do_super()
- */
-#define eo_query_super(obj, ...) eo_do_super_internal((Eo *) EO_TYPECHECK(const Eo *, obj), EO_OP_TYPE_CONST, __VA_ARGS__)
-
-/**
- * @brief Calls the super function for the specific op.
- * @param obj The object to work on
- * @param ... list of parameters.
- * @return @c EINA_TRUE on success.
- *
- * Unlike eo_do() and eo_query(), this function only accepts one op.
+ * Unlike eo_do(), this function only accepts one op.
*
* @see #eo_do
- * @see eo_query_super()
*/
#define eo_do_super(obj, ...) eo_do_super_internal(obj, EO_OP_TYPE_REGULAR, __VA_ARGS__)
*
* @see #eo_do
* @see #eo_do_super
- * @see #eo_query_super
*/
EAPI Eina_Bool eo_do_super_internal(Eo *obj, Eo_Op_Type op_type, Eo_Op op, ...);
ERR("Tried calling a class op '%s' (%x) from a non-class context.", (op_desc) ? op_desc->name : NULL, op);
return EINA_FALSE;
}
- else if ((op_type == EO_OP_TYPE_CONST) &&
- (op_desc->op_type != EO_OP_TYPE_CONST))
- {
- ERR("Tried calling non-const or non-existant op '%s' (%x) from a const (query) function.", (op_desc) ? op_desc->name : NULL, op);
- return EINA_FALSE;
- }
}
#endif
}
static void
-_data_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
+_data_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
{
/* We don't really change it... */
Private_Data *pd = (Private_Data *) class_data;
}
static void
-_wref_add(const Eo *obj, const void *class_data, va_list *list)
+_wref_add(Eo *obj, void *class_data, va_list *list)
{
Private_Data *pd = (Private_Data *) class_data;
size_t count;
pd->wrefs[count - 1] = wref;
pd->wrefs[count] = NULL;
- *wref = (Eo *) obj;
+ *wref = obj;
}
static void
-_wref_del(const Eo *obj, const void *class_data, va_list *list)
+_wref_del(Eo *obj, void *class_data, va_list *list)
{
Private_Data *pd = (Private_Data *) class_data;
size_t count;
}
static void
-_ev_cb_call(const Eo *_obj, const void *class_data, va_list *list)
+_ev_cb_call(Eo *obj, void *class_data, va_list *list)
{
Private_Data *pd = (Private_Data *) class_data;
- Eo *obj = (Eo *) _obj;
const Eo_Event_Description *desc = va_arg(*list, const Eo_Event_Description *);
void *event_info = va_arg(*list, void *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
}
static void
-_ev_freeze_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
+_ev_freeze_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
{
Private_Data *pd = (Private_Data *) class_data;
int *ret = va_arg(*list, int *);
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_SET), _data_set),
- EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get),
+ EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_DEL), _data_del),
- EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_WREF_ADD), _wref_add),
- EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_WREF_DEL), _wref_del),
+ EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_WREF_ADD), _wref_add),
+ EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_WREF_DEL), _wref_del),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD), _ev_cb_priority_add),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_DEL), _ev_cb_del),
- EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL), _ev_cb_call),
+ EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL), _ev_cb_call),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD), _ev_cb_forwarder_add),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL), _ev_cb_forwarder_del),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE), _ev_freeze),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_THAW), _ev_thaw),
- EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE_GET), _ev_freeze_get),
+ EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_FREEZE_GET), _ev_freeze_get),
EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE), _ev_global_freeze),
EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_THAW), _ev_global_thaw),
EO_OP_FUNC_CLASS(EO_BASE_ID(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET), _ev_global_freeze_get),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_CONSTRUCTOR, "Constructor"),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DESTRUCTOR, "Destructor"),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_SET, "Set data for key."),
- EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_DATA_GET, "Get data for key."),
+ EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_GET, "Get data for key."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_DEL, "Del key."),
- EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_WREF_ADD, "Add a weak ref to the object."),
- EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_WREF_DEL, "Delete the weak ref."),
+ EO_OP_DESCRIPTION(EO_BASE_SUB_ID_WREF_ADD, "Add a weak ref to the object."),
+ EO_OP_DESCRIPTION(EO_BASE_SUB_ID_WREF_DEL, "Delete the weak ref."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD, "Add an event callback with a priority."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_DEL, "Delete an event callback"),
- EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL, "Call the event callbacks for an event."),
+ EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_CALL, "Call the event callbacks for an event."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD, "Add an event forwarder."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL, "Delete an event forwarder."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_FREEZE, "Freezes events."),
EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_THAW, "Thaws events."),
- EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_EVENT_FREEZE_GET, "Get event freeze counter."),
+ EO_OP_DESCRIPTION(EO_BASE_SUB_ID_EVENT_FREEZE_GET, "Get event freeze counter."),
EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE, "Freezes events globally."),
EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_THAW, "Thaws events globally."),
EO_OP_DESCRIPTION_CLASS(EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET, "Get global event freeze counter."),
#define MY_CLASS INHERIT_CLASS
static void
-_prot_print(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_prot_print(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
Simple_Protected_Data *pd = eo_data_get(obj, SIMPLE_CLASS);
(void) list;
_class_constructor(Eo_Class *klass)
{
const Eo_Op_Func_Description func_desc[] = {
- EO_OP_FUNC_CONST(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
+ EO_OP_FUNC(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
EO_OP_FUNC_SENTINEL
};
}
static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION_CONST(INHERIT_SUB_ID_PROT_PRINT, "Print protected var x1."),
+ EO_OP_DESCRIPTION(INHERIT_SUB_ID_PROT_PRINT, "Print protected var x1."),
EO_OP_DESCRIPTION_SENTINEL
};
#define MY_CLASS COMP_CLASS
static void
-_a_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_a_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
int *a;
a = va_arg(*list, int *);
- eo_query_super(obj, simple_a_get(a));
+ eo_do_super(obj, simple_a_get(a));
}
static void
{
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC_SENTINEL
};
}
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 Simple_Public_Data *pd = class_data;
int *a;
{
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(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC_SENTINEL
};
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
};
#define MY_CLASS MIXIN_CLASS
static void
-_add_and_print_set(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_add_and_print_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
int a, b, x;
- eo_query(obj, simple_a_get(&a), simple_b_get(&b));
+ eo_do(obj, simple_a_get(&a), simple_b_get(&b));
x = va_arg(*list, const int);
printf("%s %d\n", __func__, a + b + x);
}
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
- EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
+ EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
EO_OP_FUNC_SENTINEL
};
}
static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_ADD_AND_SET, "Add A + B + param and print it"),
+ EO_OP_DESCRIPTION(MIXIN_SUB_ID_ADD_AND_SET, "Add A + B + param and print it"),
EO_OP_DESCRIPTION_SENTINEL
};
#define _GET_SET_FUNC(name) \
static void \
-_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \
+_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \
{ \
const Private_Data *pd = class_data; \
int *name; \
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
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(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
EO_OP_FUNC_SENTINEL
};
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(SIMPLE_SUB_ID_B_SET, "Set property B"),
- EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"),
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"),
EO_OP_DESCRIPTION_SENTINEL
};
}
static void
-_a_print(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
+_a_print(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
{
const Simple_Public_Data *pd = class_data;
(void) list;
{
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_PRINT), _a_print),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print),
EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), _class_hi_print),
EO_OP_FUNC_SENTINEL
};
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_PRINT, "Print property A"),
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_PRINT, "Print property A"),
EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_HI_PRINT, "Print Hi"),
EO_OP_DESCRIPTION_SENTINEL
};
static int _const_ops_counter = 0;
static void
-_const_ops_a_set(const Eo *obj EINA_UNUSED, const void *class_data EINA_UNUSED, va_list *list)
+_const_ops_a_set(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, va_list *list)
{
int a = va_arg(*list, int);
(void) a;
_const_ops_class_constructor(Eo_Class *klass)
{
const Eo_Op_Func_Description func_desc[] = {
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type_const) _const_ops_a_set),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type) _const_ops_a_set),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), (eo_op_func_type) _const_ops_a_print),
EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), (eo_op_func_type_class) _const_ops_a_set),
EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), (eo_op_func_type_class) _const_ops_a_print),
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type_const) _const_ops_class_hi_print),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type) _const_ops_class_hi_print),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_HI_PRINT), (eo_op_func_type) _const_ops_class_hi_print),
EO_OP_FUNC_SENTINEL
};
klass = eo_class_new(&class_desc, 0, SIMPLE_CLASS, NULL);
fail_if(!klass);
+ /* Add class checks here... */
Eo *obj = eo_add(klass, NULL);
eo_do(obj, simple_a_set(7), simple_a_print(), simple_class_hi_print());
- fail_if(_const_ops_counter != 0);
eo_unref(obj);
obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(!eo_do(obj, simple_a_print()));
- fail_if(!eo_query(obj, simple_a_print()));
- fail_if(eo_query(obj, simple_a_set(1)));
+ fail_if(!eo_do(obj, simple_a_print()));
+ fail_if(!eo_do(obj, simple_a_set(1)));
eo_unref(obj);
eo_shutdown();
}
static void
-_a_print(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
+_a_print(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
{
const Simple_Public_Data *pd = class_data;
(void) list;
{
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_PRINT), _a_print),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_PRINT), _a_print),
EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_PRINT), _class_print),
EO_OP_FUNC_CLASS(SIMPLE_ID(SIMPLE_SUB_ID_CLASS_PRINT2), _class_print2),
EO_OP_FUNC_SENTINEL
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_PRINT, "Print property A"),
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_PRINT, "Print property A"),
EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_PRINT, "Print class name."),
EO_OP_DESCRIPTION_CLASS(SIMPLE_SUB_ID_CLASS_PRINT2, "Print2 class name."),
EO_OP_DESCRIPTION_SENTINEL
#define MY_CLASS INTERFACE_CLASS
static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION_CONST(INTERFACE_SUB_ID_AB_SUM_GET, "Get the sum of a and b."),
+ EO_OP_DESCRIPTION(INTERFACE_SUB_ID_AB_SUM_GET, "Get the sum of a and b."),
EO_OP_DESCRIPTION_SENTINEL
};
#define MY_CLASS INTERFACE2_CLASS
static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION_CONST(INTERFACE2_SUB_ID_AB_SUM_GET2, "Print the sum of a and b."),
+ EO_OP_DESCRIPTION(INTERFACE2_SUB_ID_AB_SUM_GET2, "Print the sum of a and b."),
EO_OP_DESCRIPTION_SENTINEL
};
#define _GET_SET_FUNC(name) \
static void \
-_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \
+_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \
{ \
const Private_Data *pd = class_data; \
int *name; \
_GET_SET_FUNC(b)
static void
-_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
int a, b;
- eo_query(obj, simple_a_get(&a), simple_b_get(&b));
+ eo_do(obj, simple_a_get(&a), simple_b_get(&b));
int *sum = va_arg(*list, int *);
if (sum)
*sum = a + b;
}
static void
-_ab_sum_get2(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_ab_sum_get2(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
int a, b;
- eo_query(obj, simple_a_get(&a), simple_b_get(&b));
+ eo_do(obj, simple_a_get(&a), simple_b_get(&b));
int *sum = va_arg(*list, int *);
if (sum)
*sum = a + b + 1;
{
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(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
- EO_OP_FUNC_CONST(INTERFACE_ID(INTERFACE_SUB_ID_AB_SUM_GET), _ab_sum_get),
- EO_OP_FUNC_CONST(INTERFACE2_ID(INTERFACE2_SUB_ID_AB_SUM_GET2), _ab_sum_get2),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
+ EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_AB_SUM_GET), _ab_sum_get),
+ EO_OP_FUNC(INTERFACE2_ID(INTERFACE2_SUB_ID_AB_SUM_GET2), _ab_sum_get2),
EO_OP_FUNC_SENTINEL
};
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(SIMPLE_SUB_ID_B_SET, "Set property B"),
- EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"),
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"),
EO_OP_DESCRIPTION_SENTINEL
};
#define MY_CLASS MIXIN_CLASS
static void
-_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
int a, b;
- eo_query(obj, simple_a_get(&a), simple_b_get(&b));
+ eo_do(obj, simple_a_get(&a), simple_b_get(&b));
int *sum = va_arg(*list, int *);
if (sum)
*sum = a + b;
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
- EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
+ EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
EO_OP_FUNC_SENTINEL
};
static const Eo_Op_Description op_desc[] = {
- EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_AB_SUM_GET, "Get the sum of a and b."),
+ EO_OP_DESCRIPTION(MIXIN_SUB_ID_AB_SUM_GET, "Get the sum of a and b."),
EO_OP_DESCRIPTION_SENTINEL
};
#define MY_CLASS MIXIN2_CLASS
static void
-_ab_sum_get(const Eo *obj, const void *class_data, va_list *list)
+_ab_sum_get(Eo *obj, void *class_data, va_list *list)
{
/* This cast is a hack just for the tests... */
Mixin2_Public_Data *pd = (Mixin2_Public_Data *) class_data;
int *sum = va_arg(*list, int *);
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
- eo_query_super(obj, mixin_ab_sum_get(sum));
+ eo_do_super(obj, mixin_ab_sum_get(sum));
++*sum;
pd->count += 2;
{
int _a, _b;
- eo_query(obj, simple_a_get(&_a), simple_b_get(&_b));
+ eo_do(obj, simple_a_get(&_a), simple_b_get(&_b));
fail_if(*sum != _a + _b + 1);
}
}
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
- EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
+ EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
EO_OP_FUNC_SENTINEL
};
#define MY_CLASS MIXIN3_CLASS
static void
-_ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
+_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
{
/* This cast is just a hack for the test. */
Mixin3_Public_Data *pd = (Mixin3_Public_Data *) class_data;
int *sum = va_arg(*list, int *);
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
- eo_query_super(obj, mixin_ab_sum_get(sum));
+ eo_do_super(obj, mixin_ab_sum_get(sum));
++*sum;
pd->count += 3;
{
int _a, _b;
- eo_query(obj, simple_a_get(&_a), simple_b_get(&_b));
+ eo_do(obj, simple_a_get(&_a), simple_b_get(&_b));
fail_if(*sum != _a + _b + 2);
}
}
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
- EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
+ EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
EO_OP_FUNC_SENTINEL
};
#define _GET_SET_FUNC(name) \
static void \
-_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \
+_##name##_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \
{ \
const Private_Data *pd = class_data; \
int *name; \
{
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(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
- EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
EO_OP_FUNC_SENTINEL
};
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(SIMPLE_SUB_ID_B_SET, "Set property B"),
- EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "Get property B"),
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_GET, "Get property B"),
EO_OP_DESCRIPTION_SENTINEL
};