summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2007-08-04 13:12:43 +0000
committerCarsten Haitzler <raster@rasterman.com>2007-08-04 13:12:43 +0000
commit4b435be1ed7f470e763ed14abb8ae0973a6a9f6b (patch)
tree83d3f6d832e215a26ad80367b38a379bdc67cc02 /legacy/emotion/src/lib/emotion_smart.c
parent6437f4ed230b8ad3ae28110a507e57667a139a34 (diff)
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. SVN revision: 31161
Diffstat (limited to 'legacy/emotion/src/lib/emotion_smart.c')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c93
1 files changed, 18 insertions, 75 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 842553e4a7..93b7f4d98c 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -74,11 +74,6 @@ static void _pixels_get(void *data, Evas_Object *obj);
74static void _smart_init(void); 74static void _smart_init(void);
75static void _smart_add(Evas_Object * obj); 75static void _smart_add(Evas_Object * obj);
76static void _smart_del(Evas_Object * obj); 76static void _smart_del(Evas_Object * obj);
77static void _smart_layer_set(Evas_Object * obj, int layer);
78static void _smart_raise(Evas_Object * obj);
79static void _smart_lower(Evas_Object * obj);
80static void _smart_stack_above(Evas_Object * obj, Evas_Object * above);
81static void _smart_stack_below(Evas_Object * obj, Evas_Object * below);
82static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y); 77static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
83static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h); 78static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
84static void _smart_show(Evas_Object * obj); 79static void _smart_show(Evas_Object * obj);
@@ -239,7 +234,6 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
239 { 234 {
240 sd->module->file_close(sd->video); 235 sd->module->file_close(sd->video);
241 sd->video = NULL; 236 sd->video = NULL;
242 printf("VIDEO -> NULL\n");
243 evas_object_image_size_set(sd->obj, 0, 0); 237 evas_object_image_size_set(sd->obj, 0, 0);
244 } 238 }
245 } 239 }
@@ -1130,22 +1124,24 @@ static void
1130_smart_init(void) 1124_smart_init(void)
1131{ 1125{
1132 if (smart) return; 1126 if (smart) return;
1133 smart = evas_smart_new(E_OBJ_NAME, 1127 {
1134 _smart_add, 1128 static const Evas_Smart_Class sc =
1135 _smart_del, 1129 {
1136 _smart_layer_set, 1130 E_OBJ_NAME,
1137 _smart_raise, 1131 EVAS_SMART_CLASS_VERSION,
1138 _smart_lower, 1132 _smart_add,
1139 _smart_stack_above, 1133 _smart_del,
1140 _smart_stack_below, 1134 _smart_move,
1141 _smart_move, 1135 _smart_resize,
1142 _smart_resize, 1136 _smart_show,
1143 _smart_show, 1137 _smart_hide,
1144 _smart_hide, 1138 _smart_color_set,
1145 _smart_color_set, 1139 _smart_clip_set,
1146 _smart_clip_set, 1140 _smart_clip_unset,
1147 _smart_clip_unset, 1141 NULL
1148 NULL); 1142 };
1143 smart = evas_smart_class_new(&sc);
1144 }
1149} 1145}
1150 1146
1151static void 1147static void
@@ -1179,11 +1175,8 @@ _smart_del(Evas_Object * obj)
1179 Smart_Data *sd; 1175 Smart_Data *sd;
1180 sd = evas_object_smart_data_get(obj); 1176 sd = evas_object_smart_data_get(obj);
1181 if (!sd) return; 1177 if (!sd) return;
1182 printf("DEL: sd->video = %p\n", sd->video);
1183 if (sd->video) sd->module->file_close(sd->video); 1178 if (sd->video) sd->module->file_close(sd->video);
1184 printf("MOD CLOSE: sd->video = %p\n", sd->video);
1185 _emotion_module_close(sd->module, sd->video); 1179 _emotion_module_close(sd->module, sd->video);
1186 printf("DEL SD: sd = %p\n", sd);
1187 evas_object_del(sd->obj); 1180 evas_object_del(sd->obj);
1188 if (sd->file) free(sd->file); 1181 if (sd->file) free(sd->file);
1189 if (sd->job) ecore_job_del(sd->job); 1182 if (sd->job) ecore_job_del(sd->job);
@@ -1191,56 +1184,6 @@ _smart_del(Evas_Object * obj)
1191 if (sd->ref.file) free(sd->ref.file); 1184 if (sd->ref.file) free(sd->ref.file);
1192 free(sd); 1185 free(sd);
1193} 1186}
1194
1195static void
1196_smart_layer_set(Evas_Object * obj, int layer)
1197{
1198 Smart_Data *sd;
1199
1200 sd = evas_object_smart_data_get(obj);
1201 if (!sd) return;
1202 evas_object_layer_set(sd->obj, layer);
1203}
1204
1205static void
1206_smart_raise(Evas_Object * obj)
1207{
1208 Smart_Data *sd;
1209
1210 sd = evas_object_smart_data_get(obj);
1211 if (!sd) return;
1212 evas_object_raise(sd->obj);
1213}
1214
1215static void
1216_smart_lower(Evas_Object * obj)
1217{
1218 Smart_Data *sd;
1219
1220 sd = evas_object_smart_data_get(obj);
1221 if (!sd) return;
1222 evas_object_lower(sd->obj);
1223}
1224
1225static void
1226_smart_stack_above(Evas_Object * obj, Evas_Object * above)
1227{
1228 Smart_Data *sd;
1229
1230 sd = evas_object_smart_data_get(obj);
1231 if (!sd) return;
1232 evas_object_stack_above(sd->obj, above);
1233}
1234
1235static void
1236_smart_stack_below(Evas_Object * obj, Evas_Object * below)
1237{
1238 Smart_Data *sd;
1239
1240 sd = evas_object_smart_data_get(obj);
1241 if (!sd) return;
1242 evas_object_stack_below(sd->obj, below);
1243}
1244 1187
1245static void 1188static void
1246_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y) 1189_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)