forked from enlightenment/efl
eo2: add EO2_CLASS_CLASS
This commit is contained in:
parent
1614b9d529
commit
eb01d1c3e8
|
@ -13,6 +13,7 @@ lib/eo/eo_ptr_indirection.h \
|
|||
lib/eo/eo_class_class.c \
|
||||
lib/eo/eo_base_class.c \
|
||||
lib/eo/eo2_base_class.c \
|
||||
lib/eo/eo2_class_class.c \
|
||||
lib/eo/eo_private.h
|
||||
|
||||
lib_eo_libeo_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EO_CFLAGS@
|
||||
|
|
|
@ -1217,11 +1217,13 @@ EAPI Eina_Bool eo_composite_is(const Eo *comp_obj);
|
|||
* The class type for the Eo Class class.
|
||||
*/
|
||||
#define EO_CLASS_CLASS eo_class_class_get()
|
||||
#define EO2_CLASS_CLASS eo2_class_class_get()
|
||||
/**
|
||||
* @brief Use #EO_CLASS_CLASS
|
||||
* @internal
|
||||
* */
|
||||
EAPI const Eo_Class *eo_class_class_get(void);
|
||||
EAPI const Eo_Class *eo2_class_class_get(void);
|
||||
|
||||
/**
|
||||
* @var EO_CLASS_CLASS_BASE_ID
|
||||
|
|
|
@ -950,7 +950,10 @@ eo_class_get(const Eo *eo_id)
|
|||
if (_eo_is_a_class(eo_id))
|
||||
{
|
||||
EO_CLASS_POINTER_RETURN_VAL(eo_id, _klass, NULL);
|
||||
return eo_class_class_get();
|
||||
if (_klass->desc->version == EO2_VERSION)
|
||||
return eo2_class_class_get();
|
||||
else
|
||||
return eo_class_class_get();
|
||||
}
|
||||
|
||||
EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, NULL);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "Eo.h"
|
||||
|
||||
static Eo2_Op_Description op_descs [] = {};
|
||||
|
||||
static const Eo_Class_Description class_desc = {
|
||||
EO2_VERSION,
|
||||
"Eo Abstract Class",
|
||||
EO_CLASS_TYPE_REGULAR_NO_INSTANT,
|
||||
EO2_CLASS_DESCRIPTION_OPS(op_descs),
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
EO_DEFINE_CLASS(eo2_class_class_get, &class_desc, NULL, NULL)
|
Loading…
Reference in New Issue