summaryrefslogtreecommitdiff
path: root/legacy/edje/src/lib/edje_edit.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-10-21 13:35:16 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-10-21 13:35:16 +0000
commitbdc4de91cd88ab4c41e273d413bdaa91f9d88b49 (patch)
tree3a896c78d41464eac39bdfb916209307a5e4ca81 /legacy/edje/src/lib/edje_edit.c
parentfdd87314b2aa210f1b4c89fc99757bfd454b2df7 (diff)
Fix edje_edit. Didn't see that the base of the Edje_edit is not a
pointer. Changed it to satisfy Eo requirements. Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 78306
Diffstat (limited to '')
-rw-r--r--legacy/edje/src/lib/edje_edit.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/legacy/edje/src/lib/edje_edit.c b/legacy/edje/src/lib/edje_edit.c
index 3e6c41a229..07ad3599b4 100644
--- a/legacy/edje/src/lib/edje_edit.c
+++ b/legacy/edje/src/lib/edje_edit.c
@@ -97,7 +97,7 @@ static const char _edje_edit_type[] = "edje_edit";
97typedef struct _Edje_Edit Edje_Edit; 97typedef struct _Edje_Edit Edje_Edit;
98struct _Edje_Edit 98struct _Edje_Edit
99{ 99{
100 Edje base; 100 Edje *base;
101 101
102 void *bytecode; 102 void *bytecode;
103 int bytecode_size; 103 int bytecode_size;
@@ -213,11 +213,11 @@ _edje_edit_smart_file_set(Eo *obj, void *_pd, va_list *list)
213 ef = eet_open(file, EET_FILE_MODE_READ); 213 ef = eet_open(file, EET_FILE_MODE_READ);
214 214
215 snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i", 215 snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i",
216 eed->base.collection->id); 216 eed->base->collection->id);
217 eed->embryo_source = eet_read(ef, buf, &count); 217 eed->embryo_source = eet_read(ef, buf, &count);
218 218
219 snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i/*", 219 snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i/*",
220 eed->base.collection->id); 220 eed->base->collection->id);
221 keys = eet_list(ef, buf, &count); 221 keys = eet_list(ef, buf, &count);
222 for (i = 0; i < count; i++) 222 for (i = 0; i < count; i++)
223 { 223 {
@@ -257,8 +257,11 @@ edje_edit_object_add(Evas *evas)
257} 257}
258 258
259static void 259static void
260_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) 260_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
261{ 261{
262 Edje_Edit *eed = class_data;
263 eed->base = eo_data_get(obj, EDJE_OBJ_CLASS);
264
262 eo_do_super(obj, eo_constructor()); 265 eo_do_super(obj, eo_constructor());
263 eina_error_set(0); 266 eina_error_set(0);
264 267
@@ -288,14 +291,14 @@ _edje_image_id_find(Edje_Edit *eed, const char *image_name)
288{ 291{
289 unsigned int i; 292 unsigned int i;
290 293
291 if (!eed->base.file) return -1; 294 if (!eed->base->file) return -1;
292 if (!eed->base.file->image_dir) return -1; 295 if (!eed->base->file->image_dir) return -1;
293 296
294 //printf("SEARCH IMAGE %s\n", image_name); 297 //printf("SEARCH IMAGE %s\n", image_name);
295 298
296 for (i = 0; i < eed->base.file->image_dir->entries_count; ++i) 299 for (i = 0; i < eed->base->file->image_dir->entries_count; ++i)
297 if (eed->base.file->image_dir->entries[i].entry 300 if (eed->base->file->image_dir->entries[i].entry
298 && !strcmp(image_name, eed->base.file->image_dir->entries[i].entry)) 301 && !strcmp(image_name, eed->base->file->image_dir->entries[i].entry))
299 return i; 302 return i;
300 303
301 return -1; 304 return -1;
@@ -304,16 +307,16 @@ _edje_image_id_find(Edje_Edit *eed, const char *image_name)
304static const char * 307static const char *
305_edje_image_name_find(Edje_Edit *eed, int image_id) 308_edje_image_name_find(Edje_Edit *eed, int image_id)
306{ 309{
307 if (!eed->base.file) return NULL; 310 if (!eed->base->file) return NULL;
308 if (!eed->base.file->image_dir) return NULL; 311 if (!eed->base->file->image_dir) return NULL;
309 312
310 /* Special case for external image */ 313 /* Special case for external image */
311 if (image_id < 0) image_id = -image_id - 1; 314 if (image_id < 0) image_id = -image_id - 1;
312 315
313 //printf("SEARCH IMAGE ID %d\n", image_id); 316 //printf("SEARCH IMAGE ID %d\n", image_id);
314 if ((unsigned int) image_id >= eed->base.file->image_dir->entries_count) 317 if ((unsigned int) image_id >= eed->base->file->image_dir->entries_count)
315 return NULL; 318 return NULL;
316 return eed->base.file->image_dir->entries[image_id].entry; 319 return eed->base->file->image_dir->entries[image_id].entry;
317} 320}
318 321
319static void 322static void
@@ -5090,9 +5093,9 @@ _edje_program_id_find(Edje_Edit *eed, const char *program)
5090 Edje_Program *epr; 5093 Edje_Program *epr;
5091 int i; 5094 int i;
5092 5095
5093 for (i = 0; i < eed->base.table_programs_size; i++) 5096 for (i = 0; i < eed->base->table_programs_size; i++)
5094 { 5097 {
5095 epr = eed->base.table_programs[i]; 5098 epr = eed->base->table_programs[i];
5096 if (epr->name && !strcmp(epr->name, program)) 5099 if (epr->name && !strcmp(epr->name, program))
5097 return epr->id; 5100 return epr->id;
5098 } 5101 }
@@ -6424,7 +6427,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
6424 free(ps->processed); 6427 free(ps->processed);
6425 ps->processed = NULL; 6428 ps->processed = NULL;
6426 } 6429 }
6427 epr = eed->base.table_programs[ps->id]; 6430 epr = eed->base->table_programs[ps->id];
6428 if (!ps->processed) 6431 if (!ps->processed)
6429 ps->processed = _edje_edit_script_process(eed, epr->name, ps->code); 6432 ps->processed = _edje_edit_script_process(eed, epr->name, ps->code);
6430 if (!ps->processed) 6433 if (!ps->processed)
@@ -6503,7 +6506,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
6503 eed->script_need_recompile = EINA_FALSE; 6506 eed->script_need_recompile = EINA_FALSE;
6504 eed->all_dirty = EINA_FALSE; 6507 eed->all_dirty = EINA_FALSE;
6505 6508
6506 edc = eed->base.collection; 6509 edc = eed->base->collection;
6507 embryo_program_free(edc->script); 6510 embryo_program_free(edc->script);
6508 edc->script = embryo_program_new(eed->bytecode, eed->bytecode_size); 6511 edc->script = embryo_program_new(eed->bytecode, eed->bytecode_size);
6509 _edje_embryo_script_init(edc); 6512 _edje_embryo_script_init(edc);
@@ -7172,7 +7175,7 @@ _edje_generate_source_of_group(Edje *ed, Edje_Part_Collection_Directory_Entry *p
7172 } 7175 }
7173 7176
7174 eed = eo_data_get(obj, MY_CLASS); 7177 eed = eo_data_get(obj, MY_CLASS);
7175 pc = eed->base.collection; 7178 pc = eed->base->collection;
7176 7179
7177 BUF_APPENDF(I1"group { name: \"%s\";\n", group); 7180 BUF_APPENDF(I1"group { name: \"%s\";\n", group);
7178 //TODO Support alias: 7181 //TODO Support alias: