2 Concerning the EDC reference:
4 The formatting for blocks and properties has been implemented as a table
5 which is filled using ALIASES.
6 For maximum flexibility I implemented them in the \@code/\@encode style,
7 this means that missing one or changing the order most certainly cause
13 code sample of the block
15 the block's description
21 property's parameter list
23 the property description (lol)
41 * @page edcref Edje Data Collection reference
42 * An Edje Data Collection, it's a plain text file (normally identified with the
43 * .edc extension), consisting of instructions for the Edje Compiler.
45 * The syntax for the edje data collection files follows a simple structure of
46 * "blocks { .. }" that can contain "properties: ..", more blocks, or both.
48 * @anchor sec_quickaccess Quick access to block descriptions:
50 * <li>@ref sec_toplevel "Top-Level"</li>
51 * <li>@ref sec_group "Group"</li>
52 * <li>@ref sec_description "State description"</li>
54 * <li>@ref sec_description_image "Image"</li>
55 * <li>@ref sec_description_text "Text"</li>
56 * <li>@ref sec_description_box "Box"</li>
57 * <li>@ref sec_description_table "Table"</li>
58 * <li>@ref sec_description_map "Map (3d/transformations)"</li>
60 * <li>@ref sec_program "Program block"</li>
63 * @author Andres Blanc (dresb) andresblanc@gmail.com
65 * <table class="edcref" border="0">
68 static Edje_Part_Collection_Directory_Entry *current_de = NULL;
69 static Edje_Part *current_part = NULL;
70 static Edje_Pack_Element *current_item = NULL;
71 static Edje_Part_Description_Common *current_desc = NULL;
72 static Edje_Part_Description_Common *parent_desc = NULL;
73 static Edje_Program *current_program = NULL;
75 struct _Edje_Cc_Handlers_Hierarchy_Info
76 { /* Struct that keeps globals value to impl hierarchy */
77 Edje_Part_Collection_Directory_Entry *current_de;
78 Edje_Part *current_part;
79 Edje_Pack_Element *current_item;
80 Edje_Part_Description_Common *current_desc;
81 Edje_Part_Description_Common *parent_desc;
82 Edje_Program *current_program;
85 typedef struct _Edje_Cc_Handlers_Hierarchy_Info Edje_Cc_Handlers_Hierarchy_Info;
87 static Eina_Array *part_hierarchy = NULL; /* stack parts,support nested parts */
88 static void edje_cc_handlers_hierarchy_set(Edje_Part *src);
89 static Edje_Part *edje_cc_handlers_hierarchy_parent_get(void);
90 static void edje_cc_handlers_hierarchy_push(Edje_Part *ep, Edje_Part *cp);
91 static void edje_cc_handlers_hierarchy_rename(Edje_Part *old, Edje_Part *new);
92 static void edje_cc_handlers_hierarchy_pop(void);
94 static void st_externals_external(void);
96 static void st_images_image(void);
97 static void ob_images_set(void);
98 static void st_images_set_name(void);
99 static void ob_images_set_image(void);
100 static void st_images_set_image_image(void);
101 static void st_images_set_image_size(void);
103 static void st_fonts_font(void);
105 static void st_data_item(void);
106 static void st_data_file(void);
108 static void ob_styles_style(void);
109 static void st_styles_style_name(void);
110 static void st_styles_style_base(void);
111 static void st_styles_style_tag(void);
113 static void ob_color_class(void);
114 static void st_color_class_name(void);
115 static void st_color_class_color(void);
116 static void st_color_class_color2(void);
117 static void st_color_class_color3(void);
119 static void ob_collections(void);
121 static void ob_collections_group(void);
122 static void st_collections_group_name(void);
123 static void st_collections_group_inherit(void);
124 static void st_collections_group_script_only(void);
125 static void st_collections_group_alias(void);
126 static void st_collections_group_min(void);
127 static void st_collections_group_max(void);
128 static void st_collections_group_broadcast_signal(void);
129 static void st_collections_group_data_item(void);
130 static void st_collections_group_orientation(void);
132 static void st_collections_group_limits_vertical(void);
133 static void st_collections_group_limits_horizontal(void);
135 static void ob_collections_group_script(void);
136 static void ob_collections_group_lua_script(void);
138 static void st_collections_group_parts_alias(void);
140 static Edje_Part *edje_cc_handlers_part_make(void);
141 static void ob_collections_group_parts_part(void);
142 static void st_collections_group_parts_part_name(void);
143 static void st_collections_group_parts_part_type(void);
144 static void st_collections_group_parts_part_insert_before(void);
145 static void st_collections_group_parts_part_insert_after(void);
146 static void st_collections_group_parts_part_effect(void);
147 static void st_collections_group_parts_part_mouse_events(void);
148 static void st_collections_group_parts_part_repeat_events(void);
149 static void st_collections_group_parts_part_ignore_flags(void);
150 static void st_collections_group_parts_part_scale(void);
151 static void st_collections_group_parts_part_pointer_mode(void);
152 static void st_collections_group_parts_part_precise_is_inside(void);
153 static void st_collections_group_parts_part_use_alternate_font_metrics(void);
154 static void st_collections_group_parts_part_clip_to_id(void);
155 static void st_collections_group_parts_part_source(void);
156 static void st_collections_group_parts_part_source2(void);
157 static void st_collections_group_parts_part_source3(void);
158 static void st_collections_group_parts_part_source4(void);
159 static void st_collections_group_parts_part_source5(void);
160 static void st_collections_group_parts_part_source6(void);
161 static void st_collections_group_parts_part_entry_mode(void);
162 static void st_collections_group_parts_part_select_mode(void);
163 static void st_collections_group_parts_part_cursor_mode(void);
164 static void st_collections_group_parts_part_multiline(void);
165 static void st_collections_group_parts_part_access(void);
166 static void st_collections_group_parts_part_dragable_x(void);
167 static void st_collections_group_parts_part_dragable_y(void);
168 static void st_collections_group_parts_part_dragable_confine(void);
169 static void st_collections_group_parts_part_dragable_events(void);
171 /* box and table items share these */
172 static void ob_collections_group_parts_part_box_items_item(void);
173 static void st_collections_group_parts_part_box_items_item_type(void);
174 static void st_collections_group_parts_part_box_items_item_name(void);
175 static void st_collections_group_parts_part_box_items_item_source(void);
176 static void st_collections_group_parts_part_box_items_item_min(void);
177 static void st_collections_group_parts_part_box_items_item_prefer(void);
178 static void st_collections_group_parts_part_box_items_item_max(void);
179 static void st_collections_group_parts_part_box_items_item_padding(void);
180 static void st_collections_group_parts_part_box_items_item_align(void);
181 static void st_collections_group_parts_part_box_items_item_weight(void);
182 static void st_collections_group_parts_part_box_items_item_aspect(void);
183 static void st_collections_group_parts_part_box_items_item_aspect_mode(void);
184 static void st_collections_group_parts_part_box_items_item_options(void);
185 /* but these are only for table */
186 static void st_collections_group_parts_part_table_items_item_position(void);
187 static void st_collections_group_parts_part_table_items_item_span(void);
189 static void ob_collections_group_parts_part_description(void);
190 static void st_collections_group_parts_part_description_inherit(void);
191 static void st_collections_group_parts_part_description_source(void);
192 static void st_collections_group_parts_part_description_state(void);
193 static void st_collections_group_parts_part_description_visible(void);
194 static void st_collections_group_parts_part_description_limit(void);
195 static void st_collections_group_parts_part_description_align(void);
196 static void st_collections_group_parts_part_description_fixed(void);
197 static void st_collections_group_parts_part_description_min(void);
198 static void st_collections_group_parts_part_description_minmul(void);
199 static void st_collections_group_parts_part_description_max(void);
200 static void st_collections_group_parts_part_description_step(void);
201 static void st_collections_group_parts_part_description_aspect(void);
202 static void st_collections_group_parts_part_description_aspect_preference(void);
203 static void st_collections_group_parts_part_description_rel1_relative(void);
204 static void st_collections_group_parts_part_description_rel1_offset(void);
205 static void st_collections_group_parts_part_description_rel1_to_set(const char *name);
206 static void st_collections_group_parts_part_description_rel1_to(void);
207 static void st_collections_group_parts_part_description_rel1_to_x(void);
208 static void st_collections_group_parts_part_description_rel1_to_y(void);
209 static void st_collections_group_parts_part_description_rel2_relative(void);
210 static void st_collections_group_parts_part_description_rel2_offset(void);
211 static void st_collections_group_parts_part_description_rel2_to_set(const char *name);
212 static void st_collections_group_parts_part_description_rel2_to(void);
213 static void st_collections_group_parts_part_description_rel2_to_x(void);
214 static void st_collections_group_parts_part_description_rel2_to_y(void);
215 static void st_collections_group_parts_part_description_image_normal(void);
216 static void st_collections_group_parts_part_description_image_tween(void);
217 static void st_collections_group_parts_part_description_image_border(void);
218 static void st_collections_group_parts_part_description_image_middle(void);
219 static void st_collections_group_parts_part_description_image_border_scale(void);
220 static void st_collections_group_parts_part_description_image_border_scale_by(void);
221 static void st_collections_group_parts_part_description_image_scale_hint(void);
222 static void st_collections_group_parts_part_description_fill_smooth(void);
223 static void st_collections_group_parts_part_description_fill_origin_relative(void);
224 static void st_collections_group_parts_part_description_fill_origin_offset(void);
225 static void st_collections_group_parts_part_description_fill_size_relative(void);
226 static void st_collections_group_parts_part_description_fill_size_offset(void);
227 static void st_collections_group_parts_part_description_fill_spread(void);
228 static void st_collections_group_parts_part_description_fill_type(void);
229 static void st_collections_group_parts_part_description_color_class(void);
230 static void st_collections_group_parts_part_description_color(void);
231 static void st_collections_group_parts_part_description_color2(void);
232 static void st_collections_group_parts_part_description_color3(void);
233 static void st_collections_group_parts_part_description_text_text(void);
234 static void st_collections_group_parts_part_description_text_text_class(void);
235 static void st_collections_group_parts_part_description_text_font(void);
236 static void st_collections_group_parts_part_description_text_style(void);
237 static void st_collections_group_parts_part_description_text_repch(void);
238 static void st_collections_group_parts_part_description_text_size(void);
239 static void st_collections_group_parts_part_description_text_size_range(void);
240 static void st_collections_group_parts_part_description_text_fit(void);
241 static void st_collections_group_parts_part_description_text_min(void);
242 static void st_collections_group_parts_part_description_text_max(void);
243 static void st_collections_group_parts_part_description_text_align(void);
244 static void st_collections_group_parts_part_description_text_source(void);
245 static void st_collections_group_parts_part_description_text_text_source(void);
246 static void st_collections_group_parts_part_description_text_elipsis(void);
247 static void st_collections_group_parts_part_description_box_layout(void);
248 static void st_collections_group_parts_part_description_box_align(void);
249 static void st_collections_group_parts_part_description_box_padding(void);
250 static void st_collections_group_parts_part_description_box_min(void);
251 static void st_collections_group_parts_part_description_table_homogeneous(void);
252 static void st_collections_group_parts_part_description_table_align(void);
253 static void st_collections_group_parts_part_description_table_padding(void);
254 static void st_collections_group_parts_part_description_table_min(void);
255 static void st_collections_group_parts_part_description_map_perspective(void);
256 static void st_collections_group_parts_part_description_map_light(void);
257 static void st_collections_group_parts_part_description_map_rotation_center(void);
258 static void st_collections_group_parts_part_description_map_rotation_x(void);
259 static void st_collections_group_parts_part_description_map_rotation_y(void);
260 static void st_collections_group_parts_part_description_map_rotation_z(void);
261 static void st_collections_group_parts_part_description_map_on(void);
262 static void st_collections_group_parts_part_description_map_smooth(void);
263 static void st_collections_group_parts_part_description_map_alpha(void);
264 static void st_collections_group_parts_part_description_map_backface_cull(void);
265 static void st_collections_group_parts_part_description_map_perspective_on(void);
266 static void st_collections_group_parts_part_description_perspective_zplane(void);
267 static void st_collections_group_parts_part_description_perspective_focal(void);
268 static void st_collections_group_parts_part_api(void);
270 /* external part parameters */
271 static void st_collections_group_parts_part_description_params_int(void);
272 static void ob_collections_group_programs_program(void);
273 static void st_collections_group_parts_part_description_params_double(void);
275 static void st_collections_group_programs_program_name(void);
276 static void st_collections_group_parts_part_description_params_string(void);
277 static void st_collections_group_parts_part_description_params_bool(void);
278 static void st_collections_group_parts_part_description_params_choice(void);
279 static void st_collections_group_programs_program_signal(void);
280 static void st_collections_group_programs_program_source(void);
281 static void st_collections_group_programs_program_filter(void);
282 static void st_collections_group_programs_program_in(void);
283 static void st_collections_group_programs_program_action(void);
284 static void st_collections_group_programs_program_transition(void);
285 static void st_collections_group_programs_program_target(void);
286 static void st_collections_group_programs_program_after(void);
287 static void st_collections_group_programs_program_api(void);
289 static void ob_collections_group_programs_program_script(void);
291 static void st_collections_group_sound_sample_name(void);
292 static void st_collections_group_sound_sample_source(void);
293 static void st_collections_group_sound_tone(void);
296 New_Statement_Handler statement_handlers[] =
298 {"externals.external", st_externals_external},
299 {"images.image", st_images_image},
300 {"images.set.name", st_images_set_name},
301 {"images.set.image.image", st_images_set_image_image},
302 {"images.set.image.size", st_images_set_image_size},
303 {"fonts.font", st_fonts_font},
304 {"data.item", st_data_item},
305 {"data.file", st_data_file},
306 {"styles.style.name", st_styles_style_name},
307 {"styles.style.base", st_styles_style_base},
308 {"styles.style.tag", st_styles_style_tag},
309 {"color_classes.color_class.name", st_color_class_name},
310 {"color_classes.color_class.color", st_color_class_color},
311 {"color_classes.color_class.color2", st_color_class_color2},
312 {"color_classes.color_class.color3", st_color_class_color3},
313 {"collections.externals.external", st_externals_external}, /* dup */
314 {"collections.image", st_images_image}, /* dup */
315 {"collections.set.name", st_images_set_name}, /* dup */
316 {"collections.set.image.image", st_images_set_image_image}, /* dup */
317 {"collections.set.image.size", st_images_set_image_size}, /* dup */
318 {"collections.images.image", st_images_image}, /* dup */
319 {"collections.images.set.name", st_images_set_name}, /* dup */
320 {"collections.images.set.image.image", st_images_set_image_image}, /* dup */
321 {"collections.images.set.image.size", st_images_set_image_size}, /* dup */
322 {"collections.font", st_fonts_font}, /* dup */
323 {"collections.fonts.font", st_fonts_font}, /* dup */
324 {"collections.styles.style.name", st_styles_style_name}, /* dup */
325 {"collections.styles.style.base", st_styles_style_base}, /* dup */
326 {"collections.styles.style.tag", st_styles_style_tag}, /* dup */
327 {"collections.color_classes.color_class.name", st_color_class_name}, /* dup */
328 {"collections.color_classes.color_class.color", st_color_class_color}, /* dup */
329 {"collections.color_classes.color_class.color2", st_color_class_color2}, /* dup */
330 {"collections.color_classes.color_class.color3", st_color_class_color3}, /* dup */
331 {"collections.sounds.sample.name", st_collections_group_sound_sample_name},
332 {"collections.sounds.sample.source", st_collections_group_sound_sample_source},
333 {"collections.group.sounds.sample.name", st_collections_group_sound_sample_name}, /* dup */
334 {"collections.group.sounds.sample.source", st_collections_group_sound_sample_source}, /* dup */
335 {"collections.sounds.tone", st_collections_group_sound_tone},
336 {"collections.group.sounds.tone", st_collections_group_sound_tone}, /* dup */
337 {"collections.group.name", st_collections_group_name},
338 {"collections.group.inherit", st_collections_group_inherit},
339 {"collections.group.script_only", st_collections_group_script_only},
340 {"collections.group.lua_script_only", st_collections_group_script_only},
341 {"collections.group.alias", st_collections_group_alias},
342 {"collections.group.min", st_collections_group_min},
343 {"collections.group.max", st_collections_group_max},
344 {"collections.group.broadcast_signal", st_collections_group_broadcast_signal},
345 {"collections.group.orientation", st_collections_group_orientation},
346 {"collections.group.data.item", st_collections_group_data_item},
347 {"collections.group.limits.horizontal", st_collections_group_limits_horizontal},
348 {"collections.group.limits.vertical", st_collections_group_limits_vertical},
349 {"collections.group.externals.external", st_externals_external}, /* dup */
350 {"collections.group.image", st_images_image}, /* dup */
351 {"collections.group.set.name", st_images_set_name},
352 {"collections.group.set.image.image", st_images_set_image_image},
353 {"collections.group.set.image.size", st_images_set_image_size},
354 {"collections.group.images.image", st_images_image}, /* dup */
355 {"collections.group.images.set.name", st_images_set_name},
356 {"collections.group.images.set.image.image", st_images_set_image_image},
357 {"collections.group.images.set.image.size", st_images_set_image_size},
358 {"collections.group.font", st_fonts_font}, /* dup */
359 {"collections.group.fonts.font", st_fonts_font}, /* dup */
360 {"collections.group.styles.style.name", st_styles_style_name}, /* dup */
361 {"collections.group.styles.style.base", st_styles_style_base}, /* dup */
362 {"collections.group.styles.style.tag", st_styles_style_tag}, /* dup */
363 {"collections.group.color_classes.color_class.name", st_color_class_name}, /* dup */
364 {"collections.group.color_classes.color_class.color", st_color_class_color}, /* dup */
365 {"collections.group.color_classes.color_class.color2", st_color_class_color2}, /* dup */
366 {"collections.group.color_classes.color_class.color3", st_color_class_color3}, /* dup */
367 {"collections.group.parts.alias", st_collections_group_parts_alias },
368 {"collections.group.parts.image", st_images_image}, /* dup */
369 {"collections.group.parts.set.name", st_images_set_name},
370 {"collections.group.parts.set.image.image", st_images_set_image_image},
371 {"collections.group.parts.set.image.size", st_images_set_image_size},
372 {"collections.group.parts.images.image", st_images_image}, /* dup */
373 {"collections.group.parts.images.set.name", st_images_set_name},
374 {"collections.group.parts.images.set.image.image", st_images_set_image_image},
375 {"collections.group.parts.images.set.image.size", st_images_set_image_size},
376 {"collections.group.parts.font", st_fonts_font}, /* dup */
377 {"collections.group.parts.fonts.font", st_fonts_font}, /* dup */
378 {"collections.group.parts.styles.style.name", st_styles_style_name}, /* dup */
379 {"collections.group.parts.styles.style.base", st_styles_style_base}, /* dup */
380 {"collections.group.parts.styles.style.tag", st_styles_style_tag}, /* dup */
381 {"collections.group.parts.color_classes.color_class.name", st_color_class_name}, /* dup */
382 {"collections.group.parts.color_classes.color_class.color", st_color_class_color}, /* dup */
383 {"collections.group.parts.color_classes.color_class.color2", st_color_class_color2}, /* dup */
384 {"collections.group.parts.color_classes.color_class.color3", st_color_class_color3}, /* dup */
385 {"collections.group.parts.part.name", st_collections_group_parts_part_name},
386 {"collections.group.parts.part.api", st_collections_group_parts_part_api},
387 {"collections.group.parts.part.type", st_collections_group_parts_part_type},
388 {"collections.group.parts.part.insert_before", st_collections_group_parts_part_insert_before},
389 {"collections.group.parts.part.insert_after", st_collections_group_parts_part_insert_after},
390 {"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
391 {"collections.group.parts.part.mouse_events", st_collections_group_parts_part_mouse_events},
392 {"collections.group.parts.part.repeat_events", st_collections_group_parts_part_repeat_events},
393 {"collections.group.parts.part.ignore_flags", st_collections_group_parts_part_ignore_flags},
394 {"collections.group.parts.part.scale", st_collections_group_parts_part_scale},
395 {"collections.group.parts.part.pointer_mode", st_collections_group_parts_part_pointer_mode},
396 {"collections.group.parts.part.precise_is_inside", st_collections_group_parts_part_precise_is_inside},
397 {"collections.group.parts.part.use_alternate_font_metrics", st_collections_group_parts_part_use_alternate_font_metrics},
398 {"collections.group.parts.part.clip_to", st_collections_group_parts_part_clip_to_id},
399 {"collections.group.parts.part.source", st_collections_group_parts_part_source},
400 {"collections.group.parts.part.source2", st_collections_group_parts_part_source2},
401 {"collections.group.parts.part.source3", st_collections_group_parts_part_source3},
402 {"collections.group.parts.part.source4", st_collections_group_parts_part_source4},
403 {"collections.group.parts.part.source5", st_collections_group_parts_part_source5},
404 {"collections.group.parts.part.source6", st_collections_group_parts_part_source6},
405 {"collections.group.parts.part.dragable.x", st_collections_group_parts_part_dragable_x},
406 {"collections.group.parts.part.dragable.y", st_collections_group_parts_part_dragable_y},
407 {"collections.group.parts.part.dragable.confine", st_collections_group_parts_part_dragable_confine},
408 {"collections.group.parts.part.dragable.events", st_collections_group_parts_part_dragable_events},
409 {"collections.group.parts.part.entry_mode", st_collections_group_parts_part_entry_mode},
410 {"collections.group.parts.part.select_mode", st_collections_group_parts_part_select_mode},
411 {"collections.group.parts.part.cursor_mode", st_collections_group_parts_part_cursor_mode},
412 {"collections.group.parts.part.multiline", st_collections_group_parts_part_multiline},
413 {"collections.group.parts.part.access", st_collections_group_parts_part_access},
414 {"collections.group.parts.part.image", st_images_image}, /* dup */
415 {"collections.group.parts.part.set.name", st_images_set_name},
416 {"collections.group.parts.part.set.image.image", st_images_set_image_image},
417 {"collections.group.parts.part.set.image.size", st_images_set_image_size},
418 {"collections.group.parts.part.images.image", st_images_image}, /* dup */
419 {"collections.group.parts.part.images.set.name", st_images_set_name},
420 {"collections.group.parts.part.images.set.image.image", st_images_set_image_image},
421 {"collections.group.parts.part.images.set.image.size", st_images_set_image_size},
422 {"collections.group.parts.part.font", st_fonts_font}, /* dup */
423 {"collections.group.parts.part.fonts.font", st_fonts_font}, /* dup */
424 {"collections.group.parts.part.styles.style.name", st_styles_style_name}, /* dup */
425 {"collections.group.parts.part.styles.style.base", st_styles_style_base}, /* dup */
426 {"collections.group.parts.part.styles.style.tag", st_styles_style_tag}, /* dup */
427 {"collections.group.parts.part.color_classes.color_class.name", st_color_class_name}, /* dup */
428 {"collections.group.parts.part.color_classes.color_class.color", st_color_class_color}, /* dup */
429 {"collections.group.parts.part.color_classes.color_class.color2", st_color_class_color2}, /* dup */
430 {"collections.group.parts.part.color_classes.color_class.color3", st_color_class_color3}, /* dup */
431 {"collections.group.parts.part.box.items.item.type", st_collections_group_parts_part_box_items_item_type},
432 {"collections.group.parts.part.box.items.item.name", st_collections_group_parts_part_box_items_item_name},
433 {"collections.group.parts.part.box.items.item.source", st_collections_group_parts_part_box_items_item_source},
434 {"collections.group.parts.part.box.items.item.min", st_collections_group_parts_part_box_items_item_min},
435 {"collections.group.parts.part.box.items.item.prefer", st_collections_group_parts_part_box_items_item_prefer},
436 {"collections.group.parts.part.box.items.item.max", st_collections_group_parts_part_box_items_item_max},
437 {"collections.group.parts.part.box.items.item.padding", st_collections_group_parts_part_box_items_item_padding},
438 {"collections.group.parts.part.box.items.item.align", st_collections_group_parts_part_box_items_item_align},
439 {"collections.group.parts.part.box.items.item.weight", st_collections_group_parts_part_box_items_item_weight},
440 {"collections.group.parts.part.box.items.item.aspect", st_collections_group_parts_part_box_items_item_aspect},
441 {"collections.group.parts.part.box.items.item.aspect_mode", st_collections_group_parts_part_box_items_item_aspect_mode},
442 {"collections.group.parts.part.box.items.item.options", st_collections_group_parts_part_box_items_item_options},
443 {"collections.group.parts.part.table.items.item.type", st_collections_group_parts_part_box_items_item_type}, /* dup */
444 {"collections.group.parts.part.table.items.item.name", st_collections_group_parts_part_box_items_item_name}, /* dup */
445 {"collections.group.parts.part.table.items.item.source", st_collections_group_parts_part_box_items_item_source}, /* dup */
446 {"collections.group.parts.part.table.items.item.min", st_collections_group_parts_part_box_items_item_min}, /* dup */
447 {"collections.group.parts.part.table.items.item.prefer", st_collections_group_parts_part_box_items_item_prefer}, /* dup */
448 {"collections.group.parts.part.table.items.item.max", st_collections_group_parts_part_box_items_item_max}, /* dup */
449 {"collections.group.parts.part.table.items.item.padding", st_collections_group_parts_part_box_items_item_padding}, /* dup */
450 {"collections.group.parts.part.table.items.item.align", st_collections_group_parts_part_box_items_item_align}, /* dup */
451 {"collections.group.parts.part.table.items.item.weight", st_collections_group_parts_part_box_items_item_weight}, /* dup */
452 {"collections.group.parts.part.table.items.item.aspect", st_collections_group_parts_part_box_items_item_aspect}, /* dup */
453 {"collections.group.parts.part.table.items.item.aspect_mode", st_collections_group_parts_part_box_items_item_aspect_mode}, /* dup */
454 {"collections.group.parts.part.table.items.item.options", st_collections_group_parts_part_box_items_item_options}, /* dup */
455 {"collections.group.parts.part.table.items.item.position", st_collections_group_parts_part_table_items_item_position},
456 {"collections.group.parts.part.table.items.item.span", st_collections_group_parts_part_table_items_item_span},
457 {"collections.group.parts.part.description.inherit", st_collections_group_parts_part_description_inherit},
458 {"collections.group.parts.part.description.source", st_collections_group_parts_part_description_source},
459 {"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
460 {"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
461 {"collections.group.parts.part.description.limit", st_collections_group_parts_part_description_limit},
462 {"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align},
463 {"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed},
464 {"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min},
465 {"collections.group.parts.part.description.minmul", st_collections_group_parts_part_description_minmul},
466 {"collections.group.parts.part.description.max", st_collections_group_parts_part_description_max},
467 {"collections.group.parts.part.description.step", st_collections_group_parts_part_description_step},
468 {"collections.group.parts.part.description.aspect", st_collections_group_parts_part_description_aspect},
469 {"collections.group.parts.part.description.aspect_preference", st_collections_group_parts_part_description_aspect_preference},
470 {"collections.group.parts.part.description.rel1.relative", st_collections_group_parts_part_description_rel1_relative},
471 {"collections.group.parts.part.description.rel1.offset", st_collections_group_parts_part_description_rel1_offset},
472 {"collections.group.parts.part.description.rel1.to", st_collections_group_parts_part_description_rel1_to},
473 {"collections.group.parts.part.description.rel1.to_x", st_collections_group_parts_part_description_rel1_to_x},
474 {"collections.group.parts.part.description.rel1.to_y", st_collections_group_parts_part_description_rel1_to_y},
475 {"collections.group.parts.part.description.rel2.relative", st_collections_group_parts_part_description_rel2_relative},
476 {"collections.group.parts.part.description.rel2.offset", st_collections_group_parts_part_description_rel2_offset},
477 {"collections.group.parts.part.description.rel2.to", st_collections_group_parts_part_description_rel2_to},
478 {"collections.group.parts.part.description.rel2.to_x", st_collections_group_parts_part_description_rel2_to_x},
479 {"collections.group.parts.part.description.rel2.to_y", st_collections_group_parts_part_description_rel2_to_y},
480 {"collections.group.parts.part.description.image.normal", st_collections_group_parts_part_description_image_normal},
481 {"collections.group.parts.part.description.image.tween", st_collections_group_parts_part_description_image_tween},
482 {"collections.group.parts.part.description.image.image", st_images_image}, /* dup */
483 {"collections.group.parts.part.description.image.set.name", st_images_set_name},
484 {"collections.group.parts.part.description.image.set.image.image", st_images_set_image_image},
485 {"collections.group.parts.part.description.image.set.image.size", st_images_set_image_size},
486 {"collections.group.parts.part.description.image.images.image", st_images_image}, /* dup */
487 {"collections.group.parts.part.description.image.images.set.name", st_images_set_name},
488 {"collections.group.parts.part.description.image.images.set.image.image", st_images_set_image_image},
489 {"collections.group.parts.part.description.image.images.set.image.size", st_images_set_image_size},
490 {"collections.group.parts.part.description.image.border", st_collections_group_parts_part_description_image_border},
491 {"collections.group.parts.part.description.image.middle", st_collections_group_parts_part_description_image_middle},
492 {"collections.group.parts.part.description.image.border_scale", st_collections_group_parts_part_description_image_border_scale},
493 {"collections.group.parts.part.description.image.border_scale_by", st_collections_group_parts_part_description_image_border_scale_by},
494 {"collections.group.parts.part.description.image.scale_hint", st_collections_group_parts_part_description_image_scale_hint},
495 {"collections.group.parts.part.description.fill.smooth", st_collections_group_parts_part_description_fill_smooth},
496 {"collections.group.parts.part.description.fill.origin.relative", st_collections_group_parts_part_description_fill_origin_relative},
497 {"collections.group.parts.part.description.fill.origin.offset", st_collections_group_parts_part_description_fill_origin_offset},
498 {"collections.group.parts.part.description.fill.size.relative", st_collections_group_parts_part_description_fill_size_relative},
499 {"collections.group.parts.part.description.fill.size.offset", st_collections_group_parts_part_description_fill_size_offset},
500 {"collections.group.parts.part.description.fill.spread", st_collections_group_parts_part_description_fill_spread},
501 {"collections.group.parts.part.description.fill.type", st_collections_group_parts_part_description_fill_type},
502 {"collections.group.parts.part.description.color_class", st_collections_group_parts_part_description_color_class},
503 {"collections.group.parts.part.description.color", st_collections_group_parts_part_description_color},
504 {"collections.group.parts.part.description.color2", st_collections_group_parts_part_description_color2},
505 {"collections.group.parts.part.description.color3", st_collections_group_parts_part_description_color3},
506 {"collections.group.parts.part.description.text.text", st_collections_group_parts_part_description_text_text},
507 {"collections.group.parts.part.description.text.text_class", st_collections_group_parts_part_description_text_text_class},
508 {"collections.group.parts.part.description.text.font", st_collections_group_parts_part_description_text_font},
509 {"collections.group.parts.part.description.text.style", st_collections_group_parts_part_description_text_style},
510 {"collections.group.parts.part.description.text.repch", st_collections_group_parts_part_description_text_repch},
511 {"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size},
512 {"collections.group.parts.part.description.text.size_range", st_collections_group_parts_part_description_text_size_range},
513 {"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit},
514 {"collections.group.parts.part.description.text.min", st_collections_group_parts_part_description_text_min},
515 {"collections.group.parts.part.description.text.max", st_collections_group_parts_part_description_text_max},
516 {"collections.group.parts.part.description.text.align", st_collections_group_parts_part_description_text_align},
517 {"collections.group.parts.part.description.text.source", st_collections_group_parts_part_description_text_source},
518 {"collections.group.parts.part.description.text.text_source", st_collections_group_parts_part_description_text_text_source},
519 {"collections.group.parts.part.description.text.font", st_fonts_font}, /* dup */
520 {"collections.group.parts.part.description.text.fonts.font", st_fonts_font}, /* dup */
521 {"collections.group.parts.part.description.text.elipsis", st_collections_group_parts_part_description_text_elipsis},
522 {"collections.group.parts.part.description.text.ellipsis", st_collections_group_parts_part_description_text_elipsis},
523 {"collections.group.parts.part.description.box.layout", st_collections_group_parts_part_description_box_layout},
524 {"collections.group.parts.part.description.box.align", st_collections_group_parts_part_description_box_align},
525 {"collections.group.parts.part.description.box.padding", st_collections_group_parts_part_description_box_padding},
526 {"collections.group.parts.part.description.box.min", st_collections_group_parts_part_description_box_min},
527 {"collections.group.parts.part.description.table.homogeneous", st_collections_group_parts_part_description_table_homogeneous},
528 {"collections.group.parts.part.description.table.align", st_collections_group_parts_part_description_table_align},
529 {"collections.group.parts.part.description.table.padding", st_collections_group_parts_part_description_table_padding},
530 {"collections.group.parts.part.description.table.min", st_collections_group_parts_part_description_table_min},
531 {"collections.group.parts.part.description.map.perspective", st_collections_group_parts_part_description_map_perspective},
532 {"collections.group.parts.part.description.map.light", st_collections_group_parts_part_description_map_light},
533 {"collections.group.parts.part.description.map.rotation.center", st_collections_group_parts_part_description_map_rotation_center},
534 {"collections.group.parts.part.description.map.rotation.x", st_collections_group_parts_part_description_map_rotation_x},
535 {"collections.group.parts.part.description.map.rotation.y", st_collections_group_parts_part_description_map_rotation_y},
536 {"collections.group.parts.part.description.map.rotation.z", st_collections_group_parts_part_description_map_rotation_z},
537 {"collections.group.parts.part.description.map.on", st_collections_group_parts_part_description_map_on},
538 {"collections.group.parts.part.description.map.smooth", st_collections_group_parts_part_description_map_smooth},
539 {"collections.group.parts.part.description.map.alpha", st_collections_group_parts_part_description_map_alpha},
540 {"collections.group.parts.part.description.map.backface_cull", st_collections_group_parts_part_description_map_backface_cull},
541 {"collections.group.parts.part.description.map.perspective_on", st_collections_group_parts_part_description_map_perspective_on},
542 {"collections.group.parts.part.description.perspective.zplane", st_collections_group_parts_part_description_perspective_zplane},
543 {"collections.group.parts.part.description.perspective.focal", st_collections_group_parts_part_description_perspective_focal},
544 {"collections.group.parts.part.description.params.int", st_collections_group_parts_part_description_params_int},
545 {"collections.group.parts.part.description.params.double", st_collections_group_parts_part_description_params_double},
546 {"collections.group.parts.part.description.params.string", st_collections_group_parts_part_description_params_string},
547 {"collections.group.parts.part.description.params.bool", st_collections_group_parts_part_description_params_bool},
548 {"collections.group.parts.part.description.params.choice", st_collections_group_parts_part_description_params_choice},
549 {"collections.group.parts.part.description.images.image", st_images_image}, /* dup */
550 {"collections.group.parts.part.description.images.set.name", st_images_set_name},
551 {"collections.group.parts.part.description.images.set.image.image", st_images_set_image_image},
552 {"collections.group.parts.part.description.images.set.image.size", st_images_set_image_size},
553 {"collections.group.parts.part.description.font", st_fonts_font}, /* dup */
554 {"collections.group.parts.part.description.fonts.font", st_fonts_font}, /* dup */
555 {"collections.group.parts.part.description.styles.style.name", st_styles_style_name}, /* dup */
556 {"collections.group.parts.part.description.styles.style.base", st_styles_style_base}, /* dup */
557 {"collections.group.parts.part.description.styles.style.tag", st_styles_style_tag}, /* dup */
558 {"collections.group.parts.part.description.color_classes.color_class.name", st_color_class_name}, /* dup */
559 {"collections.group.parts.part.description.color_classes.color_class.color", st_color_class_color}, /* dup */
560 {"collections.group.parts.part.description.color_classes.color_class.color2", st_color_class_color2}, /* dup */
561 {"collections.group.parts.part.description.color_classes.color_class.color3", st_color_class_color3}, /* dup */
562 {"collections.group.parts.part.description.programs.image", st_images_image}, /* dup */
563 {"collections.group.parts.part.description.programs.set.name", st_images_set_name},
564 {"collections.group.parts.part.description.programs.set.image.image", st_images_set_image_image},
565 {"collections.group.parts.part.description.programs.set.image.size", st_images_set_image_size},
566 {"collections.group.parts.part.description.programs.images.image", st_images_image}, /* dup */
567 {"collections.group.parts.part.description.programs.images.set.name", st_images_set_name},
568 {"collections.group.parts.part.description.programs.images.set.image.image", st_images_set_image_image},
569 {"collections.group.parts.part.description.programs.images.set.image.size", st_images_set_image_size},
570 {"collections.group.parts.part.description.programs.font", st_fonts_font}, /* dup */
571 {"collections.group.parts.part.description.programs.fonts.font", st_fonts_font}, /* dup */
572 {"collections.group.parts.part.description.programs.program.name", st_collections_group_programs_program_name}, /* dup */
573 {"collections.group.parts.part.description.programs.program.signal", st_collections_group_programs_program_signal}, /* dup */
574 {"collections.group.parts.part.description.programs.program.source", st_collections_group_programs_program_source}, /* dup */
575 {"collections.group.parts.part.description.programs.program.in", st_collections_group_programs_program_in}, /* dup */
576 {"collections.group.parts.part.description.programs.program.action", st_collections_group_programs_program_action}, /* dup */
577 {"collections.group.parts.part.description.programs.program.transition", st_collections_group_programs_program_transition}, /* dup */
578 {"collections.group.parts.part.description.programs.program.target", st_collections_group_programs_program_target}, /* dup */
579 {"collections.group.parts.part.description.programs.program.after", st_collections_group_programs_program_after}, /* dup */
580 {"collections.group.parts.part.description.programs.program.api", st_collections_group_programs_program_api}, /* dup */
581 {"collections.group.parts.part.description.program.name", st_collections_group_programs_program_name}, /* dup */
582 {"collections.group.parts.part.description.program.signal", st_collections_group_programs_program_signal}, /* dup */
583 {"collections.group.parts.part.description.program.source", st_collections_group_programs_program_source}, /* dup */
584 {"collections.group.parts.part.description.program.in", st_collections_group_programs_program_in}, /* dup */
585 {"collections.group.parts.part.description.program.action", st_collections_group_programs_program_action}, /* dup */
586 {"collections.group.parts.part.description.program.transition", st_collections_group_programs_program_transition}, /* dup */
587 {"collections.group.parts.part.description.program.target", st_collections_group_programs_program_target}, /* dup */
588 {"collections.group.parts.part.description.program.after", st_collections_group_programs_program_after}, /* dup */
589 {"collections.group.parts.part.description.program.api", st_collections_group_programs_program_api}, /* dup */
590 {"collections.group.parts.part.programs.image", st_images_image}, /* dup */
591 {"collections.group.parts.part.programs.set.name", st_images_set_name},
592 {"collections.group.parts.part.programs.set.image.image", st_images_set_image_image},
593 {"collections.group.parts.part.programs.set.image.size", st_images_set_image_size},
594 {"collections.group.parts.part.programs.images.image", st_images_image}, /* dup */
595 {"collections.group.parts.part.programs.images.set.name", st_images_set_name},
596 {"collections.group.parts.part.programs.images.set.image.image", st_images_set_image_image},
597 {"collections.group.parts.part.programs.images.set.image.size", st_images_set_image_size},
598 {"collections.group.parts.part.programs.font", st_fonts_font}, /* dup */
599 {"collections.group.parts.part.programs.fonts.font", st_fonts_font}, /* dup */
600 {"collections.group.parts.part.programs.program.name", st_collections_group_programs_program_name}, /* dup */
601 {"collections.group.parts.part.programs.program.signal", st_collections_group_programs_program_signal}, /* dup */
602 {"collections.group.parts.part.programs.program.source", st_collections_group_programs_program_source}, /* dup */
603 {"collections.group.parts.part.programs.program.in", st_collections_group_programs_program_in}, /* dup */
604 {"collections.group.parts.part.programs.program.action", st_collections_group_programs_program_action}, /* dup */
605 {"collections.group.parts.part.programs.program.transition", st_collections_group_programs_program_transition}, /* dup */
606 {"collections.group.parts.part.programs.program.target", st_collections_group_programs_program_target}, /* dup */
607 {"collections.group.parts.part.programs.program.after", st_collections_group_programs_program_after}, /* dup */
608 {"collections.group.parts.part.programs.program.api", st_collections_group_programs_program_api}, /* dup */
609 {"collections.group.parts.part.program.name", st_collections_group_programs_program_name}, /* dup */
610 {"collections.group.parts.part.program.signal", st_collections_group_programs_program_signal}, /* dup */
611 {"collections.group.parts.part.program.source", st_collections_group_programs_program_source}, /* dup */
612 {"collections.group.parts.part.program.in", st_collections_group_programs_program_in}, /* dup */
613 {"collections.group.parts.part.program.action", st_collections_group_programs_program_action}, /* dup */
614 {"collections.group.parts.part.program.transition", st_collections_group_programs_program_transition}, /* dup */
615 {"collections.group.parts.part.program.target", st_collections_group_programs_program_target}, /* dup */
616 {"collections.group.parts.part.program.after", st_collections_group_programs_program_after}, /* dup */
617 {"collections.group.parts.part.program.api", st_collections_group_programs_program_api}, /* dup */
618 {"collections.group.parts.programs.image", st_images_image}, /* dup */
619 {"collections.group.parts.programs.set.name", st_images_set_name},
620 {"collections.group.parts.programs.set.image.image", st_images_set_image_image},
621 {"collections.group.parts.programs.set.image.size", st_images_set_image_size},
622 {"collections.group.parts.programs.images.image", st_images_image}, /* dup */
623 {"collections.group.parts.programs.images.set.name", st_images_set_name},
624 {"collections.group.parts.programs.images.set.image.image", st_images_set_image_image},
625 {"collections.group.parts.programs.images.set.image.size", st_images_set_image_size},
626 {"collections.group.parts.programs.font", st_fonts_font}, /* dup */
627 {"collections.group.parts.programs.fonts.font", st_fonts_font}, /* dup */
628 {"collections.group.parts.programs.program.name", st_collections_group_programs_program_name}, /* dup */
629 {"collections.group.parts.programs.program.signal", st_collections_group_programs_program_signal}, /* dup */
630 {"collections.group.parts.programs.program.source", st_collections_group_programs_program_source}, /* dup */
631 {"collections.group.parts.programs.program.filter", st_collections_group_programs_program_filter}, /* dup */
632 {"collections.group.parts.programs.program.in", st_collections_group_programs_program_in}, /* dup */
633 {"collections.group.parts.programs.program.action", st_collections_group_programs_program_action}, /* dup */
634 {"collections.group.parts.programs.program.transition", st_collections_group_programs_program_transition}, /* dup */
635 {"collections.group.parts.programs.program.target", st_collections_group_programs_program_target}, /* dup */
636 {"collections.group.parts.programs.program.after", st_collections_group_programs_program_after},
637 {"collections.group.parts.programs.program.api", st_collections_group_programs_program_api},
638 {"collections.group.parts.program.name", st_collections_group_programs_program_name}, /* dup */
639 {"collections.group.parts.program.signal", st_collections_group_programs_program_signal}, /* dup */
640 {"collections.group.parts.program.source", st_collections_group_programs_program_source}, /* dup */
641 {"collections.group.parts.program.filter", st_collections_group_programs_program_filter}, /* dup */
642 {"collections.group.parts.program.in", st_collections_group_programs_program_in}, /* dup */
643 {"collections.group.parts.program.action", st_collections_group_programs_program_action}, /* dup */
644 {"collections.group.parts.program.transition", st_collections_group_programs_program_transition}, /* dup */
645 {"collections.group.parts.program.target", st_collections_group_programs_program_target}, /* dup */
646 {"collections.group.parts.program.after", st_collections_group_programs_program_after}, /* dup */
647 {"collections.group.parts.program.api", st_collections_group_programs_program_api}, /* dup */
648 {"collections.group.program.name", st_collections_group_programs_program_name}, /* dup */
649 {"collections.group.program.signal", st_collections_group_programs_program_signal}, /* dup */
650 {"collections.group.program.source", st_collections_group_programs_program_source}, /* dup */
651 {"collections.group.program.filter", st_collections_group_programs_program_filter}, /* dup */
652 {"collections.group.program.in", st_collections_group_programs_program_in}, /* dup */
653 {"collections.group.program.action", st_collections_group_programs_program_action}, /* dup */
654 {"collections.group.program.transition", st_collections_group_programs_program_transition}, /* dup */
655 {"collections.group.program.target", st_collections_group_programs_program_target}, /* dup */
656 {"collections.group.program.after", st_collections_group_programs_program_after}, /* dup */
657 {"collections.group.program.api", st_collections_group_programs_program_api}, /* dup */
658 {"collections.group.programs.program.name", st_collections_group_programs_program_name},
659 {"collections.group.programs.program.signal", st_collections_group_programs_program_signal},
660 {"collections.group.programs.program.source", st_collections_group_programs_program_source},
661 {"collections.group.programs.program.filter", st_collections_group_programs_program_filter}, /* dup */
662 {"collections.group.programs.program.in", st_collections_group_programs_program_in},
663 {"collections.group.programs.program.action", st_collections_group_programs_program_action},
664 {"collections.group.programs.program.transition", st_collections_group_programs_program_transition},
665 {"collections.group.programs.program.target", st_collections_group_programs_program_target},
666 {"collections.group.programs.program.after", st_collections_group_programs_program_after},
667 {"collections.group.programs.program.api", st_collections_group_programs_program_api},
668 {"collections.group.programs.image", st_images_image}, /* dup */
669 {"collections.group.programs.set.name", st_images_set_name},
670 {"collections.group.programs.set.image.image", st_images_set_image_image},
671 {"collections.group.programs.set.image.size", st_images_set_image_size},
672 {"collections.group.programs.images.image", st_images_image}, /* dup */
673 {"collections.group.programs.images.set.name", st_images_set_name},
674 {"collections.group.programs.images.set.image.image", st_images_set_image_image},
675 {"collections.group.programs.images.set.image.size", st_images_set_image_size},
676 {"collections.group.programs.font", st_fonts_font}, /* dup */
677 {"collections.group.programs.fonts.font", st_fonts_font} /* dup */
680 New_Object_Handler object_handlers[] =
684 {"images.set", ob_images_set},
685 {"images.set.image", ob_images_set_image},
689 {"styles.style", ob_styles_style},
690 {"color_classes", NULL},
691 {"color_classes.color_class", ob_color_class},
693 {"collections", ob_collections},
694 {"collections.externals", NULL}, /* dup */
695 {"collections.set", ob_images_set}, /* dup */
696 {"collections.set.image", ob_images_set_image}, /* dup */
697 {"collections.images", NULL}, /* dup */
698 {"collections.images.set", ob_images_set}, /* dup */
699 {"collections.images.set.image", ob_images_set_image}, /* dup */
700 {"collections.fonts", NULL}, /* dup */
701 {"collections.styles", NULL}, /* dup */
702 {"collections.styles.style", ob_styles_style}, /* dup */
703 {"collections.color_classes", NULL}, /* dup */
704 {"collections.color_classes.color_class", ob_color_class}, /* dup */
705 {"collections.sounds", NULL},
706 {"collections.group.sounds", NULL}, /* dup */
707 {"collections.sounds.sample", NULL},
708 {"collections.group.sounds.sample", NULL}, /* dup */
709 {"collections.group", ob_collections_group},
710 {"collections.group.data", NULL},
711 {"collections.group.limits", NULL},
712 {"collections.group.script", ob_collections_group_script},
713 {"collections.group.lua_script", ob_collections_group_lua_script},
714 {"collections.group.externals", NULL}, /* dup */
715 {"collections.group.set", ob_images_set}, /* dup */
716 {"collections.group.set.image", ob_images_set_image}, /* dup */
717 {"collections.group.images", NULL}, /* dup */
718 {"collections.group.images.set", ob_images_set}, /* dup */
719 {"collections.group.images.set.image", ob_images_set_image}, /* dup */
720 {"collections.group.fonts", NULL}, /* dup */
721 {"collections.group.styles", NULL}, /* dup */
722 {"collections.group.styles.style", ob_styles_style}, /* dup */
723 {"collections.group.color_classes", NULL}, /* dup */
724 {"collections.group.color_classes.color_class", ob_color_class}, /* dup */
725 {"collections.group.parts", NULL},
726 {"collections.group.parts.set", ob_images_set}, /* dup */
727 {"collections.group.parts.set.image", ob_images_set_image}, /* dup */
728 {"collections.group.parts.images", NULL}, /* dup */
729 {"collections.group.parts.images.set", ob_images_set}, /* dup */
730 {"collections.group.parts.images.set.image", ob_images_set_image}, /* dup */
731 {"collections.group.parts.fonts", NULL}, /* dup */
732 {"collections.group.parts.styles", NULL}, /* dup */
733 {"collections.group.parts.styles.style", ob_styles_style}, /* dup */
734 {"collections.group.parts.color_classes", NULL}, /* dup */
735 {"collections.group.parts.color_classes.color_class", ob_color_class}, /* dup */
736 {"collections.group.parts.part", ob_collections_group_parts_part},
737 {"collections.group.parts.part.dragable", NULL},
738 {"collections.group.parts.part.set", ob_images_set}, /* dup */
739 {"collections.group.parts.part.set.image", ob_images_set_image}, /* dup */
740 {"collections.group.parts.part.images", NULL}, /* dup */
741 {"collections.group.parts.part.images.set", ob_images_set}, /* dup */
742 {"collections.group.parts.part.images.set.image", ob_images_set_image}, /* dup */
743 {"collections.group.parts.part.fonts", NULL}, /* dup */
744 {"collections.group.parts.part.styles", NULL}, /* dup */
745 {"collections.group.parts.part.styles.style", ob_styles_style}, /* dup */
746 {"collections.group.parts.part.color_classes", NULL}, /* dup */
747 {"collections.group.parts.part.color_classes.color_class", ob_color_class}, /* dup */
748 {"collections.group.parts.part.box", NULL},
749 {"collections.group.parts.part.box.items", NULL},
750 {"collections.group.parts.part.box.items.item", ob_collections_group_parts_part_box_items_item},
751 {"collections.group.parts.part.table", NULL},
752 {"collections.group.parts.part.table.items", NULL},
753 {"collections.group.parts.part.table.items.item", ob_collections_group_parts_part_box_items_item}, /* dup */
754 {"collections.group.parts.part.description", ob_collections_group_parts_part_description},
755 {"collections.group.parts.part.description.rel1", NULL},
756 {"collections.group.parts.part.description.rel2", NULL},
757 {"collections.group.parts.part.description.image", NULL}, /* dup */
758 {"collections.group.parts.part.description.image.set", ob_images_set}, /* dup */
759 {"collections.group.parts.part.description.image.set.image", ob_images_set_image}, /* dup */
760 {"collections.group.parts.part.description.image.images", NULL}, /* dup */
761 {"collections.group.parts.part.description.image.images.set", ob_images_set}, /* dup */
762 {"collections.group.parts.part.description.image.images.set.image", ob_images_set_image}, /* dup */
763 {"collections.group.parts.part.description.fill", NULL},
764 {"collections.group.parts.part.description.fill.origin", NULL},
765 {"collections.group.parts.part.description.fill.size", NULL},
766 {"collections.group.parts.part.description.text", NULL},
767 {"collections.group.parts.part.description.text.fonts", NULL}, /* dup */
768 {"collections.group.parts.part.description.images", NULL}, /* dup */
769 {"collections.group.parts.part.description.images.set", ob_images_set}, /* dup */
770 {"collections.group.parts.part.description.images.set.image", ob_images_set_image}, /* dup */
771 {"collections.group.parts.part.description.fonts", NULL}, /* dup */
772 {"collections.group.parts.part.description.styles", NULL}, /* dup */
773 {"collections.group.parts.part.description.styles.style", ob_styles_style}, /* dup */
774 {"collections.group.parts.part.description.box", NULL},
775 {"collections.group.parts.part.description.table", NULL},
776 {"collections.group.parts.part.description.map", NULL},
777 {"collections.group.parts.part.description.map.rotation", NULL},
778 {"collections.group.parts.part.description.perspective", NULL},
779 {"collections.group.parts.part.description.params", NULL},
780 {"collections.group.parts.part.description.color_classes", NULL}, /* dup */
781 {"collections.group.parts.part.description.color_classes.color_class", ob_color_class}, /* dup */
782 {"collections.group.parts.part.description.program", ob_collections_group_programs_program}, /* dup */
783 {"collections.group.parts.part.description.program.script", ob_collections_group_programs_program_script}, /* dup */
784 {"collections.group.parts.part.description.programs", NULL}, /* dup */
785 {"collections.group.parts.part.description.programs.set", ob_images_set}, /* dup */
786 {"collections.group.parts.part.description.programs.set.image", ob_images_set_image}, /* dup */
787 {"collections.group.parts.part.description.programs.images", NULL}, /* dup */
788 {"collections.group.parts.part.description.programs.images.set", ob_images_set},
789 {"collections.group.parts.part.description.programs.images.set.image", ob_images_set_image}, /* dup */
790 {"collections.group.parts.part.description.programs.fonts", NULL}, /* dup */
791 {"collections.group.parts.part.description.programs.program", ob_collections_group_programs_program}, /* dup */
792 {"collections.group.parts.part.description.programs.program.script", ob_collections_group_programs_program_script}, /* dup */
793 {"collections.group.parts.part.description.script", ob_collections_group_script}, /* dup */
794 {"collections.group.parts.part.program", ob_collections_group_programs_program}, /* dup */
795 {"collections.group.parts.part.program.script", ob_collections_group_programs_program_script}, /* dup */
796 {"collections.group.parts.part.programs", NULL}, /* dup */
797 {"collections.group.parts.part.programs.set", ob_images_set}, /* dup */
798 {"collections.group.parts.part.programs.set.image", ob_images_set_image}, /* dup */
799 {"collections.group.parts.part.programs.images", NULL}, /* dup */
800 {"collections.group.parts.part.programs.images.set", ob_images_set}, /* dup */
801 {"collections.group.parts.part.programs.images.set.image", ob_images_set_image}, /* dup */
802 {"collections.group.parts.part.programs.fonts", NULL}, /* dup */
803 {"collections.group.parts.part.programs.program", ob_collections_group_programs_program}, /* dup */
804 {"collections.group.parts.part.programs.program.script", ob_collections_group_programs_program_script}, /* dup */
805 {"collections.group.parts.part.script", ob_collections_group_script}, /* dup */
806 {"collections.group.parts.program", ob_collections_group_programs_program}, /* dup */
807 {"collections.group.parts.program.script", ob_collections_group_programs_program_script}, /* dup */
808 {"collections.group.parts.programs", NULL}, /* dup */
809 {"collections.group.parts.programs.set", ob_images_set}, /* dup */
810 {"collections.group.parts.programs.set.image", ob_images_set_image}, /* dup */
811 {"collections.group.parts.programs.images", NULL}, /* dup */
812 {"collections.group.parts.programs.images.set", ob_images_set}, /* dup */
813 {"collections.group.parts.programs.images.set.image", ob_images_set_image}, /* dup */
814 {"collections.group.parts.programs.fonts", NULL}, /* dup */
815 {"collections.group.parts.programs.program", ob_collections_group_programs_program}, /* dup */
816 {"collections.group.parts.programs.program.script", ob_collections_group_programs_program_script}, /* dup */
817 {"collections.group.parts.script", ob_collections_group_script}, /* dup */
818 {"collections.group.program", ob_collections_group_programs_program}, /* dup */
819 {"collections.group.program.script", ob_collections_group_programs_program_script}, /* dup */
820 {"collections.group.programs", NULL},
821 {"collections.group.programs.set", ob_images_set}, /* dup */
822 {"collections.group.programs.set.image", ob_images_set_image}, /* dup */
823 {"collections.group.programs.images", NULL}, /* dup */
824 {"collections.group.programs.images.set", ob_images_set}, /* dup */
825 {"collections.group.programs.images.set.image", ob_images_set_image}, /* dup */
826 {"collections.group.programs.fonts", NULL}, /* dup */
827 {"collections.group.programs.program", ob_collections_group_programs_program},
828 {"collections.group.programs.program.script", ob_collections_group_programs_program_script},
829 {"collections.group.programs.script", ob_collections_group_script} /* dup */
832 New_Nested_Handler nested_handlers[] = {
833 {"collections.group.parts", "part", NULL, edje_cc_handlers_hierarchy_pop }
839 object_handler_num(void)
841 return sizeof(object_handlers) / sizeof (New_Object_Handler);
845 statement_handler_num(void)
847 return sizeof(statement_handlers) / sizeof (New_Object_Handler);
851 nested_handler_num(void)
853 return sizeof(nested_handlers) / sizeof (New_Nested_Handler);
857 _edje_part_description_fill(Edje_Part_Description_Spec_Fill *fill)
860 fill->pos_rel_x = FROM_DOUBLE(0.0);
862 fill->rel_x = FROM_DOUBLE(1.0);
864 fill->pos_rel_y = FROM_DOUBLE(0.0);
866 fill->rel_y = FROM_DOUBLE(1.0);
870 fill->type = EDJE_FILL_TYPE_SCALE;
874 _edje_part_description_image_remove(Edje_Part_Description_Image *ed)
880 data_queue_image_remove(&(ed->image.id), &(ed->image.set));
882 for (j = 0; j < ed->image.tweens_count; ++j)
883 data_queue_image_remove(&(ed->image.tweens[j]->id),
884 &(ed->image.tweens[j]->set));
888 part_description_image_cleanup(Edje_Part *ep)
890 Edje_Part_Description_Image *ed;
893 if (ep->type != EDJE_PART_TYPE_IMAGE)
896 ed = (Edje_Part_Description_Image*) ep->default_desc;
897 _edje_part_description_image_remove(ed);
899 for (j = 0; j < ep->other.desc_count; j++)
901 ed = (Edje_Part_Description_Image*) ep->other.desc[j];
902 _edje_part_description_image_remove(ed);
906 static Edje_Part_Description_Common *
907 _edje_part_description_alloc(unsigned char type, const char *collection, const char *part)
909 Edje_Part_Description_Common *result = NULL;
913 case EDJE_PART_TYPE_SPACER:
914 case EDJE_PART_TYPE_RECTANGLE:
915 case EDJE_PART_TYPE_SWALLOW:
916 case EDJE_PART_TYPE_GROUP:
917 result = mem_alloc(SZ(Edje_Part_Description_Common));
919 case EDJE_PART_TYPE_TEXT:
920 case EDJE_PART_TYPE_TEXTBLOCK:
922 Edje_Part_Description_Text *ed;
924 ed = mem_alloc(SZ(Edje_Part_Description_Text));
926 ed->text.color3.r = 0;
927 ed->text.color3.g = 0;
928 ed->text.color3.b = 0;
929 ed->text.color3.a = 128;
930 ed->text.align.x = FROM_DOUBLE(0.5);
931 ed->text.align.y = FROM_DOUBLE(0.5);
932 ed->text.id_source = -1;
933 ed->text.id_text_source = -1;
935 result = &ed->common;
938 case EDJE_PART_TYPE_IMAGE:
940 Edje_Part_Description_Image *ed;
942 ed = mem_alloc(SZ(Edje_Part_Description_Image));
946 _edje_part_description_fill(&ed->image.fill);
948 result = &ed->common;
951 case EDJE_PART_TYPE_PROXY:
953 Edje_Part_Description_Proxy *ed;
955 ed = mem_alloc(SZ(Edje_Part_Description_Proxy));
959 _edje_part_description_fill(&ed->proxy.fill);
961 result = &ed->common;
964 case EDJE_PART_TYPE_BOX:
966 Edje_Part_Description_Box *ed;
968 ed = mem_alloc(SZ(Edje_Part_Description_Box));
970 ed->box.layout = NULL;
971 ed->box.alt_layout = NULL;
972 ed->box.align.x = FROM_DOUBLE(0.5);
973 ed->box.align.y = FROM_DOUBLE(0.5);
974 ed->box.padding.x = 0;
975 ed->box.padding.y = 0;
977 result = &ed->common;
980 case EDJE_PART_TYPE_TABLE:
982 Edje_Part_Description_Table *ed;
984 ed = mem_alloc(SZ(Edje_Part_Description_Table));
986 ed->table.homogeneous = EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE;
987 ed->table.align.x = FROM_DOUBLE(0.5);
988 ed->table.align.y = FROM_DOUBLE(0.5);
989 ed->table.padding.x = 0;
990 ed->table.padding.y = 0;
992 result = &ed->common;
995 case EDJE_PART_TYPE_EXTERNAL:
997 Edje_Part_Description_External *ed;
999 ed = mem_alloc(SZ(Edje_Part_Description_External));
1001 ed->external_params = NULL;
1003 result = &ed->common;
1010 ERR("Unknown type %i of part %s in collection %s.",
1011 type, part, collection);
1019 _edje_program_check(const char *name, Edje_Program *me, Edje_Program **pgrms, unsigned int count)
1021 Edje_Part_Collection *pc;
1023 Edje_Program_Parser *epp;
1025 pc = eina_list_data_get(eina_list_last(edje_collections));
1027 for (i = 0; i < count; ++i)
1029 if (pgrms[i] != me && (!strcmp(name, pgrms[i]->name)))
1031 epp = (Edje_Program_Parser *)pgrms[i];
1032 if (!epp->can_override)
1034 ERR("parse error %s:%i. There is already a program of the name %s",
1035 file_in, line - 1, name);
1040 _edje_program_remove(pc, me);
1041 current_program = pgrms[i];
1042 epp->can_override = EINA_FALSE;
1049 _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
1051 Edje_Part_Collection *pc;
1052 Edje_Program_Target *et, *et2;
1053 Edje_Program_After *pa, *pa2;
1054 Edje_Program_Parser *epp;
1059 pc = eina_list_data_get(eina_list_last(edje_collections));
1061 #define STRDUP(x) x ? strdup(x) : NULL
1062 ep->name = STRDUP(ep2->name);
1064 _edje_program_remove(pc, current_program);
1065 ep->signal = STRDUP(ep2->signal);
1066 ep->source = STRDUP(ep2->source);
1067 _edje_program_insert(pc, current_program);
1069 ep->filter.part = STRDUP(ep2->filter.part);
1070 ep->filter.state = STRDUP(ep2->filter.state);
1071 ep->in.from = ep2->in.from;
1072 ep->in.range = ep2->in.range;
1073 ep->action = ep2->action;
1074 ep->state = STRDUP(ep2->state);
1075 ep->state2 = STRDUP(ep2->state2);
1076 ep->value = ep2->value;
1077 ep->value2 = ep2->value2;
1078 ep->tween.mode = ep2->tween.mode;
1079 ep->tween.time = ep2->tween.time;
1080 ep->tween.v1 = ep2->tween.v1;
1081 ep->tween.v2 = ep2->tween.v2;
1082 ep->sample_name = STRDUP(ep2->sample_name);
1083 ep->tone_name = STRDUP(ep2->tone_name);
1084 ep->duration = ep2->duration;
1085 ep->speed = ep2->speed;
1087 EINA_LIST_FOREACH(ep2->targets, l, et2)
1089 name = (char*) (et2 + 1);
1090 et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1);
1091 ep->targets = eina_list_append(ep->targets, et);
1092 copy = (char*) (et + 1);
1094 memcpy(copy, name, strlen(name) + 1);
1096 if (ep2->action == EDJE_ACTION_TYPE_STATE_SET)
1097 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1098 else if (ep2->action == EDJE_ACTION_TYPE_ACTION_STOP)
1099 data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
1100 else if (ep2->action == EDJE_ACTION_TYPE_SCRIPT)
1101 data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
1102 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
1103 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1104 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
1105 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1106 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
1107 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1108 else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_SET)
1110 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1111 else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
1112 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1115 ERR("parse error %s:%i. target may only be used after action",
1121 EINA_LIST_FOREACH(ep2->after, l, pa2)
1123 name = (char*) (pa2 + 1);
1124 pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
1125 ep->after = eina_list_append(ep->after, pa);
1126 copy = (char*) (pa + 1);
1128 memcpy(copy, name, strlen(name) + 1);
1130 data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id));
1133 ep->api.name = STRDUP(ep2->api.name);
1134 ep->api.description = STRDUP(ep2->api.description);
1135 data_queue_copied_part_lookup(pc, &(ep2->param.src), &(ep->param.src));
1136 data_queue_copied_part_lookup(pc, &(ep2->param.dst), &(ep->param.dst));
1138 epp = (Edje_Program_Parser *)ep;
1139 epp->can_override = EINA_TRUE;
1147 @edcsection{toplevel,Top-Level blocks}
1160 The "externals" block is used to list each external module file that will be used in others
1169 Used to add a file to the externals list.
1173 st_externals_external(void)
1179 if (!edje_file->external_dir)
1180 edje_file->external_dir = mem_alloc(SZ(Edje_External_Directory));
1182 ex = mem_alloc(SZ(External));
1183 ex->name = parse_str(0);
1188 EINA_LIST_FOREACH(externals, l, lex)
1190 if (!strcmp(lex->name, ex->name))
1198 externals = eina_list_append(externals, ex);
1200 if (edje_file->external_dir)
1202 edje_file->external_dir->entries_count++;
1203 edje_file->external_dir->entries = realloc(edje_file->external_dir->entries,
1204 sizeof (Edje_External_Directory) * edje_file->external_dir->entries_count);
1205 memset(edje_file->external_dir->entries + edje_file->external_dir->entries_count - 1,
1206 0, sizeof (Edje_External_Directory));
1207 if (!edje_file->external_dir->entries)
1209 ERR("not enough memory");
1213 edje_file->external_dir->entries[edje_file->external_dir->entries_count - 1].entry = mem_strdup(ex->name);
1224 image: "filename1.ext" COMP;
1225 image: "filename2.ext" LOSSY 99;
1227 name: "image_name_used";
1229 image: "filename3.ext" LOSSY 90;
1230 size: 201 201 500 500;
1233 image: "filename4.ext" COMP;
1234 size: 51 51 200 200;
1237 image: "filename5.ext" COMP;
1241 image: "filename6.ext" RAW;
1248 The "images" block is used to list each image file that will be used in
1249 the theme along with its compression method (if any).
1250 Besides the document's root, additional "images" blocks can be
1251 included inside other blocks, normally "collections", "group" and
1252 "part", easing maintenance of the file list when the theme is split
1253 among multiple files.
1259 [image file] [compression method] (compression level)
1261 Used to include each image file. The full path to the directory holding
1262 the images can be defined later with edje_cc's "-id" option.
1263 Compression methods:
1264 @li RAW: Uncompressed.
1265 @li COMP: Lossless compression.
1266 @li LOSSY [0-100]: Lossy compression with quality from 0 to 100.
1267 @li USER: Do not embed the file, refer to the external file instead.
1271 st_images_image(void)
1273 Edje_Image_Directory_Entry *img;
1278 check_min_arg_count(2);
1280 if (!edje_file->image_dir)
1281 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
1285 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
1286 if (!strcmp(edje_file->image_dir->entries[i].entry, tmp))
1292 edje_file->image_dir->entries_count++;
1293 edje_file->image_dir->entries = realloc(edje_file->image_dir->entries,
1294 sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count);
1295 memset(edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1,
1296 0, sizeof (Edje_Image_Directory_Entry));
1297 if (!edje_file->image_dir->entries)
1299 ERR("No enough memory.");
1303 img = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1;
1306 img->id = edje_file->image_dir->entries_count - 1;
1315 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT;
1316 img->source_param = 0;
1320 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT;
1321 img->source_param = 1;
1325 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY;
1326 img->source_param = 0;
1330 img->source_type = EDJE_IMAGE_SOURCE_TYPE_EXTERNAL;
1331 img->source_param = 0;
1333 if (img->source_type != EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY)
1337 img->source_param = parse_int_range(2, 0, 100);
1349 name: "image_name_used";
1351 image: "filename3.ext" LOSSY 90;
1352 size: 201 201 500 500;
1355 image: "filename4.ext" COMP;
1356 size: 51 51 200 200;
1359 image: "filename5.ext" COMP;
1363 image: "filename6.ext" RAW;
1368 The "set" block is used to define an image with different content depending on their size.
1369 Besides the document's root, additional "set" blocks can be
1370 included inside other blocks, normally "collections", "group" and
1371 "part", easing maintenance of the file list when the theme is split
1372 among multiple files.
1378 if (!edje_file->image_dir)
1379 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
1381 edje_file->image_dir->sets_count++;
1382 edje_file->image_dir->sets = realloc(edje_file->image_dir->sets,
1383 sizeof (Edje_Image_Directory_Set) * edje_file->image_dir->sets_count);
1384 memset(edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1,
1385 0, sizeof (Edje_Image_Directory_Set));
1386 if (!edje_file->image_dir->sets)
1388 ERR("Not enough memory.");
1391 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].id = edje_file->image_dir->sets_count - 1;
1402 Define the name that refer to this image description.
1406 st_images_set_name(void)
1410 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].name = parse_str(0);
1419 The "image" block inside a "set" block define the characteristic of an image.
1420 Every block will describe one image and the size rule to use it.
1424 ob_images_set_image(void)
1426 Edje_Image_Directory_Set_Entry *entry;
1427 Edje_Image_Directory_Set *set;
1429 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1431 entry = mem_alloc(SZ(Edje_Image_Directory_Set_Entry));
1433 set->entries = eina_list_append(set->entries, entry);
1442 [image file] [compression method] (compression level)
1444 Used to include each image file. The full path to the directory holding
1445 the images can be defined later with edje_cc's "-id" option.
1446 Compression methods:
1447 @li RAW: Uncompressed.
1448 @li COMP: Lossless compression.
1449 @li LOSSY [0-100]: Lossy compression with quality from 0 to 100.
1450 @li USER: Do not embed the file, refer to the external file instead.
1454 st_images_set_image_image(void)
1456 Edje_Image_Directory_Set_Entry *entry;
1457 Edje_Image_Directory_Set *set;
1460 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1461 entry = eina_list_data_get(eina_list_last(set->entries));
1463 /* Add the image to the global pool with the same syntax. */
1466 entry->name = parse_str(0);
1468 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
1469 if (!strcmp(edje_file->image_dir->entries[i].entry, entry->name))
1482 [minw minh maxw mawh]
1484 Define the minimal and maximal size that will select the specified image.
1488 st_images_set_image_size(void)
1490 Edje_Image_Directory_Set_Entry *entry;
1491 Edje_Image_Directory_Set *set;
1493 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1494 entry = eina_list_data_get(eina_list_last(set->entries));
1496 entry->size.min.w = parse_int(0);
1497 entry->size.min.h = parse_int(1);
1498 entry->size.max.w = parse_int(2);
1499 entry->size.max.h = parse_int(3);
1501 if (entry->size.min.w > entry->size.max.w
1502 || entry->size.min.h > entry->size.max.h)
1504 ERR("parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])",
1506 entry->size.min.w, entry->size.min.h,
1507 entry->size.max.w, entry->size.max.h);
1519 font: "filename1.ext" "fontname";
1520 font: "filename2.ext" "otherfontname";
1524 The "fonts" block is used to list each font file with an alias used later
1525 in the theme. As with the "images" block, additional "fonts" blocks can
1526 be included inside other blocks.
1532 [font filename] [font alias]
1534 Defines each font "file" and "alias", the full path to the directory
1535 holding the font files can be defined with edje_cc's "-fd" option.
1545 if (!edje_file->fonts)
1546 edje_file->fonts = eina_hash_string_small_new(free);
1548 fn = mem_alloc(SZ(Font));
1549 fn->file = parse_str(0);
1550 fn->name = parse_str(1);
1552 if (eina_hash_find(edje_file->fonts, fn->name))
1560 eina_hash_direct_add(edje_file->fonts, fn->name, fn);
1569 item: "key" "value";
1570 file: "otherkey" "filename.ext";
1574 The "data" block is used to pass arbitrary parameters from the theme to
1575 the application. Unlike the "images" and "fonts" blocks, additional
1576 "data" blocks can only be included inside the "group" block.
1582 [parameter name] [parameter value]
1584 Defines a new parameter, the value will be the string specified next to
1598 es = mem_alloc(SZ(Edje_String));
1599 es->str = parse_str(1);
1601 if (!edje_file->data)
1602 edje_file->data = eina_hash_string_small_new(free);
1604 /* FIXME: check if data already exist */
1605 eina_hash_direct_add(edje_file->data, key, es);
1613 [parameter name] [parameter filename]
1615 Defines a new parameter, the value will be the contents of the
1616 specified file formated as a single string of text. This property only
1617 works with plain text files.
1637 es = mem_alloc(SZ(Edje_String));
1638 filename = parse_str(1);
1640 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
1643 ERR("%s:%i when opening file \"%s\": \"%s\"",
1644 file_in, line, filename, strerror(errno));
1648 if (fstat(fd, &buf))
1650 ERR("%s:%i when stating file \"%s\": \"%s\"",
1651 file_in, line, filename, strerror(errno));
1655 data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
1656 if (data == MAP_FAILED)
1658 ERR("%s:%i when mapping file \"%s\": \"%s\"",
1659 file_in, line, filename, strerror(errno));
1664 for (i = 0; i < buf.st_size; ++i, ++over)
1667 ERR("%s:%i file \"%s\" is a binary file.", file_in, line, filename);
1671 value = malloc(sizeof (char) * buf.st_size + 1);
1672 snprintf(value, buf.st_size + 1, "%s", data);
1674 munmap((void*)data, buf.st_size);
1679 eina_hash_direct_add(edje_file->data, key, es);
1691 name: "colorclassname";
1692 color: [0-255] [0-255] [0-255] [0-255];
1693 color2: [0-255] [0-255] [0-255] [0-255];
1694 color3: [0-255] [0-255] [0-255] [0-255]
1699 The "color_classes" block contains a list of one or more "color_class"
1700 blocks. Each "color_class" allows the designer to name an arbitrary
1701 group of colors to be used in the theme, the application can use that
1702 name to alter the color values at runtime.
1706 ob_color_class(void)
1708 Edje_Color_Class *cc;
1710 cc = mem_alloc(SZ(Edje_Color_Class));
1711 edje_file->color_classes = eina_list_append(edje_file->color_classes, cc);
1735 Sets the name for the color class, used as reference by both the theme
1736 and the application.
1740 st_color_class_name(void)
1742 Edje_Color_Class *cc, *tcc;
1745 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1746 cc->name = parse_str(0);
1747 EINA_LIST_FOREACH(edje_file->color_classes, l, tcc)
1749 if ((cc != tcc) && (!strcmp(cc->name, tcc->name)))
1751 ERR("parse error %s:%i. There is already a color class named \"%s\"",
1752 file_in, line - 1, cc->name);
1763 [red] [green] [blue] [alpha]
1769 st_color_class_color(void)
1771 Edje_Color_Class *cc;
1775 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1776 cc->r = parse_int_range(0, 0, 255);
1777 cc->g = parse_int_range(1, 0, 255);
1778 cc->b = parse_int_range(2, 0, 255);
1779 cc->a = parse_int_range(3, 0, 255);
1787 [red] [green] [blue] [alpha]
1789 Used as shadow in text and textblock parts.
1793 st_color_class_color2(void)
1795 Edje_Color_Class *cc;
1799 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1800 cc->r2 = parse_int_range(0, 0, 255);
1801 cc->g2 = parse_int_range(1, 0, 255);
1802 cc->b2 = parse_int_range(2, 0, 255);
1803 cc->a2 = parse_int_range(3, 0, 255);
1811 [red] [green] [blue] [alpha]
1813 Used as outline in text and textblock parts.
1817 st_color_class_color3(void)
1819 Edje_Color_Class *cc;
1823 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1824 cc->r3 = parse_int_range(0, 0, 255);
1825 cc->g3 = parse_int_range(1, 0, 255);
1826 cc->b3 = parse_int_range(2, 0, 255);
1827 cc->a3 = parse_int_range(3, 0, 255);
1838 base: "..default style properties..";
1840 tag: "tagname" "..style properties..";
1846 The "styles" block contains a list of one or more "style" blocks. A
1847 "style" block is used to create style \<tags\> for advanced TEXTBLOCK
1852 ob_styles_style(void)
1856 stl = mem_alloc(SZ(Edje_Style));
1857 edje_file->styles = eina_list_append(edje_file->styles, stl);
1867 The name of the style to be used as reference later in the theme.
1871 st_styles_style_name(void)
1873 Edje_Style *stl, *tstl;
1876 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1877 stl->name = parse_str(0);
1878 EINA_LIST_FOREACH(edje_file->styles, l, tstl)
1880 if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name)))
1882 ERR("parse error %s:%i. There is already a style named \"%s\"",
1883 file_in, line - 1, stl->name);
1894 [style properties string]
1896 The default style properties that will be applied to the complete
1901 st_styles_style_base(void)
1904 Edje_Style_Tag *tag;
1906 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1909 ERR("parse error %s:%i. There is already a basic format for the style",
1913 tag = mem_alloc(SZ(Edje_Style_Tag));
1914 tag->key = mem_strdup("DEFAULT");
1915 tag->value = parse_str(0);
1916 stl->tags = eina_list_append(stl->tags, tag);
1924 [tag name] [style properties string]
1926 Style to be applied only to text between style \<tags\>..\</tags\>.
1927 When creating "paired" tags, like \<bold\>\</bold\>, A '+' should be added at the start of the style properties of the first part (\<bold\>).
1928 If the second part (\</bold\>) is also defined, a '-' should be prepended to it's style properties.
1929 This only applies to paired tags; Single tags, like \<tab\>, must not include a starting '+'.
1933 st_styles_style_tag(void)
1936 Edje_Style_Tag *tag;
1938 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1939 tag = mem_alloc(SZ(Edje_Style_Tag));
1940 tag->key = parse_str(0);
1941 tag->value = parse_str(1);
1942 stl->tags = eina_list_append(stl->tags, tag);
1958 The "collections" block is used to list the groups that compose the
1959 theme. Additional "collections" blocks do not prevent overriding group
1960 names. The "sounds" block comprises of all sound definitions.
1964 ob_collections(void)
1966 if (!edje_file->collection)
1968 edje_file->collection = eina_hash_string_small_new(NULL);
1969 edje_collections_lookup = eina_hash_int32_new(NULL);
1979 name: "sound_file1" COMP;
1980 source: "sound_file1.wav";
1983 name: "sound_file2" LOSSY 0.4;
1984 source: "sound_file2.wav";
1986 tone: "tone-1" 2300;
1990 The "sounds" block contains a list of one or more sound sample and tones items.
1996 name: "sound_file1" RAW;
1997 source: "sound_file1.wav";
2000 name: "sound_file2" LOSSY 0.5;
2001 source: "sound_file2.wav";
2004 name: "sound_file3" COMP;
2005 source: "sound_file3.wav";
2008 name: "sound_file4" AS_IS;
2009 source: "sound_file1.wav";
2012 The sample block defines the sound sample.
2017 [sample name] [compression type] [if lossy, then quality]
2019 Used to include each sound file. The full path to the directory holding
2020 the sounds can be defined later with edje_cc's "-sd" option.
2021 @li RAW: Uncompressed.
2022 @li COMP: Lossless compression.
2023 @li LOSSY [-0.1 - 1.0]: Lossy compression with quality from 0 to 1.0.
2024 @li AS_IS: Check for re-encoding, no compression/encoding, just write the file information as it is.
2029 st_collections_group_sound_sample_name(void)
2031 Edje_Sound_Sample *sample;
2035 if (!edje_file->sound_dir)
2036 edje_file->sound_dir = mem_alloc(SZ(Edje_Sound_Directory));
2040 for (i = 0; i < edje_file->sound_dir->samples_count; i++)
2042 if (!strcmp(edje_file->sound_dir->samples[i].name, tmp))
2049 edje_file->sound_dir->samples_count++;
2050 edje_file->sound_dir->samples =
2051 realloc(edje_file->sound_dir->samples,
2052 sizeof(Edje_Sound_Sample) *
2053 edje_file->sound_dir->samples_count);
2055 if (!edje_file->sound_dir->samples)
2057 ERR("No enough memory.");
2062 edje_file->sound_dir->samples +
2063 edje_file->sound_dir->samples_count - 1;
2064 memset(sample, 0, sizeof (Edje_Sound_Sample));
2067 sample->id = edje_file->sound_dir->samples_count - 1;
2068 sample->compression = parse_enum(1,
2069 "RAW", EDJE_SOUND_SOURCE_TYPE_INLINE_RAW,
2070 "COMP", EDJE_SOUND_SOURCE_TYPE_INLINE_COMP,
2071 "LOSSY", EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY,
2072 "AS_IS", EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS,
2075 if (sample->compression == EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY)
2077 sample->quality = parse_float_range(2, 45.0, 1000.0);
2092 The Sound source file name (Source can be mono/stereo WAV file.
2093 Only files with 44.1 KHz sample rate supported now)
2098 st_collections_group_sound_sample_source(void)
2100 Edje_Sound_Sample *sample;
2102 if (!edje_file->sound_dir->samples)
2104 ERR("Invalid sound sample source definition.");
2109 edje_file->sound_dir->samples +
2110 edje_file->sound_dir->samples_count - 1;
2114 ERR("Invalid sound sample source definition.");
2117 sample->snd_src = parse_str(0);
2126 [tone name] [frequency]
2128 sound of specific frequency
2133 st_collections_group_sound_tone(void)
2135 Edje_Sound_Tone *tone;
2142 if (!edje_file->sound_dir)
2143 edje_file->sound_dir = mem_alloc(SZ(Edje_Sound_Directory));
2146 /* Audible range 20 to 20KHz */
2147 value = parse_int_range(1, 20, 20000);
2149 /* Check for Tone duplication */
2150 for (i = 0; i < edje_file->sound_dir->tones_count; i++)
2152 if (!strcmp(edje_file->sound_dir->tones[i].name, tmp))
2154 ERR("Tone name: %s already exist.", tmp);
2158 if (edje_file->sound_dir->tones[i].value == value)
2160 ERR("Tone name %s with same frequency %d exist.",
2161 edje_file->sound_dir->tones[i].name, value);
2165 edje_file->sound_dir->tones_count++;
2166 edje_file->sound_dir->tones =
2167 realloc(edje_file->sound_dir->tones,
2168 sizeof (Edje_Sound_Tone) *
2169 edje_file->sound_dir->tones_count);
2171 if (!edje_file->sound_dir->tones)
2173 ERR("No enough memory.");
2177 tone = edje_file->sound_dir->tones + edje_file->sound_dir->tones_count - 1;
2178 memset(tone, 0, sizeof (Edje_Sound_Tone));
2181 tone->value = value;
2182 tone->id = edje_file->sound_dir->tones_count - 1;
2185 @edcsection{group,Group sub blocks}
2196 name: "nameusedbytheapplication";
2197 alias: "anothername";
2209 A "group" block contains the list of parts and programs that compose a
2214 ob_collections_group(void)
2216 Edje_Part_Collection *pc;
2219 if (current_de && !current_de->entry)
2221 ERR("A collection without a name was detected, that's not allowed.");
2225 current_de = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
2226 current_de->id = eina_list_count(edje_collections);
2228 eina_hash_add(edje_collections_lookup, ¤t_de->id, current_de);
2230 pc = mem_alloc(SZ(Edje_Part_Collection));
2231 edje_collections = eina_list_append(edje_collections, pc);
2232 pc->id = current_de->id;
2233 pc->broadcast_signal = EINA_TRUE; /* This was the behaviour by default in Edje 1.1 */
2235 cd = mem_alloc(SZ(Code));
2236 codes = eina_list_append(codes, cd);
2246 The name that will be used by the application to load the resulting
2247 Edje object and to identify the group to swallow in a GROUP part. If a
2248 group with the same name exists already it will be completely overriden
2253 st_collections_group_name(void)
2255 Edje_Part_Collection_Directory_Entry *alias;
2256 Edje_Part_Collection_Directory_Entry *older;
2257 Edje_Part_Collection *current_pc;
2258 Eina_List *l = NULL;
2262 current_pc = eina_list_data_get(eina_list_last(edje_collections));
2264 current_de->entry = parse_str(0);
2265 current_pc->part = current_de->entry;
2267 older = eina_hash_find(edje_file->collection, current_de->entry);
2268 if (older) eina_hash_del(edje_file->collection, current_de->entry, older);
2269 eina_hash_direct_add(edje_file->collection, current_de->entry, current_de);
2272 EINA_LIST_FOREACH(aliases, l, alias)
2273 if (strcmp(alias->entry, current_de->entry) == 0)
2275 Edje_Part_Collection *pc;
2277 pc = eina_list_nth(edje_collections, older->id);
2278 INF("overriding alias ('%s' => '%s') by group '%s'",
2279 alias->entry, pc->part,
2281 aliases = eina_list_remove_list(aliases, l);
2288 typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;
2289 struct _Edje_List_Foreach_Data
2295 _edje_data_item_list_foreach(const Eina_Hash *hash __UNUSED__, const void *key, void *data __UNUSED__, void *fdata)
2297 Edje_List_Foreach_Data *fd;
2300 fd->list = eina_list_append(fd->list, strdup(key));
2312 Parent group name for inheritance.
2313 Group "inherit" is used to inherit any predefined group and change
2314 some property which belongs to "part", "description", "items" or "program".
2315 The child group has the same property as parent group. If you specify the
2316 type again in an inherited part, it will cause an error (unless you plan
2322 st_collections_group_inherit(void)
2324 Edje_Part_Collection *pc, *pc2;
2325 Edje_Part *ep, *ep2;
2326 Edje_Part_Parser *epp, *epp2;
2327 Edje_Pack_Element *item, *item2;
2328 Edje_Pack_Element_Parser *pitem;
2329 Edje_Part_Description_Common *ed, *ed2;
2330 Edje_List_Foreach_Data fdata;
2337 pc = eina_list_data_get(eina_list_last(edje_collections));
2339 parent_name = parse_str(0);
2341 EINA_LIST_FOREACH(edje_collections, l, pc2)
2343 if (!strcmp(parent_name, pc2->part))
2348 ERR("parse error %s:%i. There isn't a group with the name %s",
2349 file_in, line - 1, parent_name);
2354 ERR("parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
2355 "If there is another group of the same name, you want to inherit from that group and have the"
2356 "same name as that group, there is a trick ! Just put the inherit before the directive that set"
2357 "the name !", file_in, line - 1, parent_name);
2365 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2366 eina_hash_foreach(pc2->data,
2367 _edje_data_item_list_foreach, &fdata);
2369 if (!pc->data) pc->data = eina_hash_string_small_new(free);
2370 EINA_LIST_FREE(fdata.list, key)
2372 data = eina_hash_find(pc2->data, key);
2373 eina_hash_direct_add(pc->data, key, data);
2381 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2382 eina_hash_foreach(pc2->alias,
2383 _edje_data_item_list_foreach, &fdata);
2384 if (!pc->alias) pc->alias = eina_hash_string_small_new(free);
2385 EINA_LIST_FREE(fdata.list, key)
2387 alias = eina_hash_find(pc2->alias, key);
2388 eina_hash_direct_add(pc->alias, key, alias);
2393 char *key, *aliased;
2395 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2396 eina_hash_foreach(pc2->aliased,
2397 _edje_data_item_list_foreach, &fdata);
2398 if (!pc->aliased) pc->aliased = eina_hash_string_small_new(free);
2399 EINA_LIST_FREE(fdata.list, key)
2401 aliased = eina_hash_find(pc2->aliased, key);
2402 eina_hash_direct_add(pc->aliased, key, aliased);
2406 pc->prop.min.w = pc2->prop.min.w;
2407 pc->prop.min.h = pc2->prop.min.h;
2408 pc->prop.orientation = pc2->prop.orientation;
2410 pc->lua_script_only = pc2->lua_script_only;
2412 #define STRDUP(x) x ? strdup(x) : NULL
2413 for (i = 0 ; i < pc2->parts_count ; i++)
2416 edje_cc_handlers_part_make();
2418 ep2 = pc2->parts[i];
2419 ep->name = STRDUP(ep2->name);
2420 ep->source = STRDUP(ep2->source);
2421 ep->source2 = STRDUP(ep2->source2);
2422 ep->source3 = STRDUP(ep2->source3);
2423 ep->source4 = STRDUP(ep2->source4);
2424 ep->source5 = STRDUP(ep2->source5);
2425 ep->source6 = STRDUP(ep2->source6);
2427 data_queue_copied_part_lookup(pc, &(ep2->clip_to_id), &(ep->clip_to_id));
2429 ep->type = ep2->type;
2430 ep->mouse_events = ep2->mouse_events;
2431 ep->repeat_events = ep2->repeat_events;
2432 ep->ignore_flags = ep2->ignore_flags;
2433 ep->scale = ep2->scale;
2434 ep->pointer_mode = ep2->pointer_mode;
2435 ep->precise_is_inside = ep2->precise_is_inside;
2436 ep->use_alternate_font_metrics = ep2->use_alternate_font_metrics;
2437 ep->effect = ep2->effect;
2438 ep->entry_mode = ep2->entry_mode;
2439 ep->select_mode = ep2->select_mode;
2440 ep->cursor_mode = ep2->cursor_mode;
2441 ep->multiline = ep2->multiline;
2442 ep->access = ep2->access;
2443 ep->dragable.x = ep2->dragable.x;
2444 ep->dragable.step_x = ep2->dragable.step_x;
2445 ep->dragable.count_x = ep2->dragable.count_x;
2446 ep->dragable.y = ep2->dragable.y;
2447 ep->dragable.step_y = ep2->dragable.step_y;
2448 ep->dragable.count_y = ep2->dragable.count_y;
2449 ep->nested_children_count = ep2->nested_children_count;
2451 data_queue_copied_part_lookup(pc, &(ep2->dragable.confine_id), &(ep->dragable.confine_id));
2452 data_queue_copied_part_lookup(pc, &(ep2->dragable.event_id), &(ep->dragable.event_id));
2454 epp = (Edje_Part_Parser *)ep;
2455 epp2 = (Edje_Part_Parser *)ep2;
2456 epp->reorder.insert_before = STRDUP(epp2->reorder.insert_before);
2457 epp->reorder.insert_after = STRDUP(epp2->reorder.insert_after);
2458 epp->can_override = EINA_TRUE;
2460 for (j = 0 ; j < ep2->items_count ; j++)
2462 ob_collections_group_parts_part_box_items_item();
2463 item = ep->items[j];
2464 item2 = ep2->items[j];
2465 item->type = item2->type;
2466 item->name = STRDUP(item2->name);
2467 item->source = STRDUP(item2->source);
2468 item->min.w = item2->min.w;
2469 item->min.h = item2->min.h;
2470 item->prefer.w = item2->prefer.w;
2471 item->prefer.h = item2->prefer.h;
2472 item->max.w = item2->max.w;
2473 item->max.h = item2->max.h;
2474 item->padding.l = item2->padding.l;
2475 item->padding.r = item2->padding.r;
2476 item->padding.t = item2->padding.t;
2477 item->padding.b = item2->padding.b;
2478 item->align.x = item2->align.x;
2479 item->align.y = item2->align.y;
2480 item->weight.x = item2->weight.x;
2481 item->weight.y = item2->weight.y;
2482 item->aspect.w = item2->aspect.w;
2483 item->aspect.h = item2->aspect.h;
2484 item->aspect.mode = item2->aspect.mode;
2485 item->options = STRDUP(item2->options);
2486 item->col = item2->col;
2487 item->row = item2->row;
2488 item->colspan = item2->colspan;
2489 item->rowspan = item2->rowspan;
2491 pitem = (Edje_Pack_Element_Parser *)item;
2492 pitem->can_override = EINA_TRUE;
2495 ep->api.name = STRDUP(ep2->api.name);
2496 if (ep2->api.description) ep->api.description = STRDUP(ep2->api.description);
2498 // copy default description
2499 ob_collections_group_parts_part_description();
2500 ed = ep->default_desc;
2501 parent_desc = ed2 = ep2->default_desc;
2502 ed->state.name = STRDUP(ed2->state.name);
2503 ed->state.value = ed2->state.value;
2504 st_collections_group_parts_part_description_inherit();
2507 // copy other description
2508 for (j = 0 ; j < ep2->other.desc_count ; j++)
2510 ob_collections_group_parts_part_description();
2511 ed = ep->other.desc[j];
2512 parent_desc = ed2 = ep2->other.desc[j];
2513 ed->state.name = STRDUP(ed2->state.name);
2514 ed->state.value = ed2->state.value;
2515 st_collections_group_parts_part_description_inherit();
2521 for (j = 0 ; j < pc2->programs.fnmatch_count ; j++)
2523 ob_collections_group_programs_program();
2524 _edje_program_copy(current_program, pc2->programs.fnmatch[j]);
2526 for (j = 0 ; j < pc2->programs.strcmp_count ; j++)
2528 ob_collections_group_programs_program();
2529 _edje_program_copy(current_program, pc2->programs.strcmp[j]);
2531 for (j = 0 ; j < pc2->programs.strncmp_count ; j++)
2533 ob_collections_group_programs_program();
2534 _edje_program_copy(current_program, pc2->programs.strncmp[j]);
2536 for (j = 0 ; j < pc2->programs.strrncmp_count ; j++)
2538 ob_collections_group_programs_program();
2539 _edje_program_copy(current_program, pc2->programs.strrncmp[j]);
2541 for (j = 0 ; j < pc2->programs.nocmp_count ; j++)
2543 ob_collections_group_programs_program();
2544 _edje_program_copy(current_program, pc2->programs.nocmp[j]);
2548 Code_Program *cp, *cp2;
2549 Edje_Part_Collection_Directory_Entry *de;
2551 de = eina_hash_find(edje_file->collection, pc2->part);
2552 cd2 = eina_list_nth(codes, de->id);
2553 cd = eina_list_data_get(eina_list_last(codes));
2555 EINA_LIST_FOREACH(cd2->programs, l, cp2)
2557 cp = mem_alloc(SZ(Code_Program));
2561 cp->script = STRDUP(cp2->script);
2562 cd->is_lua = cd2->is_lua;
2563 cd->shared = cd2->shared;
2564 cd->programs = eina_list_append(cd->programs, cp);
2565 data_queue_copied_anonymous_lookup(pc, &(cp2->id), &(cp->id));
2579 The flag (on/off) as to if this group is defined ONLY by script
2580 callbacks such as init(), resize() and shutdown()
2584 st_collections_group_script_only(void)
2586 Edje_Part_Collection *pc;
2590 pc = eina_list_data_get(eina_list_last(edje_collections));
2591 pc->lua_script_only = parse_bool(0);
2599 [aditional group name]
2601 Additional name to serve as identifier. Defining multiple aliases is
2606 st_collections_group_alias(void)
2608 Edje_Part_Collection_Directory_Entry *alias;
2609 Edje_Part_Collection_Directory_Entry *tmp;
2614 alias = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
2615 alias->id = current_de->id;
2616 alias->entry = parse_str(0);
2618 EINA_LIST_FOREACH(aliases, l, tmp)
2619 if (strcmp(alias->entry, tmp->entry) == 0)
2621 Edje_Part_Collection *pc;
2623 pc = eina_list_nth(edje_collections, tmp->id);
2624 INF("overriding alias ('%s' => '%s') to ('%s' => '%s')",
2625 tmp->entry, pc->part,
2626 alias->entry, current_de->entry);
2627 aliases = eina_list_remove_list(aliases, l);
2632 aliases = eina_list_append(aliases, alias);
2642 The minimum size for the container defined by the composition of the
2643 parts. It is not enforced.
2647 st_collections_group_min(void)
2649 Edje_Part_Collection *pc;
2653 pc = eina_list_data_get(eina_list_last(edje_collections));
2654 pc->prop.min.w = parse_int_range(0, 0, 0x7fffffff);
2655 pc->prop.min.h = parse_int_range(1, 0, 0x7fffffff);
2665 The maximum size for the container defined by the totality of the
2666 parts. It is not enforced.
2670 st_collections_group_max(void)
2672 Edje_Part_Collection *pc;
2676 pc = eina_list_data_get(eina_list_last(edje_collections));
2677 pc->prop.max.w = parse_int_range(0, 0, 0x7fffffff);
2678 pc->prop.max.h = parse_int_range(1, 0, 0x7fffffff);
2688 Signal got automatically broadcasted to all sub group part. Default to
2693 st_collections_group_broadcast_signal(void)
2695 Edje_Part_Collection *pc;
2699 pc = eina_list_data_get(eina_list_last(edje_collections));
2700 pc->broadcast_signal = parse_bool(0);
2723 This block is used to "inject" embryo scripts to a given Edje theme and
2724 it functions in two modalities. When it's included inside a "program"
2725 block, the script will be executed every time the program is run, on
2726 the other hand, when included directly into a "group", "part" or
2727 "description" block, it will be executed once at load time, in the
2732 ob_collections_group_script(void)
2736 cd = eina_list_data_get(eina_list_last(codes));
2738 if (!is_verbatim()) track_verbatim(1);
2746 cd->l1 = get_verbatim_line1();
2747 cd->l2 = get_verbatim_line2();
2750 ERR("parse error %s:%i. There is already an existing script section for the group",
2755 cd->original = strdup(s);
2757 set_verbatim(NULL, 0, 0);
2763 ob_collections_group_lua_script(void)
2767 cd = eina_list_data_get(eina_list_last(codes));
2769 if (!is_verbatim()) track_verbatim(1);
2777 cd->l1 = get_verbatim_line1();
2778 cd->l2 = get_verbatim_line2();
2781 ERR("parse error %s:%i. There is already an existing script section for the group",
2787 set_verbatim(NULL, 0, 0);
2793 st_collections_group_data_item(void)
2795 Edje_Part_Collection *pc;
2801 pc = eina_list_data_get(eina_list_last(edje_collections));
2804 pc->data = eina_hash_string_small_new(free);
2808 es = mem_alloc(SZ(Edje_String));
2809 es->str = parse_str(1);
2811 if (eina_hash_find(pc->data, key))
2812 eina_hash_modify(pc->data, key, es);
2814 eina_hash_direct_add(pc->data, key, es);
2824 This defines GROUP orientation.
2825 This is useful if you want match interface orientation with language.
2826 AUTO - Follow system defs.
2827 LTR - suitable for Left To Right Languages (latin)
2828 RTL - suitable for Right To Left Languages (Hebrew, Arabic interface)
2832 st_collections_group_orientation(void)
2834 Edje_Part_Collection *pc;
2838 pc = eina_list_data_get(eina_list_last(edje_collections));
2839 pc->prop.orientation = parse_enum(0,
2840 "AUTO", EDJE_ORIENTATION_AUTO,
2841 "LTR", EDJE_ORIENTATION_LTR,
2842 "RTL", EDJE_ORIENTATION_RTL,
2853 vertical: "limit_name" height_barrier;
2854 horizontal: "limit_name" width_barrier;
2861 This block is used to trigger some signal when the Edje object is resized.
2868 [name] [height barrier]
2870 It will send a signal: "limit,name,over" when the object is resized and pass
2871 the limit by growing over it. And it will send: "limit,name,below" when
2872 it pass below that limit.
2873 This limit will be applied on the y absis and is expressed in pixels.
2877 st_collections_group_limits_vertical(void)
2879 Edje_Part_Collection *pc;
2884 el = mem_alloc(SZ(Edje_Limit));
2886 pc = eina_list_data_get(eina_list_last(edje_collections));
2887 pc->limits.vertical_count++;
2888 pc->limits.vertical = realloc(pc->limits.vertical, pc->limits.vertical_count * sizeof (Edje_Limit *));
2889 if (!pc->limits.vertical || !el)
2891 ERR("Not enough memory.");
2895 pc->limits.vertical[pc->limits.vertical_count - 1] = el;
2897 el->name = parse_str(0);
2898 el->value = parse_int_range(1, 1, 0xffff);
2906 [name] [width barrier]
2908 It will send a signal: "limit,name,over" when the object is resized and pass
2909 the limit by growing over it. And it will send: "limit,name,below" when
2910 it pass below that limit.
2911 This limit will be applied on the x absis and is expressed in pixels.
2915 st_collections_group_limits_horizontal(void)
2917 Edje_Part_Collection *pc;
2922 el = mem_alloc(SZ(Edje_Limit));
2924 pc = eina_list_data_get(eina_list_last(edje_collections));
2925 pc->limits.horizontal_count++;
2926 pc->limits.horizontal = realloc(pc->limits.horizontal, pc->limits.horizontal_count * sizeof (Edje_Limit *));
2927 if (!pc->limits.horizontal || !el)
2929 ERR("Not enough memory.");
2933 pc->limits.horizontal[pc->limits.horizontal_count - 1] = el;
2935 el->name = parse_str(0);
2936 el->value = parse_int_range(1, 1, 0xffff);
2946 alias: "theme_part_path" "real_part_path";
2951 Alias of part give a chance to let the designer put the real one
2952 in a box or reuse one from a GROUP or inside a BOX.
2956 st_collections_group_parts_alias(void)
2958 Edje_Part_Collection *pc;
2960 const char *aliased;
2964 pc = eina_list_data_get(eina_list_last(edje_collections));
2966 alias = parse_str(0);
2967 aliased = parse_str(1);
2969 if (!pc->alias) pc->alias = eina_hash_string_small_new(NULL);
2970 eina_hash_add(pc->alias, alias, aliased);
2972 if (!pc->aliased) pc->aliased = eina_hash_string_small_new(NULL);
2973 eina_hash_add(pc->aliased, aliased, alias);
2991 clip_to: "anotherpart";
2992 source: "groupname";
2993 pointer_mode: AUTOGRAB;
2994 use_alternate_font_metrics: 0;
3004 Parts are used to represent the most basic design elements of the
3005 theme, for example, a part can represent a line in a border or a label
3010 edje_cc_handlers_part_make(void)
3011 { /* Doing ob_collections_group_parts_part() job, without hierarchy */
3012 Edje_Part_Collection *pc;
3014 Edje_Part_Parser *epp;
3016 ep = mem_alloc(SZ(Edje_Part_Parser));
3018 pc = eina_list_data_get(eina_list_last(edje_collections));
3020 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
3023 ERR("Not enough memory.");
3026 current_part = pc->parts[pc->parts_count - 1] = ep;
3028 ep->id = pc->parts_count - 1;
3029 ep->type = EDJE_PART_TYPE_IMAGE;
3030 ep->mouse_events = 1;
3031 ep->repeat_events = 0;
3032 ep->ignore_flags = EVAS_EVENT_FLAG_NONE;
3034 ep->pointer_mode = EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
3035 ep->precise_is_inside = 0;
3036 ep->use_alternate_font_metrics = 0;
3038 ep->clip_to_id = -1;
3039 ep->dragable.confine_id = -1;
3040 ep->dragable.event_id = -1;
3042 ep->nested_children_count = 0;
3044 epp = (Edje_Part_Parser *)ep;
3045 epp->reorder.insert_before = NULL;
3046 epp->reorder.insert_after = NULL;
3047 epp->reorder.before = NULL;
3048 epp->reorder.after = NULL;
3049 epp->reorder.linked_prev = 0;
3050 epp->reorder.linked_next = 0;
3051 epp->reorder.done = EINA_FALSE;
3052 epp->can_override = EINA_FALSE;
3058 ob_collections_group_parts_part(void)
3060 Edje_Part *cp = current_part; /* Save to restore on pop */
3061 Edje_Part *ep = edje_cc_handlers_part_make(); /* This changes current_part */
3064 /* Add this new part to hierarchy stack (removed part finished parse) */
3065 edje_cc_handlers_hierarchy_push(ep, cp);
3067 prnt = edje_cc_handlers_hierarchy_parent_get();
3068 if (prnt) /* This is the child of parent in stack */
3069 prnt->nested_children_count++;
3079 The part's name will be used as reference in the theme's relative
3080 positioning system, by programs and in some cases by the application.
3081 It must be unique within the group.
3085 st_collections_group_parts_part_name(void)
3087 Edje_Part_Collection *pc;
3089 Edje_Part_Parser *epp;
3093 pc = eina_list_data_get(eina_list_last(edje_collections));
3095 ep->name = parse_str(0);
3101 for (i = 0; i < (pc->parts_count - 1); i++)
3102 { /* Compare name only if did NOT updated ep from hircy pop */
3103 if ((ep != pc->parts[i]) &&
3104 (pc->parts[i]->name &&
3105 (!strcmp(pc->parts[i]->name, ep->name))))
3107 epp = (Edje_Part_Parser *)pc->parts[i];
3108 if (!epp->can_override)
3110 ERR("parse error %s:%i. There is already a part of the name %s",
3111 file_in, line - 1, ep->name);
3118 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
3119 current_part = pc->parts[i];
3120 edje_cc_handlers_hierarchy_rename(ep, current_part);
3122 epp->can_override = EINA_FALSE;
3137 Set the type (all caps) from among the available types, it's set to
3138 IMAGE by default. Valid types:
3153 st_collections_group_parts_part_type(void)
3159 type = parse_enum(0,
3160 "NONE", EDJE_PART_TYPE_NONE,
3161 "RECT", EDJE_PART_TYPE_RECTANGLE,
3162 "TEXT", EDJE_PART_TYPE_TEXT,
3163 "IMAGE", EDJE_PART_TYPE_IMAGE,
3164 "SWALLOW", EDJE_PART_TYPE_SWALLOW,
3165 "TEXTBLOCK", EDJE_PART_TYPE_TEXTBLOCK,
3166 "GROUP", EDJE_PART_TYPE_GROUP,
3167 "BOX", EDJE_PART_TYPE_BOX,
3168 "TABLE", EDJE_PART_TYPE_TABLE,
3169 "EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
3170 "PROXY", EDJE_PART_TYPE_PROXY,
3171 "SPACER", EDJE_PART_TYPE_SPACER,
3174 /* handle type change of inherited part */
3175 if (type != current_part->type)
3177 Edje_Part_Description_Common *new, *previous;
3178 Edje_Part_Collection *pc;
3182 /* we don't free old part as we don't remove all reference to them */
3183 part_description_image_cleanup(current_part);
3185 pc = eina_list_data_get(eina_list_last(edje_collections));
3188 previous = ep->default_desc;
3191 new = _edje_part_description_alloc(type, pc->part, ep->name);
3192 memcpy(new, previous, sizeof (Edje_Part_Description_Common));
3194 ep->default_desc = new;
3197 for (i = 0; i < ep->other.desc_count; i++)
3199 previous = ep->other.desc[i];
3200 new = _edje_part_description_alloc(type, pc->part, ep->name);
3201 memcpy(new, previous, sizeof (Edje_Part_Description_Common));
3202 ep->other.desc[i] = new;
3206 current_part->type = type;
3220 name: "parent_rect";
3224 name: "nested_rect";
3233 Nested parts adds hierarchy to edje.
3234 Nested part inherits it's location relatively to the parent part.
3235 To declare a nested part just start a new part within current part decl.
3236 You must define parent part name before adding nested parts.
3246 [another part's name]
3248 The part's name which this part is inserted before. One part cannot
3249 have both insert_before and insert_after. One part cannot refer
3250 more than one by insert_before.
3255 st_collections_group_parts_part_insert_before(void)
3257 Edje_Part_Parser *epp;
3260 epp = (Edje_Part_Parser *)current_part;
3261 epp->reorder.insert_before = parse_str(0);
3269 [another part's name]
3271 The part's name which this part is inserted after. One part cannot
3272 have both insert_before and insert_after. One part cannot refer
3273 more than one by insert_after.
3278 st_collections_group_parts_part_insert_after(void)
3280 Edje_Part_Parser *epp;
3283 epp = (Edje_Part_Parser *)current_part;
3284 epp->reorder.insert_after = parse_str(0);
3294 Specifies whether the part will emit signals, although it is named
3295 "mouse_events", disabling it (0) will prevent the part from emitting
3296 any type of signal at all. It's set to 1 by default.
3300 st_collections_group_parts_part_mouse_events(void)
3304 current_part->mouse_events = parse_bool(0);
3314 Specifies whether a part echoes a mouse event to other parts below the
3315 pointer (1), or not (0). It's set to 0 by default.
3319 st_collections_group_parts_part_repeat_events(void)
3323 current_part->repeat_events = parse_bool(0);
3333 Specifies whether events with the given flags should be ignored,
3334 i.e., will not have the signals emitted to the parts. Multiple flags
3335 must be separated by spaces, the effect will be ignoring all events
3336 with one of the flags specified. Possible flags:
3337 @li NONE (default value, no event will be ignored)
3342 st_collections_group_parts_part_ignore_flags(void)
3344 check_min_arg_count(1);
3346 current_part->ignore_flags = parse_flags(0,
3347 "NONE", EVAS_EVENT_FLAG_NONE,
3348 "ON_HOLD", EVAS_EVENT_FLAG_ON_HOLD,
3359 Specifies whether the part will scale its size with an edje scaling
3360 factor. By default scale is off (0) and the default scale factor is
3361 1.0 - that means no scaling. This would be used to scale properties
3362 such as font size, min/max size of the part, and possibly can be used
3363 to scale based on DPI of the target device. The reason to be selective
3364 is that some things work well being scaled, others do not, so the
3365 designer gets to choose what works best.
3369 st_collections_group_parts_part_scale(void)
3373 current_part->scale = parse_bool(0);
3383 Sets the mouse pointer behavior for a given part. The default value is
3384 AUTOGRAB. Aviable modes:
3385 @li AUTOGRAB, when the part is clicked and the button remains
3386 pressed, the part will be the source of all future mouse
3387 signals emitted, even outside the object, until the button is
3389 @li NOGRAB, the effect will be limited to the part's container.
3393 st_collections_group_parts_part_pointer_mode(void)
3397 current_part->pointer_mode = parse_enum(0,
3398 "AUTOGRAB", EVAS_OBJECT_POINTER_MODE_AUTOGRAB,
3399 "NOGRAB", EVAS_OBJECT_POINTER_MODE_NOGRAB,
3410 Enables precise point collision detection for the part, which is more
3411 resource intensive. Disabled by default.
3415 st_collections_group_parts_part_precise_is_inside(void)
3419 current_part->precise_is_inside = parse_bool(0);
3425 use_alternate_font_metrics
3429 Only affects text and textblock parts, when enabled Edje will use
3430 different size measurement functions. Disabled by default. (note from
3431 the author: I don't know what this is exactly useful for?)
3435 st_collections_group_parts_part_use_alternate_font_metrics(void)
3439 current_part->use_alternate_font_metrics = parse_bool(0);
3447 [another part's name]
3449 Only renders the area of part that coincides with another part's
3450 container. Overflowing content will not be displayed. Note that
3451 the part being clipped to can only be a rectangle part.
3455 st_collections_group_parts_part_clip_to_id(void)
3457 Edje_Part_Collection *pc;
3461 pc = eina_list_data_get(eina_list_last(edje_collections));
3465 name = parse_str(0);
3466 data_queue_part_lookup(pc, name, &(current_part->clip_to_id));
3476 [another group's name]
3478 Only available to GROUP or TEXTBLOCK parts. Swallows the specified
3479 group into the part's container if a GROUP. If TEXTBLOCK it is used
3480 for the group to be loaded and used for selection display UNDER the
3481 selected text. source2 is used for on top of the selected text, if
3482 source2 is specified.
3486 st_collections_group_parts_part_source(void)
3490 //FIXME: validate this somehow (need to decide on the format also)
3491 current_part->source = parse_str(0);
3492 data_queue_group_lookup(current_part->source, current_part);
3500 [another group's name]
3502 Only available to TEXTBLOCK parts. It is used for the group to be
3503 loaded and used for selection display OVER the selected text. source
3504 is used for under of the selected text, if source is specified.
3508 st_collections_group_parts_part_source2(void)
3512 //FIXME: validate this somehow (need to decide on the format also)
3513 current_part->source2 = parse_str(0);
3514 data_queue_group_lookup(current_part->source2, current_part);
3522 [another group's name]
3524 Only available to TEXTBLOCK parts. It is used for the group to be
3525 loaded and used for cursor display UNDER the cursor position. source4
3526 is used for over the cursor text, if source4 is specified.
3530 st_collections_group_parts_part_source3(void)
3534 //FIXME: validate this somehow (need to decide on the format also)
3535 current_part->source3 = parse_str(0);
3536 data_queue_group_lookup(current_part->source3, current_part);
3544 [another group's name]
3546 Only available to TEXTBLOCK parts. It is used for the group to be
3547 loaded and used for cursor display OVER the cursor position. source3
3548 is used for under the cursor text, if source4 is specified.
3552 st_collections_group_parts_part_source4(void)
3556 //FIXME: validate this somehow (need to decide on the format also)
3557 current_part->source4 = parse_str(0);
3558 data_queue_group_lookup(current_part->source4, current_part);
3566 [another group's name]
3568 Only available to TEXTBLOCK parts. It is used for the group to be
3569 loaded and used for anchors display UNDER the anchor position. source6
3570 is used for over the anchors text, if source6 is specified.
3574 st_collections_group_parts_part_source5(void)
3578 //FIXME: validate this somehow (need to decide on the format also)
3579 current_part->source5 = parse_str(0);
3580 data_queue_group_lookup(current_part->source5, current_part);
3588 [another group's name]
3590 Only available to TEXTBLOCK parts. It is used for the group to be
3591 loaded and used for anchor display OVER the anchor position. source5
3592 is used for under the anchor text, if source6 is specified.
3596 st_collections_group_parts_part_source6(void)
3600 //FIXME: validate this somehow (need to decide on the format also)
3601 current_part->source6 = parse_str(0);
3602 data_queue_group_lookup(current_part->source6, current_part);
3612 (optional) [SHADOW DIRECTION]
3614 Causes Edje to draw the selected effect among:
3621 @li OUTLINE_SOFT_SHADOW
3626 Shadow directions (default if not given is BOTTOM_RIGHT):
3638 st_collections_group_parts_part_effect(void)
3640 check_min_arg_count(1);
3642 current_part->effect = parse_enum(0,
3643 "NONE", EDJE_TEXT_EFFECT_NONE,
3644 "PLAIN", EDJE_TEXT_EFFECT_PLAIN,
3645 "OUTLINE", EDJE_TEXT_EFFECT_OUTLINE,
3646 "SOFT_OUTLINE", EDJE_TEXT_EFFECT_SOFT_OUTLINE,
3647 "SHADOW", EDJE_TEXT_EFFECT_SHADOW,
3648 "SOFT_SHADOW", EDJE_TEXT_EFFECT_SOFT_SHADOW,
3649 "OUTLINE_SHADOW", EDJE_TEXT_EFFECT_OUTLINE_SHADOW,
3650 "OUTLINE_SOFT_SHADOW", EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW,
3651 "FAR_SHADOW", EDJE_TEXT_EFFECT_FAR_SHADOW,
3652 "FAR_SOFT_SHADOW", EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW,
3653 "GLOW", EDJE_TEXT_EFFECT_GLOW,
3655 if (get_arg_count() >= 2)
3657 unsigned char shadow;
3659 shadow = parse_enum(1,
3660 "BOTTOM_RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT,
3661 "BOTTOM", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM,
3662 "BOTTOM_LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT,
3663 "LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT,
3664 "TOP_LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT,
3665 "TOP", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP,
3666 "TOP_RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT,
3667 "RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT,
3669 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(current_part->effect, shadow);
3680 Sets the edit mode for a textblock part to one of:
3685 It causes the part be editable if the edje object has the keyboard
3686 focus AND the part has the edje focus (or selectable always
3687 regardless of focus) and in the event of password mode, not
3688 selectable and all text chars replaced with *'s but editable and
3693 st_collections_group_parts_part_entry_mode(void)
3697 current_part->entry_mode = parse_enum(0,
3698 "NONE", EDJE_ENTRY_EDIT_MODE_NONE,
3699 "PLAIN", EDJE_ENTRY_EDIT_MODE_SELECTABLE,
3700 "EDITABLE", EDJE_ENTRY_EDIT_MODE_EDITABLE,
3701 "PASSWORD", EDJE_ENTRY_EDIT_MODE_PASSWORD,
3712 Sets the selection mode for a textblock part to one of:
3713 @li DEFAULT selection mode is what you would expect on any desktop. Press
3714 mouse, drag and release to end.
3715 @li EXPLICIT mode requires the application
3716 controlling the edje object has to explicitly begin and end selection
3717 modes, and the selection itself is dragable at both ends.
3721 st_collections_group_parts_part_select_mode(void)
3725 current_part->select_mode = parse_enum(0,
3726 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT,
3727 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT,
3728 "BLOCK_HANDLE", EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE,
3739 Sets the cursor mode for a textblock part to one of:
3740 @li UNDER cursor mode means the cursor will draw below the character pointed
3741 at. That's the default.
3742 @li BEFORE cursor mode means the cursor is drawn as a vertical line before
3743 the current character, just like many other GUI toolkits handle it.
3747 st_collections_group_parts_part_cursor_mode(void)
3751 current_part->cursor_mode = parse_enum(0,
3752 "UNDER", EDJE_ENTRY_CURSOR_MODE_UNDER,
3753 "BEFORE", EDJE_ENTRY_CURSOR_MODE_BEFORE,
3764 It causes a textblock that is editable to allow multiple lines for
3769 st_collections_group_parts_part_multiline(void)
3773 current_part->multiline = parse_bool(0);
3783 Specifies whether the part will use accessibility feature (1),
3784 or not (0). It's set to 0 by default.
3788 st_collections_group_parts_part_access(void)
3792 current_part->access = parse_bool(0);
3803 confine: "another part";
3804 events: "another dragable part";
3811 When this block is used the resulting part can be dragged around the
3812 interface, do not confuse with external drag & drop. By default Edje
3813 (and most applications) will attempt to use the minimal size possible
3814 for a dragable part. If the min property is not set in the description
3815 the part will be (most likely) set to 0px width and 0px height, thus
3822 [enable/disable] [step] [count]
3824 Used to setup dragging events for the X axis. The first parameter is
3825 used to enable (1 or -1) and disable (0) dragging along the axis. When
3826 enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second
3827 parameter takes any integer and will limit movement to values
3828 divisible by it, causing the part to jump from position to position.
3829 The third parameter, (question from the author: What is count for?).
3833 st_collections_group_parts_part_dragable_x(void)
3837 current_part->dragable.x = parse_int_range(0, -1, 1);
3838 current_part->dragable.step_x = parse_int_range(1, 0, 0x7fffffff);
3839 current_part->dragable.count_x = parse_int_range(2, 0, 0x7fffffff);
3847 [enable/disable] [step] [count]
3849 Used to setup dragging events for the Y axis. The first parameter is
3850 used to enable (1 or -1) and disable (0) dragging along the axis. When
3851 enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second
3852 parameter takes any integer and will limit movement to values
3853 divisibles by it, causing the part to jump from position to position.
3854 The third parameter, (question from the author: What is count for?).
3858 st_collections_group_parts_part_dragable_y(void)
3862 current_part->dragable.y = parse_int_range(0, -1, 1);
3863 current_part->dragable.step_y = parse_int_range(1, 0, 0x7fffffff);
3864 current_part->dragable.count_y = parse_int_range(2, 0, 0x7fffffff);
3872 [another part's name]
3874 When set, limits the movement of the dragged part to another part's
3875 container. When you use confine don't forget to set a min size for the
3876 part, or the draggie will not show up.
3880 st_collections_group_parts_part_dragable_confine(void)
3882 Edje_Part_Collection *pc;
3886 pc = eina_list_data_get(eina_list_last(edje_collections));
3890 name = parse_str(0);
3891 data_queue_part_lookup(pc, name, &(current_part->dragable.confine_id));
3901 [another dragable part's name]
3903 It causes the part to forward the drag events to another part, thus
3904 ignoring them for itself.
3908 st_collections_group_parts_part_dragable_events(void)
3910 Edje_Part_Collection *pc;
3914 pc = eina_list_data_get(eina_list_last(edje_collections));
3918 name = parse_str(0);
3919 data_queue_part_lookup(pc, name, &(current_part->dragable.event_id));
3935 source: "some source";
3942 source: "some other source";
3952 On a part of type BOX, this block can be used to set other groups
3953 as elements of the box. These can be mixed with external objects set
3954 by the application through the edje_object_part_box_* API.
3957 static void ob_collections_group_parts_part_box_items_item(void)
3960 Edje_Pack_Element *item;
3961 Edje_Pack_Element_Parser *pitem;
3965 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
3967 ERR("parse error %s:%i. box attributes in non-BOX or TABLE part.",
3973 ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count);
3976 ERR("Not enough memory.");
3980 item = mem_alloc(SZ(Edje_Pack_Element_Parser));
3981 current_item = ep->items[ep->items_count - 1] = item;
3982 item->type = EDJE_PART_TYPE_GROUP;
3984 item->source = NULL;
3991 item->padding.l = 0;
3992 item->padding.r = 0;
3993 item->padding.t = 0;
3994 item->padding.b = 0;
3995 item->align.x = FROM_DOUBLE(0.5);
3996 item->align.y = FROM_DOUBLE(0.5);
3997 item->weight.x = FROM_DOUBLE(0.0);
3998 item->weight.y = FROM_DOUBLE(0.0);
4001 item->aspect.mode = EDJE_ASPECT_CONTROL_NONE;
4002 item->options = NULL;
4007 pitem = (Edje_Pack_Element_Parser *)item;
4008 pitem->can_override = EINA_FALSE;
4016 Only GROUP for now (defaults to it)
4018 Sets the type of the object this item will hold.
4021 static void st_collections_group_parts_part_box_items_item_type(void)
4029 if (strcmp(s, "GROUP"))
4031 ERR("parse error %s:%i. token %s not one of: GROUP.",
4032 file_in, line - 1, s);
4035 /* FIXME: handle the enum, once everything else is supported */
4036 current_item->type = EDJE_PART_TYPE_GROUP;
4045 [name for the object]
4047 Sets the name of the object via evas_object_name_set().
4050 static void st_collections_group_parts_part_box_items_item_name(void)
4053 Edje_Pack_Element *item;
4054 Edje_Pack_Element_Parser *pitem;
4059 item = ep->items[ep->items_count - 1];
4061 item->name = parse_str(0);
4066 for (i = 0; i < ep->items_count - 1; ++i)
4068 if (ep->items[i]->name && (!strcmp(ep->items[i]->name, item->name)))
4070 pitem = (Edje_Pack_Element_Parser *)ep->items[i];
4071 if (!pitem->can_override)
4073 ERR("parse error %s:%i. There is already a item of the name %s",
4074 file_in, line - 1, item->name);
4081 ep->items = realloc(ep->items, ep->items_count * sizeof (Edje_Pack_Element *));
4082 current_item = ep->items[i];
4083 pitem->can_override = EINA_FALSE;
4095 [another group's name]
4097 Sets the group this object will be made from.
4100 static void st_collections_group_parts_part_box_items_item_source(void)
4104 current_item->source = parse_str(0);
4105 data_queue_group_lookup(current_item->source, current_part);
4115 Sets the minimum size hints for this object.
4118 static void st_collections_group_parts_part_box_items_item_min(void)
4122 current_item->min.w = parse_int_range(0, 0, 0x7ffffff);
4123 current_item->min.h = parse_int_range(1, 0, 0x7ffffff);
4133 Sets the preferred size hints for this object.
4136 static void st_collections_group_parts_part_box_items_item_prefer(void)
4140 current_item->prefer.w = parse_int_range(0, 0, 0x7ffffff);
4141 current_item->prefer.h = parse_int_range(1, 0, 0x7ffffff);
4150 Sets the maximum size hints for this object.
4153 static void st_collections_group_parts_part_box_items_item_max(void)
4157 current_item->max.w = parse_int_range(0, 0, 0x7ffffff);
4158 current_item->max.h = parse_int_range(1, 0, 0x7ffffff);
4166 [left] [right] [top] [bottom]
4168 Sets the padding hints for this object.
4171 static void st_collections_group_parts_part_box_items_item_padding(void)
4175 current_item->padding.l = parse_int_range(0, 0, 0x7ffffff);
4176 current_item->padding.r = parse_int_range(1, 0, 0x7ffffff);
4177 current_item->padding.t = parse_int_range(2, 0, 0x7ffffff);
4178 current_item->padding.b = parse_int_range(3, 0, 0x7ffffff);
4188 Sets the alignment hints for this object.
4191 static void st_collections_group_parts_part_box_items_item_align(void)
4195 current_item->align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
4196 current_item->align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
4206 Sets the weight hints for this object.
4209 static void st_collections_group_parts_part_box_items_item_weight(void)
4213 current_item->weight.x = FROM_DOUBLE(parse_float_range(0, 0.0, 99999.99));
4214 current_item->weight.y = FROM_DOUBLE(parse_float_range(1, 0.0, 99999.99));
4224 Sets the aspect width and height hints for this object.
4227 static void st_collections_group_parts_part_box_items_item_aspect(void)
4231 current_item->aspect.w = parse_int_range(0, 0, 0x7fffffff);
4232 current_item->aspect.h = parse_int_range(1, 0, 0x7fffffff);
4240 NONE, NEITHER, HORIZONTAL, VERTICAL, BOTH
4242 Sets the aspect control hints for this object.
4245 static void st_collections_group_parts_part_box_items_item_aspect_mode(void)
4249 current_item->aspect.mode = parse_enum(0,
4250 "NONE", EDJE_ASPECT_CONTROL_NONE,
4251 "NEITHER", EDJE_ASPECT_CONTROL_NEITHER,
4252 "HORIZONTAL", EDJE_ASPECT_CONTROL_HORIZONTAL,
4253 "VERTICAL", EDJE_ASPECT_CONTROL_VERTICAL,
4254 "BOTH", EDJE_ASPECT_CONTROL_BOTH,
4265 Sets extra options for the object. Unused for now.
4268 static void st_collections_group_parts_part_box_items_item_options(void)
4272 current_item->options = parse_str(0);
4282 Sets the position this item will have in the table.
4283 This is required for parts of type TABLE.
4286 static void st_collections_group_parts_part_table_items_item_position(void)
4290 if (current_part->type != EDJE_PART_TYPE_TABLE)
4292 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4297 current_item->col = parse_int_range(0, 0, 0xffff);
4298 current_item->row = parse_int_range(1, 0, 0xffff);
4308 Sets how many columns/rows this item will use.
4312 static void st_collections_group_parts_part_table_items_item_span(void)
4316 if (current_part->type != EDJE_PART_TYPE_TABLE)
4318 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4323 current_item->colspan = parse_int_range(0, 1, 0xffff);
4324 current_item->rowspan = parse_int_range(1, 1, 0xffff);
4328 @edcsection{description,State description sub blocks}
4337 inherit: "another_description" INDEX;
4338 state: "description_name" INDEX;
4356 Every part can have one or more description blocks. Each description is
4357 used to define style and layout properties of a part in a given
4362 ob_collections_group_parts_part_description(void)
4363 { /* Allocate and set desc, set relative part hierarchy if needed */
4364 Edje_Part_Collection *pc;
4366 Edje_Part_Description_Common *ed;
4368 pc = eina_list_data_get(eina_list_last(edje_collections));
4371 ed = _edje_part_description_alloc(ep->type, pc->part, ep->name);
4378 if (!ep->default_desc)
4380 current_desc = ep->default_desc = ed;
4382 { /* Get the ptr of the part above current part in hierarchy */
4383 Edje_Part *node = edje_cc_handlers_hierarchy_parent_get();
4384 if (node) /* Make relative according to part hierarchy */
4385 edje_cc_handlers_hierarchy_set(node);
4390 ep->other.desc_count++;
4391 ep->other.desc = realloc(ep->other.desc,
4392 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4393 current_desc = ep->other.desc[ep->other.desc_count - 1] = ed;
4398 ed->align.x = FROM_DOUBLE(0.5);
4399 ed->align.y = FROM_DOUBLE(0.5);
4406 ed->rel1.relative_x = FROM_DOUBLE(0.0);
4407 ed->rel1.relative_y = FROM_DOUBLE(0.0);
4408 ed->rel1.offset_x = 0;
4409 ed->rel1.offset_y = 0;
4410 ed->rel2.relative_x = FROM_DOUBLE(1.0);
4411 ed->rel2.relative_y = FROM_DOUBLE(1.0);
4412 ed->rel2.offset_x = -1;
4413 ed->rel2.offset_y = -1;
4414 ed->color_class = NULL;
4423 ed->map.id_persp = -1;
4424 ed->map.id_light = -1;
4425 ed->map.rot.id_center = -1;
4426 ed->map.rot.x = FROM_DOUBLE(0.0);
4427 ed->map.rot.y = FROM_DOUBLE(0.0);
4428 ed->map.rot.z = FROM_DOUBLE(0.0);
4432 ed->map.backcull = 0;
4433 ed->map.persp_on = 0;
4434 ed->persp.zplane = 0;
4435 ed->persp.focal = 1000;
4436 ed->minmul.have = 1;
4437 ed->minmul.w = FROM_INT(1);
4438 ed->minmul.h = FROM_INT(1);
4446 [another description's name] [another description's index]
4448 When set, the description will inherit all the properties from the
4449 named description. The properties defined in this part will override
4450 the inherited properties, reducing the amount of necessary code for
4451 simple state changes. Note: inheritance in Edje is single level only.
4455 st_collections_group_parts_part_description_inherit(void)
4457 Edje_Part_Collection *pc;
4459 Edje_Part_Description_Common *ed, *parent = NULL;
4460 Edje_Part_Image_Id *iid;
4462 const char *state_name;
4463 double parent_val, state_val;
4465 pc = eina_list_data_get(eina_list_last(edje_collections));
4469 if (!ed->state.name)
4471 ERR("parse error %s:%i. inherit may only be used after state",
4476 parent = parent_desc;
4479 check_min_arg_count(1);
4481 /* inherit may not be used in the default description */
4482 if (!ep->other.desc_count)
4484 ERR("parse error %s:%i. "
4485 "inherit may not be used in the default description",
4490 /* find the description that we inherit from */
4491 parent_name = parse_str(0);
4492 if (get_arg_count() == 2)
4493 parent_val = parse_float_range(1, 0.0, 1.0);
4497 if (!strcmp (parent_name, "default") && parent_val == 0.0)
4498 parent = ep->default_desc;
4501 Edje_Part_Description_Common *d;
4502 double min_dst = 999.0;
4505 if (!strcmp(parent_name, "default"))
4507 parent = ep->default_desc;
4508 min_dst = ABS(ep->default_desc->state.value - parent_val);
4511 for (i = 0; i < ep->other.desc_count; ++i)
4513 d = ep->other.desc[i];
4515 if (!strcmp (d->state.name, parent_name))
4520 dst = ABS(d->state.value - parent_val);
4532 ERR("parse error %s:%i. "
4533 "cannot find referenced part %s state %s %lf",
4534 file_in, line - 1, ep->name, parent_name, parent_val);
4540 /* now do a full copy, only state info will be kept */
4541 state_name = ed->state.name;
4542 state_val = ed->state.value;
4546 ed->state.name = state_name;
4547 ed->state.value = state_val;
4549 data_queue_copied_part_lookup(pc, &parent->rel1.id_x, &ed->rel1.id_x);
4550 data_queue_copied_part_lookup(pc, &parent->rel1.id_y, &ed->rel1.id_y);
4551 data_queue_copied_part_lookup(pc, &parent->rel2.id_x, &ed->rel2.id_x);
4552 data_queue_copied_part_lookup(pc, &parent->rel2.id_y, &ed->rel2.id_y);
4554 data_queue_copied_part_lookup(pc, &parent->map.id_persp, &ed->map.id_persp);
4555 data_queue_copied_part_lookup(pc, &parent->map.id_light, &ed->map.id_light);
4556 data_queue_copied_part_lookup(pc, &parent->map.rot.id_center, &ed->map.rot.id_center);
4558 /* make sure all the allocated memory is getting copied, not just
4561 #define STRDUP(x) x ? strdup(x) : NULL
4563 ed->color_class = STRDUP(ed->color_class);
4566 case EDJE_PART_TYPE_SPACER:
4567 case EDJE_PART_TYPE_RECTANGLE:
4568 case EDJE_PART_TYPE_SWALLOW:
4569 case EDJE_PART_TYPE_GROUP:
4570 /* Nothing todo, this part only have a common description. */
4572 case EDJE_PART_TYPE_TEXT:
4573 case EDJE_PART_TYPE_TEXTBLOCK:
4575 Edje_Part_Description_Text *ted = (Edje_Part_Description_Text*) ed;
4576 Edje_Part_Description_Text *tparent = (Edje_Part_Description_Text*) parent;
4578 ted->text = tparent->text;
4580 ted->text.text.str = STRDUP(ted->text.text.str);
4581 ted->text.text_class = STRDUP(ted->text.text_class);
4582 ted->text.font.str = STRDUP(ted->text.font.str);
4584 data_queue_copied_part_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source));
4585 data_queue_copied_part_lookup(pc, &(tparent->text.id_text_source), &(ted->text.id_text_source));
4589 case EDJE_PART_TYPE_IMAGE:
4591 Edje_Part_Description_Image *ied = (Edje_Part_Description_Image *) ed;
4592 Edje_Part_Description_Image *iparent = (Edje_Part_Description_Image *) parent;
4595 ied->image = iparent->image;
4597 data_queue_image_remove(&ied->image.id, &ied->image.set);
4598 data_queue_copied_image_lookup(&iparent->image.id, &ied->image.id, &ied->image.set);
4600 ied->image.tweens = calloc(iparent->image.tweens_count,
4601 sizeof (Edje_Part_Image_Id*));
4602 for (i = 0; i < iparent->image.tweens_count; i++)
4604 Edje_Part_Image_Id *iid_new;
4606 iid = iparent->image.tweens[i];
4608 iid_new = mem_alloc(SZ(Edje_Part_Image_Id));
4609 data_queue_image_remove(&ied->image.id, &ied->image.set);
4610 data_queue_copied_image_lookup(&(iid->id), &(iid_new->id), &(iid_new->set));
4611 ied->image.tweens[i] = iid_new;
4616 case EDJE_PART_TYPE_PROXY:
4618 Edje_Part_Description_Proxy *ped = (Edje_Part_Description_Proxy*) ed;
4619 Edje_Part_Description_Proxy *pparent = (Edje_Part_Description_Proxy*) parent;
4621 data_queue_copied_part_lookup(pc, &(pparent->proxy.id), &(ped->proxy.id));
4625 case EDJE_PART_TYPE_BOX:
4627 Edje_Part_Description_Box *bed = (Edje_Part_Description_Box *) ed;
4628 Edje_Part_Description_Box *bparent = (Edje_Part_Description_Box *) parent;
4630 bed->box = bparent->box;
4634 case EDJE_PART_TYPE_TABLE:
4636 Edje_Part_Description_Table *ted = (Edje_Part_Description_Table *) ed;
4637 Edje_Part_Description_Table *tparent = (Edje_Part_Description_Table *) parent;
4639 ted->table = tparent->table;
4643 case EDJE_PART_TYPE_EXTERNAL:
4645 Edje_Part_Description_External *eed = (Edje_Part_Description_External *) ed;
4646 Edje_Part_Description_External *eparent = (Edje_Part_Description_External *) parent;
4648 if (eparent->external_params)
4651 Edje_External_Param *param, *new_param;
4653 eed->external_params = NULL;
4654 EINA_LIST_FOREACH(eparent->external_params, l, param)
4656 new_param = mem_alloc(SZ(Edje_External_Param));
4657 *new_param = *param;
4658 eed->external_params = eina_list_append(eed->external_params, new_param);
4674 [another part's name]
4676 Causes the part to use another part content as the content of this part.
4677 Only work with PROXY part.
4681 st_collections_group_parts_part_description_source(void)
4683 Edje_Part_Collection *pc;
4684 Edje_Part_Description_Proxy *ed;
4689 pc = eina_list_data_get(eina_list_last(edje_collections));
4691 if (current_part->type != EDJE_PART_TYPE_PROXY)
4693 ERR("parse error %s:%i. source attributes in non-PROXY part.",
4698 ed = (Edje_Part_Description_Proxy*) current_desc;
4700 name = parse_str(0);
4702 data_queue_part_lookup(pc, name, &(ed->proxy.id));
4711 [a name for the description] [an index]
4713 Sets a name used to identify a description inside a given part.
4714 Multiple descriptions are used to declare different states of the same
4715 part, like "clicked" or "invisible". All states declarations are also
4716 coupled with an index number between 0.0 and 1.0. All parts must have
4717 at least one description named "default 0.0".
4721 st_collections_group_parts_part_description_state(void)
4724 Edje_Part_Description_Common *ed;
4727 check_min_arg_count(1);
4731 ed = ep->default_desc;
4732 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4735 if (!strcmp (s, "custom"))
4737 ERR("parse error %s:%i. invalid state name: '%s'.",
4738 file_in, line - 1, s);
4743 if (get_arg_count() == 1)
4744 ed->state.value = 0.0;
4746 ed->state.value = parse_float_range(1, 0.0, 1.0);
4748 if (ed != ep->default_desc)
4750 if ((ep->default_desc->state.name && !strcmp(s, ep->default_desc->state.name) && ed->state.value == ep->default_desc->state.value) ||
4751 (!ep->default_desc->state.name && !strcmp(s, "default") && ed->state.value == ep->default_desc->state.value))
4753 if (ep->type == EDJE_PART_TYPE_IMAGE)
4754 _edje_part_description_image_remove((Edje_Part_Description_Image*) ed);
4757 ep->other.desc_count--;
4758 ep->other.desc = realloc(ep->other.desc,
4759 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4760 current_desc = ep->default_desc;
4762 else if (ep->other.desc_count)
4765 for (i = 0; i < ep->other.desc_count - 1; ++i)
4767 if (!strcmp(s, ep->other.desc[i]->state.name) && ed->state.value == ep->other.desc[i]->state.value)
4769 if (ep->type == EDJE_PART_TYPE_IMAGE)
4770 _edje_part_description_image_remove((Edje_Part_Description_Image*) ed);
4773 ep->other.desc_count--;
4774 ep->other.desc = realloc(ep->other.desc,
4775 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4776 current_desc = ep->other.desc[i];
4791 Takes a boolean value specifying whether part is visible (1) or not
4792 (0). Non-visible parts do not emit signals. The default value is 1.
4796 st_collections_group_parts_part_description_visible(void)
4800 if (current_part->type == EDJE_PART_TYPE_SPACER)
4802 ERR("parse error %s:%i. SPACER part can't have a visibility defined",
4807 current_desc->visible = parse_bool(0);
4814 [NONE, WIDTH, HEIGHT or BOTH]
4816 Emit a signal when the part size change from zero or to a zero size
4817 ('limit,width,over', 'limit,width,zero'). By default no signal are
4823 st_collections_group_parts_part_description_limit(void)
4827 current_desc->limit = parse_enum(0,
4833 if (current_desc->limit)
4835 Edje_Part_Collection *pc;
4838 pc = eina_list_data_get(eina_list_last(edje_collections));
4839 count = pc->limits.parts_count++;
4840 pc->limits.parts = realloc(pc->limits.parts,
4841 pc->limits.parts_count * sizeof (Edje_Part_Limit));
4842 data_queue_part_lookup(pc, current_part->name,
4843 &(pc->limits.parts[count].part));
4854 When the displayed object's size is smaller than its container, this
4855 property moves it relatively along both axis inside its container. The
4856 default value is "0.5 0.5".
4860 st_collections_group_parts_part_description_align(void)
4864 current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0));
4865 current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
4873 [width, 0 or 1] [height, 0 or 1]
4875 This affects the minimum size calculation. See
4876 edje_object_size_min_calc() and edje_object_size_min_restricted_calc().
4877 This tells the min size calculation routine that this part does not
4878 change size in width or height (1 for it doesn't, 0 for it does), so
4879 the routine should not try and expand or contract the part.
4883 st_collections_group_parts_part_description_fixed(void)
4887 current_desc->fixed.w = parse_float_range(0, 0, 1);
4888 current_desc->fixed.h = parse_float_range(1, 0, 1);
4896 [width] [height] or SOURCE
4898 The minimum size of the state.
4900 When min is defined to SOURCE, it will look at the original
4901 image size and enforce it minimal size to match at least the
4902 original one. The part must be an IMAGE or a GROUP part.
4906 st_collections_group_parts_part_description_min(void)
4908 check_min_arg_count(1);
4911 current_desc->min.w = parse_float_range(0, 0, 0x7fffffff);
4912 current_desc->min.h = parse_float_range(1, 0, 0x7fffffff);
4917 if ((current_part->type != EDJE_PART_TYPE_IMAGE && current_part->type != EDJE_PART_TYPE_GROUP) ||
4918 !tmp || strcmp(tmp, "SOURCE") != 0)
4920 ERR("parse error %s:%i. "
4921 "Only IMAGE and GROUP part can have a min: SOURCE; defined",
4926 current_desc->min.limit = EINA_TRUE;
4935 [width multipler] [height multiplier]
4937 A multiplier FORCIBLY applied to whatever minimum size is only during
4938 minimum size calculation.
4943 st_collections_group_parts_part_description_minmul(void)
4947 current_desc->minmul.w = FROM_DOUBLE(parse_float_range(0, 0, 999999));
4948 current_desc->minmul.h = FROM_DOUBLE(parse_float_range(1, 0, 999999));
4956 [width] [height] or SOURCE
4958 The maximum size of the state. A size of -1.0 means that it will be ignored in one direction.
4960 When max is set to SOURCE, edje will enforce the part to be
4961 not more than the original image size. The part must be an
4966 st_collections_group_parts_part_description_max(void)
4968 check_min_arg_count(1);
4971 current_desc->max.w = parse_float_range(0, -1.0, 0x7fffffff);
4972 current_desc->max.h = parse_float_range(1, -1.0, 0x7fffffff);
4977 if (current_part->type != EDJE_PART_TYPE_IMAGE ||
4978 !tmp || strcmp(tmp, "SOURCE") != 0)
4980 ERR("parse error %s:%i. "
4981 "Only IMAGE part can have a max: SOURCE; defined",
4986 current_desc->max.limit = EINA_TRUE;
4997 Restricts resizing of each dimension to values divisibles by its value.
4998 This causes the part to jump from value to value while resizing. The
4999 default value is "0 0" disabling stepping.
5003 st_collections_group_parts_part_description_step(void)
5007 current_desc->step.x = parse_float_range(0, 0, 0x7fffffff);
5008 current_desc->step.y = parse_float_range(1, 0, 0x7fffffff);
5018 Normally width and height can be resized to any values independently.
5019 The aspect property forces the width to height ratio to be kept between
5020 the minimum and maximum set. For example, "1.0 1.0" will increase the
5021 width a pixel for every pixel added to height. The default value is
5022 "0.0 0.0" disabling aspect.
5026 st_collections_group_parts_part_description_aspect(void)
5030 current_desc->aspect.min = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
5031 current_desc->aspect.max = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
5041 Sets the scope of the "aspect" property to a given dimension. Available
5042 options are BOTH, VERTICAL, HORIZONTAL, SOURCE and NONE
5046 st_collections_group_parts_part_description_aspect_preference(void)
5050 current_desc->aspect.prefer = parse_enum(0,
5051 "NONE", EDJE_ASPECT_PREFER_NONE,
5052 "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL,
5053 "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL,
5054 "BOTH", EDJE_ASPECT_PREFER_BOTH,
5055 "SOURCE", EDJE_ASPECT_PREFER_SOURCE,
5066 The part will use the color values of the named color_class, these
5067 values can be overrided by the "color", "color2" and "color3"
5068 properties set below.
5072 st_collections_group_parts_part_description_color_class(void)
5076 if (current_part->type == EDJE_PART_TYPE_SPACER)
5078 ERR("parse error %s:%i. SPACER part can't have a color defined",
5083 current_desc->color_class = parse_str(0);
5091 [red] [green] [blue] [alpha]
5093 Sets the main color to the specified values (between 0 and 255).
5097 st_collections_group_parts_part_description_color(void)
5101 if (current_part->type == EDJE_PART_TYPE_SPACER)
5103 ERR("parse error %s:%i. SPACER part can't have a color defined",
5108 current_desc->color.r = parse_int_range(0, 0, 255);
5109 current_desc->color.g = parse_int_range(1, 0, 255);
5110 current_desc->color.b = parse_int_range(2, 0, 255);
5111 current_desc->color.a = parse_int_range(3, 0, 255);
5119 [red] [green] [blue] [alpha]
5121 Sets the text shadow color to the specified values (0 to 255).
5125 st_collections_group_parts_part_description_color2(void)
5129 if (current_part->type == EDJE_PART_TYPE_SPACER)
5131 ERR("parse error %s:%i. SPACER part can't have a color defined",
5136 current_desc->color2.r = parse_int_range(0, 0, 255);
5137 current_desc->color2.g = parse_int_range(1, 0, 255);
5138 current_desc->color2.b = parse_int_range(2, 0, 255);
5139 current_desc->color2.a = parse_int_range(3, 0, 255);
5147 [red] [green] [blue] [alpha]
5149 Sets the text outline color to the specified values (0 to 255).
5153 st_collections_group_parts_part_description_color3(void)
5155 Edje_Part_Collection *pc;
5156 Edje_Part_Description_Text *ed;
5160 pc = eina_list_data_get(eina_list_last(edje_collections));
5162 if (current_part->type != EDJE_PART_TYPE_TEXT
5163 && current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
5165 ERR("Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.",
5166 current_part->name, pc->part);
5170 ed = (Edje_Part_Description_Text*)current_desc;
5172 ed->text.color3.r = parse_int_range(0, 0, 255);
5173 ed->text.color3.g = parse_int_range(1, 0, 255);
5174 ed->text.color3.b = parse_int_range(2, 0, 255);
5175 ed->text.color3.a = parse_int_range(3, 0, 255);
5197 The rel1 and rel2 blocks are used to define the position of each corner
5198 of the part's container. With rel1 being the left-up corner and rel2
5199 being the right-down corner.
5207 Moves a corner to a relative position inside the container of the
5208 relative "to" part. Values from 0.0 (0%, beginning) to 1.0 (100%, end)
5213 st_collections_group_parts_part_description_rel1_relative(void)
5217 current_desc->rel1.relative_x = FROM_DOUBLE(parse_float(0));
5218 current_desc->rel1.relative_y = FROM_DOUBLE(parse_float(1));
5228 Affects the corner position a fixed number of pixels along each axis.
5232 st_collections_group_parts_part_description_rel1_offset(void)
5236 current_desc->rel1.offset_x = parse_int(0);
5237 current_desc->rel1.offset_y = parse_int(1);
5245 [another part's name]
5247 Causes a corner to be positioned relatively to another part's
5248 container. Setting to "" will un-set this value for inherited
5253 st_collections_group_parts_part_description_rel1_to_set(const char *name)
5255 Edje_Part_Collection *pc;
5256 pc = eina_list_data_get(eina_list_last(edje_collections));
5257 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_x));
5258 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_y));
5262 st_collections_group_parts_part_description_rel1_to(void)
5268 name = parse_str(0);
5269 st_collections_group_parts_part_description_rel1_to_set(name);
5279 [another part's name]
5281 Causes a corner to be positioned relatively to the X axis of another
5282 part's container. Simply put affects the first parameter of "relative".
5283 Setting to "" will un-set this value for inherited parts.
5287 st_collections_group_parts_part_description_rel1_to_x(void)
5289 Edje_Part_Collection *pc;
5293 pc = eina_list_data_get(eina_list_last(edje_collections));
5298 name = parse_str(0);
5299 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_x));
5309 [another part's name]
5311 Causes a corner to be positioned relatively to the Y axis of another
5312 part's container. Simply put, affects the second parameter of
5313 "relative". Setting to "" will un-set this value for inherited parts.
5317 st_collections_group_parts_part_description_rel1_to_y(void)
5319 Edje_Part_Collection *pc;
5323 pc = eina_list_data_get(eina_list_last(edje_collections));
5328 name = parse_str(0);
5329 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_y));
5335 st_collections_group_parts_part_description_rel2_relative(void)
5339 current_desc->rel2.relative_x = FROM_DOUBLE(parse_float(0));
5340 current_desc->rel2.relative_y = FROM_DOUBLE(parse_float(1));
5344 st_collections_group_parts_part_description_rel2_offset(void)
5348 current_desc->rel2.offset_x = parse_int(0);
5349 current_desc->rel2.offset_y = parse_int(1);
5353 st_collections_group_parts_part_description_rel2_to_set(const char *name)
5355 Edje_Part_Collection *pc;
5356 pc = eina_list_data_get(eina_list_last(edje_collections));
5357 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_x));
5358 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_y));
5362 st_collections_group_parts_part_description_rel2_to(void)
5368 name = parse_str(0);
5369 st_collections_group_parts_part_description_rel2_to_set(name);
5375 st_collections_group_parts_part_description_rel2_to_x(void)
5377 Edje_Part_Collection *pc;
5381 pc = eina_list_data_get(eina_list_last(edje_collections));
5386 name = parse_str(0);
5387 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_x));
5393 st_collections_group_parts_part_description_rel2_to_y(void)
5395 Edje_Part_Collection *pc;
5399 pc = eina_list_data_get(eina_list_last(edje_collections));
5404 name = parse_str(0);
5405 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_y));
5411 @edcsection{description_image,Image state description sub blocks}
5422 normal: "filename.ext";
5423 tween: "filename2.ext";
5425 tween: "filenameN.ext";
5426 border: left right top bottom;
5427 middle: 0/1/NONE/DEFAULT/SOLID;
5439 Name of image to be used as previously declared in the images block.
5440 In an animation, this is the first and last image displayed. It's
5441 required in any image part
5445 st_collections_group_parts_part_description_image_normal(void)
5447 Edje_Part_Description_Image *ed;
5451 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5453 ERR("parse error %s:%i. "
5454 "image attributes in non-IMAGE part.",
5459 ed = (Edje_Part_Description_Image*) current_desc;
5464 name = parse_str(0);
5465 data_queue_image_remove(&(ed->image.id), &(ed->image.set));
5466 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set));
5478 Name of an image to be used in an animation loop, an image block can
5479 have none, one or multiple tween declarations. Images are displayed in
5480 the order they are listed, during the transition to the state they are
5481 declared in; the "normal" image is the final state.
5485 st_collections_group_parts_part_description_image_tween(void)
5487 Edje_Part_Description_Image *ed;
5491 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5493 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5498 ed = (Edje_Part_Description_Image*) current_desc;
5502 Edje_Part_Image_Id *iid;
5504 iid = mem_alloc(SZ(Edje_Part_Image_Id));
5505 ed->image.tweens_count++;
5506 ed->image.tweens = realloc(ed->image.tweens,
5507 sizeof (Edje_Part_Image_Id*) * ed->image.tweens_count);
5508 ed->image.tweens[ed->image.tweens_count - 1] = iid;
5509 name = parse_str(0);
5510 data_queue_image_remove(&(iid->id), &(iid->set));
5511 data_queue_image_lookup(name, &(iid->id), &(iid->set));
5521 [left] [right] [top] [bottom]
5523 If set, the area (in pixels) of each side of the image will be
5524 displayed as a fixed size border, from the side -> inwards, preventing
5525 the corners from being changed on a resize.
5529 st_collections_group_parts_part_description_image_border(void)
5531 Edje_Part_Description_Image *ed;
5535 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5537 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5542 ed = (Edje_Part_Description_Image*) current_desc;
5544 ed->image.border.l = parse_int_range(0, 0, 0x7fffffff);
5545 ed->image.border.r = parse_int_range(1, 0, 0x7fffffff);
5546 ed->image.border.t = parse_int_range(2, 0, 0x7fffffff);
5547 ed->image.border.b = parse_int_range(3, 0, 0x7fffffff);
5555 0, 1, NONE, DEFAULT, SOLID
5557 If border is set, this value tells Edje if the rest of the
5558 image (not covered by the defined border) will be displayed or not
5559 or be assumed to be solid (without alpha). The default is 1/DEFAULT.
5563 st_collections_group_parts_part_description_image_middle(void)
5565 Edje_Part_Description_Image *ed;
5569 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5571 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5576 ed = (Edje_Part_Description_Image*) current_desc;
5578 ed->image.border.no_fill = parse_enum(0,
5592 0.0 or bigger (0.0 or 1.0 to turn it off)
5594 If border scaling is enabled then normally the OUTPUT border sizes
5595 (e.g. if 3 pixels on the left edge are set as a border, then normally
5596 at scale 1.0, those 3 columns will always be the exact 3 columns of
5597 output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge
5598 into a single column). This property multiplies the input scale
5599 factor by this multiplier, allowing the creation of "supersampled"
5600 borders to make much higher resolution outputs possible by always using
5601 the highest resolution artwork and then runtime scaling it down.
5605 st_collections_group_parts_part_description_image_border_scale_by(void)
5607 Edje_Part_Description_Image *ed;
5611 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5613 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5618 ed = (Edje_Part_Description_Image*) current_desc;
5620 ed->image.border.scale_by = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
5630 If border is set, this value tells Edje if the border should be scaled
5631 by the object/global edje scale factors
5635 st_collections_group_parts_part_description_image_border_scale(void)
5637 Edje_Part_Description_Image *ed;
5641 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5643 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5648 ed = (Edje_Part_Description_Image*) current_desc;
5650 ed->image.border.scale = parse_enum(0,
5661 0, NONE, DYNAMIC, STATIC
5663 Sets the evas image scale hint letting the engine more effectively save
5664 cached copies of the scaled image if it makes sense
5668 st_collections_group_parts_part_description_image_scale_hint(void)
5670 Edje_Part_Description_Image *ed;
5674 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5676 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5681 ed = (Edje_Part_Description_Image*) current_desc;
5683 ed->image.scale_hint = parse_enum(0,
5684 "NONE", EVAS_IMAGE_SCALE_HINT_NONE,
5685 "DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
5686 "STATIC", EVAS_IMAGE_SCALE_HINT_STATIC,
5687 "0", EVAS_IMAGE_SCALE_HINT_NONE,
5701 relative: X-axis Y-axis;
5702 offset: X-axis Y-axis;
5705 relative: width height;
5706 offset: width height;
5712 The fill method is an optional block that defines the way an IMAGE part
5713 is going to be displayed inside its container.
5714 It can be used for tiling (repeating the image) or displaying only
5715 part of an image. See @ref evas_object_image_fill_set() documentation
5724 The smooth property takes a boolean value to decide if the image will
5725 be smoothed on scaling (1) or not (0). The default value is 1.
5729 st_collections_group_parts_part_description_fill_smooth(void)
5731 Edje_Part_Description_Spec_Fill *fill;
5735 switch (current_part->type)
5737 case EDJE_PART_TYPE_IMAGE:
5739 Edje_Part_Description_Image *ed;
5741 ed = (Edje_Part_Description_Image*) current_desc;
5743 fill = &ed->image.fill;
5746 case EDJE_PART_TYPE_PROXY:
5748 Edje_Part_Description_Proxy *ed;
5750 ed = (Edje_Part_Description_Proxy*) current_desc;
5752 fill = &ed->proxy.fill;
5757 ERR("parse error %s:%i. "
5758 "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
5759 file_in, line - 1, current_part->name, current_part->type);
5764 fill->smooth = parse_bool(0);
5779 st_collections_group_parts_part_description_fill_spread(void)
5782 Edje_Part_Collection *pc;
5784 Edje_Part_Description_Image *ed;
5789 /* XXX this will need to include IMAGES when spread support is added to evas images */
5791 ERR("parse error %s:%i. fill.spread not supported yet.",
5797 pc = eina_list_data_get(eina_list_last(edje_collections));
5799 ep = pc->parts[pc->parts_count - 1];
5801 if (ep->type != EDJE_PART_TYPE_IMAGE)
5803 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5808 ed = (Edje_Part_Description_Image*) ep->default_desc;
5809 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
5811 ed->image.fill.spread = parse_int_range(0, 0, 1);
5827 st_collections_group_parts_part_description_fill_type(void)
5829 Edje_Part_Description_Spec_Fill *fill;
5833 switch (current_part->type)
5835 case EDJE_PART_TYPE_IMAGE:
5837 Edje_Part_Description_Image *ed;
5839 ed = (Edje_Part_Description_Image*) current_desc;
5841 fill = &ed->image.fill;
5844 case EDJE_PART_TYPE_PROXY:
5846 Edje_Part_Description_Proxy *ed;
5848 ed = (Edje_Part_Description_Proxy*) current_desc;
5850 fill = &ed->proxy.fill;
5855 ERR("parse error %s:%i. "
5856 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5862 fill->type = parse_enum(0,
5863 "SCALE", EDJE_FILL_TYPE_SCALE,
5864 "TILE", EDJE_FILL_TYPE_TILE,
5886 The origin block is used to place the starting point, inside the
5887 displayed element, that will be used to render the tile. By default,
5888 the origin is set at the element's left-up corner.
5896 Sets the starting point relatively to displayed element's content.
5900 st_collections_group_parts_part_description_fill_origin_relative(void)
5902 Edje_Part_Description_Spec_Fill *fill;
5906 switch (current_part->type)
5908 case EDJE_PART_TYPE_IMAGE:
5910 Edje_Part_Description_Image *ed;
5912 ed = (Edje_Part_Description_Image*) current_desc;
5914 fill = &ed->image.fill;
5917 case EDJE_PART_TYPE_PROXY:
5919 Edje_Part_Description_Proxy *ed;
5921 ed = (Edje_Part_Description_Proxy*) current_desc;
5923 fill = &ed->proxy.fill;
5928 ERR("parse error %s:%i. "
5929 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5935 fill->pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
5936 fill->pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
5946 Affects the starting point a fixed number of pixels along each axis.
5950 st_collections_group_parts_part_description_fill_origin_offset(void)
5952 Edje_Part_Description_Spec_Fill *fill;
5956 switch (current_part->type)
5958 case EDJE_PART_TYPE_IMAGE:
5960 Edje_Part_Description_Image *ed;
5962 ed = (Edje_Part_Description_Image*) current_desc;
5964 fill = &ed->image.fill;
5967 case EDJE_PART_TYPE_PROXY:
5969 Edje_Part_Description_Proxy *ed;
5971 ed = (Edje_Part_Description_Proxy*) current_desc;
5973 fill = &ed->proxy.fill;
5978 ERR("parse error %s:%i. "
5979 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5985 fill->pos_abs_x = parse_int(0);
5986 fill->pos_abs_y = parse_int(1);
6007 The size block defines the tile size of the content that will be
6016 Takes a pair of decimal values that represent the percentual value
6017 of the original size of the element. For example, "0.5 0.5" represents
6018 half the size, while "2.0 2.0" represents the double. The default
6023 st_collections_group_parts_part_description_fill_size_relative(void)
6025 Edje_Part_Description_Spec_Fill *fill;
6029 switch (current_part->type)
6031 case EDJE_PART_TYPE_IMAGE:
6033 Edje_Part_Description_Image *ed;
6035 ed = (Edje_Part_Description_Image*) current_desc;
6037 fill = &ed->image.fill;
6040 case EDJE_PART_TYPE_PROXY:
6042 Edje_Part_Description_Proxy *ed;
6044 ed = (Edje_Part_Description_Proxy*) current_desc;
6046 fill = &ed->proxy.fill;
6051 ERR("parse error %s:%i. "
6052 "image and proxy attributes in non-IMAGE, non-PROXY part.",
6058 fill->rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
6059 fill->rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
6069 Affects the size of the tile a fixed number of pixels along each axis.
6073 st_collections_group_parts_part_description_fill_size_offset(void)
6075 Edje_Part_Description_Spec_Fill *fill;
6079 switch (current_part->type)
6081 case EDJE_PART_TYPE_IMAGE:
6083 Edje_Part_Description_Image *ed;
6085 ed = (Edje_Part_Description_Image*) current_desc;
6087 fill = &ed->image.fill;
6090 case EDJE_PART_TYPE_PROXY:
6092 Edje_Part_Description_Proxy *ed;
6094 ed = (Edje_Part_Description_Proxy*) current_desc;
6096 fill = &ed->proxy.fill;
6101 ERR("parse error %s:%i. "
6102 "image and proxy attributes in non-IMAGE, non-PROXY part.",
6108 fill->abs_x = parse_int(0);
6109 fill->abs_y = parse_int(1);
6114 @edcsection{description_text,Text state description sub blocks}
6127 text: "some string of text to display";
6130 text_class: "class_name";
6131 fit: horizontal vertical;
6132 min: horizontal vertical;
6133 max: horizontal vertical;
6134 align: X-axis Y-axis;
6135 source: "part_name";
6136 text_source: "text_part_name";
6149 [a string of text, or nothing]
6151 Sets the default content of a text part, normally the application is
6152 the one changing its value.
6156 st_collections_group_parts_part_description_text_text(void)
6158 Edje_Part_Description_Text *ed;
6162 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6163 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6165 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6170 ed = (Edje_Part_Description_Text*) current_desc;
6176 if (!is_param(i)) break;
6181 str = realloc(str, strlen(str) + strlen(s) + 1);
6186 ed->text.text.str = str;
6197 Similar to color_class, this is the name used by the application
6198 to alter the font family and size at runtime.
6202 st_collections_group_parts_part_description_text_text_class(void)
6204 Edje_Part_Description_Text *ed;
6208 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6209 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6211 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6216 ed = (Edje_Part_Description_Text*) current_desc;
6218 ed->text.text_class = parse_str(0);
6229 This sets the font family to one of the aliases set up in the "fonts"
6230 block. Can be overrided by the application.
6234 st_collections_group_parts_part_description_text_font(void)
6236 Edje_Part_Description_Text *ed;
6240 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6241 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6243 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6248 ed = (Edje_Part_Description_Text*) current_desc;
6250 ed->text.font.str = parse_str(0);
6261 Causes the part to use the default style and tags defined in the
6262 "style" block with the specified name.
6266 st_collections_group_parts_part_description_text_style(void)
6268 Edje_Part_Description_Text *ed;
6272 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6273 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6275 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6280 ed = (Edje_Part_Description_Text*) current_desc;
6282 ed->text.style.str = parse_str(0);
6291 [the replacement character string]
6293 If this is a textblock and is in PASSWORD mode this string is used
6294 to replace every character to hide the details of the entry. Normally
6295 you would use a "*", but you can use anything you like.
6299 st_collections_group_parts_part_description_text_repch(void)
6301 Edje_Part_Description_Text *ed;
6305 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6306 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6308 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6313 ed = (Edje_Part_Description_Text*) current_desc;
6315 ed->text.repch.str = parse_str(0);
6324 [font size in points (pt)]
6326 Sets the default font size for the text part. Can be overrided by the
6331 st_collections_group_parts_part_description_text_size(void)
6333 Edje_Part_Description_Text *ed;
6337 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6338 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6340 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6345 ed = (Edje_Part_Description_Text*)current_desc;
6347 ed->text.size = parse_int_range(0, 0, 255);
6356 [font min size in points (pt)] [font max size in points (pt)]
6358 Sets the allowed font size for the text part. Setting min and max to 0
6359 means we won't restrict the sizing (default).
6364 st_collections_group_parts_part_description_text_size_range(void)
6366 Edje_Part_Description_Text *ed;
6370 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6371 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6373 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6378 ed = (Edje_Part_Description_Text*) current_desc;
6380 ed->text.size_range_min = parse_int_range(0, 0, 255);
6381 ed->text.size_range_max = parse_int_range(1, 0, 255);
6382 if (ed->text.size_range_min > ed->text.size_range_max)
6384 ERR("parse error %s:%i. min size is bigger than max size.",
6396 [horizontal] [vertical]
6398 When any of the parameters is set to 1 edje will resize the text for it
6399 to fit in it's container. Both are disabled by default.
6403 st_collections_group_parts_part_description_text_fit(void)
6405 Edje_Part_Description_Text *ed;
6409 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6410 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6412 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6417 ed = (Edje_Part_Description_Text*) current_desc;
6419 ed->text.fit_x = parse_bool(0);
6420 ed->text.fit_y = parse_bool(1);
6429 [horizontal] [vertical]
6431 When any of the parameters is enabled (1) it forces the minimum size of
6432 the container to be equal to the minimum size of the text. The default
6437 st_collections_group_parts_part_description_text_min(void)
6439 Edje_Part_Description_Text *ed;
6443 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6444 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6446 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6451 ed = (Edje_Part_Description_Text*)current_desc;
6453 ed->text.min_x = parse_bool(0);
6454 ed->text.min_y = parse_bool(1);
6463 [horizontal] [vertical]
6465 When any of the parameters is enabled (1) it forces the maximum size of
6466 the container to be equal to the maximum size of the text. The default
6471 st_collections_group_parts_part_description_text_max(void)
6473 Edje_Part_Description_Text *ed;
6477 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6478 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6480 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6485 ed = (Edje_Part_Description_Text*) current_desc;
6487 ed->text.max_x = parse_bool(0);
6488 ed->text.max_y = parse_bool(1);
6497 [horizontal] [vertical]
6499 Change the position of the point of balance inside the container. The
6500 default value is 0.5 0.5.
6504 st_collections_group_parts_part_description_text_align(void)
6506 Edje_Part_Description_Text *ed;
6510 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6511 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6513 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6518 ed = (Edje_Part_Description_Text*) current_desc;
6520 ed->text.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6521 ed->text.align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
6530 [another TEXT part's name]
6532 Causes the part to use the text properties (like font and size) of
6533 another part and update them as they change.
6537 st_collections_group_parts_part_description_text_source(void)
6539 Edje_Part_Collection *pc;
6540 Edje_Part_Description_Text *ed;
6544 pc = eina_list_data_get(eina_list_last(edje_collections));
6546 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6547 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6549 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6554 ed = (Edje_Part_Description_Text*) current_desc;
6559 name = parse_str(0);
6560 data_queue_part_lookup(pc, name, &(ed->text.id_source));
6571 [another TEXT part's name]
6573 Causes the part to display the text content of another part and update
6574 them as they change.
6578 st_collections_group_parts_part_description_text_text_source(void)
6580 Edje_Part_Collection *pc;
6581 Edje_Part_Description_Text *ed;
6585 pc = eina_list_data_get(eina_list_last(edje_collections));
6587 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6588 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6590 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6595 ed = (Edje_Part_Description_Text*) current_desc;
6600 name = parse_str(0);
6601 data_queue_part_lookup(pc, name, &(ed->text.id_text_source));
6614 Used to balance the text in a relative point from 0.0 to 1.0, this
6615 point is the last section of the string to be cut out in case of a
6616 resize that is smaller than the text itself. The default value is 0.0.
6620 st_collections_group_parts_part_description_text_elipsis(void)
6622 Edje_Part_Description_Text *ed;
6626 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6627 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6629 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6634 ed = (Edje_Part_Description_Text*) current_desc;
6636 ed->text.elipsis = parse_float_range(0, 0.0, 1.0);
6641 @edcsection{description_box,Box state description sub blocks}
6663 A box block can contain other objects and display them in different
6664 layouts, any of the predefined set, or a custom one, set by the
6671 [primary layout] [fallback layout]
6673 Sets the layout for the box:
6674 @li horizontal (default)
6676 @li horizontal_homogeneous
6677 @li vertical_homogeneous
6678 @li horizontal_max (homogeneous to the max sized child)
6683 @li some_other_custom_layout_set_by_the_application
6684 You could set a custom layout as fallback, it makes very
6685 very little sense though, and if that one fails, it will
6686 default to horizontal.
6692 [horizontal] [vertical]
6694 Change the position of the point of balance inside the container. The
6695 default value is 0.5 0.5.
6701 [horizontal] [vertical]
6703 Sets the space between cells in pixels. Defaults to 0 0.
6709 [horizontal] [vertical]
6711 When any of the parameters is enabled (1) it forces the minimum size of
6712 the box to be equal to the minimum size of the items. The default
6716 static void st_collections_group_parts_part_description_box_layout(void)
6718 Edje_Part_Description_Box *ed;
6720 check_min_arg_count(1);
6722 if (current_part->type != EDJE_PART_TYPE_BOX)
6724 ERR("parse error %s:%i. box attributes in non-BOX part.",
6729 ed = (Edje_Part_Description_Box*) current_desc;
6731 ed->box.layout = parse_str(0);
6733 ed->box.alt_layout = parse_str(1);
6736 static void st_collections_group_parts_part_description_box_align(void)
6738 Edje_Part_Description_Box *ed;
6742 if (current_part->type != EDJE_PART_TYPE_BOX)
6744 ERR("parse error %s:%i. box attributes in non-BOX part.",
6749 ed = (Edje_Part_Description_Box*) current_desc;
6751 ed->box.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6752 ed->box.align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
6755 static void st_collections_group_parts_part_description_box_padding(void)
6757 Edje_Part_Description_Box *ed;
6761 if (current_part->type != EDJE_PART_TYPE_BOX)
6763 ERR("parse error %s:%i. box attributes in non-BOX part.",
6768 ed = (Edje_Part_Description_Box*) current_desc;
6770 ed->box.padding.x = parse_int_range(0, 0, 0x7fffffff);
6771 ed->box.padding.y = parse_int_range(1, 0, 0x7fffffff);
6775 st_collections_group_parts_part_description_box_min(void)
6777 Edje_Part_Description_Box *ed;
6781 if (current_part->type != EDJE_PART_TYPE_BOX)
6783 ERR("parse error %s:%i. box attributes in non-BOX part.",
6788 ed = (Edje_Part_Description_Box*) current_desc;
6790 ed->box.min.h = parse_bool(0);
6791 ed->box.min.v = parse_bool(1);
6796 @edcsection{description_table,Table state description sub blocks}
6818 A table block can contain other objects packed in multiple columns
6819 and rows, and each item can span across more than one column and/or
6828 Sets the homogeneous mode for the table:
6837 [horizontal] [vertical]
6839 Change the position of the point of balance inside the container. The
6840 default value is 0.5 0.5.
6846 [horizontal] [vertical]
6848 Sets the space between cells in pixels. Defaults to 0 0.
6854 [horizontal] [vertical]
6856 When any of the parameters is enabled (1) it forces the minimum size of
6857 the table to be equal to the minimum size of the items. The default
6861 static void st_collections_group_parts_part_description_table_homogeneous(void)
6863 Edje_Part_Description_Table *ed;
6865 check_min_arg_count(1);
6867 if (current_part->type != EDJE_PART_TYPE_TABLE)
6869 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6874 ed = (Edje_Part_Description_Table*) current_desc;
6876 ed->table.homogeneous = parse_enum(0,
6877 "NONE", EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE,
6878 "TABLE", EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE,
6879 "ITEM", EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM,
6883 static void st_collections_group_parts_part_description_table_align(void)
6885 Edje_Part_Description_Table *ed;
6889 if (current_part->type != EDJE_PART_TYPE_TABLE)
6891 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6896 ed = (Edje_Part_Description_Table*) current_desc;
6898 ed->table.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6899 ed->table.align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
6902 static void st_collections_group_parts_part_description_table_padding(void)
6904 Edje_Part_Description_Table *ed;
6908 if (current_part->type != EDJE_PART_TYPE_TABLE)
6910 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6915 ed = (Edje_Part_Description_Table*) current_desc;
6917 ed->table.padding.x = parse_int_range(0, 0, 0x7fffffff);
6918 ed->table.padding.y = parse_int_range(1, 0, 0x7fffffff);
6922 st_collections_group_parts_part_description_table_min(void)
6924 Edje_Part_Description_Table *ed;
6928 if (current_part->type != EDJE_PART_TYPE_TABLE)
6930 ERR("parse error %s:%i. box attributes in non-TABLE part.",
6935 ed = (Edje_Part_Description_Table*) current_desc;
6937 ed->table.min.h = parse_bool(0);
6938 ed->table.min.v = parse_bool(1);
6942 @edcsection{description_map,Map state description sub blocks}
6953 perspective: "name";
6974 [another part's name]
6976 This sets the part that is used as the "perspective point" for giving
6977 a part a "3d look". The perspective point should have a perspective
6978 section that provides zplane and focal properties. The center of this
6979 part will be used as the focal point, so size, color and visibility
6980 etc. are not relevant just center point, zplane and focal are used.
6981 This also implicitly enables perspective transforms (see the on
6982 parameter for the map section).
6986 st_collections_group_parts_part_description_map_perspective(void)
6988 Edje_Part_Collection *pc;
6992 pc = eina_list_data_get(eina_list_last(edje_collections));
6997 name = parse_str(0);
6998 data_queue_part_lookup(pc, name, &(current_desc->map.id_persp));
7002 current_desc->map.persp_on = 1;
7010 [another part's name]
7012 This sets the part that is used as the "light" for calculating the
7013 brightness (based on how directly the part's surface is facing the
7014 light source point). Like the perspective point part, the center point
7015 is used and zplane is used for the z position (0 being the zero-plane
7016 where all 2D objects normally live) and positive values being further
7017 away into the distance. The light part color is used as the light
7018 color (alpha not used for light color). The color2 color is used for
7019 the ambient lighting when calculating brightness (alpha also not
7024 st_collections_group_parts_part_description_map_light(void)
7026 Edje_Part_Collection *pc;
7030 pc = eina_list_data_get(eina_list_last(edje_collections));
7035 name = parse_str(0);
7036 data_queue_part_lookup(pc, name, &(current_desc->map.id_light));
7048 This enables mapping for the part. Default is 0.
7052 st_collections_group_parts_part_description_map_on(void)
7056 current_desc->map.on = parse_bool(0);
7066 This enable smooth map rendering. This may be linear interpolation,
7067 anisotropic filtering or anything the engine decides is "smooth".
7068 This is a best-effort hint and may not produce precisely the same
7069 results in all engines and situations. Default is 1
7073 st_collections_group_parts_part_description_map_smooth(void)
7077 current_desc->map.smooth = parse_bool(0);
7087 This enable alpha channel when map rendering. Default is 1.
7091 st_collections_group_parts_part_description_map_alpha(void)
7095 current_desc->map.alpha = parse_bool(0);
7105 This enables backface culling (when the rotated part that normally
7106 faces the camera is facing away after being rotated etc.). This means
7107 that the object will be hidden when "backface culled".
7111 st_collections_group_parts_part_description_map_backface_cull(void)
7115 current_desc->map.backcull = parse_bool(0);
7125 Enable perspective when rotating even without a perspective point object.
7126 This would use perspective set for the object itself or for the
7127 canvas as a whole as the global perspective with
7128 edje_perspective_set() and edje_perspective_global_set().
7132 st_collections_group_parts_part_description_map_perspective_on(void)
7136 current_desc->map.persp_on = parse_bool(0);
7154 Rotates the part, optionally with the center on another part.
7160 [another part's name]
7162 This sets the part that is used as the center of rotation when
7163 rotating the part with this description. The part's center point
7164 is used as the rotation center when applying rotation around the
7165 x, y and z axes. If no center is given, the parts original center
7166 itself is used for the rotation center.
7170 st_collections_group_parts_part_description_map_rotation_center(void)
7172 Edje_Part_Collection *pc;
7176 pc = eina_list_data_get(eina_list_last(edje_collections));
7181 name = parse_str(0);
7182 data_queue_part_lookup(pc, name, &(current_desc->map.rot.id_center));
7194 This sets the rotation around the x axis of the part considering
7195 the center set. In degrees.
7199 st_collections_group_parts_part_description_map_rotation_x(void)
7203 current_desc->map.rot.x = FROM_DOUBLE(parse_float(0));
7213 This sets the rotation around the y axis of the part considering
7214 the center set. In degrees.
7218 st_collections_group_parts_part_description_map_rotation_y(void)
7222 current_desc->map.rot.y = FROM_DOUBLE(parse_float(0));
7232 This sets the rotation around the z axis of the part considering
7233 the center set. In degrees.
7237 st_collections_group_parts_part_description_map_rotation_z(void)
7241 current_desc->map.rot.z = FROM_DOUBLE(parse_float(0));
7258 Adds focal and plane perspective to the part. Active if perspective_on is true.
7259 Must be provided if the part is being used by other part as it's perspective target.
7267 This sets the z value that will not be scaled. Normally this is 0 as
7268 that is the z distance that all objects are at normally.
7272 st_collections_group_parts_part_description_perspective_zplane(void)
7276 current_desc->persp.zplane = parse_int(0);
7287 This sets the distance from the focal z plane (zplane) and the
7288 camera - i.e. very much equating to focal length of the camera
7292 st_collections_group_parts_part_description_perspective_focal(void)
7296 current_desc->persp.focal = parse_int_range(0, 1, 0x7fffffff);
7301 @edcsection{description_params,Params state description sub blocks}
7313 double: "other_name" 0.0;
7314 string: "another_name" "some text";
7316 choice: "some_name" "value";
7321 Set parameters for EXTERNAL parts. The value overwrites previous
7322 definitions with the same name.
7326 _st_collections_group_parts_part_description_params(Edje_External_Param_Type type)
7328 Edje_Part_Description_External *ed;
7329 Edje_External_Param *param;
7336 if (current_part->type != EDJE_PART_TYPE_EXTERNAL)
7338 ERR("parse error %s:%i. params in non-EXTERNAL part.",
7343 ed = (Edje_Part_Description_External*) current_desc;
7345 name = parse_str(0);
7347 /* if a param with this name already exists, overwrite it */
7348 EINA_LIST_FOREACH(ed->external_params, l, param)
7350 if (!strcmp(param->name, name))
7359 param = mem_alloc(SZ(Edje_External_Param));
7370 case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
7371 case EDJE_EXTERNAL_PARAM_TYPE_INT:
7372 param->i = parse_int(1);
7374 case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
7375 param->d = parse_float(1);
7377 case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
7378 case EDJE_EXTERNAL_PARAM_TYPE_STRING:
7379 param->s = parse_str(1);
7382 ERR("parse error %s:%i. Invalid param type.",
7388 ed->external_params = eina_list_append(ed->external_params, param);
7396 [param_name] [int_value]
7398 Adds an integer parameter for an external object
7402 st_collections_group_parts_part_description_params_int(void)
7404 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_INT);
7412 [param_name] [double_value]
7414 Adds a double parameter for an external object
7418 st_collections_group_parts_part_description_params_double(void)
7420 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_DOUBLE);
7428 [param_name] [string_value]
7430 Adds a string parameter for an external object
7434 st_collections_group_parts_part_description_params_string(void)
7436 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_STRING);
7444 [param_name] [bool_value]
7446 Adds an boolean parameter for an external object. Value must be 0 or 1.
7450 st_collections_group_parts_part_description_params_bool(void)
7452 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_BOOL);
7460 [param_name] [choice_string]
7462 Adds a choice parameter for an external object. The possible
7463 choice values are defined by external type at their register time
7464 and will be validated at runtime.
7468 st_collections_group_parts_part_description_params_choice(void)
7470 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_CHOICE);
7475 @edcsection{program, Program block}
7487 name: "programname";
7488 signal: "signalname";
7490 filter: "partname" "statename";
7492 action: STATE_SET "statename" state_value;
7493 transition: LINEAR 0.5;
7495 target: "anotherpart";
7496 after: "programname";
7497 after: "anotherprogram";
7503 Programs define how your interface reacts to events.
7504 Programs can change the state of parts, react to events or trigger
7509 ob_collections_group_programs_program(void)
7511 Edje_Part_Collection *pc;
7513 Edje_Program_Parser *epp;
7515 pc = eina_list_data_get(eina_list_last(edje_collections));
7517 ep = mem_alloc(SZ(Edje_Program_Parser));
7519 ep->tween.mode = EDJE_TWEEN_MODE_LINEAR;
7521 epp = (Edje_Program_Parser *)ep;
7522 epp->can_override = EINA_FALSE;
7524 _edje_program_insert(pc, ep);
7526 current_program = ep;
7536 Symbolic name of program as a unique identifier.
7540 st_collections_group_programs_program_name(void)
7542 Edje_Part_Collection *pc;
7546 pc = eina_list_data_get(eina_list_last(edje_collections));
7547 current_program->name = parse_str(0);
7549 _edje_program_check(current_program->name, current_program, pc->programs.fnmatch, pc->programs.fnmatch_count);
7550 _edje_program_check(current_program->name, current_program, pc->programs.strcmp, pc->programs.strcmp_count);
7551 _edje_program_check(current_program->name, current_program, pc->programs.strncmp, pc->programs.strncmp_count);
7552 _edje_program_check(current_program->name, current_program, pc->programs.strrncmp, pc->programs.strrncmp_count);
7553 _edje_program_check(current_program->name, current_program, pc->programs.nocmp, pc->programs.nocmp_count);
7563 Specifies signal(s) that should cause the program to run. The signal
7564 received must match the specified source to run.
7565 Signals may be globbed, but only one signal keyword per program
7566 may be used. ex: signal: "mouse,clicked,*"; (clicking any mouse button
7567 that matches source starts program).
7571 st_collections_group_programs_program_signal(void)
7573 Edje_Part_Collection *pc;
7577 pc = eina_list_data_get(eina_list_last(edje_collections));
7579 _edje_program_remove(pc, current_program);
7580 current_program->signal = parse_str(0);
7581 _edje_program_insert(pc, current_program);
7591 Source of accepted signal. Sources may be globbed, but only one source
7592 keyword per program may be used. ex:source: "button-*"; (Signals from
7593 any part or program named "button-*" are accepted).
7597 st_collections_group_programs_program_source(void)
7599 Edje_Part_Collection *pc;
7603 pc = eina_list_data_get(eina_list_last(edje_collections));
7605 _edje_program_remove(pc, current_program);
7606 current_program->source = parse_str(0);
7607 _edje_program_insert(pc, current_program);
7617 Filter signals to be only accepted if the part [part] is in state named [state].
7618 Only one filter per program can be used. If [state] is not given, the source of
7619 the event will be used instead.
7623 st_collections_group_programs_program_filter(void)
7625 check_min_arg_count(1);
7628 current_program->filter.part = parse_str(0);
7629 current_program->filter.state = parse_str(1);
7631 current_program->filter.state = parse_str(0);
7642 Wait 'from' seconds before executing the program. And add a random
7643 number of seconds (from 0 to 'range') to the total waiting time.
7647 st_collections_group_programs_program_in(void)
7651 current_program->in.from = parse_float_range(0, 0.0, 999999999.0);
7652 current_program->in.range = parse_float_range(1, 0.0, 999999999.0);
7660 [type] [param1] [param2]
7662 Action to be performed by the program. Valid actions are: STATE_SET,
7663 ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE,
7664 FOCUS_SET, PARAM_COPY, PARAM_SET, PLAY_SAMPLE, PLAY_TONE
7665 Only one action can be specified per program. Examples:\n
7666 action: STATE_SET "statename" 0.5;\n
7667 action: ACTION_STOP;\n
7668 action: SIGNAL_EMIT "signalname" "emitter";\n
7669 action: DRAG_VAL_SET 0.5 0.0;\n
7670 action: DRAG_VAL_STEP 1.0 0.0;\n
7671 action: DRAG_VAL_PAGE 0.0 0.0;\n
7672 action: FOCUS_SET;\n
7673 action: FOCUS_OBJECT;\n
7674 action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";\n
7675 action: PARAM_SET "part" "param" "value";\n
7676 action: PLAY_SAMPLE "sample name";\n
7677 action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n
7681 st_collections_group_programs_program_action(void)
7683 Edje_Part_Collection *pc;
7687 pc = eina_list_data_get(eina_list_last(edje_collections));
7688 ep = current_program;
7689 ep->action = parse_enum(0,
7690 "STATE_SET", EDJE_ACTION_TYPE_STATE_SET,
7691 "ACTION_STOP", EDJE_ACTION_TYPE_ACTION_STOP,
7692 "SIGNAL_EMIT", EDJE_ACTION_TYPE_SIGNAL_EMIT,
7693 "DRAG_VAL_SET", EDJE_ACTION_TYPE_DRAG_VAL_SET,
7694 "DRAG_VAL_STEP", EDJE_ACTION_TYPE_DRAG_VAL_STEP,
7695 "DRAG_VAL_PAGE", EDJE_ACTION_TYPE_DRAG_VAL_PAGE,
7696 "SCRIPT", EDJE_ACTION_TYPE_SCRIPT,
7697 "FOCUS_SET", EDJE_ACTION_TYPE_FOCUS_SET,
7698 "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT,
7699 "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY,
7700 "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET,
7701 "PLAY_SAMPLE", EDJE_ACTION_TYPE_SOUND_SAMPLE,
7702 "PLAY_TONE", EDJE_ACTION_TYPE_SOUND_TONE,
7704 if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
7706 ep->state = parse_str(1);
7707 if (get_arg_count() == 1)
7710 ep->value = parse_float_range(2, 0.0, 1.0);
7712 else if (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)
7714 ep->state = parse_str(1);
7715 ep->state2 = parse_str(2);
7717 else if (ep->action == EDJE_ACTION_TYPE_SOUND_SAMPLE)
7719 ep->sample_name = parse_str(1);
7720 for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++)
7722 if (!strcmp(edje_file->sound_dir->samples[i].name, ep->sample_name))
7724 if (i == (int)(edje_file->sound_dir->samples_count - 1))
7726 ERR("No Sample name %s exist.", ep->sample_name);
7730 ep->speed = parse_float_range(2, 0.0, 10.0);
7732 else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE)
7734 ep->tone_name = parse_str(1);
7735 for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++)
7737 if (!strcmp(edje_file->sound_dir->tones[i].name, ep->tone_name))
7739 if (i == (int)(edje_file->sound_dir->tones_count - 1))
7741 ERR("No Tone name %s exist.", ep->tone_name);
7745 ep->duration = parse_float_range(2, 0.1, 10.0);
7747 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
7749 ep->value = parse_float(1);
7750 ep->value2 = parse_float(2);
7752 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
7754 ep->value = parse_float(1);
7755 ep->value2 = parse_float(2);
7757 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
7759 ep->value = parse_float(1);
7760 ep->value2 = parse_float(2);
7762 else if (ep->action == EDJE_ACTION_TYPE_PARAM_COPY)
7764 char *src_part, *dst_part;
7766 src_part = parse_str(1);
7767 ep->state = parse_str(2);
7768 dst_part = parse_str(3);
7769 ep->state2 = parse_str(4);
7771 data_queue_part_lookup(pc, src_part, &(ep->param.src));
7772 data_queue_part_lookup(pc, dst_part, &(ep->param.dst));
7777 else if (ep->action == EDJE_ACTION_TYPE_PARAM_SET)
7781 part = parse_str(1);
7782 ep->state = parse_str(2);
7783 ep->state2 = parse_str(3);
7785 data_queue_part_lookup(pc, part, &(ep->param.dst));
7791 case EDJE_ACTION_TYPE_ACTION_STOP:
7794 case EDJE_ACTION_TYPE_SCRIPT:
7795 /* this is implicitly set by script {} so this is here just for
7798 case EDJE_ACTION_TYPE_FOCUS_OBJECT:
7799 case EDJE_ACTION_TYPE_FOCUS_SET:
7802 case EDJE_ACTION_TYPE_PARAM_COPY:
7805 case EDJE_ACTION_TYPE_PARAM_SET:
7808 case EDJE_ACTION_TYPE_SOUND_SAMPLE:
7811 case EDJE_ACTION_TYPE_SOUND_TONE:
7824 [type] [length] [[interp val 1]] [[interp val 2]] [[option]]
7826 Defines how transitions occur using STATE_SET action.\n
7827 Where 'type' is the style of the transition and 'length' is a double
7828 specifying the number of seconds in which to preform the transition.\n
7829 Valid types are: LIN or LINEAR, SIN or SINUSOIDAL,
7830 ACCEL or ACCELERATE, DECEL or DECELERATE,
7831 ACCEL_FAC or ACCELERATE_FACTOR, DECEL_FAC or DECELERATE_FACTOR,
7832 SIN_FAC or SINUSOIDAL_FACTOR, DIVIS or DIVISOR_INTERP,
7835 ACCEL_FAC, DECEL_FAC and SIN_FAC need the extra optional
7836 "interp val 1" to determine the "factor" of curviness. 1.0 is the same
7837 as their non-factor counterparts, where 0.0 is equal to linear.
7838 Numbers higher than one make the curve angles steeper with a more
7839 pronounced curve point.
7841 DIVIS, BOUNCE and SPRING also require "interp val 2" in addition
7844 DIVIS uses val 1 as the initial gradient start
7845 (0.0 is horizontal, 1.0 is diagonal (linear), 2.0 is twice the
7846 gradient of linear etc.). val 2 is interpreted as an integer factor
7847 defining how much the value swings "outside" the gradient only to come
7848 back to the final resting spot at the end. 0.0 for val 2 is equivalent
7849 to linear interpolation. Note that DIVIS can exceed 1.0
7851 BOUNCE uses val 2 as the number of bounces (so its rounded down to
7852 the nearest integer value), with val 1 determining how much the
7853 bounce decays, with 0.0 giving linear decay per bounce, and higher
7854 values giving much more decay.
7856 SPRING is similar to bounce, where val 2 specifies the number of
7857 spring "swings" and val 1 specifies the decay, but it can exceed 1.0
7858 on the outer swings.
7860 Valid option is CURRENT.
7862 CURRENT is the option which causes the edje object to move from its current position.
7863 It can be used as the last parameter of any transition type. (@since 1.1.0)
7868 st_collections_group_programs_program_transition(void)
7870 check_min_arg_count(2);
7872 current_program->tween.mode = parse_enum(0,
7874 "LIN", EDJE_TWEEN_MODE_LINEAR,
7875 "SIN", EDJE_TWEEN_MODE_SINUSOIDAL,
7876 "ACCEL", EDJE_TWEEN_MODE_ACCELERATE,
7877 "DECEL", EDJE_TWEEN_MODE_DECELERATE,
7878 "ACCEL_FAC", EDJE_TWEEN_MODE_ACCELERATE_FACTOR,
7879 "DECEL_FAC", EDJE_TWEEN_MODE_DECELERATE_FACTOR,
7880 "SIN_FAC", EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR,
7881 "DIVIS", EDJE_TWEEN_MODE_DIVISOR_INTERP,
7884 "LINEAR", EDJE_TWEEN_MODE_LINEAR,
7885 "SINUSOIDAL", EDJE_TWEEN_MODE_SINUSOIDAL,
7886 "ACCELERATE", EDJE_TWEEN_MODE_ACCELERATE,
7887 "DECELERATE", EDJE_TWEEN_MODE_DECELERATE,
7888 "ACCELERATE_FACTOR", EDJE_TWEEN_MODE_ACCELERATE_FACTOR,
7889 "DECELERATE_FACTOR", EDJE_TWEEN_MODE_DECELERATE_FACTOR,
7890 "SINUSOIDAL_FACTOR", EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR,
7891 "DIVISOR_INTERP", EDJE_TWEEN_MODE_DIVISOR_INTERP,
7893 // long/full is short enough
7894 "BOUNCE", EDJE_TWEEN_MODE_BOUNCE,
7895 "SPRING", EDJE_TWEEN_MODE_SPRING,
7897 current_program->tween.time = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
7898 if ((current_program->tween.mode >= EDJE_TWEEN_MODE_LINEAR) &&
7899 (current_program->tween.mode <= EDJE_TWEEN_MODE_DECELERATE))
7901 if ((get_arg_count() == 3) && (!strcmp(parse_str(2), "CURRENT")))
7902 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7903 else if (get_arg_count() != 2)
7905 ERR("parse error %s:%i. Need 2rd parameter to set time",
7910 // the following need v1
7911 // EDJE_TWEEN_MODE_ACCELERATE_FACTOR
7912 // EDJE_TWEEN_MODE_DECELERATE_FACTOR
7913 // EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR
7914 // current_program->tween.v1
7915 else if ((current_program->tween.mode >= EDJE_TWEEN_MODE_ACCELERATE_FACTOR) &&
7916 (current_program->tween.mode <= EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR))
7918 if ((get_arg_count() == 4) && (!strcmp(parse_str(3), "CURRENT")))
7919 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7920 else if (get_arg_count() != 3)
7922 ERR("parse error %s:%i. Need 3rd parameter to set factor",
7926 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
7928 // the followjng also need v2
7929 // EDJE_TWEEN_MODE_DIVISOR_INTERP
7930 // EDJE_TWEEN_MODE_BOUNCE
7931 // EDJE_TWEEN_MODE_SPRING
7932 // current_program->tween.v2
7933 else if ((current_program->tween.mode >= EDJE_TWEEN_MODE_DIVISOR_INTERP) &&
7934 (current_program->tween.mode <= EDJE_TWEEN_MODE_SPRING))
7936 if ((get_arg_count() == 5) && (!strcmp(parse_str(4), "CURRENT")))
7937 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7938 else if (get_arg_count() != 4)
7940 ERR("parse error %s:%i. "
7941 "Need 3rd and 4th parameters to set factor and counts",
7945 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
7946 current_program->tween.v2 = FROM_DOUBLE(parse_float_range(3, 0.0, 999999999.0));
7957 Program or part on which the specified action acts. Multiple target
7958 keywords may be specified, one per target. SIGNAL_EMITs do not have
7963 st_collections_group_programs_program_target(void)
7965 Edje_Part_Collection *pc;
7970 pc = eina_list_data_get(eina_list_last(edje_collections));
7971 ep = current_program;
7973 Edje_Program_Target *et;
7974 Edje_Program_Target *etw;
7979 name = parse_str(0);
7981 EINA_LIST_FOREACH(ep->targets, l, etw)
7983 if (!strcmp(name, (char*) (etw + 1)))
7990 et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1);
7991 ep->targets = eina_list_append(ep->targets, et);
7992 copy = (char*) (et + 1);
7994 memcpy(copy, name, strlen(name) + 1);
7996 if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
7997 data_queue_part_lookup(pc, name, &(et->id));
7998 else if (ep->action == EDJE_ACTION_TYPE_ACTION_STOP)
7999 data_queue_program_lookup(pc, name, &(et->id));
8000 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
8001 data_queue_part_lookup(pc, name, &(et->id));
8002 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
8003 data_queue_part_lookup(pc, name, &(et->id));
8004 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
8005 data_queue_part_lookup(pc, name, &(et->id));
8006 else if (ep->action == EDJE_ACTION_TYPE_FOCUS_SET)
8007 data_queue_part_lookup(pc, name, &(et->id));
8008 else if (ep->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
8009 data_queue_part_lookup(pc, name, &(et->id));
8012 ERR("parse error %s:%i. target may only be used after action",
8027 Specifies a program to run after the current program completes. The
8028 source and signal parameters of a program run as an "after" are ignored.
8029 Multiple "after" statements can be specified per program.
8033 st_collections_group_programs_program_after(void)
8035 Edje_Part_Collection *pc;
8040 pc = eina_list_data_get(eina_list_last(edje_collections));
8041 ep = current_program;
8043 Edje_Program_After *pa;
8044 Edje_Program_After *pa2;
8049 name = parse_str(0);
8051 EINA_LIST_FOREACH(ep->after, l, pa2)
8053 if (!strcmp(name, (char*) (pa2 + 1)))
8060 pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
8062 ep->after = eina_list_append(ep->after, pa);
8063 copy = (char*)(pa + 1);
8065 memcpy(copy, name, strlen(name) + 1);
8067 data_queue_program_lookup(pc, name, &(pa->id));
8077 [name] [description]
8079 Specifies a hint to let applications (or IDE's) know how to bind
8080 things. The parameter name should contain the name of the function that
8081 the application should use, and description describes how it should
8086 st_collections_group_programs_program_api(void)
8088 check_min_arg_count(1);
8090 current_program->api.name = parse_str(0);
8095 current_program->api.description = parse_str(1);
8100 st_collections_group_parts_part_api(void)
8102 check_min_arg_count(1);
8104 current_part->api.name = parse_str(0);
8108 current_part->api.description = parse_str(1);
8113 ob_collections_group_programs_program_script(void)
8115 Edje_Part_Collection *pc;
8118 pc = eina_list_data_get(eina_list_last(edje_collections));
8119 cd = eina_list_data_get(eina_list_last(codes));
8121 if (!is_verbatim()) track_verbatim(1);
8124 Eina_Bool empty = EINA_TRUE;
8133 /* FIXME: Need to store the script somewhere to be restored when using edje_edit API */
8134 cp = mem_alloc(SZ(Code_Program));
8135 cp->l1 = get_verbatim_line1();
8136 cp->l2 = get_verbatim_line2();
8138 cp->original = strdup(s);
8139 if (cd->shared && cd->is_lua)
8141 ERR("parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group",
8147 len = strlen(cp->script);
8148 for (i = 0; i < len; i++)
8150 if (((cp->script[i] > 'a') && (cp->script[i] < 'z')) ||
8151 ((cp->script[i] > 'A') && (cp->script[i] < 'Z')) ||
8152 ((cp->script[i] > '0') && (cp->script[i] < '9')))
8158 cd->programs = eina_list_append(cd->programs, cp);
8159 data_queue_anonymous_lookup(pc, current_program, &(cp->id));
8160 current_program->action = EDJE_ACTION_TYPE_SCRIPT;
8164 data_queue_anonymous_lookup(pc, current_program, NULL);
8169 set_verbatim(NULL, 0, 0);
8179 edje_cc_handlers_hierarchy_set(Edje_Part *src)
8180 { /* This funcion makes current part rel_1.id, rel_2.id relative to src */
8183 ERR("parse error %s:%i. You must set parent name before creating nested part",
8187 st_collections_group_parts_part_description_rel1_to_set(src->name);
8188 st_collections_group_parts_part_description_rel2_to_set(src->name);
8192 edje_cc_handlers_hierarchy_parent_get(void)
8193 { /* Return the parent part pointer */
8194 int idx = eina_array_count(part_hierarchy) - 2;
8195 Edje_Cc_Handlers_Hierarchy_Info *info = (idx >= 0) ?
8196 eina_array_data_get(part_hierarchy, idx) : NULL;
8198 return (info) ? info->ep : NULL;
8202 edje_cc_handlers_hierarchy_push(Edje_Part *ep, Edje_Part *cp)
8203 { /* Remove part from hierarchy stack when finished parsing it */
8204 Edje_Cc_Handlers_Hierarchy_Info *info = malloc(sizeof(*info));
8205 info->current_de = current_de;
8206 info->current_part = cp; /* current_part restored on pop */
8207 info->current_item = current_item;
8208 info->current_desc = current_desc;
8209 info->parent_desc = parent_desc;
8210 info->current_program = current_program;
8213 eina_array_push(part_hierarchy, info);
8217 edje_cc_handlers_hierarchy_rename(Edje_Part *old, Edje_Part *new)
8219 Edje_Cc_Handlers_Hierarchy_Info *item;
8220 Eina_Array_Iterator iterator;
8223 EINA_ARRAY_ITER_NEXT(part_hierarchy, i, item, iterator)
8225 if (item->ep == old) item->ep = new;
8226 if (item->current_part == old) item->current_part = new;
8231 edje_cc_handlers_hierarchy_alloc(void)
8233 part_hierarchy = eina_array_new(8);
8237 edje_cc_handlers_hierarchy_free(void)
8239 eina_array_free(part_hierarchy);
8240 part_hierarchy = NULL;
8244 edje_cc_handlers_hierarchy_pop(void)
8245 { /* Remove part from hierarchy stack when finished parsing it */
8246 Edje_Cc_Handlers_Hierarchy_Info *info = eina_array_pop(part_hierarchy);
8250 current_de = info->current_de;
8251 current_part = info->current_part;
8252 current_item = info->current_item;
8253 current_desc = info->current_desc;
8254 parent_desc = info->parent_desc;
8255 current_program = info->current_program;