[multibuttenentry] merged with opensource r75453.
[framework/uifw/elementary.git] / src / lib / elm_layout.h
index 4251806..84ecbff 100644 (file)
@@ -1,5 +1,6 @@
 /**
  * @defgroup Layout Layout
+ * @ingroup Elementary
  *
  * @image html img/widget/layout/preview-00.png
  * @image latex img/widget/layout/preview-00.eps width=\textwidth
@@ -72,7 +73,7 @@
  * sent to the Layout theme (with elm_object_signal_emit()) and the theme
  * handled the signal by changing the box padding, or align, or both. Using
  * the Elementary @ref Box widget is not necessarily harder or easier, it
- * just depends on the circunstances and requirements.
+ * just depends on the circumstances and requirements.
  *
  * The Layout Box can be used through the @c elm_layout_box_* set of
  * functions.
  * @li @c toolbar-table - application with toolbar and main content area as a
  * table
  *
+ * Supported elm_object common APIs.
+ * @li @ref elm_object_signal_emit
+ * @li @ref elm_object_signal_callback_add
+ * @li @ref elm_object_signal_callback_del
+ * @li @ref elm_object_part_text_set
+ * @li @ref elm_object_part_text_get
+ * @li @ref elm_object_part_content_set
+ * @li @ref elm_object_part_content_get
+ * @li @ref elm_object_part_content_unset
+ *
  * @section secExamples Examples
  *
  * Some examples of the Layout widget can be found here:
  *
  * @ingroup Layout
  */
-EAPI Evas_Object *
-                                  elm_layout_add(Evas_Object *parent)
-EINA_ARG_NONNULL(1);
+EAPI Evas_Object                 *elm_layout_add(Evas_Object *parent);
 
 /**
  * Set the file that will be used as layout
@@ -167,13 +176,13 @@ EINA_ARG_NONNULL(1);
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_file_set(Evas_Object *obj, const char *file, const char *group);
 
 /**
  * Set the edje group from the elementary theme that will be used as layout
  *
  * @param obj The layout object
- * @param clas the clas of the group
+ * @param clas the class of the group
  * @param group the group
  * @param style the style to used
  *
@@ -181,87 +190,7 @@ EAPI Eina_Bool                    elm_layout_file_set(Evas_Object *obj, const ch
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style) EINA_ARG_NONNULL(1);
-
-/**
- * Set the layout content.
- *
- * @param obj The layout object
- * @param swallow The swallow part name in the edje file
- * @param content The child that will be added in this layout object
- *
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_object_part_content_unset() function.
- *
- * @note In an Edje theme, the part used as a content container is called @c
- * SWALLOW. This is why the parameter name is called @p swallow, but it is
- * expected to be a part name just like the second parameter of
- * elm_layout_box_append().
- *
- * @see elm_layout_box_append()
- * @see elm_object_part_content_get()
- * @see elm_object_part_content_unset()
- * @see @ref secBox
- * @deprecated use elm_object_part_content_set() instead
- *
- * @ingroup Layout
- */
-EINA_DEPRECATED EAPI void         elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1);
-
-/**
- * Get the child object in the given content part.
- *
- * @param obj The layout object
- * @param swallow The SWALLOW part to get its content
- *
- * @return The swallowed object or NULL if none or an error occurred
- *
- * @deprecated use elm_object_part_content_get() instead
- *
- * @ingroup Layout
- */
-EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
-
-/**
- * Unset the layout content.
- *
- * @param obj The layout object
- * @param swallow The swallow part name in the edje file
- * @return The content that was being used
- *
- * Unparent and return the content object which was set for this part.
- *
- * @deprecated use elm_object_part_content_unset() instead
- *
- * @ingroup Layout
- */
-EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
-
-/**
- * Set the text of the given part
- *
- * @param obj The layout object
- * @param part The TEXT part where to set the text
- * @param text The text to set
- *
- * @ingroup Layout
- * @deprecated use elm_object_part_text_set() instead.
- */
-EINA_DEPRECATED EAPI void         elm_layout_text_set(Evas_Object *obj, const char *part, const char *text) EINA_ARG_NONNULL(1);
-
-/**
- * Get the text set in the given part
- *
- * @param obj The layout object
- * @param part The TEXT part to retrieve the text off
- *
- * @return The text set in @p part
- *
- * @ingroup Layout
- * @deprecated use elm_object_part_text_get() instead.
- */
-EINA_DEPRECATED EAPI const char  *elm_layout_text_get(const Evas_Object *obj, const char *part) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style);
 
 /**
  * Append child to layout box part.
@@ -269,6 +198,7 @@ EINA_DEPRECATED EAPI const char  *elm_layout_text_get(const Evas_Object *obj, co
  * @param obj the layout object
  * @param part the box part to which the object will be appended.
  * @param child the child object to append to box.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * Once the object is appended, it will become child of the layout. Its
  * lifetime will be bound to the layout, whenever the layout dies the child
@@ -282,7 +212,7 @@ EINA_DEPRECATED EAPI const char  *elm_layout_text_get(const Evas_Object *obj, co
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child);
 
 /**
  * Prepend child to layout box part.
@@ -290,6 +220,7 @@ EAPI void                         elm_layout_box_append(Evas_Object *obj, const
  * @param obj the layout object
  * @param part the box part to prepend.
  * @param child the child object to prepend to box.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * Once the object is prepended, it will become child of the layout. Its
  * lifetime will be bound to the layout, whenever the layout dies the child
@@ -303,7 +234,7 @@ EAPI void                         elm_layout_box_append(Evas_Object *obj, const
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child);
 
 /**
  * Insert child to layout box part before a reference object.
@@ -312,6 +243,7 @@ EAPI void                         elm_layout_box_prepend(Evas_Object *obj, const
  * @param part the box part to insert.
  * @param child the child object to insert into box.
  * @param reference another reference object to insert before in box.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * Once the object is inserted, it will become child of the layout. Its
  * lifetime will be bound to the layout, whenever the layout dies the child
@@ -325,7 +257,7 @@ EAPI void                         elm_layout_box_prepend(Evas_Object *obj, const
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
 
 /**
  * Insert child to layout box part at a given position.
@@ -334,6 +266,7 @@ EAPI void                         elm_layout_box_insert_before(Evas_Object *obj,
  * @param part the box part to insert.
  * @param child the child object to insert into box.
  * @param pos the numeric position >=0 to insert the child.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * Once the object is inserted, it will become child of the layout. Its
  * lifetime will be bound to the layout, whenever the layout dies the child
@@ -347,7 +280,7 @@ EAPI void                         elm_layout_box_insert_before(Evas_Object *obj,
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool                    elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
 
 /**
  * Remove a child of the given part box.
@@ -366,7 +299,7 @@ EAPI void                         elm_layout_box_insert_at(Evas_Object *obj, con
  *
  * @ingroup Layout
  */
