#include <Elementary.h>
#include "elm_priv.h"
-/**
- * @defgroup Label Label
- *
- * Display text, with simple html-like markup. The theme of course
- * can invent new markup tags and style them any way it likes
- */
-
typedef struct _Widget_Data Widget_Data;
struct _Widget_Data
return wd->label;
}
-/**
- * Add a new label to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Label
- */
EAPI Evas_Object *
elm_label_add(Evas_Object *parent)
{
return obj;
}
-/**
- * Set the label on the label object
- *
- * @param obj The label object
- * @param label The label will be used on the label object
- *
- * @ingroup Label
- */
EAPI void
elm_label_label_set(Evas_Object *obj, const char *label)
{
_elm_label_label_set(obj, NULL, label);
}
-/**
- * Get the label used on the label object
- *
- * @param obj The label object
- * @return The string inside the label
- * @ingroup Label
- * @deprecated
- */
EAPI const char *
elm_label_label_get(const Evas_Object *obj)
{
return _elm_label_label_get(obj, NULL);
}
-/**
- * Set the wrapping behavior of the label
- *
- * @param obj The label object
- * @param wrap To wrap text or not
- * @ingroup Label
- * @deprecated
- */
EAPI void
elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap)
{
}
}
-/**
- * Get the wrapping behavior of the label
- *
- * @param obj The label object
- * @return Wrap type
- * @ingroup Label
- */
EAPI Elm_Wrap_Type
elm_label_line_wrap_get(const Evas_Object *obj)
{
return wd->linewrap;
}
-/**
- * Set wrap width of the label
- *
- * @param obj The label object
- * @param w The wrap width in pixels at a minimum where words need to wrap
- * @ingroup Label
- */
EAPI void
elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w)
{
_sizing_eval(obj);
}
-/**
- * get wrap width of the label
- *
- * @param obj The label object
- * @return The wrap width in pixels at a minimum where words need to wrap
- * @ingroup Label
- */
EAPI Evas_Coord
elm_label_wrap_width_get(const Evas_Object *obj)
{
return wd->wrap_w;
}
-/**
- * Set wrap height of the label
- *
- * @param obj The label object
- * @param w The wrap width in pixels at a minimum where words need to wrap
- * @ingroup Label
- */
EAPI void
elm_label_wrap_height_set(Evas_Object *obj,
Evas_Coord h)
_sizing_eval(obj);
}
-/**
- * get wrap width of the label
- *
- * @param obj The label object
- * @return The wrap height in pixels at a minimum where words need to wrap
- * @ingroup Label
- */
EAPI Evas_Coord
elm_label_wrap_height_get(const Evas_Object *obj)
{
return wd->wrap_h;
}
-/**
- * Set the font size on the label object.
- *
- * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
- * "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
- *
- * @param obj The label object
- * @param size font size
- *
- * @ingroup Label
- */
EAPI void
elm_label_fontsize_set(Evas_Object *obj, int fontsize)
{
eina_strbuf_free(fontbuf);
}
-/**
- * Set the text align on the label object
- *
- * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
- * "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
- *
- * @param obj The label object
- * @param align align mode ("left", "center", "right")
- *
- * @ingroup Label
- */
EAPI void
elm_label_text_align_set(Evas_Object *obj, const char *alignmode)
{
_sizing_eval(obj);
}
-/**
- * Set the text color on the label object
- *
- * @param obj The label object
- * @param r Red property background color of The label object
- * @param g Green property background color of The label object
- * @param b Blue property background color of The label object
- * @param a Alpha property background color of The label object
- *
- * @ingroup Label
- */
EAPI void
elm_label_text_color_set(Evas_Object *obj,
unsigned int r,
eina_strbuf_free(colorbuf);
}
-/**
- * Set background color of the label
- *
- * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
- * "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
- *
- * @param obj The label object
- * @param r Red property background color of The label object
- * @param g Green property background color of The label object
- * @param b Blue property background color of The label object
- * @param a Alpha property background alpha of The label object
- *
- * @ingroup Label
- */
EAPI void
elm_label_background_color_set(Evas_Object *obj,
unsigned int r,
}
}
-/**
- * Set the wrapmode of the label
- *
- * @param obj The label object
- * @param wrapmode 0 is charwrap, 1 is wordwrap
- * @ingroup Label
- * @deprecated
-*/
EAPI void
elm_label_wrap_mode_set(Evas_Object *obj,
Eina_Bool wrapmode)
return;
}
-/**
- * Set the ellipsis behavior of the label
- *
- * @param obj The label object
- * @param ellipsis To ellipsis text or not
- * @ingroup Label
- */
EAPI void
elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis)
{
}
-/**
- * Set the text slide of the label
- *
- * @param obj The label object
- * @param slide To start slide or stop
- * @ingroup Label
- */
EAPI void
elm_label_slide_set(Evas_Object *obj,
Eina_Bool slide)
_sizing_eval(obj);
}
-/**
- * get the text slide mode of the label
- *
- * @param obj The label object
- * @return slide slide mode value
- * @ingroup Label
- */
EAPI Eina_Bool
elm_label_slide_get(Evas_Object *obj)
{
return wd->slidingmode;
}
-/**
- * set the slide duration(speed) of the label
- *
- * @param obj The label object
- * @return The duration time in moving text from slide begin position to slide end position
- * @ingroup Label
- */
EAPI void
elm_label_slide_duration_set(Evas_Object *obj, double duration)
{
edje_object_message_send(wd->lbl, EDJE_MESSAGE_FLOAT_SET, 0, msg);
}
-/**
- * get the slide duration(speed) of the label
- *
- * @param obj The label object
- * @return The duration time in moving text from slide begin position to slide end position
- * @ingroup Label
- */
EAPI double
elm_label_slide_duration_get(Evas_Object *obj)
{
#include <Elementary.h>
#include "elm_priv.h"
-/**
- * @defgroup Layout Layout
- * @ingroup Elementary
- *
- * This takes a standard Edje design file and wraps it very thinly
- * in a widget and handles swallowing widgets into swallow regions
- * in the Edje object, allowing Edje to be used as a design and
- * layout tool
- */
-
typedef struct _Widget_Data Widget_Data;
typedef struct _Subinfo Subinfo;
typedef struct _Part_Cursor Part_Cursor;
return edje_object_part_text_get(wd->lay, part);
}
-/**
- * Add a new layout to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_add(Evas_Object *parent)
{
return obj;
}
-/**
- * Set the file that will be used as layout
- *
- * @param obj The layout object
- * @param file The path to file (edj) that will be used as layout
- * @param group The group that the layout belongs in edje file
- *
- * @return (1 = success, 0 = error)
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_file_set(Evas_Object *obj, const char *file, const char *group)
{
return ret;
}
-/**
- * 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 group the group
- * @param style the style to used
- *
- * @return (1 = success, 0 = error)
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style)
{
return ret;
}
-/**
- * Set the layout content
- *
- * 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_layout_content_unset() function.
- *
- * @param obj The layout object
- * @param swallow The swallow group name in the edje file
- * @param content The content will be filled in this layout object
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
{
_request_sizing_eval(wd);
}
-/**
- * Get the swallowed object in the given 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
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_content_get(const Evas_Object *obj, const char *swallow)
{
return NULL;
}
-/**
- * Unset the layout content
- *
- * Unparent and return the content object which was set for this widget
- *
- * @param obj The layout object
- * @param swallow The swallow group name in the edje file
- * @return The content that was being used
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_content_unset(Evas_Object *obj, const char *swallow)
{
return NULL;
}
-/**
- * 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
- * @deprecate use elm_object_text_* instead.
- */
EAPI void
elm_layout_text_set(Evas_Object *obj, const char *part, const char *text)
{
_elm_layout_label_set(obj, part, text);
}
-/**
- * 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
- * @deprecate use elm_object_text_* instead.
- */
EAPI const char *
elm_layout_text_get(const Evas_Object *obj, const char *part)
{
return _elm_layout_label_get(obj, part);
}
-/**
- * Append child to layout box part.
- *
- * Once the object is appended, its lifetime will be bound to the
- * layout, whenever the layout dies the child will be deleted
- * automatically. One should use elm_layout_box_remove() to make this
- * layout forget about the object.
- *
- * @param obj the layout object
- * @param part the box part to append.
- * @param child the child object to append to box.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child)
{
_request_sizing_eval(wd);
}
-/**
- * Prepend child to layout box part.
- *
- * Once the object is prepended, its lifetime will be bound to the
- * layout, whenever the layout dies the child will be deleted
- * automatically. One should use elm_layout_box_remove() to make this
- * layout forget about the object.
- *
- * @param obj the layout object
- * @param part the box part to prepend.
- * @param child the child object to prepend to box.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child)
{
si->p.box.reference = NULL;
}
-/**
- * Insert child to layout box part before a reference object.
- *
- * Once the object is inserted, its lifetime will be bound to the
- * layout, whenever the layout dies the child will be deleted
- * automatically. One should use elm_layout_box_remove() to make this
- * layout forget about the object.
- *
- * @param obj the layout object
- * @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.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
{
_request_sizing_eval(wd);
}
-/**
- * Insert child to layout box part at a given position.
- *
- * Once the object is inserted, its lifetime will be bound to the
- * layout, whenever the layout dies the child will be deleted
- * automatically. One should use elm_layout_box_remove() to make this
- * layout forget about the object.
- *
- * @param obj the layout object
- * @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.
- *
- * @ingroup Layout
- */
EAPI void
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.
- *
- * The object will be removed from the box part and its lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for box.
- *
- * @param obj The layout object
- * @param part The box part name to remove child.
- * @param child The object to remove from box.
- * @return The object that was being used, or NULL if not found.
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child)
{
return NULL;
}
-/**
- * Remove all child of the given part box.
- *
- * The objects will be removed from the box part and their lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for all box children.
- *
- * @param obj The layout object
- * @param part The box part name to remove child.
- * @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.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear)
{
edje_object_part_box_remove_all(wd->lay, part, clear);
}
-/**
- * Insert child to layout table part.
- *
- * Once the object is inserted, its lifetime will be bound to the
- * layout, whenever the layout dies the child will be deleted
- * automatically. One should use elm_layout_box_remove() to make this
- * layout forget about the object.
- *
- * @param obj the layout object
- * @param part the box part to pack child.
- * @param child the child object to pack into table.
- * @param reference another reference object to insert before in box.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
_request_sizing_eval(wd);
}
-/**
- * Unpack (remove) a child of the given part table.
- *
- * The object will be unpacked from the table part and its lifetime
- * will not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for table.
- *
- * @param obj The layout object
- * @param part The table part name to remove child.
- * @param child The object to remove from table.
- * @return The object that was being used, or NULL if not found.
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child)
{
return NULL;
}
-/**
- * Remove all child of the given part table.
- *
- * The objects will be removed from the table part and their lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for all table children.
- *
- * @param obj The layout object
- * @param part The table part name to remove child.
- * @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.
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear)
{
edje_object_part_table_clear(wd->lay, part, clear);
}
-/**
- * Get the edje layout
- *
- * @param obj The layout object
- *
- * This returns the edje object. It is not expected to be used to then swallow
- * objects via edje_object_part_swallow() for example. Use
- * elm_layout_content_set() instead so child object handling and sizing is
- * done properly. This is more intended for setting text, emitting signals,
- * hooking to signal callbacks etc.
- *
- * @return A Evas_Object with the edje layout settings loaded
- * with function elm_layout_file_set
- *
- * @ingroup Layout
- */
EAPI Evas_Object *
elm_layout_edje_get(const Evas_Object *obj)
{
return wd->lay;
}
-/**
- * Get the edje data of the given layout
- *
- * @param obj The layout object
- * @param key The data key
- *
- * @return The edje data string
- *
- * This function fetches data specified at the object level.
- * This function return NULL if data is not found.
- *
- * In EDC this comes from a data block within the group block that @a
- * obj was loaded from. E.g.
- *
- * @code
- * collections {
- * group {
- * name: "a_group";
- * data {
- * item: "key1" "value1";
- * item: "key2" "value2";
- * }
- * }
- * }
- * @endcode
- *
- * @ingroup Layout
- */
EAPI const char *
elm_layout_data_get(const Evas_Object *obj, const char *key)
{
return edje_object_data_get(wd->lay, key);
}
-/**
- * Eval sizing
- *
- * Manually forms a sizing re-evaluation when contents changed state so that
- * minimum size might have changed and needs re-evaluation. Also note that
- * a standard signal of "size,eval" "elm" emitted by the edje object will
- * cause this to happen too
- *
- * @param obj The layout object
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_sizing_eval(Evas_Object *obj)
{
_request_sizing_eval(wd);
}
-/**
- * Sets a specific cursor for an edje part.
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- * @param cursor cursor name to use, see Elementary_Cursor.h
- *
- * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
- * part not exists or it has "mouse_events: 0".
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor)
{
return EINA_TRUE;
}
-/**
- * Get the cursor to be shown when mouse is over an edje part
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- * @return the cursor name.
- *
- * @ingroup Layout
- */
EAPI const char *
elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name)
{
return elm_object_cursor_get(pc->obj);
}
-/**
- * Unsets a cursor previously set with elm_layout_part_cursor_set().
- *
- * @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().
- *
- * @ingroup Layout
- */
EAPI void
elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name)
{
}
}
-/**
- * Sets a specific cursor style for an edje part.
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- * @param style the theme style to use (default, transparent, ...)
- *
- * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
- * part not exists or it did not had a cursor set.
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style)
{
return EINA_TRUE;
}
-/**
- * Gets a specific cursor style for an edje part.
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- *
- * @return the theme style in use, defaults to "default". If the
- * object does not have a cursor set, then NULL is returned.
- *
- * @ingroup Layout
- */
EAPI const char *
elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name)
{
return elm_object_cursor_style_get(pc->obj);
}
-/**
- * Sets if the cursor set should be searched on the theme or should use
- * the provided by the engine, only.
- *
- * @note before you set if should look on theme you should define a
- * cursor with elm_layout_part_cursor_set(). By default it will only
- * look for cursors provided by the engine.
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- * @param engine_only if cursors should be just provided by the engine
- * or should also search on widget's theme as well
- *
- * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
- * part not exists or it did not had a cursor set.
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only)
{
return EINA_TRUE;
}
-/**
- * Gets a specific cursor engine_only for an edje part.
- *
- * @param obj The layout object.
- * @param part_name a part from loaded edje group.
- *
- * @return whenever the cursor is just provided by engine or also from theme.
- *
- * @ingroup Layout
- */
EAPI Eina_Bool
elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name)
{