2 * @defgroup Layout Layout
5 * @image html layout_inheritance_tree.png
6 * @image latex layout_inheritance_tree.eps
8 * @image html img/widget/layout/preview-00.png
9 * @image latex img/widget/layout/preview-00.eps width=\textwidth
11 * @image html img/layout-predefined.png
12 * @image latex img/layout-predefined.eps width=\textwidth
14 * A Layout is a direct realization of @ref elm-layout-class.
16 * This is a container widget that takes a standard Edje design file and
17 * wraps it very thinly in a widget.
19 * An Edje design (theme) file has a very wide range of possibilities to
20 * describe the behavior of elements added to the Layout. Check out the Edje
21 * documentation and the EDC reference to get more information about what can
24 * Just like @ref List, @ref Box, and other container widgets, any
25 * object added to the Layout will become its child, meaning that it will be
26 * deleted if the Layout is deleted, move if the Layout is moved, and so on.
28 * The Layout widget can contain as many Contents, Boxes or Tables as
29 * described in its theme file. For instance, objects can be added to
30 * different Tables by specifying the respective Table part names. The same
31 * is valid for Content and Box.
33 * The objects added as child of the Layout will behave as described in the
34 * part description where they were added. There are 3 possible types of
35 * parts where a child can be added:
37 * @section secContent Content (SWALLOW part)
39 * Only one object can be added to the @c SWALLOW part (but you still can
40 * have many @c SWALLOW parts and one object on each of them). Use the @c
41 * elm_object_content_set/get/unset functions to set, retrieve and unset
42 * objects as content of the @c SWALLOW. After being set to this part, the
43 * object size, position, visibility, clipping and other description
44 * properties will be totally controlled by the description of the given part
45 * (inside the Edje theme file).
47 * One can use @c evas_object_size_hint_* functions on the child to have some
48 * kind of control over its behavior, but the resulting behavior will still
49 * depend heavily on the @c SWALLOW part description.
51 * The Edje theme also can change the part description, based on signals or
52 * scripts running inside the theme. This change can also be animated. All of
53 * this will affect the child object set as content accordingly. The object
54 * size will be changed if the part size is changed, it will animate move if
55 * the part is moving, and so on.
57 * The following picture demonstrates a Layout widget with a child object
58 * added to its @c SWALLOW:
60 * @image html layout_swallow.png
61 * @image latex layout_swallow.eps width=\textwidth
63 * @section secBox Box (BOX part)
65 * An Edje @c BOX part is very similar to the Elementary @ref Box widget. It
66 * allows one to add objects to the box and have them distributed along its
67 * area, accordingly to the specified @a layout property (now by @a layout we
68 * mean the chosen layouting design of the Box, not the Layout widget
71 * A similar effect for having a box with its position, size and other things
72 * controlled by the Layout theme would be to create an Elementary @ref Box
73 * widget and add it as a Content in the @c SWALLOW part.
75 * The main difference of using the Layout Box is that its behavior, the box
76 * properties like layouting format, padding, align, etc. will be all
77 * controlled by the theme. This means, for example, that a signal could be
78 * sent to the Layout theme (with elm_object_signal_emit()) and the theme
79 * handled the signal by changing the box padding, or align, or both. Using
80 * the Elementary @ref Box widget is not necessarily harder or easier, it
81 * just depends on the circumstances and requirements.
83 * The Layout Box can be used through the @c elm_layout_box_* set of
86 * The following picture demonstrates a Layout widget with many child objects
87 * added to its @c BOX part:
89 * @image html layout_box.png
90 * @image latex layout_box.eps width=\textwidth
92 * @section secTable Table (TABLE part)
94 * Just like the @ref secBox, the Layout Table is very similar to the
95 * Elementary @ref Table widget. It allows one to add objects to the Table
96 * specifying the row and column where the object should be added, and any
97 * column or row span if necessary.
99 * Again, we could have this design by adding a @ref Table widget to the @c
100 * SWALLOW part using elm_object_part_content_set(). The same difference happens
101 * here when choosing to use the Layout Table (a @c TABLE part) instead of
102 * the @ref Table plus @c SWALLOW part. It's just a matter of convenience.
104 * The Layout Table can be used through the @c elm_layout_table_* set of
107 * The following picture demonstrates a Layout widget with many child objects
108 * added to its @c TABLE part:
110 * @image html layout_table.png
111 * @image latex layout_table.eps width=\textwidth
113 * @section secPredef Predefined Layouts
115 * Another interesting thing about the Layout widget is that it offers some
116 * predefined themes that come with the default Elementary theme. These
117 * themes can be set by the call elm_layout_theme_set(), and provide some
118 * basic functionality depending on the theme used.
120 * Most of them already send some signals, some already provide a toolbar or
121 * back and next buttons.
123 * These are available predefined theme layouts. All of them have class = @c
124 * layout, group = @c application, and style = one of the following options:
126 * @li @c toolbar-content - application with toolbar and main content area
127 * @li @c toolbar-content-back - application with toolbar and main content
128 * area with a back button and title area
129 * @li @c toolbar-content-back-next - application with toolbar and main
130 * content area with a back and next buttons and title area
131 * @li @c content-back - application with a main content area with a back
132 * button and title area
133 * @li @c content-back-next - application with a main content area with a
134 * back and next buttons and title area
135 * @li @c toolbar-vbox - application with toolbar and main content area as a
137 * @li @c toolbar-table - application with toolbar and main content area as a
140 * Supported elm_object common APIs.
141 * @li @ref elm_object_signal_emit
142 * @li @ref elm_object_signal_callback_add
143 * @li @ref elm_object_signal_callback_del
144 * @li @ref elm_object_part_text_set
145 * @li @ref elm_object_part_text_get
146 * @li @ref elm_object_part_content_set
147 * @li @ref elm_object_part_content_get
148 * @li @ref elm_object_part_content_unset
150 * @section layout-signals Emitted signals
152 * This widget emits the following signals:
154 * @li "theme,changed": The theme was changed.
156 * @section secExamples Examples
158 * Some examples of the Layout widget can be found here:
159 * @li @ref layout_example_01
160 * @li @ref layout_example_02
161 * @li @ref layout_example_03
162 * @li @ref layout_example_edc
167 * Add a new layout to the parent
169 * @param parent The parent object
170 * @return The new object or NULL if it cannot be created
172 * @see elm_layout_file_set()
173 * @see elm_layout_theme_set()
177 EAPI Evas_Object *elm_layout_add(Evas_Object *parent);
180 * Set the file that will be used as layout
182 * @param obj The layout object
183 * @param file The path to file (edj) that will be used as layout
184 * @param group The group that the layout belongs in edje file
186 * @return (1 = success, 0 = error)
190 EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group);
193 * @brief Freezes the Elementary layout object.
195 * @param obj A handle to an Elementary layout object.
196 * @return The frozen state or 0 on Error
198 * This function puts all changes on hold. Successive freezes will
199 * nest, requiring an equal number of thaws.
201 * @see elm_layout_thaw()
203 EAPI int elm_layout_freeze(Evas_Object *obj);
206 * @brief Thaws the Elementary object.
208 * @param obj A handle to an Elementary layout object.
209 * @return The frozen state or 0 if the object is not frozen or on error.
211 * This function thaws the given Edje object and the Elementary sizing calc.
213 * @note: If sucessives freezes were done, an equal number of
214 * thaws will be required.
216 * @see elm_layout_freeze()
218 EAPI int elm_layout_thaw(Evas_Object *obj);
221 * Set the edje group from the elementary theme that will be used as layout
223 * @param obj The layout object
224 * @param clas the class of the group
225 * @param group the group
226 * @param style the style to used
228 * @return (1 = success, 0 = error)
230 * Note that @a style will be the new style of @a obj too, as in an
231 * elm_object_style_set() call.
235 EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style);
238 * Send a (Edje) signal to a given layout widget's underlying Edje
241 * @param obj The layout object handle
242 * @param emission The signal's name string
243 * @param source The signal's source string
245 * This function sends a signal to the underlying Edje object of @a
246 * obj. An Edje program on that Edje object's definition can respond
247 * to a signal by specifying matching 'signal' and 'source' fields.
251 EAPI void elm_layout_signal_emit(Evas_Object *obj, const char *emission, const char *source);
254 * Add a callback for a (Edje) signal emitted by a layout widget's
255 * underlying Edje object.
257 * @param obj The layout object handle
258 * @param emission The signal's name string
259 * @param source The signal's source string
260 * @param func The callback function to be executed when the signal is
262 * @param data A pointer to data to pass in to the callback function.
264 * This function connects a callback function to a signal emitted by
265 * the underlying Edje object of @a obj. Globs are accepted in either
266 * the emission or source strings (see @c
267 * edje_object_signal_callback_add()).
271 EAPI void elm_layout_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
274 * Remove a signal-triggered callback from a given layout widget.
276 * @param obj The layout object handle
277 * @param emission The signal's name string
278 * @param source The signal's source string
279 * @param func The callback function being executed when the signal
281 * @return The data pointer of the signal callback (passed on
282 * elm_layout_signal_callback_add()) or @c NULL, on errors.
284 * This function removes the @b last callback attached to a signal
285 * emitted by the undelying Edje object of @a obj, with parameters @a
286 * emission, @a source and @c func matching exactly those passed to a
287 * previous call to elm_object_signal_callback_add(). The data pointer
288 * that was passed to this call will be returned.
292 EAPI void *elm_layout_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
295 * Append child to layout box part.
297 * @param obj the layout object
298 * @param part the box part to which the object will be appended.
299 * @param child the child object to append to box.
300 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
302 * Once the object is appended, it will become child of the layout. Its
303 * lifetime will be bound to the layout, whenever the layout dies the child
304 * will be deleted automatically. One should use elm_layout_box_remove() to
305 * make this layout forget about the object.
307 * @see elm_layout_box_prepend()
308 * @see elm_layout_box_insert_before()
309 * @see elm_layout_box_insert_at()
310 * @see elm_layout_box_remove()
314 EAPI Eina_Bool elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child);
317 * Prepend child to layout box part.
319 * @param obj the layout object
320 * @param part the box part to prepend.
321 * @param child the child object to prepend to box.
322 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
324 * Once the object is prepended, it will become child of the layout. Its
325 * lifetime will be bound to the layout, whenever the layout dies the child
326 * will be deleted automatically. One should use elm_layout_box_remove() to
327 * make this layout forget about the object.
329 * @see elm_layout_box_append()
330 * @see elm_layout_box_insert_before()
331 * @see elm_layout_box_insert_at()
332 * @see elm_layout_box_remove()
336 EAPI Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child);
339 * Insert child to layout box part before a reference object.
341 * @param obj the layout object
342 * @param part the box part to insert.
343 * @param child the child object to insert into box.
344 * @param reference another reference object to insert before in box.
345 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
347 * Once the object is inserted, it will become child of the layout. Its
348 * lifetime will be bound to the layout, whenever the layout dies the child
349 * will be deleted automatically. One should use elm_layout_box_remove() to
350 * make this layout forget about the object.
352 * @see elm_layout_box_append()
353 * @see elm_layout_box_prepend()
354 * @see elm_layout_box_insert_before()
355 * @see elm_layout_box_remove()
359 EAPI Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
362 * Insert child to layout box part at a given position.
364 * @param obj the layout object
365 * @param part the box part to insert.
366 * @param child the child object to insert into box.
367 * @param pos the numeric position >=0 to insert the child.
368 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
370 * Once the object is inserted, it will become child of the layout. Its
371 * lifetime will be bound to the layout, whenever the layout dies the child
372 * will be deleted automatically. One should use elm_layout_box_remove() to
373 * make this layout forget about the object.
375 * @see elm_layout_box_append()
376 * @see elm_layout_box_prepend()
377 * @see elm_layout_box_insert_before()
378 * @see elm_layout_box_remove()
382 EAPI Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
385 * Remove a child of the given part box.
387 * @param obj The layout object
388 * @param part The box part name to remove child.
389 * @param child The object to remove from box.
390 * @return The object that was being used, or NULL if not found.
392 * The object will be removed from the box part and its lifetime will
393 * not be handled by the layout anymore. This is equivalent to
394 * elm_object_part_content_unset() for box.
396 * @see elm_layout_box_append()
397 * @see elm_layout_box_remove_all()
401 EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child);
404 * Remove all children of the given part box.
406 * @param obj The layout object
407 * @param part The box part name to remove child.
408 * @param clear If EINA_TRUE, then all objects will be deleted as
409 * well, otherwise they will just be removed and will be
410 * dangling on the canvas.
411 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
413 * The objects will be removed from the box part and their lifetime will
414 * not be handled by the layout anymore. This is equivalent to
415 * elm_layout_box_remove() for all box children.
417 * @see elm_layout_box_append()
418 * @see elm_layout_box_remove()
422 EAPI Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear);
425 * Insert child to layout table part.
427 * @param obj the layout object
428 * @param part the box part to pack child.
429 * @param child_obj the child object to pack into table.
430 * @param col the column to which the child should be added. (>= 0)
431 * @param row the row to which the child should be added. (>= 0)
432 * @param colspan how many columns should be used to store this object. (>=
434 * @param rowspan how many rows should be used to store this object. (>= 1)
435 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
437 * Once the object is inserted, it will become child of the table. Its
438 * lifetime will be bound to the layout, and whenever the layout dies the
439 * child will be deleted automatically. One should use
440 * elm_layout_table_remove() to make this layout forget about the object.
442 * If @p colspan or @p rowspan are bigger than 1, that object will occupy
443 * more space than a single cell. For instance, the following code:
445 * elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);
448 * Would result in an object being added like the following picture:
450 * @image html layout_colspan.png
451 * @image latex layout_colspan.eps width=\textwidth
453 * @see elm_layout_table_unpack()
454 * @see elm_layout_table_clear()
458 EAPI Eina_Bool elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
461 * Unpack (remove) a child of the given part table.
463 * @param obj The layout object
464 * @param part The table part name to remove child.
465 * @param child_obj The object to remove from table.
466 * @return The object that was being used, or NULL if not found.
468 * The object will be unpacked from the table part and its lifetime
469 * will not be handled by the layout anymore. This is equivalent to
470 * elm_object_part_content_unset() for table.
472 * @see elm_layout_table_pack()
473 * @see elm_layout_table_clear()
477 EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj);
480 * Remove all the child objects of the given part table.
482 * @param obj The layout object
483 * @param part The table part name to remove child.
484 * @param clear If EINA_TRUE, then all objects will be deleted as
485 * well, otherwise they will just be removed and will be
486 * dangling on the canvas.
487 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
489 * The objects will be removed from the table part and their lifetime will
490 * not be handled by the layout anymore. This is equivalent to
491 * elm_layout_table_unpack() for all table children.
493 * @see elm_layout_table_pack()
494 * @see elm_layout_table_unpack()
498 EAPI Eina_Bool elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear);
501 * Get the edje layout
503 * @param obj The layout object
505 * @return A Evas_Object with the edje layout settings loaded
506 * with function elm_layout_file_set
508 * This returns the edje object. It is not expected to be used to then
509 * swallow objects via edje_object_part_swallow() for example. Use
510 * elm_object_part_content_set() instead so child object handling and sizing is
513 * @note This function should only be used if you really need to call some
514 * low level Edje function on this edje object. All the common stuff (setting
515 * text, emitting signals, hooking callbacks to signals, etc.) can be done
516 * with proper elementary functions.
518 * @see elm_object_signal_callback_add()
519 * @see elm_object_signal_emit()
520 * @see elm_object_part_text_set()
521 * @see elm_object_part_content_set()
522 * @see elm_layout_box_append()
523 * @see elm_layout_table_pack()
524 * @see elm_layout_data_get()
528 EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj);
531 * Get the edje data from the given layout
533 * @param obj The layout object
534 * @param key The data key
536 * @return The edje data string
538 * This function fetches data specified inside the edje theme of this layout.
539 * This function return NULL if data is not found.
541 * In EDC this comes from a data block within the group block that @p
542 * obj was loaded from. E.g.
549 * item: "key1" "value1";
550 * item: "key2" "value2";
558 EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key);
563 * @param obj The layout object
565 * Manually forces a sizing re-evaluation. This is useful when the minimum
566 * size required by the edje theme of this layout has changed. The change on
567 * the minimum size required by the edje theme is not immediately reported to
568 * the elementary layout, so one needs to call this function in order to tell
569 * the widget (layout) that it needs to reevaluate its own size.
571 * The minimum size of the theme is calculated based on minimum size of
572 * parts, the size of elements inside containers like box and table, etc. All
573 * of this can change due to state changes, and that's when this function
576 * Also note that a standard signal of "size,eval" "elm" emitted from the
577 * edje object will cause this to happen too.
581 EAPI void elm_layout_sizing_eval(Evas_Object *obj);
584 * Sets a specific cursor for an edje part.
586 * @param obj The layout object.
587 * @param part_name a part from loaded edje group.
588 * @param cursor cursor name to use, see Elementary_Cursor.h
590 * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
591 * part not exists or it has "mouse_events: 0".
595 EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor);
598 * Get the cursor to be shown when mouse is over an edje part
600 * @param obj The layout object.
601 * @param part_name a part from loaded edje group.
602 * @return the cursor name.
606 EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name);
609 * Unsets a cursor previously set with elm_layout_part_cursor_set().
611 * @param obj The layout object.
612 * @param part_name a part from loaded edje group, that had a cursor set
613 * with elm_layout_part_cursor_set().
614 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
618 EAPI Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name);
621 * Sets a specific cursor style for an edje part.
623 * @param obj The layout object.
624 * @param part_name a part from loaded edje group.
625 * @param style the theme style to use (default, transparent, ...)
627 * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
628 * part not exists or it did not had a cursor set.
632 EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style);
635 * Gets a specific cursor style for an edje part.
637 * @param obj The layout object.
638 * @param part_name a part from loaded edje group.
640 * @return the theme style in use, defaults to "default". If the
641 * object does not have a cursor set, then NULL is returned.
645 EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name);
648 * Sets if the cursor set should be searched on the theme or should use
649 * the provided by the engine, only.
651 * @note before you set if should look on theme you should define a
652 * cursor with elm_layout_part_cursor_set(). By default it will only
653 * look for cursors provided by the engine.
655 * @param obj The layout object.
656 * @param part_name a part from loaded edje group.
657 * @param engine_only if cursors should be just provided by the engine (EINA_TRUE)
658 * or should also search on widget's theme as well (EINA_FALSE)
660 * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
661 * part not exists or it did not had a cursor set.
665 EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only);
668 * Set accessibility to all texblock(text) parts in the layout object
670 * @param obj The layout object.
671 * @param can_access makes all textblock(text) parts in the layout @p obj possible
672 * to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible
674 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. If @p obj is not
675 * a proper layout object, @c EINA_FALSE is returned.
681 EAPI Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access);
684 * Get accessibility state of texblock(text) parts in the layout object
686 * @param obj The layout object.
688 * @return @c EINA_TRUE, if all textblock(text) parts in the layout can be accessible
689 * @c EINA_FALSET if those cannot be accessible. If @p obj is not a proper layout
690 * object, @c EINA_FALSE is returned.
692 * @see elm_layout_edje_object_access_set()
698 EAPI Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj);
701 * Gets a specific cursor engine_only for an edje part.
703 * @param obj The layout object.
704 * @param part_name a part from loaded edje group.
706 * @return whenever the cursor is just provided by engine or also from theme.
710 EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name);
713 * Set the layout content.
715 * @param obj The layout object
716 * @param swallow The swallow part name in the edje file
717 * @param content The child that will be added in this layout object
718 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
720 * Once the content object is set, a previously set one will be deleted.
721 * If you want to keep that old content object, use the
722 * elm_object_part_content_unset() function.
724 * @note In an Edje theme, the part used as a content container is called @c
725 * SWALLOW. This is why the parameter name is called @p swallow, but it is
726 * expected to be a part name just like the second parameter of
727 * elm_layout_box_append().
729 * @see elm_layout_box_append()
730 * @see elm_object_part_content_get()
731 * @see elm_object_part_content_unset()
734 EAPI Eina_Bool elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content);
737 * Get the child object in the given content part.
739 * @param obj The layout object
740 * @param swallow The SWALLOW part to get its content
742 * @return The swallowed object or NULL if none or an error occurred
744 EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow);
747 * Unset the layout content.
749 * @param obj The layout object
750 * @param swallow The swallow part name in the edje file
751 * @return The content that was being used
753 * Unparent and return the content object which was set for this part.
755 EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow);
758 * Set the text of the given part
760 * @param obj The layout object
761 * @param part The TEXT part where to set the text
762 * @param text The text to set
763 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
765 EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const char *part, const char *text);
768 * Get the text set in the given part
770 * @param obj The layout object
771 * @param part The TEXT part to retrieve the text off
773 * @return The text set in @p part
775 EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part);
778 * @def elm_layout_icon_set
779 * Convenience macro to set the icon object in a layout that follows the
780 * Elementary naming convention for its parts.
784 #define elm_layout_icon_set(_ly, _obj) \
787 elm_object_part_content_set((_ly), "elm.swallow.icon", (_obj)); \
788 if ((_obj)) sig = "elm,state,icon,visible"; \
789 else sig = "elm,state,icon,hidden"; \
790 elm_object_signal_emit((_ly), sig, "elm"); \
794 * @def elm_layout_icon_get
795 * Convenience macro to get the icon object from a layout that follows the
796 * Elementary naming convention for its parts.
800 #define elm_layout_icon_get(_ly) \
801 elm_object_part_content_get((_ly), "elm.swallow.icon")
804 * @def elm_layout_end_set
805 * Convenience macro to set the end object in a layout that follows the
806 * Elementary naming convention for its parts.
810 #define elm_layout_end_set(_ly, _obj) \
813 elm_object_part_content_set((_ly), "elm.swallow.end", (_obj)); \
814 if ((_obj)) sig = "elm,state,end,visible"; \
815 else sig = "elm,state,end,hidden"; \
816 elm_object_signal_emit((_ly), sig, "elm"); \
820 * @def elm_layout_end_get
821 * Convenience macro to get the end object in a layout that follows the
822 * Elementary naming convention for its parts.
826 #define elm_layout_end_get(_ly) \
827 elm_object_part_content_get((_ly), "elm.swallow.end")