-EAPI Evas_Object                 *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1, 2, 3);
+EAPI Evas_Object                 *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child);
 
 /**
  * Remove all children of the given part box.
@@ -376,6 +309,7 @@ EAPI Evas_Object                 *elm_layout_box_remove(Evas_Object *obj, const
  * @param clear If EINA_TRUE, then all objects will be deleted as
  *        well, otherwise they will just be removed and will be
  *        dangling on the canvas.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * The objects will be removed from the box part and their lifetime will
  * not be handled by the layout anymore. This is equivalent to
@@ -386,7 +320,7 @@ EAPI Evas_Object                 *elm_layout_box_remove(Evas_Object *obj, const
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear);
 
 /**
  * Insert child to layout table part.
@@ -399,6 +333,7 @@ EAPI void                         elm_layout_box_remove_all(Evas_Object *obj, co
  * @param colspan how many columns should be used to store this object. (>=
  *        1)
  * @param rowspan how many rows should be used to store this object. (>= 1)
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * Once the object is inserted, it will become child of the table. Its
  * lifetime will be bound to the layout, and whenever the layout dies the
@@ -421,7 +356,7 @@ EAPI void                         elm_layout_box_remove_all(Evas_Object *obj, co
  *
  * @ingroup Layout
  */
-EAPI void                         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) EINA_ARG_NONNULL(1);
+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);
 
 /**
  * Unpack (remove) a child of the given part table.
@@ -440,7 +375,7 @@ EAPI void                         elm_layout_table_pack(Evas_Object *obj, const
  *
  * @ingroup Layout
  */
-EAPI Evas_Object                 *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj) EINA_ARG_NONNULL(1, 2, 3);
+EAPI Evas_Object                 *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj);
 
 /**
  * Remove all the child objects of the given part table.
@@ -450,6 +385,7 @@ EAPI Evas_Object                 *elm_layout_table_unpack(Evas_Object *obj, cons
  * @param clear If EINA_TRUE, then all objects will be deleted as
  *        well, otherwise they will just be removed and will be
  *        dangling on the canvas.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * The objects will be removed from the table part and their lifetime will
  * not be handled by the layout anymore. This is equivalent to
@@ -460,7 +396,7 @@ EAPI Evas_Object                 *elm_layout_table_unpack(Evas_Object *obj, cons
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear);
 
 /**
  * Get the edje layout
@@ -490,7 +426,7 @@ EAPI void                         elm_layout_table_clear(Evas_Object *obj, const
  *
  * @ingroup Layout
  */
