forked from enlightenment/efl
parent
ed0154875b
commit
0a798ec6a8
|
@ -95,10 +95,13 @@ struct _Evas_Rectangle /** A rectangle */
|
|||
int h; /**< height of rectangle */
|
||||
};
|
||||
|
||||
#define EVAS_SMART_CLASS_VERSION 1 /** the version you have to put into the version field in the smart class struct */
|
||||
struct _Evas_Smart_Class /** a smart object class */
|
||||
{
|
||||
const char *name; /** the string name of the class */
|
||||
|
||||
int version;
|
||||
|
||||
void (*add) (Evas_Object *o);
|
||||
void (*del) (Evas_Object *o);
|
||||
void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y);
|
||||
|
|
|
@ -90,6 +90,9 @@ evas_smart_class_new(Evas_Smart_Class *sc)
|
|||
|
||||
if (!sc) return NULL;
|
||||
|
||||
/* api does not match abi! for now refuse as we only have 1 version */
|
||||
if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL;
|
||||
|
||||
s = evas_mem_calloc(sizeof(Evas_Smart));
|
||||
if (!s) return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue