Enlightenment CVS committal Author : raster Project : e17 Module : libs/emotion
Dir : e17/libs/emotion/src/lib Modified Files: emotion_smart.c Log Message: move a chunk of stuff to use evas_smart_class_new() - evas_smart_new() will probably die as it's already got legacy funcion methods for layer etc. stuff. =================================================================== RCS file: /cvs/e/e17/libs/emotion/src/lib/emotion_smart.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- emotion_smart.c 18 Jul 2007 04:42:31 -0000 1.29 +++ emotion_smart.c 4 Aug 2007 13:12:41 -0000 1.30 @@ -74,11 +74,6 @@ static void _smart_init(void); static void _smart_add(Evas_Object * obj); static void _smart_del(Evas_Object * obj); -static void _smart_layer_set(Evas_Object * obj, int layer); -static void _smart_raise(Evas_Object * obj); -static void _smart_lower(Evas_Object * obj); -static void _smart_stack_above(Evas_Object * obj, Evas_Object * above); -static void _smart_stack_below(Evas_Object * obj, Evas_Object * below); static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y); static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h); static void _smart_show(Evas_Object * obj); @@ -239,7 +234,6 @@ { sd->module->file_close(sd->video); sd->video = NULL; - printf("VIDEO -> NULL\n"); evas_object_image_size_set(sd->obj, 0, 0); } } @@ -1130,22 +1124,24 @@ _smart_init(void) { if (smart) return; - smart = evas_smart_new(E_OBJ_NAME, - _smart_add, - _smart_del, - _smart_layer_set, - _smart_raise, - _smart_lower, - _smart_stack_above, - _smart_stack_below, - _smart_move, - _smart_resize, - _smart_show, - _smart_hide, - _smart_color_set, - _smart_clip_set, - _smart_clip_unset, - NULL); + { + static const Evas_Smart_Class sc = + { + E_OBJ_NAME, + EVAS_SMART_CLASS_VERSION, + _smart_add, + _smart_del, + _smart_move, + _smart_resize, + _smart_show, + _smart_hide, + _smart_color_set, + _smart_clip_set, + _smart_clip_unset, + NULL + }; + smart = evas_smart_class_new(&sc); + } } static void @@ -1179,67 +1175,14 @@ Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; - printf("DEL: sd->video = %p\n", sd->video); if (sd->video) sd->module->file_close(sd->video); - printf("MOD CLOSE: sd->video = %p\n", sd->video); _emotion_module_close(sd->module, sd->video); - printf("DEL SD: sd = %p\n", sd); evas_object_del(sd->obj); if (sd->file) free(sd->file); if (sd->job) ecore_job_del(sd->job); if (sd->progress.info) free(sd->progress.info); if (sd->ref.file) free(sd->ref.file); free(sd); -} - -static void -_smart_layer_set(Evas_Object * obj, int layer) -{ - Smart_Data *sd; - - sd = evas_object_smart_data_get(obj); - if (!sd) return; - evas_object_layer_set(sd->obj, layer); -} - -static void -_smart_raise(Evas_Object * obj) -{ - Smart_Data *sd; - - sd = evas_object_smart_data_get(obj); - if (!sd) return; - evas_object_raise(sd->obj); -} - -static void -_smart_lower(Evas_Object * obj) -{ - Smart_Data *sd; - - sd = evas_object_smart_data_get(obj); - if (!sd) return; - evas_object_lower(sd->obj); -} - -static void -_smart_stack_above(Evas_Object * obj, Evas_Object * above) -{ - Smart_Data *sd; - - sd = evas_object_smart_data_get(obj); - if (!sd) return; - evas_object_stack_above(sd->obj, above); -} - -static void -_smart_stack_below(Evas_Object * obj, Evas_Object * below) -{ - Smart_Data *sd; - - sd = evas_object_smart_data_get(obj); - if (!sd) return; - evas_object_stack_below(sd->obj, below); } static void ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs