forked from enlightenment/efl
parent
bfa48634cf
commit
71341334a9
|
@ -594,7 +594,7 @@ EAPI Eina_Bool eo_shutdown(void);
|
||||||
|
|
||||||
typedef struct _Eo_Internal _Eo;
|
typedef struct _Eo_Internal _Eo;
|
||||||
|
|
||||||
#define EO_FUNC_CALL(...) func(objid, __VA_ARGS__)
|
#define EO_FUNC_CALL(...) func(obj_data, __VA_ARGS__)
|
||||||
|
|
||||||
/* XXX: Essential, because we need to adjust objid for comp objects. */
|
/* XXX: Essential, because we need to adjust objid for comp objects. */
|
||||||
#define EO_FUNC_BODY(Name, Ret, Id, Func, DefRet, ...) \
|
#define EO_FUNC_BODY(Name, Ret, Id, Func, DefRet, ...) \
|
||||||
|
@ -602,18 +602,14 @@ EAPI Ret \
|
||||||
Name(_Eo *obj, Eo *objid, __VA_ARGS__) \
|
Name(_Eo *obj, Eo *objid, __VA_ARGS__) \
|
||||||
{ \
|
{ \
|
||||||
Ret (*func)(Eo *, __VA_ARGS__) = eo2_func_get(obj, Id(Name)); \
|
Ret (*func)(Eo *, __VA_ARGS__) = eo2_func_get(obj, Id(Name)); \
|
||||||
if (func) \
|
if (!func) return DefRet; \
|
||||||
{ \
|
void *obj_data = eo2_data_scope_get(obj); \
|
||||||
return Func; \
|
return Func; \
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
return DefRet; \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EAPI _Eo * eo2_do_start(Eo *obj_id);
|
EAPI _Eo * eo2_do_start(Eo *obj_id);
|
||||||
|
EAPI void * eo2_data_scope_get(const _Eo *obj);
|
||||||
#define eo2_func_get(obj_id, op) eo2_func_get_internal(obj_id, NULL, op)
|
#define eo2_func_get(obj_id, op) eo2_func_get_internal(obj_id, NULL, op)
|
||||||
EAPI void * eo2_func_get_internal(_Eo *obj, const Eo_Class *klass, Eo_Op op);
|
EAPI void * eo2_func_get_internal(_Eo *obj, const Eo_Class *klass, Eo_Op op);
|
||||||
|
|
||||||
|
|
|
@ -263,6 +263,11 @@ eo2_do_start(Eo *obj_id)
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void *eo2_data_scope_get(const _Eo *obj)
|
||||||
|
{
|
||||||
|
return _eo_data_scope_get(obj, obj->klass);
|
||||||
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
_eo2_func_get(const _Eo_Class *cur_klass, Eo_Op op)
|
_eo2_func_get(const _Eo_Class *cur_klass, Eo_Op op)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue