From 0311cb609178b6e68e069b439fbd554c66538520 Mon Sep 17 00:00:00 2001 From: Yossi Kantor Date: Mon, 17 Mar 2014 14:21:55 +0200 Subject: [PATCH] Eolian: Integration of Evas Box --- src/Makefile_Evas.am | 10 +- src/lib/evas/Evas_Eo.h | 4 + src/lib/evas/canvas/evas_box.eo | 731 +++++++++++++++++++++++++ src/lib/evas/canvas/evas_object_box.c | 759 ++++++-------------------- 4 files changed, 898 insertions(+), 606 deletions(-) create mode 100644 src/lib/evas/canvas/evas_box.eo diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index a916d31d63..6132592ceb 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -43,7 +43,9 @@ BUILT_SOURCES += \ lib/evas/canvas/evas_selectable_interface.eo.c \ lib/evas/canvas/evas_selectable_interface.eo.h \ lib/evas/canvas/evas_zoomable_interface.eo.c \ - lib/evas/canvas/evas_zoomable_interface.eo.h + lib/evas/canvas/evas_zoomable_interface.eo.h \ + lib/evas/canvas/evas_box.eo.c \ + lib/evas/canvas/evas_box.eo.h evaseolianfilesdir = $(datadir)/eolian/include/evas-@VMAJ@ evaseolianfiles_DATA = \ @@ -67,7 +69,8 @@ evaseolianfiles_DATA = \ lib/evas/canvas/evas_clickable_interface.eo \ lib/evas/canvas/evas_scrollable_interface.eo \ lib/evas/canvas/evas_selectable_interface.eo \ - lib/evas/canvas/evas_zoomable_interface.eo + lib/evas/canvas/evas_zoomable_interface.eo \ + lib/evas/canvas/evas_box.eo EXTRA_DIST += \ ${evaseolianfiles_DATA} @@ -106,7 +109,8 @@ nodist_installed_evascanvasheaders_DATA = \ lib/evas/canvas/evas_clickable_interface.eo.h \ lib/evas/canvas/evas_scrollable_interface.eo.h \ lib/evas/canvas/evas_selectable_interface.eo.h \ - lib/evas/canvas/evas_zoomable_interface.eo.h + lib/evas/canvas/evas_zoomable_interface.eo.h \ + lib/evas/canvas/evas_box.eo.h noinst_HEADERS = \ lib/evas/include/evas_inline.x \ diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index de03c72fa7..b0b408acb2 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -3460,6 +3460,9 @@ enum * * @{ */ +#include "canvas/evas_box.eo.h" + +#if 0 #define EVAS_OBJ_BOX_CLASS evas_object_box_class_get() const Eo_Class *evas_object_box_class_get(void) EINA_CONST; @@ -3997,6 +4000,7 @@ enum */ #define evas_obj_box_option_property_vget(opt, property, args, ret) EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET), EO_TYPECHECK(Evas_Object_Box_Option *, opt), EO_TYPECHECK(int, property), EO_TYPECHECK(va_list *, args), EO_TYPECHECK(Eina_Bool *, ret) +#endif /** * @} */ diff --git a/src/lib/evas/canvas/evas_box.eo b/src/lib/evas/canvas/evas_box.eo new file mode 100644 index 0000000000..4eaf09e546 --- /dev/null +++ b/src/lib/evas/canvas/evas_box.eo @@ -0,0 +1,731 @@ +class Evas_Box (Evas_Smart_Clipped) +{ + legacy_prefix: evas_object_box; + eo_prefix: evas_obj_box; + data: Evas_Object_Box_Data; + properties { + align { + set { + /*@ + Set the alignment of the whole bounding box of contents, for a + given box object. + + This will influence how a box object is to align its bounding box + of contents within its own area. The values @b must be in the range + @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal + alignment, @c 0.0 means to the left, with @c 1.0 meaning to the + right. For vertical alignment, @c 0.0 means to the top, with @c 1.0 + meaning to the bottom. + + @note The default values for both alignments is @c 0.5. + + @see evas_object_box_align_get() */ + } + get { + /*@ + Get the alignment of the whole bounding box of contents, for a + given box object. + + @see evas_object_box_align_set() for more information */ + } + values { + double horizontal; /*@ The horizontal alignment, in pixels */ + double vertical; /*@ the vertical alignment, in pixels */ + } + } + padding { + set { + /*@ + Set the (space) padding between cells set for a given box object. + + @note The default values for both padding components is @c 0. + + @see evas_object_box_padding_get() */ + } + get { + /*@ + Get the (space) padding between cells set for a given box object. + + @see evas_object_box_padding_set() */ + } + values { + Evas_Coord horizontal; /*@ The horizontal padding, in pixels */ + Evas_Coord vertical; /*@ the vertical padding, in pixels */ + } + } + layout { + set { + /*@ + Set a new layouting function to a given box object + + A box layout function affects how a box object displays child + elements within its area. The list of pre-defined box layouts + available in Evas is: + - evas_object_box_layout_horizontal() + - evas_object_box_layout_vertical() + - evas_object_box_layout_homogeneous_horizontal() + - evas_object_box_layout_homogeneous_vertical() + - evas_object_box_layout_homogeneous_max_size_horizontal() + - evas_object_box_layout_homogeneous_max_size_vertical() + - evas_object_box_layout_flow_horizontal() + - evas_object_box_layout_flow_vertical() + - evas_object_box_layout_stack() + + Refer to each of their documentation texts for details on them. + + @note A box layouting function will be triggered by the @c + 'calculate' smart callback of the box's smart class. */ + } + values { + Evas_Object_Box_Layout cb @nonull; /*@ The new layout function to set on @p o. */ + const void *data; /*@ Data pointer to be passed to @p cb. */ + Eina_Free_Cb free_data; /*@ Function to free @p data, if need be. */ + } + } + } + methods { + layout_horizontal { + /*@ + Layout function which sets the box @a o to a (basic) horizontal box + + In this layout, the box object's overall behavior is controlled by + its padding/alignment properties, which are set by the + evas_object_box_{h,v}_{align,padding}_set() family of + functions. The size hints of the elements in the box -- set by the + evas_object_size_hint_{align,padding,weight}_set() functions + -- also control the way this function works. + + \par Box's properties: + @c align_h controls the horizontal alignment of the child objects + relative to the containing box. When set to @c 0.0, children are + aligned to the left. A value of @c 1.0 makes them aligned to the + right border. Values in between align them proportionally. Note + that if the size required by the children, which is given by their + widths and the @c padding_h property of the box, is bigger than the + their container's width, the children will be displayed out of the + box's bounds. A negative value of @c align_h makes the box to + @b justify its children. The padding between them, in this case, is + corrected so that the leftmost one touches the left border and the + rightmost one touches the right border (even if they must + overlap). The @c align_v and @c padding_v properties of the box + @b don't contribute to its behaviour when this layout is chosen. + + \par Child element's properties: + @c align_x does @b not influence the box's behavior. @c padding_l + and @c padding_r sum up to the container's horizontal padding + between elements. The child's @c padding_t, @c padding_b and + @c align_y properties apply for padding/alignment relative to the + overall height of the box. Finally, there is the @c weight_x + property, which, if set to a non-zero value, tells the container + that the child width is @b not pre-defined. If the container can't + accommodate all its children, it sets the widths of the ones + with weights to sizes as small as they can all fit into + it. If the size required by the children is less than the + available, the box increases its childrens' (which have weights) + widths as to fit the remaining space. The @c weight_x property, + besides telling the element is resizable, gives a @b weight for the + resizing process. The parent box will try to distribute (or take + off) widths accordingly to the @b normalized list of weights: most + weighted children remain/get larger in this process than the least + ones. @c weight_y does not influence the layout. + + If one desires that, besides having weights, child elements must be + resized bounded to a minimum or maximum size, those size hints must + be set, by the evas_object_size_hint_{min,max}_set() + functions. */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + } + layout_vertical { + /*@ + Layout function which sets the box @a o to a (basic) vertical box + + This function behaves analogously to + evas_object_box_layout_horizontal(). The description of its + behaviour can be derived from that function's documentation. */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + } + layout_homogeneous_max_size_horizontal { + /*@ + Layout function which sets the box @a o to a maximum size, + homogeneous horizontal box + + In a maximum size, homogeneous horizontal box, besides having cells + of equal size reserved for the child objects, this size will + be defined by the size of the @b largest child in the box (in + width). The box's overall behavior is controlled by its properties, + which are set by the + evas_object_box_{h,v}_{align,padding}_set() family of + functions. The size hints of the elements in the box -- set by the + evas_object_size_hint_{align,padding,weight}_set() functions + -- also control the way this function works. + + \par Box's properties: + @c padding_h tells the box to draw empty spaces of that size, in + pixels, between the child objects' cells. @c align_h controls the + horizontal alignment of the child objects, relative to the + containing box. When set to @c 0.0, children are aligned to the + left. A value of @c 1.0 lets them aligned to the right + border. Values in between align them proportionally. A negative + value of @c align_h makes the box to @b justify its children + cells. The padding between them, in this case, is corrected so that + the leftmost one touches the left border and the rightmost one + touches the right border (even if they must overlap). The + @c align_v and @c padding_v properties of the box don't contribute to + its behaviour when this layout is chosen. + + \par Child element's properties: + @c padding_l and @c padding_r sum up to the required width of the + child element. The @c align_x property tells the relative position + of this overall child width in its allocated cell (@c 0.0 to + extreme left, @c 1.0 to extreme right). A value of @c -1.0 to + @c align_x makes the box try to resize this child element to the exact + width of its cell (respecting the minimum and maximum size hints on + the child's width and accounting for its horizontal padding + hints). The child's @c padding_t, @c padding_b and @c align_y + properties apply for padding/alignment relative to the overall + height of the box. A value of @c -1.0 to @c align_y makes the box + try to resize this child element to the exact height of its parent + (respecting the max hint on the child's height). */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + + } + internal_remove { + /*@ No description supplied by the EAPI. */ + return Evas_Object *; + params { + @in Evas_Object *child; + } + } + layout_flow_vertical { + /*@ + Layout function which sets the box @a o to a @b flow vertical box. + + This function behaves analogously to + evas_object_box_layout_flow_horizontal(). The description of its + behaviour can be derived from that function's documentation. */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + } + internal_option_free { + /*@ No description supplied by the EAPI. */ + params { + @in Evas_Object_Box_Option *opt; + } + } + insert_after { + /*@ + Insert a new @a child object after another existing one, in + a given box object @a o. + + @return A box option bound to the recently added box item or @c + NULL, on errors + + On success, the @c "child,added" smart event will take place. + + @note This function will fail if @p reference is not a member of @p + o. + + @note The actual placing of the item relative to @p o's area will + depend on the layout set to it. + + @note This call will trigger the box's + _Evas_Object_Box_Api::insert_after smart function. */ + + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */ + @in const Evas_Object *reference @nonull; /*@ The child object to place this new one after */ + } + } + remove_all { + /*@ + Remove @b all child objects from a box object, unparenting them + again. + + @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + + This has the same effect of calling evas_object_box_remove() on + each of @p o's child objects, in sequence. If, and only if, all + those calls succeed, so does this one. */ + + return Eina_Bool; + params { + @in Eina_Bool clear; /*@ if true, it will delete just removed children. */ + } + } + iterator_new { + /*@ + Get an iterator to walk the list of children of a given box object. + + @return An iterator on @p o's child objects, on success, or @c NULL, + on errors + + @note Do @b not remove or delete objects while walking the list. */ + + const; + return Eina_Iterator * @warn_unused; + } + add_to { + /*@ + Add a new box as a @b child of a given smart object. + + @return @c NULL on error, a pointer to a new box object on + success. + + This is a helper function that has the same effect of putting a new + box object into @p parent by use of evas_object_smart_member_add(). + + @see evas_object_box_add() */ + + return Evas_Object * @warn_unused; + } + append { + /*@ + Append a new @a child object to the given box object @a o. + + @return A box option bound to the recently added box item or @c + NULL, on errors + + On success, the @c "child,added" smart event will take place. + + @note The actual placing of the item relative to @p o's area will + depend on the layout set to it. For example, on horizontal layouts + an item in the end of the box's list of children will appear on its + right. + + @note This call will trigger the box's _Evas_Object_Box_Api::append + smart function. */ + + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */ + } + } + option_property_id_get { + /*@ + Get the numerical identifier of the property of the child elements + of the box @a o which have @a name as name string + + @return The numerical ID of the given property or @c -1, on + errors. + + @note This call won't do anything for a canonical Evas box. Only + users which have @b subclassed it, setting custom box items options + (see #Evas_Object_Box_Option) on it, would benefit from this + function. They'd have to implement it and set it to be the + _Evas_Object_Box_Api::property_id_get smart class function of the + box, which is originally set to @c NULL. */ + + const; + return int @warn_unused; + params { + @in const char *name @nonull; /*@ The name string of the option being searched, for + its ID */ + } + } + prepend { + /*@ + Prepend a new @a child object to the given box object @a o. + + @return A box option bound to the recently added box item or @c + NULL, on errors + + On success, the @c "child,added" smart event will take place. + + @note The actual placing of the item relative to @p o's area will + depend on the layout set to it. For example, on horizontal layouts + an item in the beginning of the box's list of children will appear + on its left. + + @note This call will trigger the box's + _Evas_Object_Box_Api::prepend smart function. */ + + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */ + } + } + accessor_new { + /*@ + Get an accessor (a structure providing random items access) to the + list of children of a given box object. + + @return An accessor on @p o's child objects, on success, or @c NULL, + on errors + + @note Do not remove or delete objects while walking the list. */ + + const; + return Eina_Accessor * @warn_unused; + } + internal_append { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child; + } + } + option_property_vset { + /*@ + Set a property value (by its given numerical identifier), on a + given box child element -- by a variable argument list + + @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + + This is a variable argument list variant of the + evas_object_box_option_property_set(). See its documentation for + more details. */ + + return Eina_Bool; + params { + @in Evas_Object_Box_Option *opt @nonull; /*@ The box option structure bound to the child box element + to set a property on */ + @in int property; /*@ The numerical ID of the given property */ + @in va_list *args; /*@ The variable argument list implementing the value to + be set for this property. It @b must be of the same type the user has + defined for it. */ + } + legacy null; + } + internal_remove_at { + /*@ No description supplied by the EAPI. */ + return Evas_Object *; + params { + @in unsigned int pos; + } + } + remove_at { + /*@ + Remove an object, bound to a given position in a box object, + unparenting it again. + + @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + + On removal, you'll get an unparented object again, just as it was + before you inserted it in the box. The @c option_free() box smart + callback will be called automatically for you and, also, the + @c "child,removed" smart event will take place. + + @note This function will fail if the given position is invalid, + given @p o's internal list of elements. + + @note This call will trigger the box's + _Evas_Object_Box_Api::remove_at smart function. */ + + return Eina_Bool; + params { + @in unsigned int pos; /*@ The numeric position (starting from @c 0) of the child + object to be removed */ + } + } + option_property_vget { + /*@ + Get a property's value (by its given numerical identifier), on a + given box child element -- by a variable argument list + + @return @c EINA_TRUE on success, @c EINA_FALSE on failure. + + This is a variable argument list variant of the + evas_object_box_option_property_get(). See its documentation for + more details. */ + + const; + return Eina_Bool; + params { + @in Evas_Object_Box_Option *opt @nonull; /*@ The box option structure bound to the child box element + to get a property from */ + @in int property; /*@ The numerical ID of the given property */ + @in va_list *args; /*@ The variable argument list with pointers to where to + store the values of this property. They @b must point to variables + of the same type the user has defined for them. */ + } + legacy null; + } + internal_insert_at { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child; + @in unsigned int pos; + } + } + insert_before { + /*@ + Insert a new @a child object before another existing one, in + a given box object @a o. + + @return A box option bound to the recently added box item or @c + NULL, on errors + + On success, the @c "child,added" smart event will take place. + + @note This function will fail if @p reference is not a member of @p + o. + + @note The actual placing of the item relative to @p o's area will + depend on the layout set to it. + + @note This call will trigger the box's + _Evas_Object_Box_Api::insert_before smart function. */ + + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */ + @in const Evas_Object *reference @nonull; /*@ The child object to place this new one before */ + } + } + option_property_name_get { + /*@ + Get the name of the property of the child elements of the box @a o + which have @a id as identifier + + @return The name of the given property or @c NULL, on errors. + + @note This call won't do anything for a canonical Evas box. Only + users which have @b subclassed it, setting custom box items options + (see #Evas_Object_Box_Option) on it, would benefit from this + function. They'd have to implement it and set it to be the + _Evas_Object_Box_Api::property_name_get smart class function of the + box, which is originally set to @c NULL. */ + + const; + return const char * @warn_unused; + params { + @in int property; /*@ The numerical identifier of the option being searched, + for its name */ + } + } + internal_insert_before { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child; + @in const Evas_Object *reference; + } + } + layout_homogeneous_horizontal { + /*@ + Layout function which sets the box @a o to a @b homogeneous + horizontal box + + In a homogeneous horizontal box, its width is divided @b equally + between the contained objects. The box's overall behavior is + controlled by its padding/alignment properties, which are set by + the evas_object_box_{h,v}_{align,padding}_set() family of + functions. The size hints the elements in the box -- set by the + evas_object_size_hint_{align,padding,weight}_set() functions + -- also control the way this function works. + + \par Box's properties: + @c align_h has no influence on the box for this layout. + @c padding_h tells the box to draw empty spaces of that size, in + pixels, between the (equal) child objects' cells. The @c align_v + and @c padding_v properties of the box don't contribute to its + behaviour when this layout is chosen. + + \par Child element's properties: + @c padding_l and @c padding_r sum up to the required width of the + child element. The @c align_x property tells the relative position + of this overall child width in its allocated cell (@c 0.0 to + extreme left, @c 1.0 to extreme right). A value of @c -1.0 to + @c align_x makes the box try to resize this child element to the exact + width of its cell (respecting the minimum and maximum size hints on + the child's width and accounting for its horizontal padding + hints). The child's @c padding_t, @c padding_b and @c align_y + properties apply for padding/alignment relative to the overall + height of the box. A value of @c -1.0 to @c align_y makes the box + try to resize this child element to the exact height of its parent + (respecting the maximum size hint on the child's height). */ + params { + @in Evas_Object_Box_Data *priv; + @in void *data; + } + } + internal_option_new { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option*; + params { + @in Evas_Object *child; + } + } + layout_homogeneous_max_size_vertical { + /*@ + Layout function which sets the box @a o to a maximum size, + homogeneous vertical box + + This function behaves analogously to + evas_object_box_layout_homogeneous_max_size_horizontal(). The + description of its behaviour can be derived from that function's + documentation. */ + params { + @in Evas_Object_Box_Data *priv; + @in void *data; + } + } + internal_insert_after { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child; + @in const Evas_Object *reference; + } + } + insert_at { + /*@ + Insert a new @a child object at a given position, in a given + box object @a o. + + @return A box option bound to the recently added box item or @c + NULL, on errors + + On success, the @c "child,added" smart event will take place. + + @note This function will fail if the given position is invalid, + given @p o's internal list of elements. + + @note The actual placing of the item relative to @p o's area will + depend on the layout set to it. + + @note This call will trigger the box's + _Evas_Object_Box_Api::insert_at smart function. */ + + return Evas_Object_Box_Option *; + params { + @in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */ + @in unsigned int pos; /*@ The numeric position (starting from @c 0) to place the + new child object at */ + } + } + internal_prepend { + /*@ No description supplied by the EAPI. */ + return Evas_Object_Box_Option*; + params { + @in Evas_Object *child; + } + } + remove { + /*@ + Remove a given object from a box object, unparenting it again. + + @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise + + On removal, you'll get an unparented object again, just as it was + before you inserted it in the box. The + _Evas_Object_Box_Api::option_free box smart callback will be called + automatically for you and, also, the @c "child,removed" smart event + will take place. + + @note This call will trigger the box's _Evas_Object_Box_Api::remove + smart function. */ + + return Eina_Bool; + params { + @in Evas_Object *child @nonull; /*@ The handle to the child object to be removed */ + } + } + layout_stack { + /*@ + Layout function which sets the box @a o to a @b stacking box + + In a stacking box, all children will be given the same size -- the + box's own size -- and they will be stacked one above the other, so + that the first object in @p o's internal list of child elements + will be the bottommost in the stack. + + \par Box's properties: + No box properties are used. + + \par Child element's properties: + @c padding_l and @c padding_r sum up to the required width of the + child element. The @c align_x property tells the relative position + of this overall child width in its allocated cell (@c 0.0 to + extreme left, @c 1.0 to extreme right). A value of @c -1.0 to @c + align_x makes the box try to resize this child element to the exact + width of its cell (respecting the min and max hints on the child's + width and accounting for its horizontal padding properties). The + same applies to the vertical axis. */ + params { + @in Evas_Object_Box_Data *priv; + @in void *data; + } + } + layout_homogeneous_vertical { + /*@ + Layout function which sets the box @a o to a @b homogeneous + vertical box + + This function behaves analogously to + evas_object_box_layout_homogeneous_horizontal(). The description + of its behaviour can be derived from that function's documentation. */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + } + layout_flow_horizontal { + /*@ + Layout function which sets the box @a o to a @b flow horizontal + box. + + In a flow horizontal box, the box's child elements are placed in + @b rows (think of text as an analogy). A row has as much elements as + can fit into the box's width. The box's overall behavior is + controlled by its properties, which are set by the + evas_object_box_{h,v}_{align,padding}_set() family of + functions. The size hints of the elements in the box -- set by the + evas_object_size_hint_{align,padding,weight}_set() functions + -- also control the way this function works. + + \par Box's properties: + @c padding_h tells the box to draw empty spaces of that size, in + pixels, between the child objects' cells. @c align_h dictates the + horizontal alignment of the rows (@c 0.0 to left align them, @c 1.0 + to right align). A value of @c -1.0 to @c align_h lets the rows + @b justified horizontally. @c align_v controls the vertical alignment + of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A + value of @c -1.0 to @c align_v makes the box to @b justify the rows + vertically. The padding between them, in this case, is corrected so + that the first row touches the top border and the last one touches + the bottom border (even if they must overlap). @c padding_v has no + influence on the layout. + + \par Child element's properties: + @c padding_l and @c padding_r sum up to the required width of the + child element. The @c align_x property has no influence on the + layout. The child's @c padding_t and @c padding_b sum up to the + required height of the child element and is the only means (besides + row justifying) of setting space between rows. Note, however, that + @c align_y dictates positioning relative to the largest + height required by a child object in the actual row. */ + params { + Evas_Object_Box_Data *priv; + void *data; + } + + } + } + implements { + Eo_Base::constructor; + Evas_Object::smart_data::get; + Evas_Smart::calculate; + Evas_Smart::add; + Evas_Smart::del; + Evas_Smart::resize; + } + events { + child,added; + child,removed; + } + +} diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 1d27bfade6..48008715bf 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -7,8 +7,6 @@ #include -EAPI Eo_Op EVAS_OBJ_BOX_BASE_ID = EO_NOOP; - #define MY_CLASS_NAME "Evas_Box" #define MY_CLASS_NAME_LEGACY "Evas_Object_Box" @@ -198,79 +196,61 @@ _evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data return opt; } -static void -_evas_object_box_option_new_default(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Evas_Object_Box_Option * +_evas_box_internal_option_new(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object *child) { - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Option *opt; opt = (Evas_Object_Box_Option *)malloc(sizeof(*opt)); if (!opt) - return; + return NULL; opt->obj = child; - *ret = opt; + return opt; } -static void -_evas_object_box_option_free_default(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_evas_box_internal_option_free(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object_Box_Option *opt) { - Evas_Object_Box_Option *opt = va_arg(*list, Evas_Object_Box_Option *); free(opt); } -static void -_evas_object_box_append_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_internal_append(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Evas_Object_Box_Option *opt; opt = _evas_object_box_option_new(o, priv, child); if (!opt) - return; + return NULL; priv->children = eina_list_append(priv->children, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); - *ret = opt; + return opt; } -static void -_evas_object_box_prepend_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option * +_evas_box_internal_prepend(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Evas_Object_Box_Option *opt; opt = _evas_object_box_option_new(o, priv, child); if (!opt) - return; + return NULL; priv->children = eina_list_prepend(priv->children, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); - *ret = opt; + return opt; } -static void -_evas_object_box_insert_before_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option * +_evas_box_internal_insert_before(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { - Evas_Object *child = va_arg(*list, Evas_Object *); - const Evas_Object *reference = va_arg(*list, const Evas_Object *); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Eina_List *l; Evas_Object_Box_Option *opt; @@ -282,28 +262,22 @@ _evas_object_box_insert_before_default(Eo *o, void *_pd, va_list *list) new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) - return; + return NULL; priv->children = eina_list_prepend_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - *ret = new_opt; - return; + return new_opt; } } - *ret = opt; + return opt; } -static void -_evas_object_box_insert_after_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option * +_evas_box_internal_insert_after(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { - Evas_Object *child = va_arg(*list, Evas_Object *); - const Evas_Object *reference = va_arg(*list, const Evas_Object *); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Eina_List *l; Evas_Object_Box_Option *opt; @@ -315,28 +289,21 @@ _evas_object_box_insert_after_default(Eo *o, void *_pd, va_list *list) new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) - return; + return NULL; priv->children = eina_list_append_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - *ret = new_opt; - return; + return new_opt; } } - - *ret = opt; + return opt; } -static void -_evas_object_box_insert_at_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option * +_evas_box_internal_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos) { - Evas_Object *child = va_arg(*list, Evas_Object *); - unsigned int pos = va_arg(*list, unsigned int); - Evas_Object_Box_Option **ret = va_arg(*list, Evas_Object_Box_Option **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Eina_List *l; unsigned int i; @@ -346,13 +313,12 @@ _evas_object_box_insert_at_default(Eo *o, void *_pd, va_list *list) new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) - return; + return NULL; priv->children = eina_list_prepend(priv->children, new_opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - *ret = new_opt; - return; + return new_opt; } for (l = priv->children, i = 0; l; l = l->next, i++) @@ -365,25 +331,21 @@ _evas_object_box_insert_at_default(Eo *o, void *_pd, va_list *list) new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) - return; + return NULL; priv->children = eina_list_prepend_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); - *ret = new_opt; - return; + return new_opt; } } + return NULL; } -static void -_evas_object_box_remove_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object * +_evas_box_internal_remove(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object **ret = va_arg(*list, Evas_Object **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Evas_Object_Box_Option *opt; Eina_List *l; @@ -398,19 +360,15 @@ _evas_object_box_remove_default(Eo *o, void *_pd, va_list *list) priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); - *ret = obj; - return; + return obj; } } + return NULL; } -static void -_evas_object_box_remove_at_default(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object * +_evas_box_internal_remove_at(Eo *o, Evas_Object_Box_Data *priv, unsigned int pos) { - unsigned int pos = va_arg(*list, unsigned int); - Evas_Object **ret = va_arg(*list, Evas_Object **); - *ret = NULL; - Evas_Object_Box_Data *priv = _pd; Eina_List *node; Evas_Object_Box_Option *opt; Evas_Object *obj; @@ -419,7 +377,7 @@ _evas_object_box_remove_at_default(Eo *o, void *_pd, va_list *list) if (!node) { ERR("No item to be removed at position %d", pos); - return; + return NULL; } opt = node->data; @@ -429,15 +387,14 @@ _evas_object_box_remove_at_default(Eo *o, void *_pd, va_list *list) eo_do(o, evas_obj_box_internal_option_free(opt)); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); - *ret = obj; + return obj; } -static void -_smart_add(Eo *o, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_box_evas_smart_add(Eo *o, Evas_Object_Box_Data *priv) { eo_do_super(o, MY_CLASS, evas_obj_smart_add()); - Evas_Object_Box_Data *priv = _pd; - + evas_object_event_callback_add (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o); priv->children = NULL; @@ -450,13 +407,11 @@ _smart_add(Eo *o, void *_pd, va_list *list EINA_UNUSED) priv->layout.free_data = NULL; } -static void -_smart_del(Eo *o, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_box_evas_smart_del(Eo *o, Evas_Object_Box_Data *priv) { Eina_List *l; - Evas_Object_Box_Data *priv = _pd; - l = priv->children; while (l) { @@ -473,21 +428,18 @@ _smart_del(Eo *o, void *_pd, va_list *list EINA_UNUSED) eo_do_super(o, MY_CLASS, evas_obj_smart_del()); } -static void -_smart_resize(Eo *o, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static void +_evas_box_evas_smart_resize(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h) { - Evas_Coord w = va_arg(*list, Evas_Coord); - Evas_Coord h = va_arg(*list, Evas_Coord); Evas_Coord ow, oh; evas_object_geometry_get(o, NULL, NULL, &ow, &oh); if ((ow == w) && (oh == h)) return; evas_object_smart_changed(o); } -static void -_smart_calculate(Eo *o, void *_pd, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_box_evas_smart_calculate(Eo *o, Evas_Object_Box_Data *priv) { - Evas_Object_Box_Data *priv = _pd; if (priv->layout.cb) { priv->layouting = 1; @@ -507,8 +459,8 @@ evas_object_box_add(Evas *evas) return obj; } -static void -_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) +EOLIAN static void +_evas_box_constructor(Eo *obj, Evas_Object_Box_Data *class_data EINA_UNUSED) { eo_do_super(obj, MY_CLASS, eo_constructor()); eo_do(obj, @@ -516,23 +468,17 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) evas_obj_type_set(MY_CLASS_NAME_LEGACY)); } -EAPI Evas_Object * -evas_object_box_add_to(Evas_Object *parent) -{ - Evas_Object *o = NULL; - eo_do(parent, evas_obj_box_add_to(&o)); - return o; -} - -static void -_box_add_to(Eo *parent, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Evas_Object* +_evas_box_add_to(Eo *parent, Evas_Object_Box_Data *_pd EINA_UNUSED) { Evas *evas; - Evas_Object **o = va_arg(*list, Evas_Object **); + Evas_Object *o; evas = evas_object_evas_get(parent); - *o = evas_object_box_add(evas); - evas_object_smart_member_add(*o, parent); + o = evas_object_box_add(evas); + evas_object_smart_member_add(o, parent); + + return o; } EAPI void @@ -547,21 +493,9 @@ evas_object_box_smart_class_get(void) return NULL; } -EAPI void -evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) +EOLIAN static void +_evas_box_layout_set(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) { - eo_do(o, evas_obj_box_layout_set(cb, data, free_data)); -} - -static void -_box_layout_set(Eo *o, void *_pd, va_list *list) -{ - Evas_Object_Box_Data *priv = _pd; - - Evas_Object_Box_Layout cb = va_arg(*list, Evas_Object_Box_Layout); - const void *data = va_arg(*list, const void *); - void (*free_data)(void *data) = va_arg(*list, void (*)(void *data)); - if ((priv->layout.cb == cb) && (priv->layout.data == data) && (priv->layout.free_data == free_data)) return; @@ -716,17 +650,9 @@ _evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas return remaining - rem_diff; } -EAPI void -evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_horizontal()); -} - -static void -_box_layout_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int pad_inc = 0, sub_pixel = 0; int req_w, global_pad, remaining, top_h = 0; double weight_total = 0.0; @@ -888,17 +814,9 @@ _evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_O return remaining - rem_diff; } -EAPI void -evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_vertical()); -} - -static void -_box_layout_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int pad_inc = 0, sub_pixel = 0; int req_h, global_pad, remaining, top_w = 0; double weight_total = 0.0; @@ -1007,17 +925,9 @@ _box_layout_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(o, top_w, req_h); } -EAPI void -evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_homogeneous_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_homogeneous_horizontal()); -} - -static void -_box_layout_homogeneous_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int cell_sz, share, inc; int sub_pixel = 0; int x, y, w, h; @@ -1079,17 +989,9 @@ _box_layout_homogeneous_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(o, w, h); } -EAPI void -evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_homogeneous_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_homogeneous_vertical()); -} - -static void -_box_layout_homogeneous_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int cell_sz, share, inc; int sub_pixel = 0; int x, y, w, h; @@ -1150,17 +1052,9 @@ _box_layout_homogeneous_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(o, w, h); } -EAPI void -evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_homogeneous_max_size_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_homogeneous_max_size_horizontal()); -} - -static void -_box_layout_homogeneous_max_size_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int remaining, global_pad, pad_inc = 0, sub_pixel = 0; int cell_sz = 0; int x, y, w, h; @@ -1245,17 +1139,9 @@ _box_layout_homogeneous_max_size_horizontal(Eo *o, void *_pd, va_list *list EINA evas_object_size_hint_min_set(o, x, top_h); } -EAPI void -evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_homogeneous_max_size_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_homogeneous_max_size_vertical()); -} - -static void -_box_layout_homogeneous_max_size_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int remaining, global_pad, pad_inc = 0, sub_pixel = 0; int cell_sz = 0; int x, y, w, h; @@ -1404,17 +1290,9 @@ _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *p *max_h_ret = max_h; } -EAPI void -evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_flow_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_flow_horizontal()); -} - -static void -_box_layout_flow_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int n_children; int r, row_count = 0; int min_w = 0, min_h = 0; @@ -1589,17 +1467,9 @@ _evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *pri *max_w_ret = max_w; } -EAPI void -evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_flow_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_flow_vertical()); -} - -static void -_box_layout_flow_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - int n_children; int c, col_count; int min_w = 0, min_h = 0; @@ -1709,17 +1579,9 @@ _box_layout_flow_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(o, min_w, min_h); } -EAPI void -evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUSED, void *data EINA_UNUSED) +EOLIAN static void +_evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *boxdata EINA_UNUSED, void *data EINA_UNUSED) { - eo_do(o, evas_obj_box_layout_stack()); -} - -static void -_box_layout_stack(Eo *o, void *_pd, va_list *list EINA_UNUSED) -{ - Evas_Object_Box_Data *priv = _pd; - Eina_List *l; Evas_Coord ox, oy, ow, oh; Evas_Coord top_w = 0, top_h = 0; @@ -1766,19 +1628,9 @@ _box_layout_stack(Eo *o, void *_pd, va_list *list EINA_UNUSED) evas_object_size_hint_min_set(o, top_w, top_h); } -EAPI void -evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical) +EOLIAN static void +_evas_box_align_set(Eo *o, Evas_Object_Box_Data *priv, double horizontal, double vertical) { - eo_do(o, evas_obj_box_align_set(horizontal, vertical)); -} - -static void -_box_align_set(Eo *o, void *_pd, va_list *list) -{ - Evas_Object_Box_Data *priv = _pd; - double horizontal = va_arg(*list, double); - double vertical = va_arg(*list, double); - if (priv->align.h == horizontal && priv->align.v == vertical) return; priv->align.h = horizontal; @@ -1786,19 +1638,9 @@ _box_align_set(Eo *o, void *_pd, va_list *list) evas_object_smart_changed(o); } -EAPI void -evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical) +EOLIAN static void +_evas_box_align_get(Eo *o EINA_UNUSED, Evas_Object_Box_Data *priv, double *horizontal, double *vertical) { - eo_do((Eo *)o, evas_obj_box_align_get(horizontal, vertical)); -} - -static void -_box_align_get(Eo *o EINA_UNUSED, void *_pd, va_list *list) -{ - const Evas_Object_Box_Data *priv = _pd; - double *horizontal = va_arg(*list, double *); - double *vertical = va_arg(*list, double *); - if (priv) { if (horizontal) *horizontal = priv->align.h; @@ -1811,20 +1653,9 @@ _box_align_get(Eo *o EINA_UNUSED, void *_pd, va_list *list) } } -EAPI void -evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) +EOLIAN static void +_evas_box_padding_set(Eo *o, Evas_Object_Box_Data *priv, Evas_Coord horizontal, Evas_Coord vertical) { - eo_do(o, evas_obj_box_padding_set(horizontal, vertical)); -} - -static void -_box_padding_set(Eo *o, void *_pd, va_list *list) -{ - Evas_Object_Box_Data *priv = _pd; - - Evas_Coord horizontal = va_arg(*list, Evas_Coord); - Evas_Coord vertical = va_arg(*list, Evas_Coord); - if (priv->pad.h == horizontal && priv->pad.v == vertical) return; priv->pad.h = horizontal; @@ -1832,20 +1663,9 @@ _box_padding_set(Eo *o, void *_pd, va_list *list) evas_object_smart_changed(o); } -EAPI void -evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) +EOLIAN static void +_evas_box_padding_get(Eo *o EINA_UNUSED, Evas_Object_Box_Data *priv, Evas_Coord *horizontal, Evas_Coord *vertical) { - eo_do((Eo *)o, evas_obj_box_padding_get(horizontal, vertical)); -} - -static void -_box_padding_get(Eo *o EINA_UNUSED, void *_pd, va_list *list) -{ - const Evas_Object_Box_Data *priv = _pd; - - Evas_Coord *horizontal = va_arg(*list, Evas_Coord *); - Evas_Coord *vertical = va_arg(*list, Evas_Coord *); - if (priv) { if (horizontal) *horizontal = priv->pad.h; @@ -1858,25 +1678,13 @@ _box_padding_get(Eo *o EINA_UNUSED, void *_pd, va_list *list) } } -EAPI Evas_Object_Box_Option * -evas_object_box_append(Evas_Object *o, Evas_Object *child) -{ - Evas_Object_Box_Option *option = NULL; - eo_do(o, evas_obj_box_append(child, &option)); - return option; -} - -static void -_box_append(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_append(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt = NULL; - Evas_Object_Box_Data *priv = _pd; - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object_Box_Option **option = va_arg(*list, Evas_Object_Box_Option **); - if (option) *option = NULL; if (!child) - return; + return NULL; eo_do(o, evas_obj_box_internal_append(child, &opt)); @@ -1884,30 +1692,18 @@ _box_append(Eo *o, void *_pd, va_list *list) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); - if (option) *option = _evas_object_box_option_callbacks_register(o, priv, opt); - return; + return _evas_object_box_option_callbacks_register(o, priv, opt); } + + return NULL; } -EAPI Evas_Object_Box_Option * -evas_object_box_prepend(Evas_Object *o, Evas_Object *child) -{ - Evas_Object_Box_Option *option = NULL; - eo_do(o, evas_obj_box_prepend(child, &option)); - return option; -} - -static void -_box_prepend(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_prepend(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt = NULL; - - Evas_Object_Box_Data *priv = _pd; - Evas_Object *child = va_arg(*list, Evas_Object *); - Evas_Object_Box_Option **option = va_arg(*list, Evas_Object_Box_Option **); - if (option) *option = NULL; if (!child) - return; + return NULL; eo_do(o, evas_obj_box_internal_prepend(child, &opt)); @@ -1915,31 +1711,17 @@ _box_prepend(Eo *o, void *_pd, va_list *list) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); - if (option) *option = _evas_object_box_option_callbacks_register(o, priv, opt); - return; + return _evas_object_box_option_callbacks_register(o, priv, opt); } + return NULL; } -EAPI Evas_Object_Box_Option * -evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) -{ - Evas_Object_Box_Option *option = NULL; - eo_do(o, evas_obj_box_insert_before(child, reference, &option)); - return option; -} - -static void -_box_insert_before(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_insert_before(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { Evas_Object_Box_Option *opt = NULL; - - Evas_Object_Box_Data *priv = _pd; - Evas_Object *child = va_arg(*list, Evas_Object *); - const Evas_Object *reference = va_arg(*list, const Evas_Object *); - Evas_Object_Box_Option **option = va_arg(*list, Evas_Object_Box_Option **); - if (option) *option = NULL; if (!child) - return; + return NULL; eo_do(o, evas_obj_box_internal_insert_before(child, reference, &opt)); @@ -1947,31 +1729,18 @@ _box_insert_before(Eo *o, void *_pd, va_list *list) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); - if (option) *option = _evas_object_box_option_callbacks_register(o, priv, opt); - return; + return _evas_object_box_option_callbacks_register(o, priv, opt); } + + return NULL; } -EAPI Evas_Object_Box_Option * -evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) -{ - Evas_Object_Box_Option *option = NULL; - eo_do(o, evas_obj_box_insert_after(child, reference, &option)); - return option; -} - -static void -_box_insert_after(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_insert_after(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { Evas_Object_Box_Option *opt = NULL; - - Evas_Object_Box_Data *priv = _pd; - Evas_Object *child = va_arg(*list, Evas_Object *); - const Evas_Object *reference = va_arg(*list, const Evas_Object *); - Evas_Object_Box_Option **option = va_arg(*list, Evas_Object_Box_Option **); - if (option) *option = NULL; if (!child) - return; + return NULL; eo_do(o, evas_obj_box_internal_insert_after(child, reference, &opt)); @@ -1979,31 +1748,18 @@ _box_insert_after(Eo *o, void *_pd, va_list *list) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); - if (option) *option = _evas_object_box_option_callbacks_register(o, priv, opt); - return; + return _evas_object_box_option_callbacks_register(o, priv, opt); } + + return NULL; } -EAPI Evas_Object_Box_Option * -evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos) -{ - Evas_Object_Box_Option *option = NULL; - eo_do(o, evas_obj_box_insert_at(child, pos, &option)); - return option; -} - -static void -_box_insert_at(Eo *o, void *_pd, va_list *list) +EOLIAN static Evas_Object_Box_Option* +_evas_box_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos) { Evas_Object_Box_Option *opt = NULL; - - Evas_Object_Box_Data *priv = _pd; - Evas_Object *child = va_arg(*list, Evas_Object *); - unsigned int pos = va_arg(*list, unsigned int); - Evas_Object_Box_Option **option = va_arg(*list, Evas_Object_Box_Option **); - if (option) *option = NULL; if (!child) - return; + return NULL; eo_do(o, evas_obj_box_internal_insert_at(child, pos, &opt)); @@ -2011,25 +1767,15 @@ _box_insert_at(Eo *o, void *_pd, va_list *list) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); - if (option) *option = _evas_object_box_option_callbacks_register(o, priv, opt); - return; + return _evas_object_box_option_callbacks_register(o, priv, opt); } + + return NULL; } -EAPI Eina_Bool -evas_object_box_remove(Evas_Object *o, Evas_Object *child) +EOLIAN static Eina_Bool +_evas_box_remove(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object *child) { - Eina_Bool result = EINA_FALSE; - eo_do(o, evas_obj_box_remove(child, &result)); - return result; -} - -static void -_box_remove(Eo *o, void *_pd EINA_UNUSED, va_list *list) -{ - Evas_Object *child = va_arg(*list, Evas_Object *); - Eina_Bool *result = va_arg(*list, Eina_Bool *); - if (result) *result = EINA_FALSE; Evas_Object *obj = NULL; eo_do(o, evas_obj_box_internal_remove(child, &obj)); @@ -2039,25 +1785,15 @@ _box_remove(Eo *o, void *_pd EINA_UNUSED, va_list *list) _evas_object_box_child_callbacks_unregister(obj, o); evas_object_smart_member_del(obj); evas_object_smart_changed(o); - if (result) *result = EINA_TRUE; - return; + return EINA_TRUE; } + + return EINA_FALSE; } -EAPI Eina_Bool -evas_object_box_remove_at(Evas_Object *o, unsigned int pos) +EOLIAN static Eina_Bool +_evas_box_remove_at(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, unsigned int pos) { - Eina_Bool result = EINA_FALSE; - eo_do(o, evas_obj_box_remove_at(pos, &result)); - return result; -} - -static void -_box_remove_at(Eo *o, void *_pd EINA_UNUSED, va_list *list) -{ - unsigned int pos = va_arg(*list, unsigned int); - Eina_Bool *result = va_arg(*list, Eina_Bool *); - if (result) *result = EINA_FALSE; Evas_Object *obj = NULL; eo_do(o, evas_obj_box_internal_remove_at(pos, &obj)); @@ -2067,27 +1803,15 @@ _box_remove_at(Eo *o, void *_pd EINA_UNUSED, va_list *list) _evas_object_box_child_callbacks_unregister(obj, o); evas_object_smart_member_del(obj); evas_object_smart_changed(o); - if (result) *result = EINA_TRUE; - return; + return EINA_TRUE; } + + return EINA_FALSE; } -EAPI Eina_Bool -evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear) +EOLIAN static Eina_Bool +_evas_box_remove_all(Eo *o, Evas_Object_Box_Data *priv, Eina_Bool clear) { - Eina_Bool result = EINA_FALSE; - eo_do(o, evas_obj_box_remove_all(clear, &result)); - return result; -} - -static void -_box_remove_all(Eo *o, void *_pd, va_list *list) -{ - Evas_Object_Box_Data *priv = _pd; - Eina_Bool clear = va_arg(*list, int); - Eina_Bool *result = va_arg(*list, Eina_Bool *); - if (result) *result = EINA_FALSE; - evas_object_smart_changed(o); while (priv->children) @@ -2103,33 +1827,21 @@ _box_remove_all(Eo *o, void *_pd, va_list *list) if (clear) evas_object_del(obj); } - else return; + else return EINA_FALSE; } - if (result) *result = EINA_TRUE; + return EINA_TRUE; } -EAPI Eina_Iterator * -evas_object_box_iterator_new(const Evas_Object *o) +EOLIAN static Eina_Iterator* +_evas_box_iterator_new(Eo *o, Evas_Object_Box_Data *priv) { - Eina_Iterator *itr = NULL; - eo_do((Eo *)o, evas_obj_box_iterator_new(&itr)); - return itr; -} - -static void -_box_iterator_new(Eo *o, void *_pd, va_list *list) -{ - const Evas_Object_Box_Data *priv = _pd; - - Eina_Iterator **itr_ret = va_arg(*list, Eina_Iterator **); Evas_Object_Box_Iterator *it; - *itr_ret = NULL; - - if (!priv->children) return; + + if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Box_Iterator)); - if (!it) return; + if (!it) return NULL; EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); @@ -2140,30 +1852,18 @@ _box_iterator_new(Eo *o, void *_pd, va_list *list) it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_box_iterator_get_container); it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_box_iterator_free); - *itr_ret = &it->iterator; + return &it->iterator; } -EAPI Eina_Accessor * -evas_object_box_accessor_new(const Evas_Object *o) +EOLIAN static Eina_Accessor* +_evas_box_accessor_new(Eo *o, Evas_Object_Box_Data *priv) { - Eina_Accessor * accessor = NULL; - eo_do((Eo *)o, evas_obj_box_accessor_new(&accessor)); - return accessor; -} - -static void -_box_accessor_new(Eo *o, void *_pd, va_list *list) -{ - const Evas_Object_Box_Data *priv = _pd; - - Eina_Accessor **accessor = va_arg(*list, Eina_Accessor **); - *accessor = NULL; Evas_Object_Box_Accessor *it; - if (!priv->children) return; - + if (!priv->children) return NULL; + it = calloc(1, sizeof(Evas_Object_Box_Accessor)); - if (!it) return; + if (!it) return NULL; EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); @@ -2174,7 +1874,7 @@ _box_accessor_new(Eo *o, void *_pd, va_list *list) it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_box_accessor_get_container); it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_box_accessor_free); - *accessor = &it->accessor; + return &it->accessor; } EAPI Eina_List * @@ -2191,39 +1891,16 @@ evas_object_box_children_get(const Evas_Object *o) return new_list; } -EAPI const char * -evas_object_box_option_property_name_get(const Evas_Object *o, int property) +EOLIAN static const char* +_evas_box_option_property_name_get(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, int property EINA_UNUSED) { - const char *name = NULL; - eo_do((Eo *)o, evas_obj_box_option_property_name_get(property, &name)); - return name; + return NULL; } -static void -_box_option_property_name_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static int +_evas_box_option_property_id_get(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, const char *name EINA_UNUSED) { - va_arg(*list, int); - const char **name = va_arg(*list, const char **); - *name = NULL; -} - -EAPI int -evas_object_box_option_property_id_get(const Evas_Object *o, const char *name) -{ - int id = 0; - eo_do((Eo *)o, evas_obj_box_option_property_id_get(name, &id)); - return id; -} - -static void -_box_option_property_id_get(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) -{ - const char *name = va_arg(*list, const char *); - int *id = va_arg(*list, int *); - *id = -1; - - if (!name) - return; + return -1; } EAPI Eina_Bool @@ -2248,14 +1925,10 @@ evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt return ret; } -static void -_box_option_property_vset(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Eina_Bool +_evas_box_option_property_vset(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object_Box_Option *opt EINA_UNUSED, int property EINA_UNUSED, va_list *args EINA_UNUSED) { - va_arg(*list, Evas_Object_Box_Option *); - va_arg(*list, int); - va_arg(*list, va_list *); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - if (ret) *ret = EINA_FALSE; + return EINA_FALSE; } EAPI Eina_Bool @@ -2279,136 +1952,16 @@ evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Optio return ret; } -static void -_box_option_property_vget(Eo *o EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) +EOLIAN static Eina_Bool +_evas_box_option_property_vget(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object_Box_Option *opt EINA_UNUSED, int property EINA_UNUSED, va_list *args EINA_UNUSED) { - va_arg(*list, Evas_Object_Box_Option *); - va_arg(*list, int); - va_arg(*list, va_list *); - Eina_Bool *ret = va_arg(*list, Eina_Bool *); - *ret = EINA_FALSE; + return EINA_FALSE; } -static void -_smart_data_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) +EOLIAN static void* +_evas_box_evas_object_smart_data_get(Eo *obj EINA_UNUSED, Evas_Object_Box_Data *_pd) { - void **data = va_arg(*list, void **); - *data = (void *)_pd; + return (void *)_pd; } -static void -_class_constructor(Eo_Class *klass) -{ - const Eo_Op_Func_Description func_desc[] = { - EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor), - - EO_OP_FUNC(EVAS_OBJ_ID(EVAS_OBJ_SUB_ID_SMART_DATA_GET), _smart_data_get), - - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _smart_add), - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _smart_del), - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_RESIZE), _smart_resize), - EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_CALCULATE), _smart_calculate), - - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_APPEND), _evas_object_box_append_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_PREPEND), _evas_object_box_prepend_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_BEFORE), _evas_object_box_insert_before_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AFTER), _evas_object_box_insert_after_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AT), _evas_object_box_insert_at_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE), _evas_object_box_remove_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE_AT), _evas_object_box_remove_at_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_NEW), _evas_object_box_option_new_default), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_FREE), _evas_object_box_option_free_default), - - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ADD_TO), _box_add_to), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_SET), _box_layout_set), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HORIZONTAL), _box_layout_horizontal), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_VERTICAL), _box_layout_vertical), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_HORIZONTAL), _box_layout_homogeneous_horizontal), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_VERTICAL), _box_layout_homogeneous_vertical), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL), _box_layout_homogeneous_max_size_horizontal), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL), _box_layout_homogeneous_max_size_vertical), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_HORIZONTAL), _box_layout_flow_horizontal), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_VERTICAL), _box_layout_flow_vertical), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_LAYOUT_STACK), _box_layout_stack), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_SET), _box_align_set), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ALIGN_GET), _box_align_get), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_SET), _box_padding_set), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PADDING_GET), _box_padding_get), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_APPEND), _box_append), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_PREPEND), _box_prepend), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_BEFORE), _box_insert_before), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AFTER), _box_insert_after), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_INSERT_AT), _box_insert_at), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE), _box_remove), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_AT), _box_remove_at), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_REMOVE_ALL), _box_remove_all), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ITERATOR_NEW), _box_iterator_new), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_ACCESSOR_NEW), _box_accessor_new), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_NAME_GET), _box_option_property_name_get), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_ID_GET), _box_option_property_id_get), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VSET), _box_option_property_vset), - EO_OP_FUNC(EVAS_OBJ_BOX_ID(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET), _box_option_property_vget), - EO_OP_FUNC_SENTINEL - }; - - eo_class_funcs_set(klass, func_desc); - - evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); -} - -static const Eo_Op_Description op_desc[] = { - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_APPEND, "Append a new child object to the given box object. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_PREPEND, "Prepend a new child object to the given box object. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_BEFORE, "Insert a new child object before another existing one Can be overrided.."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AFTER, "Insert a new child object after another existing one. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_INSERT_AT, "Insert a new child object at a given position. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE, "Remove a given object from a box object, unparenting it again. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_REMOVE_AT, "Remove an object, bound to a given position in a box object. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_NEW, "Create a new box option. Can be overrided."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INTERNAL_OPTION_FREE, "Free a box option. Can be overrided."), - - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_ADD_TO, "Add a new box as a child of a given smart object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_SET, "Set a new layouting function to a given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HORIZONTAL, "Layout function which sets the box to a (basic) horizontal box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_VERTICAL, "Layout function which sets the box to a (basic) vertical box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_HORIZONTAL, "Layout function which sets the box to a homogeneous horizontal box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_VERTICAL, "Layout function which sets the box to a homogeneous vertical box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_HORIZONTAL, "Layout function which sets the box to a maximum size, homogeneous horizontal box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_HOMOGENEOUS_MAX_SIZE_VERTICAL, "Layout function which sets the box to a maximum size, homogeneous vertical box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_HORIZONTAL, "Layout function which sets the box to a flow horizontal box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_FLOW_VERTICAL, "Layout function which sets the box to a flow vertical box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_LAYOUT_STACK, "Layout function which sets the box to a stacking box."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_ALIGN_SET, "Set the alignment of the whole bounding box of contents."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_ALIGN_GET, "Get the alignment of the whole bounding box of contents."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_PADDING_SET, "Set the (space) padding between cells set for a given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_PADDING_GET, "Get the (space) padding between cells set for a given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_APPEND, "Append a new child object to the given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_PREPEND, "Prepend a new child object to the given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INSERT_BEFORE, "Insert a new child object before another existing one."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INSERT_AFTER, "Insert a new child object after another existing one."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_INSERT_AT, "Insert a new child object at a given position."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_REMOVE, "Remove a given object from a box object, unparenting it again."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_REMOVE_AT, "Remove an object, bound to a given position in a box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_REMOVE_ALL, "Remove all child objects from a box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_ITERATOR_NEW, "Get an iterator to walk the list of children of a given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_ACCESSOR_NEW, "Get an accessor (a structure providing random items access) to the list of children of a given box object."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_NAME_GET, "Get the name of the property of the child elements of the box with specific id."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_ID_GET, "Get the numerical identifier of the property of the child elements of the box which have a specific name."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VSET, "Set a property value (by its given numerical identifier), on a given box child element."), - EO_OP_DESCRIPTION(EVAS_OBJ_BOX_SUB_ID_OPTION_PROPERTY_VGET, "Get a property's value (by its given numerical identifier), on a given box child element."), - EO_OP_DESCRIPTION_SENTINEL -}; - -static const Eo_Class_Description class_desc = { - EO_VERSION, - MY_CLASS_NAME, - EO_CLASS_TYPE_REGULAR, - EO_CLASS_DESCRIPTION_OPS(&EVAS_OBJ_BOX_BASE_ID, op_desc, EVAS_OBJ_BOX_SUB_ID_LAST), - NULL, - sizeof(Evas_Object_Box_Data), - _class_constructor, - NULL -}; - -EO_DEFINE_CLASS(evas_object_box_class_get, &class_desc, EVAS_OBJ_SMART_CLIPPED_CLASS, NULL); - +#include "evas_box.eo.c"