From fe949a2798096bab250e3fa740797fd03fb6d77d Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 31 Aug 2010 12:01:46 +0000 Subject: [PATCH] evas_smart_new - deprecated api gone. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51780 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/Evas.h | 1 - src/lib/canvas/evas_smart.c | 84 --------------------------------------------- 2 files changed, 85 deletions(-) diff --git a/src/lib/Evas.h b/src/lib/Evas.h index ed6b115..164a8c6 100644 --- a/src/lib/Evas.h +++ b/src/lib/Evas.h @@ -1718,7 +1718,6 @@ struct _Evas_Smart_Cb_Description evas_object_smart_data_set(o, priv); \ } - EINA_DEPRECATED EAPI Evas_Smart *evas_smart_new (const char *name, void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void (*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object *obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) (Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object *obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void (*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) (Evas_Object *obj), const void *data) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1); EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; diff --git a/src/lib/canvas/evas_smart.c b/src/lib/canvas/evas_smart.c index c1a9b04..94f3e33 100644 --- a/src/lib/canvas/evas_smart.c +++ b/src/lib/canvas/evas_smart.c @@ -12,90 +12,6 @@ static void _evas_smart_class_callbacks_create(Evas_Smart *s); */ /** - * Create an Evas_Smart, which can be used to instantiate new smart objects. - * - * This function internally creates an Evas_Smart_Class and sets the - * provided callbacks. Callbacks that are unneeded (or marked DEPRECATED - * below) should be set to NULL. - * - * Alternatively you can create an Evas_Smart_Class yourself and use - * evas_smart_class_new(). - * - * @param name a unique name for the smart - * @param func_add callback called when smart object is added - * @param func_del callback called when smart object is deleted - * @param func_layer_set DEPRECATED - * @param func_raise DEPRECATED - * @param func_lower DEPRECATED - * @param func_stack_above DEPRECATED - * @param func_stack_below DEPRECATED - * @param func_move callback called when smart object is moved - * @param func_resize callback called when smart object is resized - * @param func_show callback called when smart object is shown - * @param func_hide callback called when smart object is hidden - * @param func_color_set callback called when smart object has its color set - * @param func_clip_set callback called when smart object has its clip set - * @param func_clip_unset callback called when smart object has its clip unset - * @param data a pointer to user data for the smart - * @return an Evas_Smart - * - */ -EAPI Evas_Smart * -evas_smart_new(const char *name, - void (*func_add) (Evas_Object *o), - void (*func_del) (Evas_Object *o), - void (*func_layer_set) (Evas_Object *o, int l) __UNUSED__, - void (*func_raise) (Evas_Object *o) __UNUSED__, - void (*func_lower) (Evas_Object *o) __UNUSED__, - void (*func_stack_above) (Evas_Object *o, Evas_Object *above) __UNUSED__, - void (*func_stack_below) (Evas_Object *o, Evas_Object *below) __UNUSED__, - void (*func_move) (Evas_Object *o, Evas_Coord x, Evas_Coord y), - void (*func_resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h), - void (*func_show) (Evas_Object *o), - void (*func_hide) (Evas_Object *o), - void (*func_color_set) (Evas_Object *o, int r, int g, int b, int a), - void (*func_clip_set) (Evas_Object *o, Evas_Object *clip), - void (*func_clip_unset) (Evas_Object *o), - const void *data) -{ - Evas_Smart *s; - Evas_Smart_Class *sc; - - WRN("----- WARNING. evas_smart_new() will be deprecated and removed soon" - "----- Please use evas_smart_class_new() instead"); - - if (!name) return NULL; - - s = evas_mem_calloc(sizeof(Evas_Smart)); - if (!s) return NULL; - - s->magic = MAGIC_SMART; - - s->class_allocated = 1; - - sc = evas_mem_calloc(sizeof(Evas_Smart_Class)); - if (!sc) - { - free(s); - return NULL; - } - sc->name = name; - sc->add = func_add; - sc->del = func_del; - sc->move = func_move; - sc->resize = func_resize; - sc->show = func_show; - sc->hide = func_hide; - sc->color_set = func_color_set; - sc->clip_set = func_clip_set; - sc->clip_unset = func_clip_unset; - sc->data = (void *)data; - s->smart_class = sc; - - return s; -} - -/** * Free an Evas_Smart * * If this smart was created using evas_smart_class_new(), the associated -- 2.7.4