-EAPI Evas_Object                 *elm_layout_edje_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Evas_Object                 *elm_layout_edje_get(const Evas_Object *obj);
 
 /**
  * Get the edje data from the given layout
@@ -520,7 +456,7 @@ EAPI Evas_Object                 *elm_layout_edje_get(const Evas_Object *obj) EI
  *
  * @ingroup Layout
  */
-EAPI const char                  *elm_layout_data_get(const Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
+EAPI const char                  *elm_layout_data_get(const Evas_Object *obj, const char *key);
 
 /**
  * Eval sizing
@@ -543,7 +479,7 @@ EAPI const char                  *elm_layout_data_get(const Evas_Object *obj, co
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_sizing_eval(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI void                         elm_layout_sizing_eval(Evas_Object *obj);
 
 /**
  * Sets a specific cursor for an edje part.
@@ -557,7 +493,7 @@ EAPI void                         elm_layout_sizing_eval(Evas_Object *obj) EINA_
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor);
 
 /**
  * Get the cursor to be shown when mouse is over an edje part
@@ -568,7 +504,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_set(Evas_Object *obj, c
  *
  * @ingroup Layout
  */
-EAPI const char                  *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+EAPI const char                  *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name);
 
 /**
  * Unsets a cursor previously set with elm_layout_part_cursor_set().
@@ -576,10 +512,11 @@ EAPI const char                  *elm_layout_part_cursor_get(const Evas_Object *
  * @param obj The layout object.
  * @param part_name a part from loaded edje group, that had a cursor set
  *        with elm_layout_part_cursor_set().
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
  *
  * @ingroup Layout
  */
-EAPI void                         elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name);
 
 /**
  * Sets a specific cursor style for an edje part.
@@ -593,7 +530,7 @@ EAPI void                         elm_layout_part_cursor_unset(Evas_Object *obj,
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style);
 
 /**
  * Gets a specific cursor style for an edje part.
@@ -606,7 +543,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_style_set(Evas_Object *
  *
  * @ingroup Layout
  */
-EAPI const char                  *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+EAPI const char                  *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name);
 
 /**
  * Sets if the cursor set should be searched on the theme or should use
@@ -626,7 +563,7 @@ EAPI const char                  *elm_layout_part_cursor_style_get(const Evas_Ob
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only);
 
 /**
  * Gets a specific cursor engine_only for an edje part.
@@ -638,7 +575,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_set(Evas_Ob
  *
  * @ingroup Layout
  */
-EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name);
 
 /**
  * @def elm_layout_icon_set
@@ -658,7 +595,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const E
 
 /**
  * @def elm_layout_icon_get
- * Convienience macro to get the icon object from a layout that follows the
+ * Convenience macro to get the icon object from a layout that follows the
  * Elementary naming convention for its parts.
  *
  * @ingroup Layout
@@ -668,7 +605,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const E
 
 /**
  * @def elm_layout_end_set
- * Convienience macro to set the end object in a layout that follows the
+ * Convenience macro to set the end object in a layout that follows the
  * Elementary naming convention for its parts.
  *
  * @ingroup Layout
@@ -684,7 +621,7 @@ EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const E
 
 /**
  * @def elm_layout_end_get
- * Convienience macro to get the end object in a layout that follows the
+ * Convenience macro to get the end object in a layout that follows the
  * Elementary naming convention for its parts.
  *
  * @ingroup Layout
@@ -692,28 +629,6 @@ EAPI Eina_Bool                    elm_layout_part_cursor_engine_only_get(const E
 #define elm_layout_end_get(_ly) \
   elm_object_part_content_get((_ly), "elm.swallow.end")
 
-/**
- * @def elm_layout_label_set
- * Convienience macro to set the label in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- * @deprecated use elm_object_text_set() instead.
- */
-#define elm_layout_label_set(_ly, _txt) \
-  elm_layout_text_set((_ly), "elm.text", (_txt))
-
-/**
- * @def elm_layout_label_get
- * Convenience macro to get the label in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- * @deprecated use elm_object_text_set() instead.
- */
-#define elm_layout_label_get(_ly) \
-  elm_layout_text_get((_ly), "elm.text")
-
 /* smart callbacks called:
  * "theme,changed" - when elm theme is changed.
  */