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);
1127 memcpy(copy, name, strlen(name) + 1);
1128 data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id));
1131 ep->api.name = STRDUP(ep2->api.name);
1132 ep->api.description = STRDUP(ep2->api.description);
1133 data_queue_copied_part_lookup(pc, &(ep2->param.src), &(ep->param.src));
1134 data_queue_copied_part_lookup(pc, &(ep2->param.dst), &(ep->param.dst));
1136 epp = (Edje_Program_Parser *)ep;
1137 epp->can_override = EINA_TRUE;
1145 @edcsection{toplevel,Top-Level blocks}
1158 The "externals" block is used to list each external module file that will be used in others
1167 Used to add a file to the externals list.
1171 st_externals_external(void)
1177 if (!edje_file->external_dir)
1178 edje_file->external_dir = mem_alloc(SZ(Edje_External_Directory));
1180 ex = mem_alloc(SZ(External));
1181 ex->name = parse_str(0);
1186 EINA_LIST_FOREACH(externals, l, lex)
1188 if (!strcmp(lex->name, ex->name))
1196 externals = eina_list_append(externals, ex);
1198 if (edje_file->external_dir)
1200 edje_file->external_dir->entries_count++;
1201 edje_file->external_dir->entries = realloc(edje_file->external_dir->entries,
1202 sizeof (Edje_External_Directory) * edje_file->external_dir->entries_count);
1203 memset(edje_file->external_dir->entries + edje_file->external_dir->entries_count - 1,
1204 0, sizeof (Edje_External_Directory));
1205 if (!edje_file->external_dir->entries)
1207 ERR("not enough memory");
1211 edje_file->external_dir->entries[edje_file->external_dir->entries_count - 1].entry = mem_strdup(ex->name);
1222 image: "filename1.ext" COMP;
1223 image: "filename2.ext" LOSSY 99;
1225 name: "image_name_used";
1227 image: "filename3.ext" LOSSY 90;
1228 size: 201 201 500 500;
1231 image: "filename4.ext" COMP;
1232 size: 51 51 200 200;
1235 image: "filename5.ext" COMP;
1239 image: "filename6.ext" RAW;
1246 The "images" block is used to list each image file that will be used in
1247 the theme along with its compression method (if any).
1248 Besides the document's root, additional "images" blocks can be
1249 included inside other blocks, normally "collections", "group" and
1250 "part", easing maintenance of the file list when the theme is split
1251 among multiple files.
1257 [image file] [compression method] (compression level)
1259 Used to include each image file. The full path to the directory holding
1260 the images can be defined later with edje_cc's "-id" option.
1261 Compression methods:
1262 @li RAW: Uncompressed.
1263 @li COMP: Lossless compression.
1264 @li LOSSY [0-100]: Lossy compression with quality from 0 to 100.
1265 @li USER: Do not embed the file, refer to the external file instead.
1269 st_images_image(void)
1271 Edje_Image_Directory_Entry *img;
1276 check_min_arg_count(2);
1278 if (!edje_file->image_dir)
1279 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
1283 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
1284 if (!strcmp(edje_file->image_dir->entries[i].entry, tmp))
1290 edje_file->image_dir->entries_count++;
1291 edje_file->image_dir->entries = realloc(edje_file->image_dir->entries,
1292 sizeof (Edje_Image_Directory_Entry) * edje_file->image_dir->entries_count);
1293 memset(edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1,
1294 0, sizeof (Edje_Image_Directory_Entry));
1295 if (!edje_file->image_dir->entries)
1297 ERR("No enough memory.");
1301 img = edje_file->image_dir->entries + edje_file->image_dir->entries_count - 1;
1304 img->id = edje_file->image_dir->entries_count - 1;
1313 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT;
1314 img->source_param = 0;
1318 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT;
1319 img->source_param = 1;
1323 img->source_type = EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY;
1324 img->source_param = 0;
1328 img->source_type = EDJE_IMAGE_SOURCE_TYPE_EXTERNAL;
1329 img->source_param = 0;
1331 if (img->source_type != EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY)
1335 img->source_param = parse_int_range(2, 0, 100);
1347 name: "image_name_used";
1349 image: "filename3.ext" LOSSY 90;
1350 size: 201 201 500 500;
1353 image: "filename4.ext" COMP;
1354 size: 51 51 200 200;
1357 image: "filename5.ext" COMP;
1361 image: "filename6.ext" RAW;
1366 The "set" block is used to define an image with different content depending on their size.
1367 Besides the document's root, additional "set" blocks can be
1368 included inside other blocks, normally "collections", "group" and
1369 "part", easing maintenance of the file list when the theme is split
1370 among multiple files.
1376 if (!edje_file->image_dir)
1377 edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
1379 edje_file->image_dir->sets_count++;
1380 edje_file->image_dir->sets = realloc(edje_file->image_dir->sets,
1381 sizeof (Edje_Image_Directory_Set) * edje_file->image_dir->sets_count);
1382 memset(edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1,
1383 0, sizeof (Edje_Image_Directory_Set));
1384 if (!edje_file->image_dir->sets)
1386 ERR("Not enough memory.");
1389 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].id = edje_file->image_dir->sets_count - 1;
1400 Define the name that refer to this image description.
1404 st_images_set_name(void)
1408 edje_file->image_dir->sets[edje_file->image_dir->sets_count - 1].name = parse_str(0);
1417 The "image" block inside a "set" block define the characteristic of an image.
1418 Every block will describe one image and the size rule to use it.
1422 ob_images_set_image(void)
1424 Edje_Image_Directory_Set_Entry *entry;
1425 Edje_Image_Directory_Set *set;
1427 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1429 entry = mem_alloc(SZ(Edje_Image_Directory_Set_Entry));
1431 set->entries = eina_list_append(set->entries, entry);
1440 [image file] [compression method] (compression level)
1442 Used to include each image file. The full path to the directory holding
1443 the images can be defined later with edje_cc's "-id" option.
1444 Compression methods:
1445 @li RAW: Uncompressed.
1446 @li COMP: Lossless compression.
1447 @li LOSSY [0-100]: Lossy compression with quality from 0 to 100.
1448 @li USER: Do not embed the file, refer to the external file instead.
1452 st_images_set_image_image(void)
1454 Edje_Image_Directory_Set_Entry *entry;
1455 Edje_Image_Directory_Set *set;
1458 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1459 entry = eina_list_data_get(eina_list_last(set->entries));
1461 /* Add the image to the global pool with the same syntax. */
1464 entry->name = parse_str(0);
1466 for (i = 0; i < edje_file->image_dir->entries_count; ++i)
1467 if (!strcmp(edje_file->image_dir->entries[i].entry, entry->name))
1480 [minw minh maxw mawh]
1482 Define the minimal and maximal size that will select the specified image.
1486 st_images_set_image_size(void)
1488 Edje_Image_Directory_Set_Entry *entry;
1489 Edje_Image_Directory_Set *set;
1491 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1492 entry = eina_list_data_get(eina_list_last(set->entries));
1494 entry->size.min.w = parse_int(0);
1495 entry->size.min.h = parse_int(1);
1496 entry->size.max.w = parse_int(2);
1497 entry->size.max.h = parse_int(3);
1499 if (entry->size.min.w > entry->size.max.w
1500 || entry->size.min.h > entry->size.max.h)
1502 ERR("parse error %s:%i. Image min and max size are not in the right order ([%i, %i] < [%i, %i])",
1504 entry->size.min.w, entry->size.min.h,
1505 entry->size.max.w, entry->size.max.h);
1517 font: "filename1.ext" "fontname";
1518 font: "filename2.ext" "otherfontname";
1522 The "fonts" block is used to list each font file with an alias used later
1523 in the theme. As with the "images" block, additional "fonts" blocks can
1524 be included inside other blocks.
1530 [font filename] [font alias]
1532 Defines each font "file" and "alias", the full path to the directory
1533 holding the font files can be defined with edje_cc's "-fd" option.
1543 if (!edje_file->fonts)
1544 edje_file->fonts = eina_hash_string_small_new(free);
1546 fn = mem_alloc(SZ(Font));
1547 fn->file = parse_str(0);
1548 fn->name = parse_str(1);
1550 if (eina_hash_find(edje_file->fonts, fn->name))
1558 eina_hash_direct_add(edje_file->fonts, fn->name, fn);
1567 item: "key" "value";
1568 file: "otherkey" "filename.ext";
1572 The "data" block is used to pass arbitrary parameters from the theme to
1573 the application. Unlike the "images" and "fonts" blocks, additional
1574 "data" blocks can only be included inside the "group" block.
1580 [parameter name] [parameter value]
1582 Defines a new parameter, the value will be the string specified next to
1596 es = mem_alloc(SZ(Edje_String));
1597 es->str = parse_str(1);
1599 if (!edje_file->data)
1600 edje_file->data = eina_hash_string_small_new(free);
1602 /* FIXME: check if data already exist */
1603 eina_hash_direct_add(edje_file->data, key, es);
1611 [parameter name] [parameter filename]
1613 Defines a new parameter, the value will be the contents of the
1614 specified file formated as a single string of text. This property only
1615 works with plain text files.
1635 es = mem_alloc(SZ(Edje_String));
1636 filename = parse_str(1);
1638 fd = open(filename, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
1641 ERR("%s:%i when opening file \"%s\": \"%s\"",
1642 file_in, line, filename, strerror(errno));
1646 if (fstat(fd, &buf))
1648 ERR("%s:%i when stating file \"%s\": \"%s\"",
1649 file_in, line, filename, strerror(errno));
1653 data = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
1654 if (data == MAP_FAILED)
1656 ERR("%s:%i when mapping file \"%s\": \"%s\"",
1657 file_in, line, filename, strerror(errno));
1662 for (i = 0; i < buf.st_size; ++i, ++over)
1665 ERR("%s:%i file \"%s\" is a binary file.", file_in, line, filename);
1669 value = malloc(sizeof (char) * buf.st_size + 1);
1670 snprintf(value, buf.st_size + 1, "%s", data);
1672 munmap((void*)data, buf.st_size);
1677 eina_hash_direct_add(edje_file->data, key, es);
1689 name: "colorclassname";
1690 color: [0-255] [0-255] [0-255] [0-255];
1691 color2: [0-255] [0-255] [0-255] [0-255];
1692 color3: [0-255] [0-255] [0-255] [0-255]
1697 The "color_classes" block contains a list of one or more "color_class"
1698 blocks. Each "color_class" allows the designer to name an arbitrary
1699 group of colors to be used in the theme, the application can use that
1700 name to alter the color values at runtime.
1704 ob_color_class(void)
1706 Edje_Color_Class *cc;
1708 cc = mem_alloc(SZ(Edje_Color_Class));
1709 edje_file->color_classes = eina_list_append(edje_file->color_classes, cc);
1733 Sets the name for the color class, used as reference by both the theme
1734 and the application.
1738 st_color_class_name(void)
1740 Edje_Color_Class *cc, *tcc;
1743 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1744 cc->name = parse_str(0);
1745 EINA_LIST_FOREACH(edje_file->color_classes, l, tcc)
1747 if ((cc != tcc) && (!strcmp(cc->name, tcc->name)))
1749 ERR("parse error %s:%i. There is already a color class named \"%s\"",
1750 file_in, line - 1, cc->name);
1761 [red] [green] [blue] [alpha]
1767 st_color_class_color(void)
1769 Edje_Color_Class *cc;
1773 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1774 cc->r = parse_int_range(0, 0, 255);
1775 cc->g = parse_int_range(1, 0, 255);
1776 cc->b = parse_int_range(2, 0, 255);
1777 cc->a = parse_int_range(3, 0, 255);
1785 [red] [green] [blue] [alpha]
1787 Used as shadow in text and textblock parts.
1791 st_color_class_color2(void)
1793 Edje_Color_Class *cc;
1797 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1798 cc->r2 = parse_int_range(0, 0, 255);
1799 cc->g2 = parse_int_range(1, 0, 255);
1800 cc->b2 = parse_int_range(2, 0, 255);
1801 cc->a2 = parse_int_range(3, 0, 255);
1809 [red] [green] [blue] [alpha]
1811 Used as outline in text and textblock parts.
1815 st_color_class_color3(void)
1817 Edje_Color_Class *cc;
1821 cc = eina_list_data_get(eina_list_last(edje_file->color_classes));
1822 cc->r3 = parse_int_range(0, 0, 255);
1823 cc->g3 = parse_int_range(1, 0, 255);
1824 cc->b3 = parse_int_range(2, 0, 255);
1825 cc->a3 = parse_int_range(3, 0, 255);
1836 base: "..default style properties..";
1838 tag: "tagname" "..style properties..";
1844 The "styles" block contains a list of one or more "style" blocks. A
1845 "style" block is used to create style \<tags\> for advanced TEXTBLOCK
1850 ob_styles_style(void)
1854 stl = mem_alloc(SZ(Edje_Style));
1855 edje_file->styles = eina_list_append(edje_file->styles, stl);
1865 The name of the style to be used as reference later in the theme.
1869 st_styles_style_name(void)
1871 Edje_Style *stl, *tstl;
1874 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1875 stl->name = parse_str(0);
1876 EINA_LIST_FOREACH(edje_file->styles, l, tstl)
1878 if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name)))
1880 ERR("parse error %s:%i. There is already a style named \"%s\"",
1881 file_in, line - 1, stl->name);
1892 [style properties string]
1894 The default style properties that will be applied to the complete
1899 st_styles_style_base(void)
1902 Edje_Style_Tag *tag;
1904 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1907 ERR("parse error %s:%i. There is already a basic format for the style",
1911 tag = mem_alloc(SZ(Edje_Style_Tag));
1912 tag->key = mem_strdup("DEFAULT");
1913 tag->value = parse_str(0);
1914 stl->tags = eina_list_append(stl->tags, tag);
1922 [tag name] [style properties string]
1924 Style to be applied only to text between style \<tags\>..\</tags\>.
1925 When creating "paired" tags, like \<bold\>\</bold\>, A '+' should be added at the start of the style properties of the first part (\<bold\>).
1926 If the second part (\</bold\>) is also defined, a '-' should be prepended to it's style properties.
1927 This only applies to paired tags; Single tags, like \<tab\>, must not include a starting '+'.
1931 st_styles_style_tag(void)
1934 Edje_Style_Tag *tag;
1936 stl = eina_list_data_get(eina_list_last(edje_file->styles));
1937 tag = mem_alloc(SZ(Edje_Style_Tag));
1938 tag->key = parse_str(0);
1939 tag->value = parse_str(1);
1940 stl->tags = eina_list_append(stl->tags, tag);
1956 The "collections" block is used to list the groups that compose the
1957 theme. Additional "collections" blocks do not prevent overriding group
1958 names. The "sounds" block comprises of all sound definitions.
1962 ob_collections(void)
1964 if (!edje_file->collection)
1966 edje_file->collection = eina_hash_string_small_new(NULL);
1967 edje_collections_lookup = eina_hash_int32_new(NULL);
1977 name: "sound_file1" COMP;
1978 source: "sound_file1.wav";
1981 name: "sound_file2" LOSSY 0.4;
1982 source: "sound_file2.wav";
1984 tone: "tone-1" 2300;
1988 The "sounds" block contains a list of one or more sound sample and tones items.
1994 name: "sound_file1" RAW;
1995 source: "sound_file1.wav";
1998 name: "sound_file2" LOSSY 0.5;
1999 source: "sound_file2.wav";
2002 name: "sound_file3" COMP;
2003 source: "sound_file3.wav";
2006 name: "sound_file4" AS_IS;
2007 source: "sound_file1.wav";
2010 The sample block defines the sound sample.
2015 [sample name] [compression type] [if lossy, then quality]
2017 Used to include each sound file. The full path to the directory holding
2018 the sounds can be defined later with edje_cc's "-sd" option.
2019 @li RAW: Uncompressed.
2020 @li COMP: Lossless compression.
2021 @li LOSSY [-0.1 - 1.0]: Lossy compression with quality from 0 to 1.0.
2022 @li AS_IS: Check for re-encoding, no compression/encoding, just write the file information as it is.
2027 st_collections_group_sound_sample_name(void)
2029 Edje_Sound_Sample *sample;
2033 if (!edje_file->sound_dir)
2034 edje_file->sound_dir = mem_alloc(SZ(Edje_Sound_Directory));
2038 for (i = 0; i < edje_file->sound_dir->samples_count; i++)
2040 if (!strcmp(edje_file->sound_dir->samples[i].name, tmp))
2047 edje_file->sound_dir->samples_count++;
2048 edje_file->sound_dir->samples =
2049 realloc(edje_file->sound_dir->samples,
2050 sizeof(Edje_Sound_Sample) *
2051 edje_file->sound_dir->samples_count);
2053 if (!edje_file->sound_dir->samples)
2055 ERR("No enough memory.");
2060 edje_file->sound_dir->samples +
2061 edje_file->sound_dir->samples_count - 1;
2062 memset(sample, 0, sizeof (Edje_Sound_Sample));
2065 sample->id = edje_file->sound_dir->samples_count - 1;
2066 sample->compression = parse_enum(1,
2067 "RAW", EDJE_SOUND_SOURCE_TYPE_INLINE_RAW,
2068 "COMP", EDJE_SOUND_SOURCE_TYPE_INLINE_COMP,
2069 "LOSSY", EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY,
2070 "AS_IS", EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS,
2073 if (sample->compression == EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY)
2075 sample->quality = parse_float_range(2, 45.0, 1000.0);
2090 The Sound source file name (Source can be mono/stereo WAV file.
2091 Only files with 44.1 KHz sample rate supported now)
2096 st_collections_group_sound_sample_source(void)
2098 Edje_Sound_Sample *sample;
2100 if (!edje_file->sound_dir->samples)
2102 ERR("Invalid sound sample source definition.");
2107 edje_file->sound_dir->samples +
2108 edje_file->sound_dir->samples_count - 1;
2112 ERR("Invalid sound sample source definition.");
2115 sample->snd_src = parse_str(0);
2124 [tone name] [frequency]
2126 sound of specific frequency
2131 st_collections_group_sound_tone(void)
2133 Edje_Sound_Tone *tone;
2140 if (!edje_file->sound_dir)
2141 edje_file->sound_dir = mem_alloc(SZ(Edje_Sound_Directory));
2144 /* Audible range 20 to 20KHz */
2145 value = parse_int_range(1, 20, 20000);
2147 /* Check for Tone duplication */
2148 for (i = 0; i < edje_file->sound_dir->tones_count; i++)
2150 if (!strcmp(edje_file->sound_dir->tones[i].name, tmp))
2152 ERR("Tone name: %s already exist.", tmp);
2156 if (edje_file->sound_dir->tones[i].value == value)
2158 ERR("Tone name %s with same frequency %d exist.",
2159 edje_file->sound_dir->tones[i].name, value);
2163 edje_file->sound_dir->tones_count++;
2164 edje_file->sound_dir->tones =
2165 realloc(edje_file->sound_dir->tones,
2166 sizeof (Edje_Sound_Tone) *
2167 edje_file->sound_dir->tones_count);
2169 if (!edje_file->sound_dir->tones)
2171 ERR("No enough memory.");
2175 tone = edje_file->sound_dir->tones + edje_file->sound_dir->tones_count - 1;
2176 memset(tone, 0, sizeof (Edje_Sound_Tone));
2179 tone->value = value;
2180 tone->id = edje_file->sound_dir->tones_count - 1;
2183 @edcsection{group,Group sub blocks}
2194 name: "nameusedbytheapplication";
2195 alias: "anothername";
2207 A "group" block contains the list of parts and programs that compose a
2212 ob_collections_group(void)
2214 Edje_Part_Collection *pc;
2217 if (current_de && !current_de->entry)
2219 ERR("A collection without a name was detected, that's not allowed.");
2223 current_de = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
2224 current_de->id = eina_list_count(edje_collections);
2226 eina_hash_add(edje_collections_lookup, ¤t_de->id, current_de);
2228 pc = mem_alloc(SZ(Edje_Part_Collection));
2229 edje_collections = eina_list_append(edje_collections, pc);
2230 pc->id = current_de->id;
2231 pc->broadcast_signal = EINA_TRUE; /* This was the behaviour by default in Edje 1.1 */
2233 cd = mem_alloc(SZ(Code));
2234 codes = eina_list_append(codes, cd);
2244 The name that will be used by the application to load the resulting
2245 Edje object and to identify the group to swallow in a GROUP part. If a
2246 group with the same name exists already it will be completely overriden
2251 st_collections_group_name(void)
2253 Edje_Part_Collection_Directory_Entry *alias;
2254 Edje_Part_Collection_Directory_Entry *older;
2255 Edje_Part_Collection *current_pc;
2256 Eina_List *l = NULL;
2260 current_pc = eina_list_data_get(eina_list_last(edje_collections));
2262 current_de->entry = parse_str(0);
2263 current_pc->part = current_de->entry;
2265 older = eina_hash_find(edje_file->collection, current_de->entry);
2266 if (older) eina_hash_del(edje_file->collection, current_de->entry, older);
2267 eina_hash_direct_add(edje_file->collection, current_de->entry, current_de);
2270 EINA_LIST_FOREACH(aliases, l, alias)
2271 if (strcmp(alias->entry, current_de->entry) == 0)
2273 Edje_Part_Collection *pc;
2275 pc = eina_list_nth(edje_collections, older->id);
2276 INF("overriding alias ('%s' => '%s') by group '%s'",
2277 alias->entry, pc->part,
2279 aliases = eina_list_remove_list(aliases, l);
2286 typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;
2287 struct _Edje_List_Foreach_Data
2293 _edje_data_item_list_foreach(const Eina_Hash *hash __UNUSED__, const void *key, void *data __UNUSED__, void *fdata)
2295 Edje_List_Foreach_Data *fd;
2298 fd->list = eina_list_append(fd->list, strdup(key));
2310 Parent group name for inheritance.
2311 Group "inherit" is used to inherit any predefined group and change
2312 some property which belongs to "part", "description", "items" or "program".
2313 The child group has the same property as parent group. If you specify the
2314 type again in an inherited part, it will cause an error (unless you plan
2320 st_collections_group_inherit(void)
2322 Edje_Part_Collection *pc, *pc2;
2323 Edje_Part *ep, *ep2;
2324 Edje_Part_Parser *epp, *epp2;
2325 Edje_Pack_Element *item, *item2;
2326 Edje_Pack_Element_Parser *pitem;
2327 Edje_Part_Description_Common *ed, *ed2;
2328 Edje_List_Foreach_Data fdata;
2335 pc = eina_list_data_get(eina_list_last(edje_collections));
2337 parent_name = parse_str(0);
2339 EINA_LIST_FOREACH(edje_collections, l, pc2)
2341 if (!strcmp(parent_name, pc2->part))
2346 ERR("parse error %s:%i. There isn't a group with the name %s",
2347 file_in, line - 1, parent_name);
2352 ERR("parse error %s:%i. You are trying to inherit '%s' from itself. That's not possible."
2353 "If there is another group of the same name, you want to inherit from that group and have the"
2354 "same name as that group, there is a trick ! Just put the inherit before the directive that set"
2355 "the name !", file_in, line - 1, parent_name);
2363 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2364 eina_hash_foreach(pc2->data,
2365 _edje_data_item_list_foreach, &fdata);
2367 if (!pc->data) pc->data = eina_hash_string_small_new(free);
2368 EINA_LIST_FREE(fdata.list, key)
2370 data = eina_hash_find(pc2->data, key);
2371 eina_hash_direct_add(pc->data, key, data);
2379 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2380 eina_hash_foreach(pc2->alias,
2381 _edje_data_item_list_foreach, &fdata);
2382 if (!pc->alias) pc->alias = eina_hash_string_small_new(free);
2383 EINA_LIST_FREE(fdata.list, key)
2385 alias = eina_hash_find(pc2->alias, key);
2386 eina_hash_direct_add(pc->alias, key, alias);
2391 char *key, *aliased;
2393 memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
2394 eina_hash_foreach(pc2->aliased,
2395 _edje_data_item_list_foreach, &fdata);
2396 if (!pc->aliased) pc->aliased = eina_hash_string_small_new(free);
2397 EINA_LIST_FREE(fdata.list, key)
2399 aliased = eina_hash_find(pc2->aliased, key);
2400 eina_hash_direct_add(pc->aliased, key, aliased);
2404 pc->prop.min.w = pc2->prop.min.w;
2405 pc->prop.min.h = pc2->prop.min.h;
2406 pc->prop.orientation = pc2->prop.orientation;
2408 pc->lua_script_only = pc2->lua_script_only;
2410 #define STRDUP(x) x ? strdup(x) : NULL
2411 for (i = 0 ; i < pc2->parts_count ; i++)
2414 edje_cc_handlers_part_make();
2416 ep2 = pc2->parts[i];
2417 ep->name = STRDUP(ep2->name);
2418 ep->source = STRDUP(ep2->source);
2419 ep->source2 = STRDUP(ep2->source2);
2420 ep->source3 = STRDUP(ep2->source3);
2421 ep->source4 = STRDUP(ep2->source4);
2422 ep->source5 = STRDUP(ep2->source5);
2423 ep->source6 = STRDUP(ep2->source6);
2425 data_queue_copied_part_lookup(pc, &(ep2->clip_to_id), &(ep->clip_to_id));
2427 ep->type = ep2->type;
2428 ep->mouse_events = ep2->mouse_events;
2429 ep->repeat_events = ep2->repeat_events;
2430 ep->ignore_flags = ep2->ignore_flags;
2431 ep->scale = ep2->scale;
2432 ep->pointer_mode = ep2->pointer_mode;
2433 ep->precise_is_inside = ep2->precise_is_inside;
2434 ep->use_alternate_font_metrics = ep2->use_alternate_font_metrics;
2435 ep->effect = ep2->effect;
2436 ep->entry_mode = ep2->entry_mode;
2437 ep->select_mode = ep2->select_mode;
2438 ep->cursor_mode = ep2->cursor_mode;
2439 ep->multiline = ep2->multiline;
2440 ep->access = ep2->access;
2441 ep->dragable.x = ep2->dragable.x;
2442 ep->dragable.step_x = ep2->dragable.step_x;
2443 ep->dragable.count_x = ep2->dragable.count_x;
2444 ep->dragable.y = ep2->dragable.y;
2445 ep->dragable.step_y = ep2->dragable.step_y;
2446 ep->dragable.count_y = ep2->dragable.count_y;
2447 ep->nested_children_count = ep2->nested_children_count;
2449 data_queue_copied_part_lookup(pc, &(ep2->dragable.confine_id), &(ep->dragable.confine_id));
2450 data_queue_copied_part_lookup(pc, &(ep2->dragable.event_id), &(ep->dragable.event_id));
2452 epp = (Edje_Part_Parser *)ep;
2453 epp2 = (Edje_Part_Parser *)ep2;
2454 epp->reorder.insert_before = STRDUP(epp2->reorder.insert_before);
2455 epp->reorder.insert_after = STRDUP(epp2->reorder.insert_after);
2456 epp->can_override = EINA_TRUE;
2458 for (j = 0 ; j < ep2->items_count ; j++)
2460 ob_collections_group_parts_part_box_items_item();
2461 item = ep->items[j];
2462 item2 = ep2->items[j];
2463 item->type = item2->type;
2464 item->name = STRDUP(item2->name);
2465 item->source = STRDUP(item2->source);
2466 item->min.w = item2->min.w;
2467 item->min.h = item2->min.h;
2468 item->prefer.w = item2->prefer.w;
2469 item->prefer.h = item2->prefer.h;
2470 item->max.w = item2->max.w;
2471 item->max.h = item2->max.h;
2472 item->padding.l = item2->padding.l;
2473 item->padding.r = item2->padding.r;
2474 item->padding.t = item2->padding.t;
2475 item->padding.b = item2->padding.b;
2476 item->align.x = item2->align.x;
2477 item->align.y = item2->align.y;
2478 item->weight.x = item2->weight.x;
2479 item->weight.y = item2->weight.y;
2480 item->aspect.w = item2->aspect.w;
2481 item->aspect.h = item2->aspect.h;
2482 item->aspect.mode = item2->aspect.mode;
2483 item->options = STRDUP(item2->options);
2484 item->col = item2->col;
2485 item->row = item2->row;
2486 item->colspan = item2->colspan;
2487 item->rowspan = item2->rowspan;
2489 pitem = (Edje_Pack_Element_Parser *)item;
2490 pitem->can_override = EINA_TRUE;
2493 ep->api.name = STRDUP(ep2->api.name);
2494 if (ep2->api.description) ep->api.description = STRDUP(ep2->api.description);
2496 // copy default description
2497 ob_collections_group_parts_part_description();
2498 ed = ep->default_desc;
2499 parent_desc = ed2 = ep2->default_desc;
2500 ed->state.name = STRDUP(ed2->state.name);
2501 ed->state.value = ed2->state.value;
2502 st_collections_group_parts_part_description_inherit();
2505 // copy other description
2506 for (j = 0 ; j < ep2->other.desc_count ; j++)
2508 ob_collections_group_parts_part_description();
2509 ed = ep->other.desc[j];
2510 parent_desc = ed2 = ep2->other.desc[j];
2511 ed->state.name = STRDUP(ed2->state.name);
2512 ed->state.value = ed2->state.value;
2513 st_collections_group_parts_part_description_inherit();
2519 for (j = 0 ; j < pc2->programs.fnmatch_count ; j++)
2521 ob_collections_group_programs_program();
2522 _edje_program_copy(current_program, pc2->programs.fnmatch[j]);
2524 for (j = 0 ; j < pc2->programs.strcmp_count ; j++)
2526 ob_collections_group_programs_program();
2527 _edje_program_copy(current_program, pc2->programs.strcmp[j]);
2529 for (j = 0 ; j < pc2->programs.strncmp_count ; j++)
2531 ob_collections_group_programs_program();
2532 _edje_program_copy(current_program, pc2->programs.strncmp[j]);
2534 for (j = 0 ; j < pc2->programs.strrncmp_count ; j++)
2536 ob_collections_group_programs_program();
2537 _edje_program_copy(current_program, pc2->programs.strrncmp[j]);
2539 for (j = 0 ; j < pc2->programs.nocmp_count ; j++)
2541 ob_collections_group_programs_program();
2542 _edje_program_copy(current_program, pc2->programs.nocmp[j]);
2546 Code_Program *cp, *cp2;
2547 Edje_Part_Collection_Directory_Entry *de;
2549 de = eina_hash_find(edje_file->collection, pc2->part);
2550 cd2 = eina_list_nth(codes, de->id);
2551 cd = eina_list_data_get(eina_list_last(codes));
2553 EINA_LIST_FOREACH(cd2->programs, l, cp2)
2555 cp = mem_alloc(SZ(Code_Program));
2559 cp->script = STRDUP(cp2->script);
2560 cd->is_lua = cd2->is_lua;
2561 cd->shared = cd2->shared;
2562 cd->programs = eina_list_append(cd->programs, cp);
2563 data_queue_copied_anonymous_lookup(pc, &(cp2->id), &(cp->id));
2577 The flag (on/off) as to if this group is defined ONLY by script
2578 callbacks such as init(), resize() and shutdown()
2582 st_collections_group_script_only(void)
2584 Edje_Part_Collection *pc;
2588 pc = eina_list_data_get(eina_list_last(edje_collections));
2589 pc->lua_script_only = parse_bool(0);
2597 [aditional group name]
2599 Additional name to serve as identifier. Defining multiple aliases is
2604 st_collections_group_alias(void)
2606 Edje_Part_Collection_Directory_Entry *alias;
2607 Edje_Part_Collection_Directory_Entry *tmp;
2612 alias = mem_alloc(SZ(Edje_Part_Collection_Directory_Entry));
2613 alias->id = current_de->id;
2614 alias->entry = parse_str(0);
2616 EINA_LIST_FOREACH(aliases, l, tmp)
2617 if (strcmp(alias->entry, tmp->entry) == 0)
2619 Edje_Part_Collection *pc;
2621 pc = eina_list_nth(edje_collections, tmp->id);
2622 INF("overriding alias ('%s' => '%s') to ('%s' => '%s')",
2623 tmp->entry, pc->part,
2624 alias->entry, current_de->entry);
2625 aliases = eina_list_remove_list(aliases, l);
2630 aliases = eina_list_append(aliases, alias);
2640 The minimum size for the container defined by the composition of the
2641 parts. It is not enforced.
2645 st_collections_group_min(void)
2647 Edje_Part_Collection *pc;
2651 pc = eina_list_data_get(eina_list_last(edje_collections));
2652 pc->prop.min.w = parse_int_range(0, 0, 0x7fffffff);
2653 pc->prop.min.h = parse_int_range(1, 0, 0x7fffffff);
2663 The maximum size for the container defined by the totality of the
2664 parts. It is not enforced.
2668 st_collections_group_max(void)
2670 Edje_Part_Collection *pc;
2674 pc = eina_list_data_get(eina_list_last(edje_collections));
2675 pc->prop.max.w = parse_int_range(0, 0, 0x7fffffff);
2676 pc->prop.max.h = parse_int_range(1, 0, 0x7fffffff);
2686 Signal got automatically broadcasted to all sub group part. Default to
2691 st_collections_group_broadcast_signal(void)
2693 Edje_Part_Collection *pc;
2697 pc = eina_list_data_get(eina_list_last(edje_collections));
2698 pc->broadcast_signal = parse_bool(0);
2721 This block is used to "inject" embryo scripts to a given Edje theme and
2722 it functions in two modalities. When it's included inside a "program"
2723 block, the script will be executed every time the program is run, on
2724 the other hand, when included directly into a "group", "part" or
2725 "description" block, it will be executed once at load time, in the
2730 ob_collections_group_script(void)
2734 cd = eina_list_data_get(eina_list_last(codes));
2736 if (!is_verbatim()) track_verbatim(1);
2744 cd->l1 = get_verbatim_line1();
2745 cd->l2 = get_verbatim_line2();
2748 ERR("parse error %s:%i. There is already an existing script section for the group",
2753 cd->original = strdup(s);
2755 set_verbatim(NULL, 0, 0);
2761 ob_collections_group_lua_script(void)
2765 cd = eina_list_data_get(eina_list_last(codes));
2767 if (!is_verbatim()) track_verbatim(1);
2775 cd->l1 = get_verbatim_line1();
2776 cd->l2 = get_verbatim_line2();
2779 ERR("parse error %s:%i. There is already an existing script section for the group",
2785 set_verbatim(NULL, 0, 0);
2791 st_collections_group_data_item(void)
2793 Edje_Part_Collection *pc;
2799 pc = eina_list_data_get(eina_list_last(edje_collections));
2802 pc->data = eina_hash_string_small_new(free);
2806 es = mem_alloc(SZ(Edje_String));
2807 es->str = parse_str(1);
2809 if (eina_hash_find(pc->data, key))
2810 eina_hash_modify(pc->data, key, es);
2812 eina_hash_direct_add(pc->data, key, es);
2822 This defines GROUP orientation.
2823 This is useful if you want match interface orientation with language.
2824 AUTO - Follow system defs.
2825 LTR - suitable for Left To Right Languages (latin)
2826 RTL - suitable for Right To Left Languages (Hebrew, Arabic interface)
2830 st_collections_group_orientation(void)
2832 Edje_Part_Collection *pc;
2836 pc = eina_list_data_get(eina_list_last(edje_collections));
2837 pc->prop.orientation = parse_enum(0,
2838 "AUTO", EDJE_ORIENTATION_AUTO,
2839 "LTR", EDJE_ORIENTATION_LTR,
2840 "RTL", EDJE_ORIENTATION_RTL,
2851 vertical: "limit_name" height_barrier;
2852 horizontal: "limit_name" width_barrier;
2859 This block is used to trigger some signal when the Edje object is resized.
2866 [name] [height barrier]
2868 It will send a signal: "limit,name,over" when the object is resized and pass
2869 the limit by growing over it. And it will send: "limit,name,below" when
2870 it pass below that limit.
2871 This limit will be applied on the y absis and is expressed in pixels.
2875 st_collections_group_limits_vertical(void)
2877 Edje_Part_Collection *pc;
2882 el = mem_alloc(SZ(Edje_Limit));
2884 pc = eina_list_data_get(eina_list_last(edje_collections));
2885 pc->limits.vertical_count++;
2886 pc->limits.vertical = realloc(pc->limits.vertical, pc->limits.vertical_count * sizeof (Edje_Limit *));
2887 if (!pc->limits.vertical || !el)
2889 ERR("Not enough memory.");
2893 pc->limits.vertical[pc->limits.vertical_count - 1] = el;
2895 el->name = parse_str(0);
2896 el->value = parse_int_range(1, 1, 0xffff);
2904 [name] [width barrier]
2906 It will send a signal: "limit,name,over" when the object is resized and pass
2907 the limit by growing over it. And it will send: "limit,name,below" when
2908 it pass below that limit.
2909 This limit will be applied on the x absis and is expressed in pixels.
2913 st_collections_group_limits_horizontal(void)
2915 Edje_Part_Collection *pc;
2920 el = mem_alloc(SZ(Edje_Limit));
2922 pc = eina_list_data_get(eina_list_last(edje_collections));
2923 pc->limits.horizontal_count++;
2924 pc->limits.horizontal = realloc(pc->limits.horizontal, pc->limits.horizontal_count * sizeof (Edje_Limit *));
2925 if (!pc->limits.horizontal || !el)
2927 ERR("Not enough memory.");
2931 pc->limits.horizontal[pc->limits.horizontal_count - 1] = el;
2933 el->name = parse_str(0);
2934 el->value = parse_int_range(1, 1, 0xffff);
2944 alias: "theme_part_path" "real_part_path";
2949 Alias of part give a chance to let the designer put the real one
2950 in a box or reuse one from a GROUP or inside a BOX.
2954 st_collections_group_parts_alias(void)
2956 Edje_Part_Collection *pc;
2958 const char *aliased;
2962 pc = eina_list_data_get(eina_list_last(edje_collections));
2964 alias = parse_str(0);
2965 aliased = parse_str(1);
2967 if (!pc->alias) pc->alias = eina_hash_string_small_new(NULL);
2968 eina_hash_add(pc->alias, alias, aliased);
2970 if (!pc->aliased) pc->aliased = eina_hash_string_small_new(NULL);
2971 eina_hash_add(pc->aliased, aliased, alias);
2989 clip_to: "anotherpart";
2990 source: "groupname";
2991 pointer_mode: AUTOGRAB;
2992 use_alternate_font_metrics: 0;
3002 Parts are used to represent the most basic design elements of the
3003 theme, for example, a part can represent a line in a border or a label
3008 edje_cc_handlers_part_make(void)
3009 { /* Doing ob_collections_group_parts_part() job, without hierarchy */
3010 Edje_Part_Collection *pc;
3012 Edje_Part_Parser *epp;
3014 ep = mem_alloc(SZ(Edje_Part_Parser));
3016 pc = eina_list_data_get(eina_list_last(edje_collections));
3018 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
3021 ERR("Not enough memory.");
3024 current_part = pc->parts[pc->parts_count - 1] = ep;
3026 ep->id = pc->parts_count - 1;
3027 ep->type = EDJE_PART_TYPE_IMAGE;
3028 ep->mouse_events = 1;
3029 ep->repeat_events = 0;
3030 ep->ignore_flags = EVAS_EVENT_FLAG_NONE;
3032 ep->pointer_mode = EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
3033 ep->precise_is_inside = 0;
3034 ep->use_alternate_font_metrics = 0;
3036 ep->clip_to_id = -1;
3037 ep->dragable.confine_id = -1;
3038 ep->dragable.event_id = -1;
3040 ep->nested_children_count = 0;
3042 epp = (Edje_Part_Parser *)ep;
3043 epp->reorder.insert_before = NULL;
3044 epp->reorder.insert_after = NULL;
3045 epp->reorder.before = NULL;
3046 epp->reorder.after = NULL;
3047 epp->reorder.linked_prev = 0;
3048 epp->reorder.linked_next = 0;
3049 epp->reorder.done = EINA_FALSE;
3050 epp->can_override = EINA_FALSE;
3056 ob_collections_group_parts_part(void)
3058 Edje_Part *cp = current_part; /* Save to restore on pop */
3059 Edje_Part *ep = edje_cc_handlers_part_make(); /* This changes current_part */
3062 /* Add this new part to hierarchy stack (removed part finished parse) */
3063 edje_cc_handlers_hierarchy_push(ep, cp);
3065 prnt = edje_cc_handlers_hierarchy_parent_get();
3066 if (prnt) /* This is the child of parent in stack */
3067 prnt->nested_children_count++;
3077 The part's name will be used as reference in the theme's relative
3078 positioning system, by programs and in some cases by the application.
3079 It must be unique within the group.
3083 st_collections_group_parts_part_name(void)
3085 Edje_Part_Collection *pc;
3087 Edje_Part_Parser *epp;
3091 pc = eina_list_data_get(eina_list_last(edje_collections));
3093 ep->name = parse_str(0);
3099 for (i = 0; i < (pc->parts_count - 1); i++)
3100 { /* Compare name only if did NOT updated ep from hircy pop */
3101 if ((ep != pc->parts[i]) &&
3102 (pc->parts[i]->name &&
3103 (!strcmp(pc->parts[i]->name, ep->name))))
3105 epp = (Edje_Part_Parser *)pc->parts[i];
3106 if (!epp->can_override)
3108 ERR("parse error %s:%i. There is already a part of the name %s",
3109 file_in, line - 1, ep->name);
3116 pc->parts = realloc(pc->parts, pc->parts_count * sizeof (Edje_Part *));
3117 current_part = pc->parts[i];
3118 edje_cc_handlers_hierarchy_rename(ep, current_part);
3120 epp->can_override = EINA_FALSE;
3135 Set the type (all caps) from among the available types, it's set to
3136 IMAGE by default. Valid types:
3151 st_collections_group_parts_part_type(void)
3157 type = parse_enum(0,
3158 "NONE", EDJE_PART_TYPE_NONE,
3159 "RECT", EDJE_PART_TYPE_RECTANGLE,
3160 "TEXT", EDJE_PART_TYPE_TEXT,
3161 "IMAGE", EDJE_PART_TYPE_IMAGE,
3162 "SWALLOW", EDJE_PART_TYPE_SWALLOW,
3163 "TEXTBLOCK", EDJE_PART_TYPE_TEXTBLOCK,
3164 "GROUP", EDJE_PART_TYPE_GROUP,
3165 "BOX", EDJE_PART_TYPE_BOX,
3166 "TABLE", EDJE_PART_TYPE_TABLE,
3167 "EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
3168 "PROXY", EDJE_PART_TYPE_PROXY,
3169 "SPACER", EDJE_PART_TYPE_SPACER,
3172 /* handle type change of inherited part */
3173 if (type != current_part->type)
3175 Edje_Part_Description_Common *new, *previous;
3176 Edje_Part_Collection *pc;
3180 /* we don't free old part as we don't remove all reference to them */
3181 part_description_image_cleanup(current_part);
3183 pc = eina_list_data_get(eina_list_last(edje_collections));
3186 previous = ep->default_desc;
3189 new = _edje_part_description_alloc(type, pc->part, ep->name);
3190 memcpy(new, previous, sizeof (Edje_Part_Description_Common));
3192 ep->default_desc = new;
3195 for (i = 0; i < ep->other.desc_count; i++)
3197 previous = ep->other.desc[i];
3198 new = _edje_part_description_alloc(type, pc->part, ep->name);
3199 memcpy(new, previous, sizeof (Edje_Part_Description_Common));
3200 ep->other.desc[i] = new;
3204 current_part->type = type;
3218 name: "parent_rect";
3222 name: "nested_rect";
3231 Nested parts adds hierarchy to edje.
3232 Nested part inherits it's location relatively to the parent part.
3233 To declare a nested part just start a new part within current part decl.
3234 You must define parent part name before adding nested parts.
3244 [another part's name]
3246 The part's name which this part is inserted before. One part cannot
3247 have both insert_before and insert_after. One part cannot refer
3248 more than one by insert_before.
3253 st_collections_group_parts_part_insert_before(void)
3255 Edje_Part_Parser *epp;
3258 epp = (Edje_Part_Parser *)current_part;
3259 epp->reorder.insert_before = parse_str(0);
3267 [another part's name]
3269 The part's name which this part is inserted after. One part cannot
3270 have both insert_before and insert_after. One part cannot refer
3271 more than one by insert_after.
3276 st_collections_group_parts_part_insert_after(void)
3278 Edje_Part_Parser *epp;
3281 epp = (Edje_Part_Parser *)current_part;
3282 epp->reorder.insert_after = parse_str(0);
3292 Specifies whether the part will emit signals, although it is named
3293 "mouse_events", disabling it (0) will prevent the part from emitting
3294 any type of signal at all. It's set to 1 by default.
3298 st_collections_group_parts_part_mouse_events(void)
3302 current_part->mouse_events = parse_bool(0);
3312 Specifies whether a part echoes a mouse event to other parts below the
3313 pointer (1), or not (0). It's set to 0 by default.
3317 st_collections_group_parts_part_repeat_events(void)
3321 current_part->repeat_events = parse_bool(0);
3331 Specifies whether events with the given flags should be ignored,
3332 i.e., will not have the signals emitted to the parts. Multiple flags
3333 must be separated by spaces, the effect will be ignoring all events
3334 with one of the flags specified. Possible flags:
3335 @li NONE (default value, no event will be ignored)
3340 st_collections_group_parts_part_ignore_flags(void)
3342 check_min_arg_count(1);
3344 current_part->ignore_flags = parse_flags(0,
3345 "NONE", EVAS_EVENT_FLAG_NONE,
3346 "ON_HOLD", EVAS_EVENT_FLAG_ON_HOLD,
3357 Specifies whether the part will scale its size with an edje scaling
3358 factor. By default scale is off (0) and the default scale factor is
3359 1.0 - that means no scaling. This would be used to scale properties
3360 such as font size, min/max size of the part, and possibly can be used
3361 to scale based on DPI of the target device. The reason to be selective
3362 is that some things work well being scaled, others do not, so the
3363 designer gets to choose what works best.
3367 st_collections_group_parts_part_scale(void)
3371 current_part->scale = parse_bool(0);
3381 Sets the mouse pointer behavior for a given part. The default value is
3382 AUTOGRAB. Aviable modes:
3383 @li AUTOGRAB, when the part is clicked and the button remains
3384 pressed, the part will be the source of all future mouse
3385 signals emitted, even outside the object, until the button is
3387 @li NOGRAB, the effect will be limited to the part's container.
3391 st_collections_group_parts_part_pointer_mode(void)
3395 current_part->pointer_mode = parse_enum(0,
3396 "AUTOGRAB", EVAS_OBJECT_POINTER_MODE_AUTOGRAB,
3397 "NOGRAB", EVAS_OBJECT_POINTER_MODE_NOGRAB,
3408 Enables precise point collision detection for the part, which is more
3409 resource intensive. Disabled by default.
3413 st_collections_group_parts_part_precise_is_inside(void)
3417 current_part->precise_is_inside = parse_bool(0);
3423 use_alternate_font_metrics
3427 Only affects text and textblock parts, when enabled Edje will use
3428 different size measurement functions. Disabled by default. (note from
3429 the author: I don't know what this is exactly useful for?)
3433 st_collections_group_parts_part_use_alternate_font_metrics(void)
3437 current_part->use_alternate_font_metrics = parse_bool(0);
3445 [another part's name]
3447 Only renders the area of part that coincides with another part's
3448 container. Overflowing content will not be displayed. Note that
3449 the part being clipped to can only be a rectangle part.
3453 st_collections_group_parts_part_clip_to_id(void)
3455 Edje_Part_Collection *pc;
3459 pc = eina_list_data_get(eina_list_last(edje_collections));
3463 name = parse_str(0);
3464 data_queue_part_lookup(pc, name, &(current_part->clip_to_id));
3474 [another group's name]
3476 Only available to GROUP or TEXTBLOCK parts. Swallows the specified
3477 group into the part's container if a GROUP. If TEXTBLOCK it is used
3478 for the group to be loaded and used for selection display UNDER the
3479 selected text. source2 is used for on top of the selected text, if
3480 source2 is specified.
3484 st_collections_group_parts_part_source(void)
3488 //FIXME: validate this somehow (need to decide on the format also)
3489 current_part->source = parse_str(0);
3490 data_queue_group_lookup(current_part->source, current_part);
3498 [another group's name]
3500 Only available to TEXTBLOCK parts. It is used for the group to be
3501 loaded and used for selection display OVER the selected text. source
3502 is used for under of the selected text, if source is specified.
3506 st_collections_group_parts_part_source2(void)
3510 //FIXME: validate this somehow (need to decide on the format also)
3511 current_part->source2 = parse_str(0);
3512 data_queue_group_lookup(current_part->source2, current_part);
3520 [another group's name]
3522 Only available to TEXTBLOCK parts. It is used for the group to be
3523 loaded and used for cursor display UNDER the cursor position. source4
3524 is used for over the cursor text, if source4 is specified.
3528 st_collections_group_parts_part_source3(void)
3532 //FIXME: validate this somehow (need to decide on the format also)
3533 current_part->source3 = parse_str(0);
3534 data_queue_group_lookup(current_part->source3, current_part);
3542 [another group's name]
3544 Only available to TEXTBLOCK parts. It is used for the group to be
3545 loaded and used for cursor display OVER the cursor position. source3
3546 is used for under the cursor text, if source4 is specified.
3550 st_collections_group_parts_part_source4(void)
3554 //FIXME: validate this somehow (need to decide on the format also)
3555 current_part->source4 = parse_str(0);
3556 data_queue_group_lookup(current_part->source4, current_part);
3564 [another group's name]
3566 Only available to TEXTBLOCK parts. It is used for the group to be
3567 loaded and used for anchors display UNDER the anchor position. source6
3568 is used for over the anchors text, if source6 is specified.
3572 st_collections_group_parts_part_source5(void)
3576 //FIXME: validate this somehow (need to decide on the format also)
3577 current_part->source5 = parse_str(0);
3578 data_queue_group_lookup(current_part->source5, current_part);
3586 [another group's name]
3588 Only available to TEXTBLOCK parts. It is used for the group to be
3589 loaded and used for anchor display OVER the anchor position. source5
3590 is used for under the anchor text, if source6 is specified.
3594 st_collections_group_parts_part_source6(void)
3598 //FIXME: validate this somehow (need to decide on the format also)
3599 current_part->source6 = parse_str(0);
3600 data_queue_group_lookup(current_part->source6, current_part);
3610 (optional) [SHADOW DIRECTION]
3612 Causes Edje to draw the selected effect among:
3619 @li OUTLINE_SOFT_SHADOW
3624 Shadow directions (default if not given is BOTTOM_RIGHT):
3636 st_collections_group_parts_part_effect(void)
3638 check_min_arg_count(1);
3640 current_part->effect = parse_enum(0,
3641 "NONE", EDJE_TEXT_EFFECT_NONE,
3642 "PLAIN", EDJE_TEXT_EFFECT_PLAIN,
3643 "OUTLINE", EDJE_TEXT_EFFECT_OUTLINE,
3644 "SOFT_OUTLINE", EDJE_TEXT_EFFECT_SOFT_OUTLINE,
3645 "SHADOW", EDJE_TEXT_EFFECT_SHADOW,
3646 "SOFT_SHADOW", EDJE_TEXT_EFFECT_SOFT_SHADOW,
3647 "OUTLINE_SHADOW", EDJE_TEXT_EFFECT_OUTLINE_SHADOW,
3648 "OUTLINE_SOFT_SHADOW", EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW,
3649 "FAR_SHADOW", EDJE_TEXT_EFFECT_FAR_SHADOW,
3650 "FAR_SOFT_SHADOW", EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW,
3651 "GLOW", EDJE_TEXT_EFFECT_GLOW,
3653 if (get_arg_count() >= 2)
3655 unsigned char shadow;
3657 shadow = parse_enum(1,
3658 "BOTTOM_RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT,
3659 "BOTTOM", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM,
3660 "BOTTOM_LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT,
3661 "LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT,
3662 "TOP_LEFT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT,
3663 "TOP", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP,
3664 "TOP_RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT,
3665 "RIGHT", EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT,
3667 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(current_part->effect, shadow);
3678 Sets the edit mode for a textblock part to one of:
3683 It causes the part be editable if the edje object has the keyboard
3684 focus AND the part has the edje focus (or selectable always
3685 regardless of focus) and in the event of password mode, not
3686 selectable and all text chars replaced with *'s but editable and
3691 st_collections_group_parts_part_entry_mode(void)
3695 current_part->entry_mode = parse_enum(0,
3696 "NONE", EDJE_ENTRY_EDIT_MODE_NONE,
3697 "PLAIN", EDJE_ENTRY_EDIT_MODE_SELECTABLE,
3698 "EDITABLE", EDJE_ENTRY_EDIT_MODE_EDITABLE,
3699 "PASSWORD", EDJE_ENTRY_EDIT_MODE_PASSWORD,
3710 Sets the selection mode for a textblock part to one of:
3711 @li DEFAULT selection mode is what you would expect on any desktop. Press
3712 mouse, drag and release to end.
3713 @li EXPLICIT mode requires the application
3714 controlling the edje object has to explicitly begin and end selection
3715 modes, and the selection itself is dragable at both ends.
3719 st_collections_group_parts_part_select_mode(void)
3723 current_part->select_mode = parse_enum(0,
3724 "DEFAULT", EDJE_ENTRY_SELECTION_MODE_DEFAULT,
3725 "EXPLICIT", EDJE_ENTRY_SELECTION_MODE_EXPLICIT,
3726 "BLOCK_HANDLE", EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE,
3737 Sets the cursor mode for a textblock part to one of:
3738 @li UNDER cursor mode means the cursor will draw below the character pointed
3739 at. That's the default.
3740 @li BEFORE cursor mode means the cursor is drawn as a vertical line before
3741 the current character, just like many other GUI toolkits handle it.
3745 st_collections_group_parts_part_cursor_mode(void)
3749 current_part->cursor_mode = parse_enum(0,
3750 "UNDER", EDJE_ENTRY_CURSOR_MODE_UNDER,
3751 "BEFORE", EDJE_ENTRY_CURSOR_MODE_BEFORE,
3762 It causes a textblock that is editable to allow multiple lines for
3767 st_collections_group_parts_part_multiline(void)
3771 current_part->multiline = parse_bool(0);
3781 Specifies whether the part will use accessibility feature (1),
3782 or not (0). It's set to 0 by default.
3786 st_collections_group_parts_part_access(void)
3790 current_part->access = parse_bool(0);
3801 confine: "another part";
3802 events: "another dragable part";
3809 When this block is used the resulting part can be dragged around the
3810 interface, do not confuse with external drag & drop. By default Edje
3811 (and most applications) will attempt to use the minimal size possible
3812 for a dragable part. If the min property is not set in the description
3813 the part will be (most likely) set to 0px width and 0px height, thus
3820 [enable/disable] [step] [count]
3822 Used to setup dragging events for the X axis. The first parameter is
3823 used to enable (1 or -1) and disable (0) dragging along the axis. When
3824 enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second
3825 parameter takes any integer and will limit movement to values
3826 divisible by it, causing the part to jump from position to position.
3827 The third parameter, (question from the author: What is count for?).
3831 st_collections_group_parts_part_dragable_x(void)
3835 current_part->dragable.x = parse_int_range(0, -1, 1);
3836 current_part->dragable.step_x = parse_int_range(1, 0, 0x7fffffff);
3837 current_part->dragable.count_x = parse_int_range(2, 0, 0x7fffffff);
3845 [enable/disable] [step] [count]
3847 Used to setup dragging events for the Y axis. The first parameter is
3848 used to enable (1 or -1) and disable (0) dragging along the axis. When
3849 enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second
3850 parameter takes any integer and will limit movement to values
3851 divisibles by it, causing the part to jump from position to position.
3852 The third parameter, (question from the author: What is count for?).
3856 st_collections_group_parts_part_dragable_y(void)
3860 current_part->dragable.y = parse_int_range(0, -1, 1);
3861 current_part->dragable.step_y = parse_int_range(1, 0, 0x7fffffff);
3862 current_part->dragable.count_y = parse_int_range(2, 0, 0x7fffffff);
3870 [another part's name]
3872 When set, limits the movement of the dragged part to another part's
3873 container. When you use confine don't forget to set a min size for the
3874 part, or the draggie will not show up.
3878 st_collections_group_parts_part_dragable_confine(void)
3880 Edje_Part_Collection *pc;
3884 pc = eina_list_data_get(eina_list_last(edje_collections));
3888 name = parse_str(0);
3889 data_queue_part_lookup(pc, name, &(current_part->dragable.confine_id));
3899 [another dragable part's name]
3901 It causes the part to forward the drag events to another part, thus
3902 ignoring them for itself.
3906 st_collections_group_parts_part_dragable_events(void)
3908 Edje_Part_Collection *pc;
3912 pc = eina_list_data_get(eina_list_last(edje_collections));
3916 name = parse_str(0);
3917 data_queue_part_lookup(pc, name, &(current_part->dragable.event_id));
3933 source: "some source";
3940 source: "some other source";
3950 On a part of type BOX, this block can be used to set other groups
3951 as elements of the box. These can be mixed with external objects set
3952 by the application through the edje_object_part_box_* API.
3955 static void ob_collections_group_parts_part_box_items_item(void)
3958 Edje_Pack_Element *item;
3959 Edje_Pack_Element_Parser *pitem;
3963 if ((ep->type != EDJE_PART_TYPE_BOX) && (ep->type != EDJE_PART_TYPE_TABLE))
3965 ERR("parse error %s:%i. box attributes in non-BOX or TABLE part.",
3971 ep->items = realloc(ep->items, sizeof (Edje_Pack_Element*) * ep->items_count);
3974 ERR("Not enough memory.");
3978 item = mem_alloc(SZ(Edje_Pack_Element_Parser));
3979 current_item = ep->items[ep->items_count - 1] = item;
3980 item->type = EDJE_PART_TYPE_GROUP;
3982 item->source = NULL;
3989 item->padding.l = 0;
3990 item->padding.r = 0;
3991 item->padding.t = 0;
3992 item->padding.b = 0;
3993 item->align.x = FROM_DOUBLE(0.5);
3994 item->align.y = FROM_DOUBLE(0.5);
3995 item->weight.x = FROM_DOUBLE(0.0);
3996 item->weight.y = FROM_DOUBLE(0.0);
3999 item->aspect.mode = EDJE_ASPECT_CONTROL_NONE;
4000 item->options = NULL;
4005 pitem = (Edje_Pack_Element_Parser *)item;
4006 pitem->can_override = EINA_FALSE;
4014 Only GROUP for now (defaults to it)
4016 Sets the type of the object this item will hold.
4019 static void st_collections_group_parts_part_box_items_item_type(void)
4027 if (strcmp(s, "GROUP"))
4029 ERR("parse error %s:%i. token %s not one of: GROUP.",
4030 file_in, line - 1, s);
4033 /* FIXME: handle the enum, once everything else is supported */
4034 current_item->type = EDJE_PART_TYPE_GROUP;
4043 [name for the object]
4045 Sets the name of the object via evas_object_name_set().
4048 static void st_collections_group_parts_part_box_items_item_name(void)
4051 Edje_Pack_Element *item;
4052 Edje_Pack_Element_Parser *pitem;
4057 item = ep->items[ep->items_count - 1];
4059 item->name = parse_str(0);
4064 for (i = 0; i < ep->items_count - 1; ++i)
4066 if (ep->items[i]->name && (!strcmp(ep->items[i]->name, item->name)))
4068 pitem = (Edje_Pack_Element_Parser *)ep->items[i];
4069 if (!pitem->can_override)
4071 ERR("parse error %s:%i. There is already a item of the name %s",
4072 file_in, line - 1, item->name);
4079 ep->items = realloc(ep->items, ep->items_count * sizeof (Edje_Pack_Element *));
4080 current_item = ep->items[i];
4081 pitem->can_override = EINA_FALSE;
4093 [another group's name]
4095 Sets the group this object will be made from.
4098 static void st_collections_group_parts_part_box_items_item_source(void)
4102 current_item->source = parse_str(0);
4103 data_queue_group_lookup(current_item->source, current_part);
4113 Sets the minimum size hints for this object.
4116 static void st_collections_group_parts_part_box_items_item_min(void)
4120 current_item->min.w = parse_int_range(0, 0, 0x7ffffff);
4121 current_item->min.h = parse_int_range(1, 0, 0x7ffffff);
4131 Sets the preferred size hints for this object.
4134 static void st_collections_group_parts_part_box_items_item_prefer(void)
4138 current_item->prefer.w = parse_int_range(0, 0, 0x7ffffff);
4139 current_item->prefer.h = parse_int_range(1, 0, 0x7ffffff);
4148 Sets the maximum size hints for this object.
4151 static void st_collections_group_parts_part_box_items_item_max(void)
4155 current_item->max.w = parse_int_range(0, 0, 0x7ffffff);
4156 current_item->max.h = parse_int_range(1, 0, 0x7ffffff);
4164 [left] [right] [top] [bottom]
4166 Sets the padding hints for this object.
4169 static void st_collections_group_parts_part_box_items_item_padding(void)
4173 current_item->padding.l = parse_int_range(0, 0, 0x7ffffff);
4174 current_item->padding.r = parse_int_range(1, 0, 0x7ffffff);
4175 current_item->padding.t = parse_int_range(2, 0, 0x7ffffff);
4176 current_item->padding.b = parse_int_range(3, 0, 0x7ffffff);
4186 Sets the alignment hints for this object.
4189 static void st_collections_group_parts_part_box_items_item_align(void)
4193 current_item->align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
4194 current_item->align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
4204 Sets the weight hints for this object.
4207 static void st_collections_group_parts_part_box_items_item_weight(void)
4211 current_item->weight.x = FROM_DOUBLE(parse_float_range(0, 0.0, 99999.99));
4212 current_item->weight.y = FROM_DOUBLE(parse_float_range(1, 0.0, 99999.99));
4222 Sets the aspect width and height hints for this object.
4225 static void st_collections_group_parts_part_box_items_item_aspect(void)
4229 current_item->aspect.w = parse_int_range(0, 0, 0x7fffffff);
4230 current_item->aspect.h = parse_int_range(1, 0, 0x7fffffff);
4238 NONE, NEITHER, HORIZONTAL, VERTICAL, BOTH
4240 Sets the aspect control hints for this object.
4243 static void st_collections_group_parts_part_box_items_item_aspect_mode(void)
4247 current_item->aspect.mode = parse_enum(0,
4248 "NONE", EDJE_ASPECT_CONTROL_NONE,
4249 "NEITHER", EDJE_ASPECT_CONTROL_NEITHER,
4250 "HORIZONTAL", EDJE_ASPECT_CONTROL_HORIZONTAL,
4251 "VERTICAL", EDJE_ASPECT_CONTROL_VERTICAL,
4252 "BOTH", EDJE_ASPECT_CONTROL_BOTH,
4263 Sets extra options for the object. Unused for now.
4266 static void st_collections_group_parts_part_box_items_item_options(void)
4270 current_item->options = parse_str(0);
4280 Sets the position this item will have in the table.
4281 This is required for parts of type TABLE.
4284 static void st_collections_group_parts_part_table_items_item_position(void)
4288 if (current_part->type != EDJE_PART_TYPE_TABLE)
4290 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4295 current_item->col = parse_int_range(0, 0, 0xffff);
4296 current_item->row = parse_int_range(1, 0, 0xffff);
4306 Sets how many columns/rows this item will use.
4310 static void st_collections_group_parts_part_table_items_item_span(void)
4314 if (current_part->type != EDJE_PART_TYPE_TABLE)
4316 ERR("parse error %s:%i. table attributes in non-TABLE part.",
4321 current_item->colspan = parse_int_range(0, 1, 0xffff);
4322 current_item->rowspan = parse_int_range(1, 1, 0xffff);
4326 @edcsection{description,State description sub blocks}
4335 inherit: "another_description" INDEX;
4336 state: "description_name" INDEX;
4354 Every part can have one or more description blocks. Each description is
4355 used to define style and layout properties of a part in a given
4360 ob_collections_group_parts_part_description(void)
4361 { /* Allocate and set desc, set relative part hierarchy if needed */
4362 Edje_Part_Collection *pc;
4364 Edje_Part_Description_Common *ed;
4366 pc = eina_list_data_get(eina_list_last(edje_collections));
4369 ed = _edje_part_description_alloc(ep->type, pc->part, ep->name);
4376 if (!ep->default_desc)
4378 current_desc = ep->default_desc = ed;
4380 { /* Get the ptr of the part above current part in hierarchy */
4381 Edje_Part *node = edje_cc_handlers_hierarchy_parent_get();
4382 if (node) /* Make relative according to part hierarchy */
4383 edje_cc_handlers_hierarchy_set(node);
4388 ep->other.desc_count++;
4389 ep->other.desc = realloc(ep->other.desc,
4390 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4391 current_desc = ep->other.desc[ep->other.desc_count - 1] = ed;
4396 ed->align.x = FROM_DOUBLE(0.5);
4397 ed->align.y = FROM_DOUBLE(0.5);
4404 ed->rel1.relative_x = FROM_DOUBLE(0.0);
4405 ed->rel1.relative_y = FROM_DOUBLE(0.0);
4406 ed->rel1.offset_x = 0;
4407 ed->rel1.offset_y = 0;
4408 ed->rel2.relative_x = FROM_DOUBLE(1.0);
4409 ed->rel2.relative_y = FROM_DOUBLE(1.0);
4410 ed->rel2.offset_x = -1;
4411 ed->rel2.offset_y = -1;
4412 ed->color_class = NULL;
4421 ed->map.id_persp = -1;
4422 ed->map.id_light = -1;
4423 ed->map.rot.id_center = -1;
4424 ed->map.rot.x = FROM_DOUBLE(0.0);
4425 ed->map.rot.y = FROM_DOUBLE(0.0);
4426 ed->map.rot.z = FROM_DOUBLE(0.0);
4430 ed->map.backcull = 0;
4431 ed->map.persp_on = 0;
4432 ed->persp.zplane = 0;
4433 ed->persp.focal = 1000;
4434 ed->minmul.have = 1;
4435 ed->minmul.w = FROM_INT(1);
4436 ed->minmul.h = FROM_INT(1);
4444 [another description's name] [another description's index]
4446 When set, the description will inherit all the properties from the
4447 named description. The properties defined in this part will override
4448 the inherited properties, reducing the amount of necessary code for
4449 simple state changes. Note: inheritance in Edje is single level only.
4453 st_collections_group_parts_part_description_inherit(void)
4455 Edje_Part_Collection *pc;
4457 Edje_Part_Description_Common *ed, *parent = NULL;
4458 Edje_Part_Image_Id *iid;
4460 const char *state_name;
4461 double parent_val, state_val;
4463 pc = eina_list_data_get(eina_list_last(edje_collections));
4467 if (!ed->state.name)
4469 ERR("parse error %s:%i. inherit may only be used after state",
4474 parent = parent_desc;
4477 check_min_arg_count(1);
4479 /* inherit may not be used in the default description */
4480 if (!ep->other.desc_count)
4482 ERR("parse error %s:%i. "
4483 "inherit may not be used in the default description",
4488 /* find the description that we inherit from */
4489 parent_name = parse_str(0);
4490 if (get_arg_count() == 2)
4491 parent_val = parse_float_range(1, 0.0, 1.0);
4495 if (!strcmp (parent_name, "default") && parent_val == 0.0)
4496 parent = ep->default_desc;
4499 Edje_Part_Description_Common *d;
4500 double min_dst = 999.0;
4503 if (!strcmp(parent_name, "default"))
4505 parent = ep->default_desc;
4506 min_dst = ABS(ep->default_desc->state.value - parent_val);
4509 for (i = 0; i < ep->other.desc_count; ++i)
4511 d = ep->other.desc[i];
4513 if (!strcmp (d->state.name, parent_name))
4518 dst = ABS(d->state.value - parent_val);
4530 ERR("parse error %s:%i. "
4531 "cannot find referenced part %s state %s %lf",
4532 file_in, line - 1, ep->name, parent_name, parent_val);
4538 /* now do a full copy, only state info will be kept */
4539 state_name = ed->state.name;
4540 state_val = ed->state.value;
4544 ed->state.name = state_name;
4545 ed->state.value = state_val;
4547 data_queue_copied_part_lookup(pc, &parent->rel1.id_x, &ed->rel1.id_x);
4548 data_queue_copied_part_lookup(pc, &parent->rel1.id_y, &ed->rel1.id_y);
4549 data_queue_copied_part_lookup(pc, &parent->rel2.id_x, &ed->rel2.id_x);
4550 data_queue_copied_part_lookup(pc, &parent->rel2.id_y, &ed->rel2.id_y);
4552 data_queue_copied_part_lookup(pc, &parent->map.id_persp, &ed->map.id_persp);
4553 data_queue_copied_part_lookup(pc, &parent->map.id_light, &ed->map.id_light);
4554 data_queue_copied_part_lookup(pc, &parent->map.rot.id_center, &ed->map.rot.id_center);
4556 /* make sure all the allocated memory is getting copied, not just
4559 #define STRDUP(x) x ? strdup(x) : NULL
4561 ed->color_class = STRDUP(ed->color_class);
4564 case EDJE_PART_TYPE_SPACER:
4565 case EDJE_PART_TYPE_RECTANGLE:
4566 case EDJE_PART_TYPE_SWALLOW:
4567 case EDJE_PART_TYPE_GROUP:
4568 /* Nothing todo, this part only have a common description. */
4570 case EDJE_PART_TYPE_TEXT:
4571 case EDJE_PART_TYPE_TEXTBLOCK:
4573 Edje_Part_Description_Text *ted = (Edje_Part_Description_Text*) ed;
4574 Edje_Part_Description_Text *tparent = (Edje_Part_Description_Text*) parent;
4576 ted->text = tparent->text;
4578 ted->text.text.str = STRDUP(ted->text.text.str);
4579 ted->text.text_class = STRDUP(ted->text.text_class);
4580 ted->text.font.str = STRDUP(ted->text.font.str);
4582 data_queue_copied_part_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source));
4583 data_queue_copied_part_lookup(pc, &(tparent->text.id_text_source), &(ted->text.id_text_source));
4587 case EDJE_PART_TYPE_IMAGE:
4589 Edje_Part_Description_Image *ied = (Edje_Part_Description_Image *) ed;
4590 Edje_Part_Description_Image *iparent = (Edje_Part_Description_Image *) parent;
4593 ied->image = iparent->image;
4595 data_queue_image_remove(&ied->image.id, &ied->image.set);
4596 data_queue_copied_image_lookup(&iparent->image.id, &ied->image.id, &ied->image.set);
4598 ied->image.tweens = calloc(iparent->image.tweens_count,
4599 sizeof (Edje_Part_Image_Id*));
4600 for (i = 0; i < iparent->image.tweens_count; i++)
4602 Edje_Part_Image_Id *iid_new;
4604 iid = iparent->image.tweens[i];
4606 iid_new = mem_alloc(SZ(Edje_Part_Image_Id));
4607 data_queue_image_remove(&ied->image.id, &ied->image.set);
4608 data_queue_copied_image_lookup(&(iid->id), &(iid_new->id), &(iid_new->set));
4609 ied->image.tweens[i] = iid_new;
4614 case EDJE_PART_TYPE_PROXY:
4616 Edje_Part_Description_Proxy *ped = (Edje_Part_Description_Proxy*) ed;
4617 Edje_Part_Description_Proxy *pparent = (Edje_Part_Description_Proxy*) parent;
4619 data_queue_copied_part_lookup(pc, &(pparent->proxy.id), &(ped->proxy.id));
4623 case EDJE_PART_TYPE_BOX:
4625 Edje_Part_Description_Box *bed = (Edje_Part_Description_Box *) ed;
4626 Edje_Part_Description_Box *bparent = (Edje_Part_Description_Box *) parent;
4628 bed->box = bparent->box;
4632 case EDJE_PART_TYPE_TABLE:
4634 Edje_Part_Description_Table *ted = (Edje_Part_Description_Table *) ed;
4635 Edje_Part_Description_Table *tparent = (Edje_Part_Description_Table *) parent;
4637 ted->table = tparent->table;
4641 case EDJE_PART_TYPE_EXTERNAL:
4643 Edje_Part_Description_External *eed = (Edje_Part_Description_External *) ed;
4644 Edje_Part_Description_External *eparent = (Edje_Part_Description_External *) parent;
4646 if (eparent->external_params)
4649 Edje_External_Param *param, *new_param;
4651 eed->external_params = NULL;
4652 EINA_LIST_FOREACH(eparent->external_params, l, param)
4654 new_param = mem_alloc(SZ(Edje_External_Param));
4655 *new_param = *param;
4656 eed->external_params = eina_list_append(eed->external_params, new_param);
4672 [another part's name]
4674 Causes the part to use another part content as the content of this part.
4675 Only work with PROXY part.
4679 st_collections_group_parts_part_description_source(void)
4681 Edje_Part_Collection *pc;
4682 Edje_Part_Description_Proxy *ed;
4687 pc = eina_list_data_get(eina_list_last(edje_collections));
4689 if (current_part->type != EDJE_PART_TYPE_PROXY)
4691 ERR("parse error %s:%i. source attributes in non-PROXY part.",
4696 ed = (Edje_Part_Description_Proxy*) current_desc;
4698 name = parse_str(0);
4700 data_queue_part_lookup(pc, name, &(ed->proxy.id));
4709 [a name for the description] [an index]
4711 Sets a name used to identify a description inside a given part.
4712 Multiple descriptions are used to declare different states of the same
4713 part, like "clicked" or "invisible". All states declarations are also
4714 coupled with an index number between 0.0 and 1.0. All parts must have
4715 at least one description named "default 0.0".
4719 st_collections_group_parts_part_description_state(void)
4722 Edje_Part_Description_Common *ed;
4725 check_min_arg_count(1);
4729 ed = ep->default_desc;
4730 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
4733 if (!strcmp (s, "custom"))
4735 ERR("parse error %s:%i. invalid state name: '%s'.",
4736 file_in, line - 1, s);
4741 if (get_arg_count() == 1)
4742 ed->state.value = 0.0;
4744 ed->state.value = parse_float_range(1, 0.0, 1.0);
4746 if (ed != ep->default_desc)
4748 if ((ep->default_desc->state.name && !strcmp(s, ep->default_desc->state.name) && ed->state.value == ep->default_desc->state.value) ||
4749 (!ep->default_desc->state.name && !strcmp(s, "default") && ed->state.value == ep->default_desc->state.value))
4751 if (ep->type == EDJE_PART_TYPE_IMAGE)
4752 _edje_part_description_image_remove((Edje_Part_Description_Image*) ed);
4755 ep->other.desc_count--;
4756 ep->other.desc = realloc(ep->other.desc,
4757 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4758 current_desc = ep->default_desc;
4760 else if (ep->other.desc_count)
4763 for (i = 0; i < ep->other.desc_count - 1; ++i)
4765 if (!strcmp(s, ep->other.desc[i]->state.name) && ed->state.value == ep->other.desc[i]->state.value)
4767 if (ep->type == EDJE_PART_TYPE_IMAGE)
4768 _edje_part_description_image_remove((Edje_Part_Description_Image*) ed);
4771 ep->other.desc_count--;
4772 ep->other.desc = realloc(ep->other.desc,
4773 sizeof (Edje_Part_Description_Common*) * ep->other.desc_count);
4774 current_desc = ep->other.desc[i];
4789 Takes a boolean value specifying whether part is visible (1) or not
4790 (0). Non-visible parts do not emit signals. The default value is 1.
4794 st_collections_group_parts_part_description_visible(void)
4798 if (current_part->type == EDJE_PART_TYPE_SPACER)
4800 ERR("parse error %s:%i. SPACER part can't have a visibility defined",
4805 current_desc->visible = parse_bool(0);
4812 [NONE, WIDTH, HEIGHT or BOTH]
4814 Emit a signal when the part size change from zero or to a zero size
4815 ('limit,width,over', 'limit,width,zero'). By default no signal are
4821 st_collections_group_parts_part_description_limit(void)
4825 current_desc->limit = parse_enum(0,
4831 if (current_desc->limit)
4833 Edje_Part_Collection *pc;
4836 pc = eina_list_data_get(eina_list_last(edje_collections));
4837 count = pc->limits.parts_count++;
4838 pc->limits.parts = realloc(pc->limits.parts,
4839 pc->limits.parts_count * sizeof (Edje_Part_Limit));
4840 data_queue_part_lookup(pc, current_part->name,
4841 &(pc->limits.parts[count].part));
4852 When the displayed object's size is smaller than its container, this
4853 property moves it relatively along both axis inside its container. The
4854 default value is "0.5 0.5".
4858 st_collections_group_parts_part_description_align(void)
4862 current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0));
4863 current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
4871 [width, 0 or 1] [height, 0 or 1]
4873 This affects the minimum size calculation. See
4874 edje_object_size_min_calc() and edje_object_size_min_restricted_calc().
4875 This tells the min size calculation routine that this part does not
4876 change size in width or height (1 for it doesn't, 0 for it does), so
4877 the routine should not try and expand or contract the part.
4881 st_collections_group_parts_part_description_fixed(void)
4885 current_desc->fixed.w = parse_float_range(0, 0, 1);
4886 current_desc->fixed.h = parse_float_range(1, 0, 1);
4894 [width] [height] or SOURCE
4896 The minimum size of the state.
4898 When min is defined to SOURCE, it will look at the original
4899 image size and enforce it minimal size to match at least the
4900 original one. The part must be an IMAGE or a GROUP part.
4904 st_collections_group_parts_part_description_min(void)
4906 check_min_arg_count(1);
4909 current_desc->min.w = parse_float_range(0, 0, 0x7fffffff);
4910 current_desc->min.h = parse_float_range(1, 0, 0x7fffffff);
4915 if ((current_part->type != EDJE_PART_TYPE_IMAGE && current_part->type != EDJE_PART_TYPE_GROUP) ||
4916 !tmp || strcmp(tmp, "SOURCE") != 0)
4918 ERR("parse error %s:%i. "
4919 "Only IMAGE and GROUP part can have a min: SOURCE; defined",
4924 current_desc->min.limit = EINA_TRUE;
4933 [width multipler] [height multiplier]
4935 A multiplier FORCIBLY applied to whatever minimum size is only during
4936 minimum size calculation.
4941 st_collections_group_parts_part_description_minmul(void)
4945 current_desc->minmul.w = FROM_DOUBLE(parse_float_range(0, 0, 999999));
4946 current_desc->minmul.h = FROM_DOUBLE(parse_float_range(1, 0, 999999));
4954 [width] [height] or SOURCE
4956 The maximum size of the state. A size of -1.0 means that it will be ignored in one direction.
4958 When max is set to SOURCE, edje will enforce the part to be
4959 not more than the original image size. The part must be an
4964 st_collections_group_parts_part_description_max(void)
4966 check_min_arg_count(1);
4969 current_desc->max.w = parse_float_range(0, -1.0, 0x7fffffff);
4970 current_desc->max.h = parse_float_range(1, -1.0, 0x7fffffff);
4975 if (current_part->type != EDJE_PART_TYPE_IMAGE ||
4976 !tmp || strcmp(tmp, "SOURCE") != 0)
4978 ERR("parse error %s:%i. "
4979 "Only IMAGE part can have a max: SOURCE; defined",
4984 current_desc->max.limit = EINA_TRUE;
4995 Restricts resizing of each dimension to values divisibles by its value.
4996 This causes the part to jump from value to value while resizing. The
4997 default value is "0 0" disabling stepping.
5001 st_collections_group_parts_part_description_step(void)
5005 current_desc->step.x = parse_float_range(0, 0, 0x7fffffff);
5006 current_desc->step.y = parse_float_range(1, 0, 0x7fffffff);
5016 Normally width and height can be resized to any values independently.
5017 The aspect property forces the width to height ratio to be kept between
5018 the minimum and maximum set. For example, "1.0 1.0" will increase the
5019 width a pixel for every pixel added to height. The default value is
5020 "0.0 0.0" disabling aspect.
5024 st_collections_group_parts_part_description_aspect(void)
5028 current_desc->aspect.min = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
5029 current_desc->aspect.max = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
5039 Sets the scope of the "aspect" property to a given dimension. Available
5040 options are BOTH, VERTICAL, HORIZONTAL, SOURCE and NONE
5044 st_collections_group_parts_part_description_aspect_preference(void)
5048 current_desc->aspect.prefer = parse_enum(0,
5049 "NONE", EDJE_ASPECT_PREFER_NONE,
5050 "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL,
5051 "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL,
5052 "BOTH", EDJE_ASPECT_PREFER_BOTH,
5053 "SOURCE", EDJE_ASPECT_PREFER_SOURCE,
5064 The part will use the color values of the named color_class, these
5065 values can be overrided by the "color", "color2" and "color3"
5066 properties set below.
5070 st_collections_group_parts_part_description_color_class(void)
5074 if (current_part->type == EDJE_PART_TYPE_SPACER)
5076 ERR("parse error %s:%i. SPACER part can't have a color defined",
5081 current_desc->color_class = parse_str(0);
5089 [red] [green] [blue] [alpha]
5091 Sets the main color to the specified values (between 0 and 255).
5095 st_collections_group_parts_part_description_color(void)
5099 if (current_part->type == EDJE_PART_TYPE_SPACER)
5101 ERR("parse error %s:%i. SPACER part can't have a color defined",
5106 current_desc->color.r = parse_int_range(0, 0, 255);
5107 current_desc->color.g = parse_int_range(1, 0, 255);
5108 current_desc->color.b = parse_int_range(2, 0, 255);
5109 current_desc->color.a = parse_int_range(3, 0, 255);
5117 [red] [green] [blue] [alpha]
5119 Sets the text shadow color to the specified values (0 to 255).
5123 st_collections_group_parts_part_description_color2(void)
5127 if (current_part->type == EDJE_PART_TYPE_SPACER)
5129 ERR("parse error %s:%i. SPACER part can't have a color defined",
5134 current_desc->color2.r = parse_int_range(0, 0, 255);
5135 current_desc->color2.g = parse_int_range(1, 0, 255);
5136 current_desc->color2.b = parse_int_range(2, 0, 255);
5137 current_desc->color2.a = parse_int_range(3, 0, 255);
5145 [red] [green] [blue] [alpha]
5147 Sets the text outline color to the specified values (0 to 255).
5151 st_collections_group_parts_part_description_color3(void)
5153 Edje_Part_Collection *pc;
5154 Edje_Part_Description_Text *ed;
5158 pc = eina_list_data_get(eina_list_last(edje_collections));
5160 if (current_part->type != EDJE_PART_TYPE_TEXT
5161 && current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
5163 ERR("Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.",
5164 current_part->name, pc->part);
5168 ed = (Edje_Part_Description_Text*)current_desc;
5170 ed->text.color3.r = parse_int_range(0, 0, 255);
5171 ed->text.color3.g = parse_int_range(1, 0, 255);
5172 ed->text.color3.b = parse_int_range(2, 0, 255);
5173 ed->text.color3.a = parse_int_range(3, 0, 255);
5195 The rel1 and rel2 blocks are used to define the position of each corner
5196 of the part's container. With rel1 being the left-up corner and rel2
5197 being the right-down corner.
5205 Moves a corner to a relative position inside the container of the
5206 relative "to" part. Values from 0.0 (0%, beginning) to 1.0 (100%, end)
5211 st_collections_group_parts_part_description_rel1_relative(void)
5215 current_desc->rel1.relative_x = FROM_DOUBLE(parse_float(0));
5216 current_desc->rel1.relative_y = FROM_DOUBLE(parse_float(1));
5226 Affects the corner position a fixed number of pixels along each axis.
5230 st_collections_group_parts_part_description_rel1_offset(void)
5234 current_desc->rel1.offset_x = parse_int(0);
5235 current_desc->rel1.offset_y = parse_int(1);
5243 [another part's name]
5245 Causes a corner to be positioned relatively to another part's
5246 container. Setting to "" will un-set this value for inherited
5251 st_collections_group_parts_part_description_rel1_to_set(const char *name)
5253 Edje_Part_Collection *pc;
5254 pc = eina_list_data_get(eina_list_last(edje_collections));
5255 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_x));
5256 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_y));
5260 st_collections_group_parts_part_description_rel1_to(void)
5266 name = parse_str(0);
5267 st_collections_group_parts_part_description_rel1_to_set(name);
5277 [another part's name]
5279 Causes a corner to be positioned relatively to the X axis of another
5280 part's container. Simply put affects the first parameter of "relative".
5281 Setting to "" will un-set this value for inherited parts.
5285 st_collections_group_parts_part_description_rel1_to_x(void)
5287 Edje_Part_Collection *pc;
5291 pc = eina_list_data_get(eina_list_last(edje_collections));
5296 name = parse_str(0);
5297 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_x));
5307 [another part's name]
5309 Causes a corner to be positioned relatively to the Y axis of another
5310 part's container. Simply put, affects the second parameter of
5311 "relative". Setting to "" will un-set this value for inherited parts.
5315 st_collections_group_parts_part_description_rel1_to_y(void)
5317 Edje_Part_Collection *pc;
5321 pc = eina_list_data_get(eina_list_last(edje_collections));
5326 name = parse_str(0);
5327 data_queue_part_lookup(pc, name, &(current_desc->rel1.id_y));
5333 st_collections_group_parts_part_description_rel2_relative(void)
5337 current_desc->rel2.relative_x = FROM_DOUBLE(parse_float(0));
5338 current_desc->rel2.relative_y = FROM_DOUBLE(parse_float(1));
5342 st_collections_group_parts_part_description_rel2_offset(void)
5346 current_desc->rel2.offset_x = parse_int(0);
5347 current_desc->rel2.offset_y = parse_int(1);
5351 st_collections_group_parts_part_description_rel2_to_set(const char *name)
5353 Edje_Part_Collection *pc;
5354 pc = eina_list_data_get(eina_list_last(edje_collections));
5355 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_x));
5356 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_y));
5360 st_collections_group_parts_part_description_rel2_to(void)
5366 name = parse_str(0);
5367 st_collections_group_parts_part_description_rel2_to_set(name);
5373 st_collections_group_parts_part_description_rel2_to_x(void)
5375 Edje_Part_Collection *pc;
5379 pc = eina_list_data_get(eina_list_last(edje_collections));
5384 name = parse_str(0);
5385 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_x));
5391 st_collections_group_parts_part_description_rel2_to_y(void)
5393 Edje_Part_Collection *pc;
5397 pc = eina_list_data_get(eina_list_last(edje_collections));
5402 name = parse_str(0);
5403 data_queue_part_lookup(pc, name, &(current_desc->rel2.id_y));
5409 @edcsection{description_image,Image state description sub blocks}
5420 normal: "filename.ext";
5421 tween: "filename2.ext";
5423 tween: "filenameN.ext";
5424 border: left right top bottom;
5425 middle: 0/1/NONE/DEFAULT/SOLID;
5437 Name of image to be used as previously declared in the images block.
5438 In an animation, this is the first and last image displayed. It's
5439 required in any image part
5443 st_collections_group_parts_part_description_image_normal(void)
5445 Edje_Part_Description_Image *ed;
5449 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5451 ERR("parse error %s:%i. "
5452 "image attributes in non-IMAGE part.",
5457 ed = (Edje_Part_Description_Image*) current_desc;
5462 name = parse_str(0);
5463 data_queue_image_remove(&(ed->image.id), &(ed->image.set));
5464 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set));
5476 Name of an image to be used in an animation loop, an image block can
5477 have none, one or multiple tween declarations. Images are displayed in
5478 the order they are listed, during the transition to the state they are
5479 declared in; the "normal" image is the final state.
5483 st_collections_group_parts_part_description_image_tween(void)
5485 Edje_Part_Description_Image *ed;
5489 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5491 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5496 ed = (Edje_Part_Description_Image*) current_desc;
5500 Edje_Part_Image_Id *iid;
5502 iid = mem_alloc(SZ(Edje_Part_Image_Id));
5503 ed->image.tweens_count++;
5504 ed->image.tweens = realloc(ed->image.tweens,
5505 sizeof (Edje_Part_Image_Id*) * ed->image.tweens_count);
5506 ed->image.tweens[ed->image.tweens_count - 1] = iid;
5507 name = parse_str(0);
5508 data_queue_image_remove(&(iid->id), &(iid->set));
5509 data_queue_image_lookup(name, &(iid->id), &(iid->set));
5519 [left] [right] [top] [bottom]
5521 If set, the area (in pixels) of each side of the image will be
5522 displayed as a fixed size border, from the side -> inwards, preventing
5523 the corners from being changed on a resize.
5527 st_collections_group_parts_part_description_image_border(void)
5529 Edje_Part_Description_Image *ed;
5533 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5535 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5540 ed = (Edje_Part_Description_Image*) current_desc;
5542 ed->image.border.l = parse_int_range(0, 0, 0x7fffffff);
5543 ed->image.border.r = parse_int_range(1, 0, 0x7fffffff);
5544 ed->image.border.t = parse_int_range(2, 0, 0x7fffffff);
5545 ed->image.border.b = parse_int_range(3, 0, 0x7fffffff);
5553 0, 1, NONE, DEFAULT, SOLID
5555 If border is set, this value tells Edje if the rest of the
5556 image (not covered by the defined border) will be displayed or not
5557 or be assumed to be solid (without alpha). The default is 1/DEFAULT.
5561 st_collections_group_parts_part_description_image_middle(void)
5563 Edje_Part_Description_Image *ed;
5567 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5569 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5574 ed = (Edje_Part_Description_Image*) current_desc;
5576 ed->image.border.no_fill = parse_enum(0,
5590 0.0 or bigger (0.0 or 1.0 to turn it off)
5592 If border scaling is enabled then normally the OUTPUT border sizes
5593 (e.g. if 3 pixels on the left edge are set as a border, then normally
5594 at scale 1.0, those 3 columns will always be the exact 3 columns of
5595 output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge
5596 into a single column). This property multiplies the input scale
5597 factor by this multiplier, allowing the creation of "supersampled"
5598 borders to make much higher resolution outputs possible by always using
5599 the highest resolution artwork and then runtime scaling it down.
5603 st_collections_group_parts_part_description_image_border_scale_by(void)
5605 Edje_Part_Description_Image *ed;
5609 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5611 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5616 ed = (Edje_Part_Description_Image*) current_desc;
5618 ed->image.border.scale_by = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
5628 If border is set, this value tells Edje if the border should be scaled
5629 by the object/global edje scale factors
5633 st_collections_group_parts_part_description_image_border_scale(void)
5635 Edje_Part_Description_Image *ed;
5639 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5641 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5646 ed = (Edje_Part_Description_Image*) current_desc;
5648 ed->image.border.scale = parse_enum(0,
5659 0, NONE, DYNAMIC, STATIC
5661 Sets the evas image scale hint letting the engine more effectively save
5662 cached copies of the scaled image if it makes sense
5666 st_collections_group_parts_part_description_image_scale_hint(void)
5668 Edje_Part_Description_Image *ed;
5672 if (current_part->type != EDJE_PART_TYPE_IMAGE)
5674 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5679 ed = (Edje_Part_Description_Image*) current_desc;
5681 ed->image.scale_hint = parse_enum(0,
5682 "NONE", EVAS_IMAGE_SCALE_HINT_NONE,
5683 "DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
5684 "STATIC", EVAS_IMAGE_SCALE_HINT_STATIC,
5685 "0", EVAS_IMAGE_SCALE_HINT_NONE,
5699 relative: X-axis Y-axis;
5700 offset: X-axis Y-axis;
5703 relative: width height;
5704 offset: width height;
5710 The fill method is an optional block that defines the way an IMAGE part
5711 is going to be displayed inside its container.
5712 It can be used for tiling (repeating the image) or displaying only
5713 part of an image. See @ref evas_object_image_fill_set() documentation
5722 The smooth property takes a boolean value to decide if the image will
5723 be smoothed on scaling (1) or not (0). The default value is 1.
5727 st_collections_group_parts_part_description_fill_smooth(void)
5729 Edje_Part_Description_Spec_Fill *fill;
5733 switch (current_part->type)
5735 case EDJE_PART_TYPE_IMAGE:
5737 Edje_Part_Description_Image *ed;
5739 ed = (Edje_Part_Description_Image*) current_desc;
5741 fill = &ed->image.fill;
5744 case EDJE_PART_TYPE_PROXY:
5746 Edje_Part_Description_Proxy *ed;
5748 ed = (Edje_Part_Description_Proxy*) current_desc;
5750 fill = &ed->proxy.fill;
5755 ERR("parse error %s:%i. "
5756 "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
5757 file_in, line - 1, current_part->name, current_part->type);
5762 fill->smooth = parse_bool(0);
5777 st_collections_group_parts_part_description_fill_spread(void)
5780 Edje_Part_Collection *pc;
5782 Edje_Part_Description_Image *ed;
5787 /* XXX this will need to include IMAGES when spread support is added to evas images */
5789 ERR("parse error %s:%i. fill.spread not supported yet.",
5795 pc = eina_list_data_get(eina_list_last(edje_collections));
5797 ep = pc->parts[pc->parts_count - 1];
5799 if (ep->type != EDJE_PART_TYPE_IMAGE)
5801 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
5806 ed = (Edje_Part_Description_Image*) ep->default_desc;
5807 if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
5809 ed->image.fill.spread = parse_int_range(0, 0, 1);
5825 st_collections_group_parts_part_description_fill_type(void)
5827 Edje_Part_Description_Spec_Fill *fill;
5831 switch (current_part->type)
5833 case EDJE_PART_TYPE_IMAGE:
5835 Edje_Part_Description_Image *ed;
5837 ed = (Edje_Part_Description_Image*) current_desc;
5839 fill = &ed->image.fill;
5842 case EDJE_PART_TYPE_PROXY:
5844 Edje_Part_Description_Proxy *ed;
5846 ed = (Edje_Part_Description_Proxy*) current_desc;
5848 fill = &ed->proxy.fill;
5853 ERR("parse error %s:%i. "
5854 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5860 fill->type = parse_enum(0,
5861 "SCALE", EDJE_FILL_TYPE_SCALE,
5862 "TILE", EDJE_FILL_TYPE_TILE,
5884 The origin block is used to place the starting point, inside the
5885 displayed element, that will be used to render the tile. By default,
5886 the origin is set at the element's left-up corner.
5894 Sets the starting point relatively to displayed element's content.
5898 st_collections_group_parts_part_description_fill_origin_relative(void)
5900 Edje_Part_Description_Spec_Fill *fill;
5904 switch (current_part->type)
5906 case EDJE_PART_TYPE_IMAGE:
5908 Edje_Part_Description_Image *ed;
5910 ed = (Edje_Part_Description_Image*) current_desc;
5912 fill = &ed->image.fill;
5915 case EDJE_PART_TYPE_PROXY:
5917 Edje_Part_Description_Proxy *ed;
5919 ed = (Edje_Part_Description_Proxy*) current_desc;
5921 fill = &ed->proxy.fill;
5926 ERR("parse error %s:%i. "
5927 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5933 fill->pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
5934 fill->pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
5944 Affects the starting point a fixed number of pixels along each axis.
5948 st_collections_group_parts_part_description_fill_origin_offset(void)
5950 Edje_Part_Description_Spec_Fill *fill;
5954 switch (current_part->type)
5956 case EDJE_PART_TYPE_IMAGE:
5958 Edje_Part_Description_Image *ed;
5960 ed = (Edje_Part_Description_Image*) current_desc;
5962 fill = &ed->image.fill;
5965 case EDJE_PART_TYPE_PROXY:
5967 Edje_Part_Description_Proxy *ed;
5969 ed = (Edje_Part_Description_Proxy*) current_desc;
5971 fill = &ed->proxy.fill;
5976 ERR("parse error %s:%i. "
5977 "image and proxy attributes in non-IMAGE, non-PROXY part.",
5983 fill->pos_abs_x = parse_int(0);
5984 fill->pos_abs_y = parse_int(1);
6005 The size block defines the tile size of the content that will be
6014 Takes a pair of decimal values that represent the percentual value
6015 of the original size of the element. For example, "0.5 0.5" represents
6016 half the size, while "2.0 2.0" represents the double. The default
6021 st_collections_group_parts_part_description_fill_size_relative(void)
6023 Edje_Part_Description_Spec_Fill *fill;
6027 switch (current_part->type)
6029 case EDJE_PART_TYPE_IMAGE:
6031 Edje_Part_Description_Image *ed;
6033 ed = (Edje_Part_Description_Image*) current_desc;
6035 fill = &ed->image.fill;
6038 case EDJE_PART_TYPE_PROXY:
6040 Edje_Part_Description_Proxy *ed;
6042 ed = (Edje_Part_Description_Proxy*) current_desc;
6044 fill = &ed->proxy.fill;
6049 ERR("parse error %s:%i. "
6050 "image and proxy attributes in non-IMAGE, non-PROXY part.",
6056 fill->rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
6057 fill->rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
6067 Affects the size of the tile a fixed number of pixels along each axis.
6071 st_collections_group_parts_part_description_fill_size_offset(void)
6073 Edje_Part_Description_Spec_Fill *fill;
6077 switch (current_part->type)
6079 case EDJE_PART_TYPE_IMAGE:
6081 Edje_Part_Description_Image *ed;
6083 ed = (Edje_Part_Description_Image*) current_desc;
6085 fill = &ed->image.fill;
6088 case EDJE_PART_TYPE_PROXY:
6090 Edje_Part_Description_Proxy *ed;
6092 ed = (Edje_Part_Description_Proxy*) current_desc;
6094 fill = &ed->proxy.fill;
6099 ERR("parse error %s:%i. "
6100 "image and proxy attributes in non-IMAGE, non-PROXY part.",
6106 fill->abs_x = parse_int(0);
6107 fill->abs_y = parse_int(1);
6112 @edcsection{description_text,Text state description sub blocks}
6125 text: "some string of text to display";
6128 text_class: "class_name";
6129 fit: horizontal vertical;
6130 min: horizontal vertical;
6131 max: horizontal vertical;
6132 align: X-axis Y-axis;
6133 source: "part_name";
6134 text_source: "text_part_name";
6147 [a string of text, or nothing]
6149 Sets the default content of a text part, normally the application is
6150 the one changing its value.
6154 st_collections_group_parts_part_description_text_text(void)
6156 Edje_Part_Description_Text *ed;
6160 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6161 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6163 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6168 ed = (Edje_Part_Description_Text*) current_desc;
6174 if (!is_param(i)) break;
6179 str = realloc(str, strlen(str) + strlen(s) + 1);
6184 ed->text.text.str = str;
6195 Similar to color_class, this is the name used by the application
6196 to alter the font family and size at runtime.
6200 st_collections_group_parts_part_description_text_text_class(void)
6202 Edje_Part_Description_Text *ed;
6206 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6207 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6209 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6214 ed = (Edje_Part_Description_Text*) current_desc;
6216 ed->text.text_class = parse_str(0);
6227 This sets the font family to one of the aliases set up in the "fonts"
6228 block. Can be overrided by the application.
6232 st_collections_group_parts_part_description_text_font(void)
6234 Edje_Part_Description_Text *ed;
6238 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6239 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6241 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6246 ed = (Edje_Part_Description_Text*) current_desc;
6248 ed->text.font.str = parse_str(0);
6259 Causes the part to use the default style and tags defined in the
6260 "style" block with the specified name.
6264 st_collections_group_parts_part_description_text_style(void)
6266 Edje_Part_Description_Text *ed;
6270 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6271 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6273 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6278 ed = (Edje_Part_Description_Text*) current_desc;
6280 ed->text.style.str = parse_str(0);
6289 [the replacement character string]
6291 If this is a textblock and is in PASSWORD mode this string is used
6292 to replace every character to hide the details of the entry. Normally
6293 you would use a "*", but you can use anything you like.
6297 st_collections_group_parts_part_description_text_repch(void)
6299 Edje_Part_Description_Text *ed;
6303 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6304 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6306 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6311 ed = (Edje_Part_Description_Text*) current_desc;
6313 ed->text.repch.str = parse_str(0);
6322 [font size in points (pt)]
6324 Sets the default font size for the text part. Can be overrided by the
6329 st_collections_group_parts_part_description_text_size(void)
6331 Edje_Part_Description_Text *ed;
6335 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6336 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6338 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6343 ed = (Edje_Part_Description_Text*)current_desc;
6345 ed->text.size = parse_int_range(0, 0, 255);
6354 [font min size in points (pt)] [font max size in points (pt)]
6356 Sets the allowed font size for the text part. Setting min and max to 0
6357 means we won't restrict the sizing (default).
6362 st_collections_group_parts_part_description_text_size_range(void)
6364 Edje_Part_Description_Text *ed;
6368 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6369 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6371 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6376 ed = (Edje_Part_Description_Text*) current_desc;
6378 ed->text.size_range_min = parse_int_range(0, 0, 255);
6379 ed->text.size_range_max = parse_int_range(1, 0, 255);
6380 if (ed->text.size_range_min > ed->text.size_range_max)
6382 ERR("parse error %s:%i. min size is bigger than max size.",
6394 [horizontal] [vertical]
6396 When any of the parameters is set to 1 edje will resize the text for it
6397 to fit in it's container. Both are disabled by default.
6401 st_collections_group_parts_part_description_text_fit(void)
6403 Edje_Part_Description_Text *ed;
6407 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6408 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6410 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6415 ed = (Edje_Part_Description_Text*) current_desc;
6417 ed->text.fit_x = parse_bool(0);
6418 ed->text.fit_y = parse_bool(1);
6427 [horizontal] [vertical]
6429 When any of the parameters is enabled (1) it forces the minimum size of
6430 the container to be equal to the minimum size of the text. The default
6435 st_collections_group_parts_part_description_text_min(void)
6437 Edje_Part_Description_Text *ed;
6441 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6442 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6444 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6449 ed = (Edje_Part_Description_Text*)current_desc;
6451 ed->text.min_x = parse_bool(0);
6452 ed->text.min_y = parse_bool(1);
6461 [horizontal] [vertical]
6463 When any of the parameters is enabled (1) it forces the maximum size of
6464 the container to be equal to the maximum size of the text. The default
6469 st_collections_group_parts_part_description_text_max(void)
6471 Edje_Part_Description_Text *ed;
6475 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6476 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6478 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6483 ed = (Edje_Part_Description_Text*) current_desc;
6485 ed->text.max_x = parse_bool(0);
6486 ed->text.max_y = parse_bool(1);
6495 [horizontal] [vertical]
6497 Change the position of the point of balance inside the container. The
6498 default value is 0.5 0.5.
6502 st_collections_group_parts_part_description_text_align(void)
6504 Edje_Part_Description_Text *ed;
6508 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6509 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6511 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6516 ed = (Edje_Part_Description_Text*) current_desc;
6518 ed->text.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6519 ed->text.align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
6528 [another TEXT part's name]
6530 Causes the part to use the text properties (like font and size) of
6531 another part and update them as they change.
6535 st_collections_group_parts_part_description_text_source(void)
6537 Edje_Part_Collection *pc;
6538 Edje_Part_Description_Text *ed;
6542 pc = eina_list_data_get(eina_list_last(edje_collections));
6544 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6545 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6547 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6552 ed = (Edje_Part_Description_Text*) current_desc;
6557 name = parse_str(0);
6558 data_queue_part_lookup(pc, name, &(ed->text.id_source));
6569 [another TEXT part's name]
6571 Causes the part to display the text content of another part and update
6572 them as they change.
6576 st_collections_group_parts_part_description_text_text_source(void)
6578 Edje_Part_Collection *pc;
6579 Edje_Part_Description_Text *ed;
6583 pc = eina_list_data_get(eina_list_last(edje_collections));
6585 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6586 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6588 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6593 ed = (Edje_Part_Description_Text*) current_desc;
6598 name = parse_str(0);
6599 data_queue_part_lookup(pc, name, &(ed->text.id_text_source));
6612 Used to balance the text in a relative point from 0.0 to 1.0, this
6613 point is the last section of the string to be cut out in case of a
6614 resize that is smaller than the text itself. The default value is 0.0.
6618 st_collections_group_parts_part_description_text_elipsis(void)
6620 Edje_Part_Description_Text *ed;
6624 if ((current_part->type != EDJE_PART_TYPE_TEXT) &&
6625 (current_part->type != EDJE_PART_TYPE_TEXTBLOCK))
6627 ERR("parse error %s:%i. text attributes in non-TEXT part.",
6632 ed = (Edje_Part_Description_Text*) current_desc;
6634 ed->text.elipsis = parse_float_range(0, 0.0, 1.0);
6639 @edcsection{description_box,Box state description sub blocks}
6661 A box block can contain other objects and display them in different
6662 layouts, any of the predefined set, or a custom one, set by the
6669 [primary layout] [fallback layout]
6671 Sets the layout for the box:
6672 @li horizontal (default)
6674 @li horizontal_homogeneous
6675 @li vertical_homogeneous
6676 @li horizontal_max (homogeneous to the max sized child)
6681 @li some_other_custom_layout_set_by_the_application
6682 You could set a custom layout as fallback, it makes very
6683 very little sense though, and if that one fails, it will
6684 default to horizontal.
6690 [horizontal] [vertical]
6692 Change the position of the point of balance inside the container. The
6693 default value is 0.5 0.5.
6699 [horizontal] [vertical]
6701 Sets the space between cells in pixels. Defaults to 0 0.
6707 [horizontal] [vertical]
6709 When any of the parameters is enabled (1) it forces the minimum size of
6710 the box to be equal to the minimum size of the items. The default
6714 static void st_collections_group_parts_part_description_box_layout(void)
6716 Edje_Part_Description_Box *ed;
6718 check_min_arg_count(1);
6720 if (current_part->type != EDJE_PART_TYPE_BOX)
6722 ERR("parse error %s:%i. box attributes in non-BOX part.",
6727 ed = (Edje_Part_Description_Box*) current_desc;
6729 ed->box.layout = parse_str(0);
6731 ed->box.alt_layout = parse_str(1);
6734 static void st_collections_group_parts_part_description_box_align(void)
6736 Edje_Part_Description_Box *ed;
6740 if (current_part->type != EDJE_PART_TYPE_BOX)
6742 ERR("parse error %s:%i. box attributes in non-BOX part.",
6747 ed = (Edje_Part_Description_Box*) current_desc;
6749 ed->box.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6750 ed->box.align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
6753 static void st_collections_group_parts_part_description_box_padding(void)
6755 Edje_Part_Description_Box *ed;
6759 if (current_part->type != EDJE_PART_TYPE_BOX)
6761 ERR("parse error %s:%i. box attributes in non-BOX part.",
6766 ed = (Edje_Part_Description_Box*) current_desc;
6768 ed->box.padding.x = parse_int_range(0, 0, 0x7fffffff);
6769 ed->box.padding.y = parse_int_range(1, 0, 0x7fffffff);
6773 st_collections_group_parts_part_description_box_min(void)
6775 Edje_Part_Description_Box *ed;
6779 if (current_part->type != EDJE_PART_TYPE_BOX)
6781 ERR("parse error %s:%i. box attributes in non-BOX part.",
6786 ed = (Edje_Part_Description_Box*) current_desc;
6788 ed->box.min.h = parse_bool(0);
6789 ed->box.min.v = parse_bool(1);
6794 @edcsection{description_table,Table state description sub blocks}
6816 A table block can contain other objects packed in multiple columns
6817 and rows, and each item can span across more than one column and/or
6826 Sets the homogeneous mode for the table:
6835 [horizontal] [vertical]
6837 Change the position of the point of balance inside the container. The
6838 default value is 0.5 0.5.
6844 [horizontal] [vertical]
6846 Sets the space between cells in pixels. Defaults to 0 0.
6852 [horizontal] [vertical]
6854 When any of the parameters is enabled (1) it forces the minimum size of
6855 the table to be equal to the minimum size of the items. The default
6859 static void st_collections_group_parts_part_description_table_homogeneous(void)
6861 Edje_Part_Description_Table *ed;
6863 check_min_arg_count(1);
6865 if (current_part->type != EDJE_PART_TYPE_TABLE)
6867 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6872 ed = (Edje_Part_Description_Table*) current_desc;
6874 ed->table.homogeneous = parse_enum(0,
6875 "NONE", EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE,
6876 "TABLE", EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE,
6877 "ITEM", EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM,
6881 static void st_collections_group_parts_part_description_table_align(void)
6883 Edje_Part_Description_Table *ed;
6887 if (current_part->type != EDJE_PART_TYPE_TABLE)
6889 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6894 ed = (Edje_Part_Description_Table*) current_desc;
6896 ed->table.align.x = FROM_DOUBLE(parse_float_range(0, -1.0, 1.0));
6897 ed->table.align.y = FROM_DOUBLE(parse_float_range(1, -1.0, 1.0));
6900 static void st_collections_group_parts_part_description_table_padding(void)
6902 Edje_Part_Description_Table *ed;
6906 if (current_part->type != EDJE_PART_TYPE_TABLE)
6908 ERR("parse error %s:%i. table attributes in non-TABLE part.",
6913 ed = (Edje_Part_Description_Table*) current_desc;
6915 ed->table.padding.x = parse_int_range(0, 0, 0x7fffffff);
6916 ed->table.padding.y = parse_int_range(1, 0, 0x7fffffff);
6920 st_collections_group_parts_part_description_table_min(void)
6922 Edje_Part_Description_Table *ed;
6926 if (current_part->type != EDJE_PART_TYPE_TABLE)
6928 ERR("parse error %s:%i. box attributes in non-TABLE part.",
6933 ed = (Edje_Part_Description_Table*) current_desc;
6935 ed->table.min.h = parse_bool(0);
6936 ed->table.min.v = parse_bool(1);
6940 @edcsection{description_map,Map state description sub blocks}
6951 perspective: "name";
6972 [another part's name]
6974 This sets the part that is used as the "perspective point" for giving
6975 a part a "3d look". The perspective point should have a perspective
6976 section that provides zplane and focal properties. The center of this
6977 part will be used as the focal point, so size, color and visibility
6978 etc. are not relevant just center point, zplane and focal are used.
6979 This also implicitly enables perspective transforms (see the on
6980 parameter for the map section).
6984 st_collections_group_parts_part_description_map_perspective(void)
6986 Edje_Part_Collection *pc;
6990 pc = eina_list_data_get(eina_list_last(edje_collections));
6995 name = parse_str(0);
6996 data_queue_part_lookup(pc, name, &(current_desc->map.id_persp));
7000 current_desc->map.persp_on = 1;
7008 [another part's name]
7010 This sets the part that is used as the "light" for calculating the
7011 brightness (based on how directly the part's surface is facing the
7012 light source point). Like the perspective point part, the center point
7013 is used and zplane is used for the z position (0 being the zero-plane
7014 where all 2D objects normally live) and positive values being further
7015 away into the distance. The light part color is used as the light
7016 color (alpha not used for light color). The color2 color is used for
7017 the ambient lighting when calculating brightness (alpha also not
7022 st_collections_group_parts_part_description_map_light(void)
7024 Edje_Part_Collection *pc;
7028 pc = eina_list_data_get(eina_list_last(edje_collections));
7033 name = parse_str(0);
7034 data_queue_part_lookup(pc, name, &(current_desc->map.id_light));
7046 This enables mapping for the part. Default is 0.
7050 st_collections_group_parts_part_description_map_on(void)
7054 current_desc->map.on = parse_bool(0);
7064 This enable smooth map rendering. This may be linear interpolation,
7065 anisotropic filtering or anything the engine decides is "smooth".
7066 This is a best-effort hint and may not produce precisely the same
7067 results in all engines and situations. Default is 1
7071 st_collections_group_parts_part_description_map_smooth(void)
7075 current_desc->map.smooth = parse_bool(0);
7085 This enable alpha channel when map rendering. Default is 1.
7089 st_collections_group_parts_part_description_map_alpha(void)
7093 current_desc->map.alpha = parse_bool(0);
7103 This enables backface culling (when the rotated part that normally
7104 faces the camera is facing away after being rotated etc.). This means
7105 that the object will be hidden when "backface culled".
7109 st_collections_group_parts_part_description_map_backface_cull(void)
7113 current_desc->map.backcull = parse_bool(0);
7123 Enable perspective when rotating even without a perspective point object.
7124 This would use perspective set for the object itself or for the
7125 canvas as a whole as the global perspective with
7126 edje_perspective_set() and edje_perspective_global_set().
7130 st_collections_group_parts_part_description_map_perspective_on(void)
7134 current_desc->map.persp_on = parse_bool(0);
7152 Rotates the part, optionally with the center on another part.
7158 [another part's name]
7160 This sets the part that is used as the center of rotation when
7161 rotating the part with this description. The part's center point
7162 is used as the rotation center when applying rotation around the
7163 x, y and z axes. If no center is given, the parts original center
7164 itself is used for the rotation center.
7168 st_collections_group_parts_part_description_map_rotation_center(void)
7170 Edje_Part_Collection *pc;
7174 pc = eina_list_data_get(eina_list_last(edje_collections));
7179 name = parse_str(0);
7180 data_queue_part_lookup(pc, name, &(current_desc->map.rot.id_center));
7192 This sets the rotation around the x axis of the part considering
7193 the center set. In degrees.
7197 st_collections_group_parts_part_description_map_rotation_x(void)
7201 current_desc->map.rot.x = FROM_DOUBLE(parse_float(0));
7211 This sets the rotation around the y axis of the part considering
7212 the center set. In degrees.
7216 st_collections_group_parts_part_description_map_rotation_y(void)
7220 current_desc->map.rot.y = FROM_DOUBLE(parse_float(0));
7230 This sets the rotation around the z axis of the part considering
7231 the center set. In degrees.
7235 st_collections_group_parts_part_description_map_rotation_z(void)
7239 current_desc->map.rot.z = FROM_DOUBLE(parse_float(0));
7256 Adds focal and plane perspective to the part. Active if perspective_on is true.
7257 Must be provided if the part is being used by other part as it's perspective target.
7265 This sets the z value that will not be scaled. Normally this is 0 as
7266 that is the z distance that all objects are at normally.
7270 st_collections_group_parts_part_description_perspective_zplane(void)
7274 current_desc->persp.zplane = parse_int(0);
7285 This sets the distance from the focal z plane (zplane) and the
7286 camera - i.e. very much equating to focal length of the camera
7290 st_collections_group_parts_part_description_perspective_focal(void)
7294 current_desc->persp.focal = parse_int_range(0, 1, 0x7fffffff);
7299 @edcsection{description_params,Params state description sub blocks}
7311 double: "other_name" 0.0;
7312 string: "another_name" "some text";
7314 choice: "some_name" "value";
7319 Set parameters for EXTERNAL parts. The value overwrites previous
7320 definitions with the same name.
7324 _st_collections_group_parts_part_description_params(Edje_External_Param_Type type)
7326 Edje_Part_Description_External *ed;
7327 Edje_External_Param *param;
7334 if (current_part->type != EDJE_PART_TYPE_EXTERNAL)
7336 ERR("parse error %s:%i. params in non-EXTERNAL part.",
7341 ed = (Edje_Part_Description_External*) current_desc;
7343 name = parse_str(0);
7345 /* if a param with this name already exists, overwrite it */
7346 EINA_LIST_FOREACH(ed->external_params, l, param)
7348 if (!strcmp(param->name, name))
7357 param = mem_alloc(SZ(Edje_External_Param));
7368 case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
7369 case EDJE_EXTERNAL_PARAM_TYPE_INT:
7370 param->i = parse_int(1);
7372 case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
7373 param->d = parse_float(1);
7375 case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
7376 case EDJE_EXTERNAL_PARAM_TYPE_STRING:
7377 param->s = parse_str(1);
7380 ERR("parse error %s:%i. Invalid param type.",
7386 ed->external_params = eina_list_append(ed->external_params, param);
7394 [param_name] [int_value]
7396 Adds an integer parameter for an external object
7400 st_collections_group_parts_part_description_params_int(void)
7402 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_INT);
7410 [param_name] [double_value]
7412 Adds a double parameter for an external object
7416 st_collections_group_parts_part_description_params_double(void)
7418 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_DOUBLE);
7426 [param_name] [string_value]
7428 Adds a string parameter for an external object
7432 st_collections_group_parts_part_description_params_string(void)
7434 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_STRING);
7442 [param_name] [bool_value]
7444 Adds an boolean parameter for an external object. Value must be 0 or 1.
7448 st_collections_group_parts_part_description_params_bool(void)
7450 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_BOOL);
7458 [param_name] [choice_string]
7460 Adds a choice parameter for an external object. The possible
7461 choice values are defined by external type at their register time
7462 and will be validated at runtime.
7466 st_collections_group_parts_part_description_params_choice(void)
7468 _st_collections_group_parts_part_description_params(EDJE_EXTERNAL_PARAM_TYPE_CHOICE);
7473 @edcsection{program, Program block}
7485 name: "programname";
7486 signal: "signalname";
7488 filter: "partname" "statename";
7490 action: STATE_SET "statename" state_value;
7491 transition: LINEAR 0.5;
7493 target: "anotherpart";
7494 after: "programname";
7495 after: "anotherprogram";
7501 Programs define how your interface reacts to events.
7502 Programs can change the state of parts, react to events or trigger
7507 ob_collections_group_programs_program(void)
7509 Edje_Part_Collection *pc;
7511 Edje_Program_Parser *epp;
7513 pc = eina_list_data_get(eina_list_last(edje_collections));
7515 ep = mem_alloc(SZ(Edje_Program_Parser));
7517 ep->tween.mode = EDJE_TWEEN_MODE_LINEAR;
7519 epp = (Edje_Program_Parser *)ep;
7520 epp->can_override = EINA_FALSE;
7522 _edje_program_insert(pc, ep);
7524 current_program = ep;
7534 Symbolic name of program as a unique identifier.
7538 st_collections_group_programs_program_name(void)
7540 Edje_Part_Collection *pc;
7544 pc = eina_list_data_get(eina_list_last(edje_collections));
7545 current_program->name = parse_str(0);
7547 _edje_program_check(current_program->name, current_program, pc->programs.fnmatch, pc->programs.fnmatch_count);
7548 _edje_program_check(current_program->name, current_program, pc->programs.strcmp, pc->programs.strcmp_count);
7549 _edje_program_check(current_program->name, current_program, pc->programs.strncmp, pc->programs.strncmp_count);
7550 _edje_program_check(current_program->name, current_program, pc->programs.strrncmp, pc->programs.strrncmp_count);
7551 _edje_program_check(current_program->name, current_program, pc->programs.nocmp, pc->programs.nocmp_count);
7561 Specifies signal(s) that should cause the program to run. The signal
7562 received must match the specified source to run.
7563 Signals may be globbed, but only one signal keyword per program
7564 may be used. ex: signal: "mouse,clicked,*"; (clicking any mouse button
7565 that matches source starts program).
7569 st_collections_group_programs_program_signal(void)
7571 Edje_Part_Collection *pc;
7575 pc = eina_list_data_get(eina_list_last(edje_collections));
7577 _edje_program_remove(pc, current_program);
7578 current_program->signal = parse_str(0);
7579 _edje_program_insert(pc, current_program);
7589 Source of accepted signal. Sources may be globbed, but only one source
7590 keyword per program may be used. ex:source: "button-*"; (Signals from
7591 any part or program named "button-*" are accepted).
7595 st_collections_group_programs_program_source(void)
7597 Edje_Part_Collection *pc;
7601 pc = eina_list_data_get(eina_list_last(edje_collections));
7603 _edje_program_remove(pc, current_program);
7604 current_program->source = parse_str(0);
7605 _edje_program_insert(pc, current_program);
7615 Filter signals to be only accepted if the part [part] is in state named [state].
7616 Only one filter per program can be used. If [state] is not given, the source of
7617 the event will be used instead.
7621 st_collections_group_programs_program_filter(void)
7623 check_min_arg_count(1);
7626 current_program->filter.part = parse_str(0);
7627 current_program->filter.state = parse_str(1);
7629 current_program->filter.state = parse_str(0);
7640 Wait 'from' seconds before executing the program. And add a random
7641 number of seconds (from 0 to 'range') to the total waiting time.
7645 st_collections_group_programs_program_in(void)
7649 current_program->in.from = parse_float_range(0, 0.0, 999999999.0);
7650 current_program->in.range = parse_float_range(1, 0.0, 999999999.0);
7658 [type] [param1] [param2]
7660 Action to be performed by the program. Valid actions are: STATE_SET,
7661 ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE,
7662 FOCUS_SET, PARAM_COPY, PARAM_SET, PLAY_SAMPLE, PLAY_TONE
7663 Only one action can be specified per program. Examples:\n
7664 action: STATE_SET "statename" 0.5;\n
7665 action: ACTION_STOP;\n
7666 action: SIGNAL_EMIT "signalname" "emitter";\n
7667 action: DRAG_VAL_SET 0.5 0.0;\n
7668 action: DRAG_VAL_STEP 1.0 0.0;\n
7669 action: DRAG_VAL_PAGE 0.0 0.0;\n
7670 action: FOCUS_SET;\n
7671 action: FOCUS_OBJECT;\n
7672 action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";\n
7673 action: PARAM_SET "part" "param" "value";\n
7674 action: PLAY_SAMPLE "sample name";\n
7675 action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n
7679 st_collections_group_programs_program_action(void)
7681 Edje_Part_Collection *pc;
7685 pc = eina_list_data_get(eina_list_last(edje_collections));
7686 ep = current_program;
7687 ep->action = parse_enum(0,
7688 "STATE_SET", EDJE_ACTION_TYPE_STATE_SET,
7689 "ACTION_STOP", EDJE_ACTION_TYPE_ACTION_STOP,
7690 "SIGNAL_EMIT", EDJE_ACTION_TYPE_SIGNAL_EMIT,
7691 "DRAG_VAL_SET", EDJE_ACTION_TYPE_DRAG_VAL_SET,
7692 "DRAG_VAL_STEP", EDJE_ACTION_TYPE_DRAG_VAL_STEP,
7693 "DRAG_VAL_PAGE", EDJE_ACTION_TYPE_DRAG_VAL_PAGE,
7694 "SCRIPT", EDJE_ACTION_TYPE_SCRIPT,
7695 "FOCUS_SET", EDJE_ACTION_TYPE_FOCUS_SET,
7696 "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT,
7697 "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY,
7698 "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET,
7699 "PLAY_SAMPLE", EDJE_ACTION_TYPE_SOUND_SAMPLE,
7700 "PLAY_TONE", EDJE_ACTION_TYPE_SOUND_TONE,
7702 if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
7704 ep->state = parse_str(1);
7705 if (get_arg_count() == 1)
7708 ep->value = parse_float_range(2, 0.0, 1.0);
7710 else if (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)
7712 ep->state = parse_str(1);
7713 ep->state2 = parse_str(2);
7715 else if (ep->action == EDJE_ACTION_TYPE_SOUND_SAMPLE)
7717 ep->sample_name = parse_str(1);
7718 for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++)
7720 if (!strcmp(edje_file->sound_dir->samples[i].name, ep->sample_name))
7722 if (i == (int)(edje_file->sound_dir->samples_count - 1))
7724 ERR("No Sample name %s exist.", ep->sample_name);
7728 ep->speed = parse_float_range(2, 0.0, 10.0);
7730 else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE)
7732 ep->tone_name = parse_str(1);
7733 for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++)
7735 if (!strcmp(edje_file->sound_dir->tones[i].name, ep->tone_name))
7737 if (i == (int)(edje_file->sound_dir->tones_count - 1))
7739 ERR("No Tone name %s exist.", ep->tone_name);
7743 ep->duration = parse_float_range(2, 0.1, 10.0);
7745 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
7747 ep->value = parse_float(1);
7748 ep->value2 = parse_float(2);
7750 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
7752 ep->value = parse_float(1);
7753 ep->value2 = parse_float(2);
7755 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
7757 ep->value = parse_float(1);
7758 ep->value2 = parse_float(2);
7760 else if (ep->action == EDJE_ACTION_TYPE_PARAM_COPY)
7762 char *src_part, *dst_part;
7764 src_part = parse_str(1);
7765 ep->state = parse_str(2);
7766 dst_part = parse_str(3);
7767 ep->state2 = parse_str(4);
7769 data_queue_part_lookup(pc, src_part, &(ep->param.src));
7770 data_queue_part_lookup(pc, dst_part, &(ep->param.dst));
7775 else if (ep->action == EDJE_ACTION_TYPE_PARAM_SET)
7779 part = parse_str(1);
7780 ep->state = parse_str(2);
7781 ep->state2 = parse_str(3);
7783 data_queue_part_lookup(pc, part, &(ep->param.dst));
7789 case EDJE_ACTION_TYPE_ACTION_STOP:
7792 case EDJE_ACTION_TYPE_SCRIPT:
7793 /* this is implicitly set by script {} so this is here just for
7796 case EDJE_ACTION_TYPE_FOCUS_OBJECT:
7797 case EDJE_ACTION_TYPE_FOCUS_SET:
7800 case EDJE_ACTION_TYPE_PARAM_COPY:
7803 case EDJE_ACTION_TYPE_PARAM_SET:
7806 case EDJE_ACTION_TYPE_SOUND_SAMPLE:
7809 case EDJE_ACTION_TYPE_SOUND_TONE:
7822 [type] [length] [[interp val 1]] [[interp val 2]] [[option]]
7824 Defines how transitions occur using STATE_SET action.\n
7825 Where 'type' is the style of the transition and 'length' is a double
7826 specifying the number of seconds in which to preform the transition.\n
7827 Valid types are: LIN or LINEAR, SIN or SINUSOIDAL,
7828 ACCEL or ACCELERATE, DECEL or DECELERATE,
7829 ACCEL_FAC or ACCELERATE_FACTOR, DECEL_FAC or DECELERATE_FACTOR,
7830 SIN_FAC or SINUSOIDAL_FACTOR, DIVIS or DIVISOR_INTERP,
7833 ACCEL_FAC, DECEL_FAC and SIN_FAC need the extra optional
7834 "interp val 1" to determine the "factor" of curviness. 1.0 is the same
7835 as their non-factor counterparts, where 0.0 is equal to linear.
7836 Numbers higher than one make the curve angles steeper with a more
7837 pronounced curve point.
7839 DIVIS, BOUNCE and SPRING also require "interp val 2" in addition
7842 DIVIS uses val 1 as the initial gradient start
7843 (0.0 is horizontal, 1.0 is diagonal (linear), 2.0 is twice the
7844 gradient of linear etc.). val 2 is interpreted as an integer factor
7845 defining how much the value swings "outside" the gradient only to come
7846 back to the final resting spot at the end. 0.0 for val 2 is equivalent
7847 to linear interpolation. Note that DIVIS can exceed 1.0
7849 BOUNCE uses val 2 as the number of bounces (so its rounded down to
7850 the nearest integer value), with val 1 determining how much the
7851 bounce decays, with 0.0 giving linear decay per bounce, and higher
7852 values giving much more decay.
7854 SPRING is similar to bounce, where val 2 specifies the number of
7855 spring "swings" and val 1 specifies the decay, but it can exceed 1.0
7856 on the outer swings.
7858 Valid option is CURRENT.
7860 CURRENT is the option which causes the edje object to move from its current position.
7861 It can be used as the last parameter of any transition type. (@since 1.1.0)
7866 st_collections_group_programs_program_transition(void)
7868 check_min_arg_count(2);
7870 current_program->tween.mode = parse_enum(0,
7872 "LIN", EDJE_TWEEN_MODE_LINEAR,
7873 "SIN", EDJE_TWEEN_MODE_SINUSOIDAL,
7874 "ACCEL", EDJE_TWEEN_MODE_ACCELERATE,
7875 "DECEL", EDJE_TWEEN_MODE_DECELERATE,
7876 "ACCEL_FAC", EDJE_TWEEN_MODE_ACCELERATE_FACTOR,
7877 "DECEL_FAC", EDJE_TWEEN_MODE_DECELERATE_FACTOR,
7878 "SIN_FAC", EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR,
7879 "DIVIS", EDJE_TWEEN_MODE_DIVISOR_INTERP,
7882 "LINEAR", EDJE_TWEEN_MODE_LINEAR,
7883 "SINUSOIDAL", EDJE_TWEEN_MODE_SINUSOIDAL,
7884 "ACCELERATE", EDJE_TWEEN_MODE_ACCELERATE,
7885 "DECELERATE", EDJE_TWEEN_MODE_DECELERATE,
7886 "ACCELERATE_FACTOR", EDJE_TWEEN_MODE_ACCELERATE_FACTOR,
7887 "DECELERATE_FACTOR", EDJE_TWEEN_MODE_DECELERATE_FACTOR,
7888 "SINUSOIDAL_FACTOR", EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR,
7889 "DIVISOR_INTERP", EDJE_TWEEN_MODE_DIVISOR_INTERP,
7891 // long/full is short enough
7892 "BOUNCE", EDJE_TWEEN_MODE_BOUNCE,
7893 "SPRING", EDJE_TWEEN_MODE_SPRING,
7895 current_program->tween.time = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
7896 if ((current_program->tween.mode >= EDJE_TWEEN_MODE_LINEAR) &&
7897 (current_program->tween.mode <= EDJE_TWEEN_MODE_DECELERATE))
7899 if ((get_arg_count() == 3) && (!strcmp(parse_str(2), "CURRENT")))
7900 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7901 else if (get_arg_count() != 2)
7903 ERR("parse error %s:%i. Need 2rd parameter to set time",
7908 // the following need v1
7909 // EDJE_TWEEN_MODE_ACCELERATE_FACTOR
7910 // EDJE_TWEEN_MODE_DECELERATE_FACTOR
7911 // EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR
7912 // current_program->tween.v1
7913 else if ((current_program->tween.mode >= EDJE_TWEEN_MODE_ACCELERATE_FACTOR) &&
7914 (current_program->tween.mode <= EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR))
7916 if ((get_arg_count() == 4) && (!strcmp(parse_str(3), "CURRENT")))
7917 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7918 else if (get_arg_count() != 3)
7920 ERR("parse error %s:%i. Need 3rd parameter to set factor",
7924 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
7926 // the followjng also need v2
7927 // EDJE_TWEEN_MODE_DIVISOR_INTERP
7928 // EDJE_TWEEN_MODE_BOUNCE
7929 // EDJE_TWEEN_MODE_SPRING
7930 // current_program->tween.v2
7931 else if ((current_program->tween.mode >= EDJE_TWEEN_MODE_DIVISOR_INTERP) &&
7932 (current_program->tween.mode <= EDJE_TWEEN_MODE_SPRING))
7934 if ((get_arg_count() == 5) && (!strcmp(parse_str(4), "CURRENT")))
7935 current_program->tween.mode |= EDJE_TWEEN_MODE_OPT_FROM_CURRENT;
7936 else if (get_arg_count() != 4)
7938 ERR("parse error %s:%i. "
7939 "Need 3rd and 4th parameters to set factor and counts",
7943 current_program->tween.v1 = FROM_DOUBLE(parse_float_range(2, 0.0, 999999999.0));
7944 current_program->tween.v2 = FROM_DOUBLE(parse_float_range(3, 0.0, 999999999.0));
7955 Program or part on which the specified action acts. Multiple target
7956 keywords may be specified, one per target. SIGNAL_EMITs do not have
7961 st_collections_group_programs_program_target(void)
7963 Edje_Part_Collection *pc;
7968 pc = eina_list_data_get(eina_list_last(edje_collections));
7969 ep = current_program;
7971 Edje_Program_Target *et;
7972 Edje_Program_Target *etw;
7977 name = parse_str(0);
7979 EINA_LIST_FOREACH(ep->targets, l, etw)
7981 if (!strcmp(name, (char*) (etw + 1)))
7988 et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1);
7989 ep->targets = eina_list_append(ep->targets, et);
7990 copy = (char*) (et + 1);
7992 memcpy(copy, name, strlen(name) + 1);
7994 if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
7995 data_queue_part_lookup(pc, name, &(et->id));
7996 else if (ep->action == EDJE_ACTION_TYPE_ACTION_STOP)
7997 data_queue_program_lookup(pc, name, &(et->id));
7998 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
7999 data_queue_part_lookup(pc, name, &(et->id));
8000 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
8001 data_queue_part_lookup(pc, name, &(et->id));
8002 else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
8003 data_queue_part_lookup(pc, name, &(et->id));
8004 else if (ep->action == EDJE_ACTION_TYPE_FOCUS_SET)
8005 data_queue_part_lookup(pc, name, &(et->id));
8006 else if (ep->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
8007 data_queue_part_lookup(pc, name, &(et->id));
8010 ERR("parse error %s:%i. target may only be used after action",
8025 Specifies a program to run after the current program completes. The
8026 source and signal parameters of a program run as an "after" are ignored.
8027 Multiple "after" statements can be specified per program.
8031 st_collections_group_programs_program_after(void)
8033 Edje_Part_Collection *pc;
8038 pc = eina_list_data_get(eina_list_last(edje_collections));
8039 ep = current_program;
8041 Edje_Program_After *pa;
8042 Edje_Program_After *pa2;
8047 name = parse_str(0);
8049 EINA_LIST_FOREACH(ep->after, l, pa2)
8051 if (!strcmp(name, (char*) (pa2 + 1)))
8058 pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
8060 ep->after = eina_list_append(ep->after, pa);
8061 copy = (char*)(pa + 1);
8062 memcpy(copy, name, strlen(name) + 1);
8063 data_queue_program_lookup(pc, name, &(pa->id));
8073 [name] [description]
8075 Specifies a hint to let applications (or IDE's) know how to bind
8076 things. The parameter name should contain the name of the function that
8077 the application should use, and description describes how it should
8082 st_collections_group_programs_program_api(void)
8084 check_min_arg_count(1);
8086 current_program->api.name = parse_str(0);
8091 current_program->api.description = parse_str(1);
8096 st_collections_group_parts_part_api(void)
8098 check_min_arg_count(1);
8100 current_part->api.name = parse_str(0);
8104 current_part->api.description = parse_str(1);
8109 ob_collections_group_programs_program_script(void)
8111 Edje_Part_Collection *pc;
8114 pc = eina_list_data_get(eina_list_last(edje_collections));
8115 cd = eina_list_data_get(eina_list_last(codes));
8117 if (!is_verbatim()) track_verbatim(1);
8120 Eina_Bool empty = EINA_TRUE;
8129 /* FIXME: Need to store the script somewhere to be restored when using edje_edit API */
8130 cp = mem_alloc(SZ(Code_Program));
8131 cp->l1 = get_verbatim_line1();
8132 cp->l2 = get_verbatim_line2();
8134 cp->original = strdup(s);
8135 if (cd->shared && cd->is_lua)
8137 ERR("parse error %s:%i. You're trying to mix Embryo and Lua scripting in the same group",
8143 len = strlen(cp->script);
8144 for (i = 0; i < len; i++)
8146 if (((cp->script[i] > 'a') && (cp->script[i] < 'z')) ||
8147 ((cp->script[i] > 'A') && (cp->script[i] < 'Z')) ||
8148 ((cp->script[i] > '0') && (cp->script[i] < '9')))
8154 cd->programs = eina_list_append(cd->programs, cp);
8155 data_queue_anonymous_lookup(pc, current_program, &(cp->id));
8156 current_program->action = EDJE_ACTION_TYPE_SCRIPT;
8160 data_queue_anonymous_lookup(pc, current_program, NULL);
8165 set_verbatim(NULL, 0, 0);
8175 edje_cc_handlers_hierarchy_set(Edje_Part *src)
8176 { /* This funcion makes current part rel_1.id, rel_2.id relative to src */
8179 ERR("parse error %s:%i. You must set parent name before creating nested part",
8183 st_collections_group_parts_part_description_rel1_to_set(src->name);
8184 st_collections_group_parts_part_description_rel2_to_set(src->name);
8188 edje_cc_handlers_hierarchy_parent_get(void)
8189 { /* Return the parent part pointer */
8190 int idx = eina_array_count(part_hierarchy) - 2;
8191 Edje_Cc_Handlers_Hierarchy_Info *info = (idx >= 0) ?
8192 eina_array_data_get(part_hierarchy, idx) : NULL;
8194 return (info) ? info->ep : NULL;
8198 edje_cc_handlers_hierarchy_push(Edje_Part *ep, Edje_Part *cp)
8199 { /* Remove part from hierarchy stack when finished parsing it */
8200 Edje_Cc_Handlers_Hierarchy_Info *info = malloc(sizeof(*info));
8201 info->current_de = current_de;
8202 info->current_part = cp; /* current_part restored on pop */
8203 info->current_item = current_item;
8204 info->current_desc = current_desc;
8205 info->parent_desc = parent_desc;
8206 info->current_program = current_program;
8209 eina_array_push(part_hierarchy, info);
8213 edje_cc_handlers_hierarchy_rename(Edje_Part *old, Edje_Part *new)
8215 Edje_Cc_Handlers_Hierarchy_Info *item;
8216 Eina_Array_Iterator iterator;
8219 EINA_ARRAY_ITER_NEXT(part_hierarchy, i, item, iterator)
8221 if (item->ep == old) item->ep = new;
8222 if (item->current_part == old) item->current_part = new;
8227 edje_cc_handlers_hierarchy_alloc(void)
8229 part_hierarchy = eina_array_new(8);
8233 edje_cc_handlers_hierarchy_free(void)
8235 eina_array_free(part_hierarchy);
8236 part_hierarchy = NULL;
8240 edje_cc_handlers_hierarchy_pop(void)
8241 { /* Remove part from hierarchy stack when finished parsing it */
8242 Edje_Cc_Handlers_Hierarchy_Info *info = eina_array_pop(part_hierarchy);
8246 current_de = info->current_de;
8247 current_part = info->current_part;
8248 current_item = info->current_item;
8249 current_desc = info->current_desc;
8250 parent_desc = info->parent_desc;
8251 current_program = info->current_program;