forked from enlightenment/efl
parent
ed0154875b
commit
0a798ec6a8
|
@ -95,9 +95,12 @@ struct _Evas_Rectangle /** A rectangle */
|
||||||
int h; /**< height of 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 */
|
struct _Evas_Smart_Class /** a smart object class */
|
||||||
{
|
{
|
||||||
const char *name; /** the string name of the class */
|
const char *name; /** the string name of the class */
|
||||||
|
|
||||||
|
int version;
|
||||||
|
|
||||||
void (*add) (Evas_Object *o);
|
void (*add) (Evas_Object *o);
|
||||||
void (*del) (Evas_Object *o);
|
void (*del) (Evas_Object *o);
|
||||||
|
|
|
@ -90,6 +90,9 @@ evas_smart_class_new(Evas_Smart_Class *sc)
|
||||||
|
|
||||||
if (!sc) return NULL;
|
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));
|
s = evas_mem_calloc(sizeof(Evas_Smart));
|
||||||
if (!s) return NULL;
|
if (!s) return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue