Elementary: header split for DateTime, DaySelector, DiskSelector, Entry,

Flip, Flip Selector, Frame, Gesture Layer, GLView, Hover, Icon,
   Inwin, Label.
This commit is contained in:
Daniel Zaoui 2013-04-28 10:23:15 +03:00
parent 9e713bc791
commit 0ca5c025aa
50 changed files with 7223 additions and 6828 deletions

View File

@ -187,32 +187,68 @@ elm_conform_eo.h \
elm_conform_legacy.h \
elm_cursor.h \
elm_datetime.h \
elm_datetime_common.h \
elm_datetime_eo.h \
elm_datetime_legacy.h \
elm_dayselector.h \
elm_dayselector_common.h \
elm_dayselector_eo.h \
elm_dayselector_legacy.h \
elm_debug.h \
elm_deprecated.h \
elm_diskselector.h \
elm_diskselector_common.h \
elm_diskselector_eo.h \
elm_diskselector_legacy.h \
elm_entry.h \
elm_entry_common.h \
elm_entry_eo.h \
elm_entry_legacy.h \
elm_finger.h \
elm_flip.h \
elm_flip_common.h \
elm_flip_eo.h \
elm_flip_legacy.h \
elm_flipselector.h \
elm_flipselector_eo.h \
elm_flipselector_legacy.h \
elm_focus.h \
elm_font.h \
elm_frame.h \
elm_frame_eo.h \
elm_frame_legacy.h \
elm_gen.h \
elm_general.h \
elm_gengrid.h \
elm_genlist.h \
elm_gesture_layer.h \
elm_gesture_layer_common.h \
elm_gesture_layer_eo.h \
elm_gesture_layer_legacy.h \
elm_getting_started.h \
elm_glview.h \
elm_glview_common.h \
elm_glview_eo.h \
elm_glview_legacy.h \
elm_grid.h \
elm_hover.h \
elm_hover_common.h \
elm_hover_eo.h \
elm_hover_legacy.h \
elm_icon.h \
elm_icon_common.h \
elm_icon_eo.h \
elm_icon_legacy.h \
elm_image.h \
elm_index.h \
elm_intro.h \
elm_inwin.h \
elm_inwin_eo.h \
elm_inwin_legacy.h \
elm_label.h \
elm_label_common.h \
elm_label_eo.h \
elm_label_legacy.h \
elm_layout.h \
elm_list.h \
elm_macros.h \

View File

@ -190,590 +190,18 @@
*
*/
#define ELM_OBJ_DATETIME_CLASS elm_obj_datetime_class_get()
const Eo_Class *elm_obj_datetime_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DATETIME_BASE_ID;
enum
{
ELM_OBJ_DATETIME_SUB_ID_FORMAT_GET,
ELM_OBJ_DATETIME_SUB_ID_FORMAT_SET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_GET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_SET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_GET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_SET,
ELM_OBJ_DATETIME_SUB_ID_LAST
};
#define ELM_OBJ_DATETIME_ID(sub_id) (ELM_OBJ_DATETIME_BASE_ID + sub_id)
/**
* @def elm_obj_datetime_format_get
* @since 1.8
*
* Get the datetime format.
*
* @param[out] ret
*
* @see elm_datetime_format_get
*/
#define elm_obj_datetime_format_get(ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FORMAT_GET), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_datetime_format_set
* @since 1.8
*
* Set the datetime format.
*
* @param[in] fmt
*
* @see elm_datetime_format_set
*/
#define elm_obj_datetime_format_set(fmt) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FORMAT_SET), EO_TYPECHECK(const char *, fmt)
/**
* @def elm_obj_datetime_field_visible_get
* @since 1.8
*
* @brief Get whether a field can be visible/not
*
* @param[in] fieldtype
* @param[out] ret
*
* @see elm_datetime_field_visible_get
*/
#define elm_obj_datetime_field_visible_get(fieldtype, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_GET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_field_visible_set
* @since 1.8
*
* @brief Set a field to be visible or not.
*
* @param[in] fieldtype
* @param[in] visible
*
* @see elm_datetime_field_visible_set
*/
#define elm_obj_datetime_field_visible_set(fieldtype, visible) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_SET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(Eina_Bool, visible)
/**
* @def elm_obj_datetime_field_limit_get
* @since 1.8
*
* @brief Get the field limits of a field.
*
* @param[in] fieldtype
* @param[out] min
* @param[out] max
*
* @see elm_datetime_field_limit_get
*/
#define elm_obj_datetime_field_limit_get(fieldtype, min, max) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_GET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(int *, min), EO_TYPECHECK(int *, max)
/**
* @def elm_obj_datetime_field_limit_set
* @since 1.8
*
* @brief Set the field limits of a field.
*
* @param[in] fieldtype
* @param[in] min
* @param[in] max
*
* @see elm_datetime_field_limit_set
*/
#define elm_obj_datetime_field_limit_set(fieldtype, min, max) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_SET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(int, min), EO_TYPECHECK(int, max)
/**
* @def elm_obj_datetime_value_get
* @since 1.8
*
* @brief Get the current value of a field.
*
* @param[out] currtime
* @param[out] ret
*
* @see elm_datetime_value_get
*/
#define elm_obj_datetime_value_get(currtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_GET), EO_TYPECHECK(struct tm *, currtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_set
* @since 1.8
*
* @brief Set the current value of a Datetime object.
*
* @param[in] newtime
* @param[out] ret
*
* @see elm_datetime_value_set
*/
#define elm_obj_datetime_value_set(newtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_SET), EO_TYPECHECK(const struct tm *, newtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_min_get
* @since 1.8
*
* @brief Get the lower boundary of a field.
*
* @param[out] mintime
* @param[out] ret
*
* @see elm_datetime_value_min_get
*/
#define elm_obj_datetime_value_min_get(mintime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_GET), EO_TYPECHECK(struct tm *, mintime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_min_set
* @since 1.8
*
* @brief Set the lower boundary of a field.
*
* @param[in] mintime
* @param[out] ret
*
* @see elm_datetime_value_min_set
*/
#define elm_obj_datetime_value_min_set(mintime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_SET), EO_TYPECHECK(const struct tm *, mintime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_max_get
* @since 1.8
*
* @brief Get the upper boundary of a field.
*
* @param[out] maxtime
* @param[out] ret
*
* @see elm_datetime_value_max_get
*/
#define elm_obj_datetime_value_max_get(maxtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_GET), EO_TYPECHECK(struct tm *, maxtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_max_set
* @since 1.8
*
* @brief Set the upper boundary of a field.
*
* @param[in] maxtime
* @param[out] ret
*
* @see elm_datetime_value_max_set
*/
#define elm_obj_datetime_value_max_set(maxtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_SET), EO_TYPECHECK(const struct tm *, maxtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @addtogroup Datetime
* @{
*/
/**
* Identifies a Datetime field, The widget supports 6 fields : Year, month,
* Date, Hour, Minute, AM/PM
*
*/
typedef enum _Elm_Datetime_Field_Type
{
ELM_DATETIME_YEAR = 0, /**< Indicates Year field */
ELM_DATETIME_MONTH = 1, /**< Indicates Month field */
ELM_DATETIME_DATE = 2, /**< Indicates Date field */
ELM_DATETIME_HOUR = 3, /**< Indicates Hour field */
ELM_DATETIME_MINUTE = 4, /**< Indicates Minute field */
ELM_DATETIME_AMPM = 5, /**< Indicates AM/PM field */
} Elm_Datetime_Field_Type;
/**
* @brief Adds a new datetime Widget
*
* The default datetime format and corresponding strings are based on current locale.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* This function inserts a new datetime widget on the canvas.
*
* @ingroup Datetime
*/
EAPI Evas_Object *elm_datetime_add(Evas_Object *parent);
/**
* Get the datetime format. Format is a combination of allowed Libc date format
* specifiers like: "%b %d, %Y %I : %M %p".
*
* Maximum allowed format length is 64 chars.
*
* Format can include separators for each individual datetime field except
* for AM/PM field.
*
* Each separator can be a maximum of 6 UTF-8 bytes.
* Space is also taken as a separator.
*
* Following are the allowed set of format specifiers for each datetime field.
*
* @b %%Y : The year as a decimal number including the century.
*
* @b %%y : The year as a decimal number without a century (range 00 to 99).
*
* @b %%m : The month as a decimal number (range 01 to 12).
*
* @b %%b : The abbreviated month name according to the current locale.
*
* @b %%B : The full month name according to the current locale.
*
* @b %%h : The abbreviated month name according to the current locale(same as %%b).
*
* @b %%d : The day of the month as a decimal number (range 01 to 31).
*
* @b %%e : The day of the month as a decimal number (range 1 to 31). single
* digits are preceded by a blank.
*
* @b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12).
*
* @b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23).
*
* @b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single
* digits are preceded by a blank.
*
* @b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single
* digits are preceded by a blank.
*
* @b %%M : The minute as a decimal number (range 00 to 59).
*
* @b %%p : Either 'AM' or 'PM' according to the given time value, or the
* corresponding strings for the current locale. Noon is treated as 'PM'
* and midnight as 'AM'.
*
* @b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for
* the current locale.
*
* @b %%c : The preferred date and time representation for the current locale.
*
* @b %%x : The preferred date representation for the current locale without the time.
*
* @b %%X : The preferred time representation for the current locale without the date.
*
* @b %%r : The complete calendar time using the AM/PM format of the current locale.
*
* @b %%R : The hour and minute in decimal numbers using the format %H:%M.
*
* @b %%T : The time of day in decimal numbers using the format %H:%M:%S.
*
* @b %%D : The date using the format %%m/%%d/%%y.
*
* @b %%F : The date using the format %%Y-%%m-%%d.
*
* These specifiers can be arranged in any order and the widget will display the
* fields accordingly.
*
* Default format is taken as per the system locale settings.
*
* @param obj The datetime object
* @return The datetime format string. Example: "%b %d, %Y %I : %M %p"
*
* @see elm_datetime_format_set()
* @ingroup Datetime
*/
EAPI const char *elm_datetime_format_get(const Evas_Object *obj);
/**
* Set the datetime format. Format is a combination of allowed Libc date format
* specifiers like: "%b %d, %Y %I : %M %p".
*
* Maximum allowed format length is 64 chars.
*
* Format can include separators for each individual datetime field except
* for AM/PM field.
*
* Each separator can be a maximum of 6 UTF-8 bytes.
* Space is also taken as a separator.
*
* Following are the allowed set of format specifiers for each datetime field.
*
* @b %%Y : The year as a decimal number including the century.
*
* @b %%y : The year as a decimal number without a century (range 00 to 99).
*
* @b %%m : The month as a decimal number (range 01 to 12).
*
* @b %%b : The abbreviated month name according to the current locale.
*
* @b %%B : The full month name according to the current locale.
*
* @b %%h : The abbreviated month name according to the current locale(same as %%b).
*
* @b %%d : The day of the month as a decimal number (range 01 to 31).
*
* @b %%e : The day of the month as a decimal number (range 1 to 31). single
* digits are preceded by a blank.
*
* @b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12).
*
* @b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23).
*
* @b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single
* digits are preceded by a blank.
*
* @b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single
* digits are preceded by a blank.
*
* @b %%M : The minute as a decimal number (range 00 to 59).
*
* @b %%p : Either 'AM' or 'PM' according to the given time value, or the
* corresponding strings for the current locale. Noon is treated as 'PM'
* and midnight as 'AM'.
*
* @b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for
* the current locale.
*
* @b %%c : The preferred date and time representation for the current locale.
*
* @b %%x : The preferred date representation for the current locale without the time.
*
* @b %%X : The preferred time representation for the current locale without the date.
*
* @b %%r : The complete calendar time using the AM/PM format of the current locale.
*
* @b %%R : The hour and minute in decimal numbers using the format %H:%M.
*
* @b %%T : The time of day in decimal numbers using the format %H:%M:%S.
*
* @b %%D : The date using the format %%m/%%d/%%y.
*
* @b %%F : The date using the format %%Y-%%m-%%d.
*
* These specifiers can be arranged in any order and the widget will display the
* fields accordingly.
*
* Default format is taken as per the system locale settings.
*
* @param obj The datetime object
* @param fmt The datetime format
*
* @see elm_datetime_format_get()
* @ingroup Datetime
*/
EAPI void elm_datetime_format_set(Evas_Object *obj, const char *fmt);
/**
* @brief Get the upper boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param maxtime Time structure containing the maximum time value.
* @return EINA_TRUE if maximum value is returned successfully.
*
* @see elm_datetime_value_max_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_max_get(const Evas_Object *obj, struct tm *maxtime);
/**
* @brief Set the upper boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param maxtime Time structure containing the maximum time value.
* @return EINA_TRUE if maximum value is accepted.
*
* @see elm_datetime_value_max_get()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_max_set(Evas_Object *obj, const struct tm *maxtime);
/**
* @brief Get the lower boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param mintime Time structure.
* @return EINA_TRUE if minimum value is successfully returned.
*
* @see elm_datetime_value_min_set()
* @ingroup Datepicker
*/
EAPI Eina_Bool elm_datetime_value_min_get(const Evas_Object *obj, struct tm *mintime);
/**
* @brief Set the lower boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object.
* @param mintime Time structure containing the minimum time value.
* @return EINA_TRUE if minimum value is accepted.
*
* @see elm_datetime_value_min_get()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_min_set(Evas_Object *obj, const struct tm *mintime);
/**
* @brief Get the field limits of a field.
*
* Limits can be set to individual fields, independently, except for AM/PM field.
* Any field can display the values only in between these Minimum and Maximum limits unless
* the corresponding time value is restricted from MinTime to MaxTime.
* That is, Min/ Max field limits always works under the limitations of MinTime/ MaxTime.
*
* There is no provision to set the limits of AM/PM field.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param min Reference to field's minimum value
* @param max Reference to field's maximum value
*
* @see elm_datetime_field_limit_set()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_limit_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int *min, int *max);
/**
* @brief Set the field limits of a field.
*
* Limits can be set to individual fields, independently, except for AM/PM field.
* Any field can display the values only in between these Minimum and Maximum limits unless
* the corresponding time value is restricted from MinTime to MaxTime.
* That is, Min/ Max field limits always works under the limitations of MinTime/ MaxTime.
*
* There is no provision to set the limits of AM/PM field.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param min Reference to field's minimum value
* @param max Reference to field's maximum value
*
* @see elm_datetime_field_limit_set()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_limit_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int min, int max);
/**
* @brief Get the current value of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object.
* @param currtime Time structure.
* @return EINA_TRUE if current time is returned successfully.
*
* @see elm_datetime_field_value_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_get(const Evas_Object *obj, struct tm *currtime);
/**
* @brief Set the current value of a Datetime object.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
*
* @param obj The datetime object.
* @param newtime Time structure filled with values to be set.
* @return EINA_TRUE if current time is set successfully.
*
* @see elm_datetime_value_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_set(Evas_Object *obj, const struct tm *newtime);
/**
* @brief Get whether a field can be visible/not
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc
* @return bool @c EINA_TRUE, if field can be visible. @c EINA_FALSE otherwise.
*
* @see elm_datetime_field_visible_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_field_visible_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype);
/**
* @brief Set a field to be visible or not.
* Setting this API True does not ensure that the field is visible, apart from
* this, the field's format must be present in Datetime overall format.
* If a field's visibility is set to False then it won't appear even though
* its format is present in overall format.
* So if and only if this API is set true and the corresponding field's format
* is present in Datetime format, the field is visible.
*
* By default the field visibility is set to True.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param visible @c EINA_TRUE field can be visible, @c EINA_FALSE otherwise.
*
* @see elm_datetime_field_visible_get()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_visible_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, Eina_Bool visible);
#include "elm_datetime_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_datetime_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_datetime_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,15 @@
/**
* Identifies a Datetime field, The widget supports 6 fields : Year, month,
* Date, Hour, Minute, AM/PM
*
*/
typedef enum _Elm_Datetime_Field_Type
{
ELM_DATETIME_YEAR = 0, /**< Indicates Year field */
ELM_DATETIME_MONTH = 1, /**< Indicates Month field */
ELM_DATETIME_DATE = 2, /**< Indicates Date field */
ELM_DATETIME_HOUR = 3, /**< Indicates Hour field */
ELM_DATETIME_MINUTE = 4, /**< Indicates Minute field */
ELM_DATETIME_AMPM = 5, /**< Indicates AM/PM field */
} Elm_Datetime_Field_Type;

View File

@ -0,0 +1,205 @@
#define ELM_OBJ_DATETIME_CLASS elm_obj_datetime_class_get()
const Eo_Class *elm_obj_datetime_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DATETIME_BASE_ID;
enum
{
ELM_OBJ_DATETIME_SUB_ID_FORMAT_GET,
ELM_OBJ_DATETIME_SUB_ID_FORMAT_SET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_GET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_SET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_GET,
ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_SET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_GET,
ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_SET,
ELM_OBJ_DATETIME_SUB_ID_LAST
};
#define ELM_OBJ_DATETIME_ID(sub_id) (ELM_OBJ_DATETIME_BASE_ID + sub_id)
/**
* @def elm_obj_datetime_format_get
* @since 1.8
*
* Get the datetime format.
*
* @param[out] ret
*
* @see elm_datetime_format_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_format_get(ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FORMAT_GET), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_datetime_format_set
* @since 1.8
*
* Set the datetime format.
*
* @param[in] fmt
*
* @see elm_datetime_format_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_format_set(fmt) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FORMAT_SET), EO_TYPECHECK(const char *, fmt)
/**
* @def elm_obj_datetime_field_visible_get
* @since 1.8
*
* @brief Get whether a field can be visible/not
*
* @param[in] fieldtype
* @param[out] ret
*
* @see elm_datetime_field_visible_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_field_visible_get(fieldtype, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_GET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_field_visible_set
* @since 1.8
*
* @brief Set a field to be visible or not.
*
* @param[in] fieldtype
* @param[in] visible
*
* @see elm_datetime_field_visible_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_field_visible_set(fieldtype, visible) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_VISIBLE_SET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(Eina_Bool, visible)
/**
* @def elm_obj_datetime_field_limit_get
* @since 1.8
*
* @brief Get the field limits of a field.
*
* @param[in] fieldtype
* @param[out] min
* @param[out] max
*
* @see elm_datetime_field_limit_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_field_limit_get(fieldtype, min, max) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_GET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(int *, min), EO_TYPECHECK(int *, max)
/**
* @def elm_obj_datetime_field_limit_set
* @since 1.8
*
* @brief Set the field limits of a field.
*
* @param[in] fieldtype
* @param[in] min
* @param[in] max
*
* @see elm_datetime_field_limit_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_field_limit_set(fieldtype, min, max) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FIELD_LIMIT_SET), EO_TYPECHECK(Elm_Datetime_Field_Type, fieldtype), EO_TYPECHECK(int, min), EO_TYPECHECK(int, max)
/**
* @def elm_obj_datetime_value_get
* @since 1.8
*
* @brief Get the current value of a field.
*
* @param[out] currtime
* @param[out] ret
*
* @see elm_datetime_value_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_get(currtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_GET), EO_TYPECHECK(struct tm *, currtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_set
* @since 1.8
*
* @brief Set the current value of a Datetime object.
*
* @param[in] newtime
* @param[out] ret
*
* @see elm_datetime_value_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_set(newtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_SET), EO_TYPECHECK(const struct tm *, newtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_min_get
* @since 1.8
*
* @brief Get the lower boundary of a field.
*
* @param[out] mintime
* @param[out] ret
*
* @see elm_datetime_value_min_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_min_get(mintime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_GET), EO_TYPECHECK(struct tm *, mintime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_min_set
* @since 1.8
*
* @brief Set the lower boundary of a field.
*
* @param[in] mintime
* @param[out] ret
*
* @see elm_datetime_value_min_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_min_set(mintime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MIN_SET), EO_TYPECHECK(const struct tm *, mintime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_max_get
* @since 1.8
*
* @brief Get the upper boundary of a field.
*
* @param[out] maxtime
* @param[out] ret
*
* @see elm_datetime_value_max_get
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_max_get(maxtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_GET), EO_TYPECHECK(struct tm *, maxtime), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_datetime_value_max_set
* @since 1.8
*
* @brief Set the upper boundary of a field.
*
* @param[in] maxtime
* @param[out] ret
*
* @see elm_datetime_value_max_set
*
* @ingroup Datetime
*/
#define elm_obj_datetime_value_max_set(maxtime, ret) ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_VALUE_MAX_SET), EO_TYPECHECK(const struct tm *, maxtime), EO_TYPECHECK(Eina_Bool *, ret)

View File

@ -0,0 +1,382 @@
/**
* @brief Adds a new datetime Widget
*
* The default datetime format and corresponding strings are based on current locale.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* This function inserts a new datetime widget on the canvas.
*
* @ingroup Datetime
*/
EAPI Evas_Object *elm_datetime_add(Evas_Object *parent);
/**
* Get the datetime format. Format is a combination of allowed Libc date format
* specifiers like: "%b %d, %Y %I : %M %p".
*
* Maximum allowed format length is 64 chars.
*
* Format can include separators for each individual datetime field except
* for AM/PM field.
*
* Each separator can be a maximum of 6 UTF-8 bytes.
* Space is also taken as a separator.
*
* Following are the allowed set of format specifiers for each datetime field.
*
* @b %%Y : The year as a decimal number including the century.
*
* @b %%y : The year as a decimal number without a century (range 00 to 99).
*
* @b %%m : The month as a decimal number (range 01 to 12).
*
* @b %%b : The abbreviated month name according to the current locale.
*
* @b %%B : The full month name according to the current locale.
*
* @b %%h : The abbreviated month name according to the current locale(same as %%b).
*
* @b %%d : The day of the month as a decimal number (range 01 to 31).
*
* @b %%e : The day of the month as a decimal number (range 1 to 31). single
* digits are preceded by a blank.
*
* @b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12).
*
* @b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23).
*
* @b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single
* digits are preceded by a blank.
*
* @b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single
* digits are preceded by a blank.
*
* @b %%M : The minute as a decimal number (range 00 to 59).
*
* @b %%p : Either 'AM' or 'PM' according to the given time value, or the
* corresponding strings for the current locale. Noon is treated as 'PM'
* and midnight as 'AM'.
*
* @b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for
* the current locale.
*
* @b %%c : The preferred date and time representation for the current locale.
*
* @b %%x : The preferred date representation for the current locale without the time.
*
* @b %%X : The preferred time representation for the current locale without the date.
*
* @b %%r : The complete calendar time using the AM/PM format of the current locale.
*
* @b %%R : The hour and minute in decimal numbers using the format %H:%M.
*
* @b %%T : The time of day in decimal numbers using the format %H:%M:%S.
*
* @b %%D : The date using the format %%m/%%d/%%y.
*
* @b %%F : The date using the format %%Y-%%m-%%d.
*
* These specifiers can be arranged in any order and the widget will display the
* fields accordingly.
*
* Default format is taken as per the system locale settings.
*
* @param obj The datetime object
* @return The datetime format string. Example: "%b %d, %Y %I : %M %p"
*
* @see elm_datetime_format_set()
* @ingroup Datetime
*/
EAPI const char *elm_datetime_format_get(const Evas_Object *obj);
/**
* Set the datetime format. Format is a combination of allowed Libc date format
* specifiers like: "%b %d, %Y %I : %M %p".
*
* Maximum allowed format length is 64 chars.
*
* Format can include separators for each individual datetime field except
* for AM/PM field.
*
* Each separator can be a maximum of 6 UTF-8 bytes.
* Space is also taken as a separator.
*
* Following are the allowed set of format specifiers for each datetime field.
*
* @b %%Y : The year as a decimal number including the century.
*
* @b %%y : The year as a decimal number without a century (range 00 to 99).
*
* @b %%m : The month as a decimal number (range 01 to 12).
*
* @b %%b : The abbreviated month name according to the current locale.
*
* @b %%B : The full month name according to the current locale.
*
* @b %%h : The abbreviated month name according to the current locale(same as %%b).
*
* @b %%d : The day of the month as a decimal number (range 01 to 31).
*
* @b %%e : The day of the month as a decimal number (range 1 to 31). single
* digits are preceded by a blank.
*
* @b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12).
*
* @b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23).
*
* @b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single
* digits are preceded by a blank.
*
* @b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single
* digits are preceded by a blank.
*
* @b %%M : The minute as a decimal number (range 00 to 59).
*
* @b %%p : Either 'AM' or 'PM' according to the given time value, or the
* corresponding strings for the current locale. Noon is treated as 'PM'
* and midnight as 'AM'.
*
* @b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for
* the current locale.
*
* @b %%c : The preferred date and time representation for the current locale.
*
* @b %%x : The preferred date representation for the current locale without the time.
*
* @b %%X : The preferred time representation for the current locale without the date.
*
* @b %%r : The complete calendar time using the AM/PM format of the current locale.
*
* @b %%R : The hour and minute in decimal numbers using the format %H:%M.
*
* @b %%T : The time of day in decimal numbers using the format %H:%M:%S.
*
* @b %%D : The date using the format %%m/%%d/%%y.
*
* @b %%F : The date using the format %%Y-%%m-%%d.
*
* These specifiers can be arranged in any order and the widget will display the
* fields accordingly.
*
* Default format is taken as per the system locale settings.
*
* @param obj The datetime object
* @param fmt The datetime format
*
* @see elm_datetime_format_get()
* @ingroup Datetime
*/
EAPI void elm_datetime_format_set(Evas_Object *obj, const char *fmt);
/**
* @brief Get whether a field can be visible/not
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc
* @return bool @c EINA_TRUE, if field can be visible. @c EINA_FALSE otherwise.
*
* @see elm_datetime_field_visible_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_field_visible_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype);
/**
* @brief Set a field to be visible or not.
* Setting this API True does not ensure that the field is visible, apart from
* this, the field's format must be present in Datetime overall format.
* If a field's visibility is set to False then it won't appear even though
* its format is present in overall format.
* So if and only if this API is set true and the corresponding field's format
* is present in Datetime format, the field is visible.
*
* By default the field visibility is set to True.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param visible @c EINA_TRUE field can be visible, @c EINA_FALSE otherwise.
*
* @see elm_datetime_field_visible_get()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_visible_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, Eina_Bool visible);
/**
* @brief Get the field limits of a field.
*
* Limits can be set to individual fields, independently, except for AM/PM field.
* Any field can display the values only in between these Minimum and Maximum limits unless
* the corresponding time value is restricted from MinTime to MaxTime.
* That is, Min/ Max field limits always works under the limitations of MinTime/ MaxTime.
*
* There is no provision to set the limits of AM/PM field.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param min Reference to field's minimum value
* @param max Reference to field's maximum value
*
* @see elm_datetime_field_limit_set()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_limit_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int *min, int *max);
/**
* @brief Set the field limits of a field.
*
* Limits can be set to individual fields, independently, except for AM/PM field.
* Any field can display the values only in between these Minimum and Maximum limits unless
* the corresponding time value is restricted from MinTime to MaxTime.
* That is, Min/ Max field limits always works under the limitations of MinTime/ MaxTime.
*
* There is no provision to set the limits of AM/PM field.
*
* @param obj The datetime object
* @param fieldtype Type of the field. ELM_DATETIME_YEAR etc.
* @param min Reference to field's minimum value
* @param max Reference to field's maximum value
*
* @see elm_datetime_field_limit_set()
* @ingroup Datetime
*/
EAPI void elm_datetime_field_limit_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int min, int max);
/**
* @brief Get the current value of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object.
* @param currtime Time structure.
* @return EINA_TRUE if current time is returned successfully.
*
* @see elm_datetime_field_value_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_get(const Evas_Object *obj, struct tm *currtime);
/**
* @brief Set the current value of a Datetime object.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
*
* @param obj The datetime object.
* @param newtime Time structure filled with values to be set.
* @return EINA_TRUE if current time is set successfully.
*
* @see elm_datetime_value_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_set(Evas_Object *obj, const struct tm *newtime);
/**
* @brief Get the lower boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param mintime Time structure.
* @return EINA_TRUE if minimum value is successfully returned.
*
* @see elm_datetime_value_min_set()
* @ingroup Datepicker
*/
EAPI Eina_Bool elm_datetime_value_min_get(const Evas_Object *obj, struct tm *mintime);
/**
* @brief Set the lower boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object.
* @param mintime Time structure containing the minimum time value.
* @return EINA_TRUE if minimum value is accepted.
*
* @see elm_datetime_value_min_get()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_min_set(Evas_Object *obj, const struct tm *mintime);
/**
* @brief Get the upper boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param maxtime Time structure containing the maximum time value.
* @return EINA_TRUE if maximum value is returned successfully.
*
* @see elm_datetime_value_max_set()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_max_get(const Evas_Object *obj, struct tm *maxtime);
/**
* @brief Set the upper boundary of a field.
*
* Year: years since 1900. Negative value represents year below 1900 (year
* value -30 represents 1870). Year default range is from 70 to 137.
*
* Month: default value range is from 0 to 11.
*
* Date: default value range is from 1 to 31 according to the month value.
*
* Hour: default value will be in terms of 24 hr format (0~23)
*
* Minute: default value range is from 0 to 59.
*
* @param obj The datetime object
* @param maxtime Time structure containing the maximum time value.
* @return EINA_TRUE if maximum value is accepted.
*
* @see elm_datetime_value_max_get()
* @ingroup Datetime
*/
EAPI Eina_Bool elm_datetime_value_max_set(Evas_Object *obj, const struct tm *maxtime);

View File

@ -75,260 +75,13 @@
* @{
*/
#define ELM_OBJ_DAYSELECTOR_CLASS elm_obj_dayselector_class_get()
const Eo_Class *elm_obj_dayselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DAYSELECTOR_BASE_ID;
enum
{
ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_DAYSELECTOR_ID(sub_id) (ELM_OBJ_DAYSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_dayselector_day_selected_set
* @since 1.8
*
* Set the state of given Dayselector_Day.
*
* @param[in] day
* @param[in] selected
*
* @see elm_dayselector_day_selected_set
*/
#define elm_obj_dayselector_day_selected_set(day, selected) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool, selected)
/**
* @def elm_obj_dayselector_day_selected_get
* @since 1.8
*
* Get the state of given Dayselector_Day.
*
* @param[in] day
* @param[out] ret
*
* @see elm_dayselector_day_selected_get
*/
#define elm_obj_dayselector_day_selected_get(day, ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_dayselector_week_start_set
* @since 1.8
*
* Set the starting day of Dayselector.
*
* @param[in] day
*
* @see elm_dayselector_week_start_set
*/
#define elm_obj_dayselector_week_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
/**
* @def elm_obj_dayselector_week_start_get
* @since 1.8
*
* Get the starting day of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_week_start_get
*/
#define elm_obj_dayselector_week_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
/**
* @def elm_obj_dayselector_weekend_start_set
* @since 1.8
*
* Set the weekend starting day of Dayselector.
*
* @param[in] day
*
* @see elm_dayselector_weekend_start_set
*/
#define elm_obj_dayselector_weekend_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
/**
* @def elm_obj_dayselector_weekend_start_get
* @since 1.8
*
* Get the weekend starting day of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_weekend_start_get
*/
#define elm_obj_dayselector_weekend_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
/**
* @def elm_obj_dayselector_weekend_length_set
* @since 1.8
*
* Set the weekend length of Dayselector.
*
* @param[in] length
*
* @see elm_dayselector_weekend_length_set
*/
#define elm_obj_dayselector_weekend_length_set(length) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET), EO_TYPECHECK(unsigned int, length)
/**
* @def elm_obj_dayselector_weekend_length_get
* @since 1.8
*
* Get the weekend length of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_weekend_length_get
*/
#define elm_obj_dayselector_weekend_length_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET), EO_TYPECHECK(unsigned int *, ret)
/**
* Identifies the day of the week.
* API can call the selection/unselection of day with this as a parameter.
*
* @see elm_dayselector_day_selected_set()
* @see elm_dayselector_day_selected_get()
*/
typedef enum
{
ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
ELM_DAYSELECTOR_MON, /**< indicates Monday */
ELM_DAYSELECTOR_TUE, /**< indicates Tuesday */
ELM_DAYSELECTOR_WED, /**< indicates Wednesday */
ELM_DAYSELECTOR_THU, /**< indicates Thursday */
ELM_DAYSELECTOR_FRI, /**< indicates Friday */
ELM_DAYSELECTOR_SAT, /**< indicates Saturday */
ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
} Elm_Dayselector_Day;
/**
* Add the dayselector.
*
* @param parent Parent object
* @return New dayselector object or @c NULL, if it cannot be created
*
* @ingroup Dayselector
*/
EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
/**
* Set the state of given Dayselector_Day.
*
* @param obj Dayselector object
* @param day Dayselector_Day that the user want to set state.
* @param selected state of the day. @c EINA_TRUE is selected.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_day_selected_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
/**
* Get the state of given Dayselector_Day.
*
* @param obj Dayselector object
* @param day Dayselector_Day that the user want to know state.
* @return @c EINA_TRUE, if the Day is selected
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_day_selected_set()
*
* @ingroup Dayselector
*/
EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Set the starting day of Dayselector.
*
* @param obj Dayselector object
* @param day Dayselector_Day the first day that the user wants to display.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_week_start_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Get the starting day of Dayselector.
*
* @param obj Dayselector object
* @return Day from where Dayselector displays all the weekdays in order.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_week_start_set()
*
* @ingroup Dayselector
*/
EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
/**
* Set the weekend starting day of Dayselector.
*
* @param obj Dayselector object
* @param day Dayselector_Day the first day from where weekend starts.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_start_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Get the weekend starting day of Dayselector.
*
* @param obj Dayselector object
* @return Elm_Dayselector_Day Day from where weekend starts.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_start_set()
*
* @ingroup Dayselector
*/
EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
/**
* Set the weekend length of Dayselector.
*
* @param obj Dayselector object
* @param length Weekend length, number of days as an integer.
*
* @see elm_dayselector_weekend_length_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
/**
* Get the weekend length of Dayselector.
*
* @param obj Dayselector object
* @return Number of days marked as a weekend.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_length_set()
*
* @ingroup Dayselector
*/
EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);
#include "elm_dayselector_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_dayselector_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_dayselector_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,19 @@
/**
* Identifies the day of the week.
* API can call the selection/unselection of day with this as a parameter.
*
* @see elm_dayselector_day_selected_set()
* @see elm_dayselector_day_selected_get()
*/
typedef enum
{
ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
ELM_DAYSELECTOR_MON, /**< indicates Monday */
ELM_DAYSELECTOR_TUE, /**< indicates Tuesday */
ELM_DAYSELECTOR_WED, /**< indicates Wednesday */
ELM_DAYSELECTOR_THU, /**< indicates Thursday */
ELM_DAYSELECTOR_FRI, /**< indicates Friday */
ELM_DAYSELECTOR_SAT, /**< indicates Saturday */
ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
} Elm_Dayselector_Day;

View File

@ -0,0 +1,135 @@
#define ELM_OBJ_DAYSELECTOR_CLASS elm_obj_dayselector_class_get()
const Eo_Class *elm_obj_dayselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DAYSELECTOR_BASE_ID;
enum
{
ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET,
ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET,
ELM_OBJ_DAYSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_DAYSELECTOR_ID(sub_id) (ELM_OBJ_DAYSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_dayselector_day_selected_set
* @since 1.8
*
* Set the state of given Dayselector_Day.
*
* @param[in] day
* @param[in] selected
*
* @see elm_dayselector_day_selected_set
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_day_selected_set(day, selected) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool, selected)
/**
* @def elm_obj_dayselector_day_selected_get
* @since 1.8
*
* Get the state of given Dayselector_Day.
*
* @param[in] day
* @param[out] ret
*
* @see elm_dayselector_day_selected_get
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_day_selected_get(day, ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_dayselector_week_start_set
* @since 1.8
*
* Set the starting day of Dayselector.
*
* @param[in] day
*
* @see elm_dayselector_week_start_set
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_week_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
/**
* @def elm_obj_dayselector_week_start_get
* @since 1.8
*
* Get the starting day of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_week_start_get
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_week_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
/**
* @def elm_obj_dayselector_weekend_start_set
* @since 1.8
*
* Set the weekend starting day of Dayselector.
*
* @param[in] day
*
* @see elm_dayselector_weekend_start_set
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_weekend_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
/**
* @def elm_obj_dayselector_weekend_start_get
* @since 1.8
*
* Get the weekend starting day of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_weekend_start_get
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_weekend_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
/**
* @def elm_obj_dayselector_weekend_length_set
* @since 1.8
*
* Set the weekend length of Dayselector.
*
* @param[in] length
*
* @see elm_dayselector_weekend_length_set
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_weekend_length_set(length) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET), EO_TYPECHECK(unsigned int, length)
/**
* @def elm_obj_dayselector_weekend_length_get
* @since 1.8
*
* Get the weekend length of Dayselector.
*
* @param[out] ret
*
* @see elm_dayselector_weekend_length_get
*
* @ingroup Dayselector
*/
#define elm_obj_dayselector_weekend_length_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET), EO_TYPECHECK(unsigned int *, ret)

View File

@ -0,0 +1,114 @@
/**
* Add the dayselector.
*
* @param parent Parent object
* @return New dayselector object or @c NULL, if it cannot be created
*
* @ingroup Dayselector
*/
EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
/**
* Set the state of given Dayselector_Day.
*
* @param obj Dayselector object
* @param day Dayselector_Day that the user want to set state.
* @param selected state of the day. @c EINA_TRUE is selected.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_day_selected_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
/**
* Get the state of given Dayselector_Day.
*
* @param obj Dayselector object
* @param day Dayselector_Day that the user want to know state.
* @return @c EINA_TRUE, if the Day is selected
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_day_selected_set()
*
* @ingroup Dayselector
*/
EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Set the starting day of Dayselector.
*
* @param obj Dayselector object
* @param day Dayselector_Day the first day that the user wants to display.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_week_start_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Get the starting day of Dayselector.
*
* @param obj Dayselector object
* @return Day from where Dayselector displays all the weekdays in order.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_week_start_set()
*
* @ingroup Dayselector
*/
EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
/**
* Set the weekend starting day of Dayselector.
*
* @param obj Dayselector object
* @param day Dayselector_Day the first day from where weekend starts.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_start_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
/**
* Get the weekend starting day of Dayselector.
*
* @param obj Dayselector object
* @return Elm_Dayselector_Day Day from where weekend starts.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_start_set()
*
* @ingroup Dayselector
*/
EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
/**
* Set the weekend length of Dayselector.
*
* @param obj Dayselector object
* @param length Weekend length, number of days as an integer.
*
* @see elm_dayselector_weekend_length_get()
*
* @ingroup Dayselector
*/
EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
/**
* Get the weekend length of Dayselector.
*
* @param obj Dayselector object
* @return Number of days marked as a weekend.
*
* @see Elm_Dayselector_Day
* @see elm_dayselector_weekend_length_set()
*
* @ingroup Dayselector
*/
EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);

View File

@ -61,500 +61,13 @@
* @{
*/
#define ELM_OBJ_DISKSELECTOR_CLASS elm_obj_diskselector_class_get()
const Eo_Class *elm_obj_diskselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DISKSELECTOR_BASE_ID;
enum
{
ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_CLEAR,
ELM_OBJ_DISKSELECTOR_SUB_ID_ITEMS_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_ITEM_APPEND,
ELM_OBJ_DISKSELECTOR_SUB_ID_SELECTED_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_FIRST_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_LAST_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_DISKSELECTOR_ID(sub_id) (ELM_OBJ_DISKSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_diskselector_round_enabled_get
* @since 1.8
*
* Get a value whether round mode is enabled or not.
*
* @param[out] ret
*
* @see elm_diskselector_round_enabled_get
*/
#define elm_obj_diskselector_round_enabled_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_diskselector_round_enabled_set
* @since 1.8
*
* Enable or disable round mode.
*
* @param[in] enabled
*
* @see elm_diskselector_round_enabled_set
*/
#define elm_obj_diskselector_round_enabled_set(enabled) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)
/**
* @def elm_obj_diskselector_side_text_max_length_get
* @since 1.8
*
* Get the side labels max length.
*
* @param[out] ret
*
* @see elm_diskselector_side_text_max_length_get
*/
#define elm_obj_diskselector_side_text_max_length_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_GET), EO_TYPECHECK(int *, ret)
/**
* @def elm_obj_diskselector_side_text_max_length_set
* @since 1.8
*
* Set the side labels max length.
*
* @param[in] len
*
* @see elm_diskselector_side_text_max_length_set
*/
#define elm_obj_diskselector_side_text_max_length_set(len) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_SET), EO_TYPECHECK(int, len)
/**
* @def elm_obj_diskselector_clear
* @since 1.8
*
* Remove all diskselector's items.
*
*
* @see elm_diskselector_clear
*/
#define elm_obj_diskselector_clear() ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_CLEAR)
/**
* @def elm_obj_diskselector_items_get
* @since 1.8
*
* Get a list of all the diskselector items.
*
* @param[out] ret
*
* @see elm_diskselector_items_get
*/
#define elm_obj_diskselector_items_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
/**
* @def elm_obj_diskselector_item_append
* @since 1.8
*
* Appends a new item to the diskselector object.
*
* @param[in] label
* @param[in] icon
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_diskselector_item_append
*/
#define elm_obj_diskselector_item_append(label, icon, func, data, ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_selected_item_get
* @since 1.8
*
* Get the selected item.
*
* @param[out] ret
*
* @see elm_diskselector_selected_item_get
*/
#define elm_obj_diskselector_selected_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_first_item_get
* @since 1.8
*
* Get the first item of the diskselector.
*
* @param[out] ret
*
* @see elm_diskselector_first_item_get
*/
#define elm_obj_diskselector_first_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_last_item_get
* @since 1.8
*
* Get the last item of the diskselector.
*
* @param[out] ret
*
* @see elm_diskselector_last_item_get
*/
#define elm_obj_diskselector_last_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_display_item_num_set
* @since 1.8
*
* Set the number of items to be displayed.
*
* @param[in] num
*
* @see elm_diskselector_display_item_num_set
*/
#define elm_obj_diskselector_display_item_num_set(num) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_SET), EO_TYPECHECK(int, num)
/**
* @def elm_obj_diskselector_display_item_num_get
* @since 1.8
*
* Get the number of items in the diskselector object.
*
* @param[out] ret
*
* @see elm_diskselector_display_item_num_get
*/
#define elm_obj_diskselector_display_item_num_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_GET), EO_TYPECHECK(int *, ret)
/**
* Add a new diskselector widget to the given parent Elementary
* (container) object.
*
* @param parent The parent object.
* @return a new diskselector widget handle or @c NULL, on errors.
*
* This function inserts a new diskselector widget on the canvas.
*
* @ingroup Diskselector
*/
EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent);
/**
* Enable or disable round mode.
*
* @param obj The diskselector object.
* @param enabled @c EINA_TRUE to enable round mode or @c EINA_FALSE to
* disable it.
*
* Disabled by default. If round mode is enabled the items list will
* work like a circular list, so when the user reaches the last item,
* the first one will popup.
*
* @see elm_diskselector_round_enabled_get()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_round_enabled_set(Evas_Object *obj, Eina_Bool enabled);
/**
* Get a value whether round mode is enabled or not.
*
* @see elm_diskselector_round_enabled_set() for details.
*
* @param obj The diskselector object.
* @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
* it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
*
* @ingroup Diskselector
*/
EAPI Eina_Bool elm_diskselector_round_enabled_get(const Evas_Object *obj);
/**
* Get the side labels max length.
*
* @see elm_diskselector_side_text_max_length_set() for details.
*
* @param obj The diskselector object.
* @return The max length defined for side labels, or 0 if not a valid
* diskselector.
*
* @ingroup Diskselector
*/
EAPI int elm_diskselector_side_text_max_length_get(const Evas_Object *obj);
/**
* Set the side labels max length.
*
* @param obj The diskselector object.
* @param len The max length defined for side labels.
*
* Length is the number of characters of items' label that will be
* visible when it's set on side positions. It will just crop
* the string after defined size. E.g.:
*
* An item with label "January" would be displayed on side position as
* "Jan" if max length is set to 3, or "Janu", if this property
* is set to 4.
*
* When it's selected, the entire label will be displayed, except for
* width restrictions. In this case label will be cropped and "..."
* will be concatenated.
*
* Default side label max length is 3.
*
* This property will be applied over all items, included before or
* later this function call.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len);
/**
* Set the number of items to be displayed.
*
* @param obj The diskselector object.
* @param num The number of items the diskselector will display.
*
* Default value is 3, and also it's the minimum. If @p num is less
* than 3, it will be set to 3.
*
* Also, it can be set on theme, using data item @c display_item_num
* on group "elm/diskselector/item/X", where X is style set.
* E.g.:
*
* group { name: "elm/diskselector/item/X";
* data {
* item: "display_item_num" "5";
* }
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num);
/**
* Get the number of items in the diskselector object.
*
* @param obj The diskselector object.
*
* @ingroup Diskselector
*/
EAPI int elm_diskselector_display_item_num_get(const Evas_Object *obj);
/**
* Remove all diskselector's items.
*
* @param obj The diskselector object.
*
* @see elm_object_item_del()
* @see elm_diskselector_item_append()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_clear(Evas_Object *obj);
/**
* Get a list of all the diskselector items.
*
* @param obj The diskselector object.
* @return An @c Eina_List of diskselector items, #Elm_Object_Item,
* or @c NULL on failure.
*
* @see elm_diskselector_item_append()
* @see elm_object_item_del()
* @see elm_diskselector_clear()
*
* @ingroup Diskselector
*/
EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj);
/**
* Appends a new item to the diskselector object.
*
* @param obj The diskselector object.
* @param label The label of the diskselector item.
* @param icon The icon object to use at left side of the item. An
* icon can be any Evas object, but usually it is an icon created
* with elm_icon_add().
* @param func The function to call when the item is selected.
* @param data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* A new item will be created and appended to the diskselector, i.e., will
* be set as last item. Also, if there is no selected item, it will
* be selected. This will always happens for the first appended item.
*
* If no icon is set, label will be centered on item position, otherwise
* the icon will be placed at left of the label, that will be shifted
* to the right.
*
* Items created with this method can be deleted with
* elm_object_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
* callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user stops the diskselector with this
* item on center position. If such function isn't needed, just passing
* @c NULL as @p func is enough. The same should be done for @p data.
*
* Simple example (with no function callback or data associated):
* @code
* disk = elm_diskselector_add(win);
* ic = elm_icon_add(win);
* elm_image_file_set(ic, "path/to/image", NULL);
* elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
* elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
* @endcode
*
* @see elm_object_item_del()
* @see elm_diskselector_clear()
* @see elm_icon_add()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data);
/**
* Get the selected item.
*
* @param obj The diskselector object.
* @return The selected diskselector item.
*
* The selected item can be unselected with function
* elm_diskselector_item_selected_set(), and the first item of
* diskselector will be selected.
*
* The selected item always will be centered on diskselector, with
* full label displayed, i.e., max length set to side labels won't
* apply on the selected item. More details on
* elm_diskselector_side_text_max_length_set().
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_selected_item_get(const Evas_Object *obj);
/**
* Set the selected state of an item.
*
* @param it The diskselector item
* @param selected The selected state
*
* This sets the selected state of the given item @p it.
* @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* elm_diskselector_selected_item_get().
*
* If the item @p it is unselected, the first item of diskselector will
* be selected.
*
* Selected items will be visible on center position of diskselector.
* So if it was on another position before selected, or was invisible,
* diskselector will animate items until the selected item reaches center
* position.
*
* @see elm_diskselector_item_selected_get()
* @see elm_diskselector_selected_item_get()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/*
* Get whether the @p item is selected or not.
*
* @param it The diskselector item.
* @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
* it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
*
* @see elm_diskselector_selected_item_set() for details.
* @see elm_diskselector_item_selected_get()
*
* @ingroup Diskselector
*/
EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Object_Item *it);
/**
* Get the first item of the diskselector.
*
* @param obj The diskselector object.
* @return The first item, or @c NULL if none.
*
* The list of items follows append order. So it will return the first
* item appended to the widget that wasn't deleted.
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_first_item_get(const Evas_Object *obj);
/**
* Get the last item of the diskselector.
*
* @param obj The diskselector object.
* @return The last item, or @c NULL if none.
*
* The list of items follows append order. So it will return last first
* item appended to the widget that wasn't deleted.
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_last_item_get(const Evas_Object *obj);
/**
* Get the item before @p item in diskselector.
*
* @param it The diskselector item.
* @return The item before @p item, or @c NULL if none or on failure.
*
* The list of items follows append order. So it will return item appended
* just before @p item and that wasn't deleted.
*
* If it is the first item, @c NULL will be returned.
* First item can be get by elm_diskselector_first_item_get().
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it);
/**
* Get the item after @p item in diskselector.
*
* @param it The diskselector item.
* @return The item after @p item, or @c NULL if none or on failure.
*
* The list of items follows append order. So it will return item appended
* just after @p item and that wasn't deleted.
*
* If it is the last item, @c NULL will be returned.
* Last item can be get by elm_diskselector_last_item_get().
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it);
#include "elm_diskselector_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_diskselector_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_diskselector_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,80 @@
/**
* Set the selected state of an item.
*
* @param it The diskselector item
* @param selected The selected state
*
* This sets the selected state of the given item @p it.
* @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* elm_diskselector_selected_item_get().
*
* If the item @p it is unselected, the first item of diskselector will
* be selected.
*
* Selected items will be visible on center position of diskselector.
* So if it was on another position before selected, or was invisible,
* diskselector will animate items until the selected item reaches center
* position.
*
* @see elm_diskselector_item_selected_get()
* @see elm_diskselector_selected_item_get()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/*
* Get whether the @p item is selected or not.
*
* @param it The diskselector item.
* @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
* it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
*
* @see elm_diskselector_selected_item_set() for details.
* @see elm_diskselector_item_selected_get()
*
* @ingroup Diskselector
*/
EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Object_Item *it);
/**
* Get the item before @p item in diskselector.
*
* @param it The diskselector item.
* @return The item before @p item, or @c NULL if none or on failure.
*
* The list of items follows append order. So it will return item appended
* just before @p item and that wasn't deleted.
*
* If it is the first item, @c NULL will be returned.
* First item can be get by elm_diskselector_first_item_get().
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it);
/**
* Get the item after @p item in diskselector.
*
* @param it The diskselector item.
* @return The item after @p item, or @c NULL if none or on failure.
*
* The list of items follows append order. So it will return item appended
* just after @p item and that wasn't deleted.
*
* If it is the last item, @c NULL will be returned.
* Last item can be get by elm_diskselector_last_item_get().
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it);

View File

@ -0,0 +1,194 @@
#define ELM_OBJ_DISKSELECTOR_CLASS elm_obj_diskselector_class_get()
const Eo_Class *elm_obj_diskselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_DISKSELECTOR_BASE_ID;
enum
{
ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_CLEAR,
ELM_OBJ_DISKSELECTOR_SUB_ID_ITEMS_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_ITEM_APPEND,
ELM_OBJ_DISKSELECTOR_SUB_ID_SELECTED_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_FIRST_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_LAST_ITEM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_SET,
ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_GET,
ELM_OBJ_DISKSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_DISKSELECTOR_ID(sub_id) (ELM_OBJ_DISKSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_diskselector_round_enabled_get
* @since 1.8
*
* Get a value whether round mode is enabled or not.
*
* @param[out] ret
*
* @see elm_diskselector_round_enabled_get
*/
#define elm_obj_diskselector_round_enabled_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_diskselector_round_enabled_set
* @since 1.8
*
* Enable or disable round mode.
*
* @param[in] enabled
*
* @see elm_diskselector_round_enabled_set
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_round_enabled_set(enabled) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ROUND_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)
/**
* @def elm_obj_diskselector_side_text_max_length_get
* @since 1.8
*
* Get the side labels max length.
*
* @param[out] ret
*
* @see elm_diskselector_side_text_max_length_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_side_text_max_length_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_GET), EO_TYPECHECK(int *, ret)
/**
* @def elm_obj_diskselector_side_text_max_length_set
* @since 1.8
*
* Set the side labels max length.
*
* @param[in] len
*
* @see elm_diskselector_side_text_max_length_set
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_side_text_max_length_set(len) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SIDE_TEXT_MAX_LENGTH_SET), EO_TYPECHECK(int, len)
/**
* @def elm_obj_diskselector_clear
* @since 1.8
*
* Remove all diskselector's items.
*
*
* @see elm_diskselector_clear
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_clear() ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_CLEAR)
/**
* @def elm_obj_diskselector_items_get
* @since 1.8
*
* Get a list of all the diskselector items.
*
* @param[out] ret
*
* @see elm_diskselector_items_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_items_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
/**
* @def elm_obj_diskselector_item_append
* @since 1.8
*
* Appends a new item to the diskselector object.
*
* @param[in] label
* @param[in] icon
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_diskselector_item_append
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_item_append(label, icon, func, data, ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_selected_item_get
* @since 1.8
*
* Get the selected item.
*
* @param[out] ret
*
* @see elm_diskselector_selected_item_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_selected_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_first_item_get
* @since 1.8
*
* Get the first item of the diskselector.
*
* @param[out] ret
*
* @see elm_diskselector_first_item_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_first_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_last_item_get
* @since 1.8
*
* Get the last item of the diskselector.
*
* @param[out] ret
*
* @see elm_diskselector_last_item_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_last_item_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_diskselector_display_item_num_set
* @since 1.8
*
* Set the number of items to be displayed.
*
* @param[in] num
*
* @see elm_diskselector_display_item_num_set
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_display_item_num_set(num) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_SET), EO_TYPECHECK(int, num)
/**
* @def elm_obj_diskselector_display_item_num_get
* @since 1.8
*
* Get the number of items in the diskselector object.
*
* @param[out] ret
*
* @see elm_diskselector_display_item_num_get
*
* @ingroup Diskselector
*/
#define elm_obj_diskselector_display_item_num_get(ret) ELM_OBJ_DISKSELECTOR_ID(ELM_OBJ_DISKSELECTOR_SUB_ID_DISPLAY_ITEM_NUM_GET), EO_TYPECHECK(int *, ret)

View File

@ -0,0 +1,240 @@
/**
* Add a new diskselector widget to the given parent Elementary
* (container) object.
*
* @param parent The parent object.
* @return a new diskselector widget handle or @c NULL, on errors.
*
* This function inserts a new diskselector widget on the canvas.
*
* @ingroup Diskselector
*/
EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent);
/**
* Get a value whether round mode is enabled or not.
*
* @see elm_diskselector_round_enabled_set() for details.
*
* @param obj The diskselector object.
* @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
* it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
*
* @ingroup Diskselector
*/
EAPI Eina_Bool elm_diskselector_round_enabled_get(const Evas_Object *obj);
/**
* Enable or disable round mode.
*
* @param obj The diskselector object.
* @param enabled @c EINA_TRUE to enable round mode or @c EINA_FALSE to
* disable it.
*
* Disabled by default. If round mode is enabled the items list will
* work like a circular list, so when the user reaches the last item,
* the first one will popup.
*
* @see elm_diskselector_round_enabled_get()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_round_enabled_set(Evas_Object *obj, Eina_Bool enabled);
/**
* Get the side labels max length.
*
* @see elm_diskselector_side_text_max_length_set() for details.
*
* @param obj The diskselector object.
* @return The max length defined for side labels, or 0 if not a valid
* diskselector.
*
* @ingroup Diskselector
*/
EAPI int elm_diskselector_side_text_max_length_get(const Evas_Object *obj);
/**
* Set the side labels max length.
*
* @param obj The diskselector object.
* @param len The max length defined for side labels.
*
* Length is the number of characters of items' label that will be
* visible when it's set on side positions. It will just crop
* the string after defined size. E.g.:
*
* An item with label "January" would be displayed on side position as
* "Jan" if max length is set to 3, or "Janu", if this property
* is set to 4.
*
* When it's selected, the entire label will be displayed, except for
* width restrictions. In this case label will be cropped and "..."
* will be concatenated.
*
* Default side label max length is 3.
*
* This property will be applied over all items, included before or
* later this function call.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len);
/**
* Remove all diskselector's items.
*
* @param obj The diskselector object.
*
* @see elm_object_item_del()
* @see elm_diskselector_item_append()
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_clear(Evas_Object *obj);
/**
* Get a list of all the diskselector items.
*
* @param obj The diskselector object.
* @return An @c Eina_List of diskselector items, #Elm_Object_Item,
* or @c NULL on failure.
*
* @see elm_diskselector_item_append()
* @see elm_object_item_del()
* @see elm_diskselector_clear()
*
* @ingroup Diskselector
*/
EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj);
/**
* Appends a new item to the diskselector object.
*
* @param obj The diskselector object.
* @param label The label of the diskselector item.
* @param icon The icon object to use at left side of the item. An
* icon can be any Evas object, but usually it is an icon created
* with elm_icon_add().
* @param func The function to call when the item is selected.
* @param data The data to associate with the item for related callbacks.
*
* @return The created item or @c NULL upon failure.
*
* A new item will be created and appended to the diskselector, i.e., will
* be set as last item. Also, if there is no selected item, it will
* be selected. This will always happens for the first appended item.
*
* If no icon is set, label will be centered on item position, otherwise
* the icon will be placed at left of the label, that will be shifted
* to the right.
*
* Items created with this method can be deleted with
* elm_object_item_del().
*
* Associated @p data can be properly freed when item is deleted if a
* callback function is set with elm_object_item_del_cb_set().
*
* If a function is passed as argument, it will be called every time this item
* is selected, i.e., the user stops the diskselector with this
* item on center position. If such function isn't needed, just passing
* @c NULL as @p func is enough. The same should be done for @p data.
*
* Simple example (with no function callback or data associated):
* @code
* disk = elm_diskselector_add(win);
* ic = elm_icon_add(win);
* elm_image_file_set(ic, "path/to/image", NULL);
* elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
* elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
* @endcode
*
* @see elm_object_item_del()
* @see elm_diskselector_clear()
* @see elm_icon_add()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data);
/**
* Get the selected item.
*
* @param obj The diskselector object.
* @return The selected diskselector item.
*
* The selected item can be unselected with function
* elm_diskselector_item_selected_set(), and the first item of
* diskselector will be selected.
*
* The selected item always will be centered on diskselector, with
* full label displayed, i.e., max length set to side labels won't
* apply on the selected item. More details on
* elm_diskselector_side_text_max_length_set().
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_selected_item_get(const Evas_Object *obj);
/**
* Get the first item of the diskselector.
*
* @param obj The diskselector object.
* @return The first item, or @c NULL if none.
*
* The list of items follows append order. So it will return the first
* item appended to the widget that wasn't deleted.
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_first_item_get(const Evas_Object *obj);
/**
* Get the last item of the diskselector.
*
* @param obj The diskselector object.
* @return The last item, or @c NULL if none.
*
* The list of items follows append order. So it will return last first
* item appended to the widget that wasn't deleted.
*
* @see elm_diskselector_item_append()
* @see elm_diskselector_items_get()
*
* @ingroup Diskselector
*/
EAPI Elm_Object_Item *elm_diskselector_last_item_get(const Evas_Object *obj);
/**
* Set the number of items to be displayed.
*
* @param obj The diskselector object.
* @param num The number of items the diskselector will display.
*
* Default value is 3, and also it's the minimum. If @p num is less
* than 3, it will be set to 3.
*
* Also, it can be set on theme, using data item @c display_item_num
* on group "elm/diskselector/item/X", where X is style set.
* E.g.:
*
* group { name: "elm/diskselector/item/X";
* data {
* item: "display_item_num" "5";
* }
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num);
/**
* Get the number of items in the diskselector object.
*
* @param obj The diskselector object.
*
* @ingroup Diskselector
*/
EAPI int elm_diskselector_display_item_num_get(const Evas_Object *obj);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,381 @@
/**
* @typedef Elm_Text_Format
*
* Text Format types.
*
* @see elm_entry_file_set()
*/
typedef enum
{
ELM_TEXT_FORMAT_PLAIN_UTF8, /**< Plain UTF8 type */
ELM_TEXT_FORMAT_MARKUP_UTF8 /**< Markup UTF8 type */
} Elm_Text_Format;
/**
* @typedef Elm_Wrap_Type
*
* Line wrapping types.
*
* @see elm_entry_line_wrap_set()
*/
typedef enum
{
ELM_WRAP_NONE = 0, /**< No wrap - value is zero */
ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */
ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */
ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */
ELM_WRAP_LAST
} Elm_Wrap_Type; /**< Type of word or character wrapping to use */
/**
* @typedef Elm_Input_Panel_Layout
*
* Input panel (virtual keyboard) layout types.
*
* @see elm_entry_input_panel_layout_set()
*/
typedef enum
{
ELM_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */
ELM_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
ELM_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
ELM_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
ELM_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
ELM_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
ELM_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
ELM_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */
ELM_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout */
ELM_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization) */
ELM_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. */
} Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */
enum
{
ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL,
ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED,
ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL,
ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL
};
/**
* @typedef Elm_Input_Panel_Lang
*
* Input panel (virtual keyboard) language modes.
*
* @see elm_entry_input_panel_language_set()
*/
typedef enum
{
ELM_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */
ELM_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */
} Elm_Input_Panel_Lang;
/**
* @typedef Elm_Autocapital_Type
*
* Autocapitalization Types.
*
* @see elm_entry_autocapital_type_set()
*/
typedef enum
{
ELM_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
ELM_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
ELM_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
} Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
/**
* @typedef Elm_Input_Panel_Return_Key_Type
*
* "Return" Key types on the input panel (virtual keyboard).
*
* @see elm_entry_input_panel_return_key_type_set()
*/
typedef enum
{
ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search string or magnifier icon */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send */
ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in @since 1.8 */
} Elm_Input_Panel_Return_Key_Type;
/**
* @typedef Elm_Entry_Anchor_Info
*
* The info sent in the callback for the "anchor,clicked" signals emitted
* by entries.
*/
typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
/**
* @struct _Elm_Entry_Anchor_Info
*
* The info sent in the callback for the "anchor,clicked" signals emitted
* by entries.
*/
struct _Elm_Entry_Anchor_Info
{
const char *name; /**< The name of the anchor, as stated in its href */
int button; /**< The mouse button used to click on it */
Evas_Coord x, /**< Anchor geometry, relative to canvas */
y, /**< Anchor geometry, relative to canvas */
w, /**< Anchor geometry, relative to canvas */
h; /**< Anchor geometry, relative to canvas */
};
/**
* @typedef Elm_Entry_Anchor_Hover_Info
*
* The info sent in the callback for "anchor,clicked" signals emitted by
* the Anchor_Hover widget.
*/
typedef struct _Elm_Entry_Anchor_Hover_Info Elm_Entry_Anchor_Hover_Info;
/**
* @typedef Elm_Entry_Context_Menu_Item
*
* Type of contextual item that can be added in to long press menu.
* @since 1.8
*/
typedef struct _Elm_Entry_Context_Menu_Item Elm_Entry_Context_Menu_Item;
/**
* @struct _Elm_Entry_Anchor_Hover_Info
*
* The info sent in the callback for "anchor,clicked" signals emitted by
* the Anchor_Hover widget.
*/
struct _Elm_Entry_Anchor_Hover_Info
{
const Elm_Entry_Anchor_Info *anchor_info; /**< The actual anchor info. */
Evas_Object *hover; /**< The hover object to use for the popup */
struct
{
Evas_Coord x, y, w, h;
} hover_parent; /**< Geometry of the object used as parent by the
hover */
Eina_Bool hover_left : 1; /**< Hint indicating if there's space
for content on the left side of
the hover. Before calling the
callback, the widget will make the
necessary calculations to check
which sides are fit to be set with
content, based on the position the
hover is activated and its distance
to the edges of its parent object
*/
Eina_Bool hover_right : 1; /**< Hint indicating content fits on
the right side of the hover.
See @ref hover_left */
Eina_Bool hover_top : 1; /**< Hint indicating content fits on top
of the hover. See @ref hover_left */
Eina_Bool hover_bottom : 1; /**< Hint indicating content fits
below the hover. See @ref
hover_left */
};
/**
* @typedef Elm_Entry_Item_Provider_Cb
* This callback type is used to provide items.
* If it returns an object handle other than NULL (it should create an
* object to do this), then this object is used to replace the current item.
* If not the next provider is called until one provides an item object, or the
* default provider in entry does.
* @param data The data specified as the last param when adding the provider
* @param entry The entry object
* @param text A pointer to the item href string in the text
* @return The object to be placed in the entry like an icon, or other element
* @see elm_entry_item_provider_append
* @see elm_entry_item_provider_prepend
* @see elm_entry_item_provider_remove
*/
typedef Evas_Object * (*Elm_Entry_Item_Provider_Cb)(void *data, Evas_Object * entry, const char *item);
/**
* @typedef Elm_Entry_Filter_Cb
* This callback type is used by entry filters to modify text.
* @param data The data specified as the last param when adding the filter
* @param entry The entry object
* @param text A pointer to the location of the text being filtered. The type of text is always markup. This data can be modified, but any additional allocations must be managed by the user.
* @see elm_entry_markup_filter_append
* @see elm_entry_markup_filter_prepend
* @see elm_entry_markup_filter_remove
*/
typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
/**
* @typedef Elm_Entry_Change_Info
* This corresponds to Edje_Entry_Change_Info. Includes information about
* a change in the entry.
*/
typedef Edje_Entry_Change_Info Elm_Entry_Change_Info;
/**
* This converts a markup (HTML-like) string into UTF-8.
*
* The returned string is a malloc'ed buffer and it should be freed when
* not needed anymore.
*
* @param s The string (in markup) to be converted
* @return The converted string (in UTF-8). It should be freed.
*
* @ingroup Entry
*/
EAPI char *elm_entry_markup_to_utf8(const char *s);
/**
* This converts a UTF-8 string into markup (HTML-like).
*
* The returned string is a malloc'ed buffer and it should be freed when
* not needed anymore.
*
* @param s The string (in UTF-8) to be converted
* @return The converted string (in markup). It should be freed.
*
* @ingroup Entry
*/
EAPI char *elm_entry_utf8_to_markup(const char *s);
/* pre-made filters for entries */
/**
* @typedef Elm_Entry_Filter_Limit_Size
*
* Data for the elm_entry_filter_limit_size() entry filter.
*/
typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
/**
* @struct _Elm_Entry_Filter_Limit_Size
*
* Data for the elm_entry_filter_limit_size() entry filter.
*/
struct _Elm_Entry_Filter_Limit_Size
{
int max_char_count; /**< The maximum number of characters allowed. */
int max_byte_count; /**< The maximum number of bytes allowed*/
};
/**
* Filter inserted text based on user defined character and byte limits
*
* Add this filter to an entry to limit the characters that it will accept
* based the contents of the provided #Elm_Entry_Filter_Limit_Size.
* The function works on the UTF-8 representation of the string, converting
* it from the set markup, thus not accounting for any format in it.
*
* The user must create an #Elm_Entry_Filter_Limit_Size structure and pass
* it as data when setting the filter. In it, it's possible to set limits
* by character count or bytes (any of them is disabled if 0), and both can
* be set at the same time. In that case, it first checks for characters,
* then bytes. The #Elm_Entry_Filter_Limit_Size structure must be alive and
* valid for as long as the entry is alive AND the elm_entry_filter_limit_size
* filter is set.
*
* The function will cut the inserted text in order to allow only the first
* number of characters that are still allowed. The cut is made in
* characters, even when limiting by bytes, in order to always contain
* valid ones and avoid half unicode characters making it in.
*
* This filter, like any others, does not apply when setting the entry text
* directly with elm_object_text_set().
*
* @ingroup Entry
*/
EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text);
/**
* @typedef Elm_Entry_Filter_Accept_Set
*
* Data for the elm_entry_filter_accept_set() entry filter.
*/
typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
/**
* @struct _Elm_Entry_Filter_Accept_Set
*
* Data for the elm_entry_filter_accept_set() entry filter.
*/
struct _Elm_Entry_Filter_Accept_Set
{
const char *accepted; /**< Set of characters accepted in the entry. */
const char *rejected; /**< Set of characters rejected from the entry. */
};
/**
* Filter inserted text based on accepted or rejected sets of characters
*
* Add this filter to an entry to restrict the set of accepted characters
* based on the sets in the provided #Elm_Entry_Filter_Accept_Set.
* This structure contains both accepted and rejected sets, but they are
* mutually exclusive. This structure must be available for as long as
* the entry is alive AND the elm_entry_filter_accept_set is being used.
*
* The @c accepted set takes preference, so if it is set, the filter will
* only work based on the accepted characters, ignoring anything in the
* @c rejected value. If @c accepted is @c NULL, then @c rejected is used.
*
* In both cases, the function filters by matching utf8 characters to the
* raw markup text, so it can be used to remove formatting tags.
*
* This filter, like any others, does not apply when setting the entry text
* directly with elm_object_text_set()
*
* @ingroup Entry
*/
EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text);
/**
* @typedef Elm_Cnp_Mode
* Enum of entry's copy & paste policy.
*
* @see elm_entry_cnp_mode_set()
* @see elm_entry_cnp_mode_get()
*/
typedef enum {
ELM_CNP_MODE_MARKUP, /**< copy & paste text with markup tag */
ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */
ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */
} Elm_Cnp_Mode;
/**
* Get the text of the contextual menu item.
*
* Gets the text of the contextual menu item of entry.
*
* @param item The item to get the label
* @return The text of contextual menu item
*
* @see elm_entry_context_menu_item_add()
* @ingroup Entry
* @since 1.8
*/
EAPI const char *elm_entry_context_menu_item_label_get(const Elm_Entry_Context_Menu_Item *item);
/**
* Get the icon object of the contextual menu item.
*
* Gets the icon object packed in the contextual menu item of entry.
*
* @param item The item to get the icon from
* @param icon_file The image file path on disk used for the icon or standard
* icon name
* @param icon_group The edje group used if @p icon_file is an edje file. NULL
* if the icon is not an edje file
* @param icon_type The icon type
*
* @see elm_entry_context_menu_item_add()
* @ingroup Entry
* @since 1.8
*/
EAPI void elm_entry_context_menu_item_icon_get(const Elm_Entry_Context_Menu_Item *item, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,418 +37,14 @@
*
* @{
*/
typedef enum
{
ELM_FLIP_ROTATE_Y_CENTER_AXIS,
ELM_FLIP_ROTATE_X_CENTER_AXIS,
ELM_FLIP_ROTATE_XZ_CENTER_AXIS,
ELM_FLIP_ROTATE_YZ_CENTER_AXIS,
ELM_FLIP_CUBE_LEFT,
ELM_FLIP_CUBE_RIGHT,
ELM_FLIP_CUBE_UP,
ELM_FLIP_CUBE_DOWN,
ELM_FLIP_PAGE_LEFT,
ELM_FLIP_PAGE_RIGHT,
ELM_FLIP_PAGE_UP,
ELM_FLIP_PAGE_DOWN
} Elm_Flip_Mode;
typedef enum
{
ELM_FLIP_INTERACTION_NONE,
ELM_FLIP_INTERACTION_ROTATE,
ELM_FLIP_INTERACTION_CUBE,
ELM_FLIP_INTERACTION_PAGE
} Elm_Flip_Interaction;
typedef enum
{
ELM_FLIP_DIRECTION_UP, /**< Allows interaction with the top of the widget */
ELM_FLIP_DIRECTION_DOWN, /**< Allows interaction with the bottom of the widget */
ELM_FLIP_DIRECTION_LEFT, /**< Allows interaction with the left portion of the widget */
ELM_FLIP_DIRECTION_RIGHT /**< Allows interaction with the right portion of the widget */
} Elm_Flip_Direction;
#define ELM_OBJ_FLIP_CLASS elm_obj_flip_class_get()
const Eo_Class *elm_obj_flip_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FLIP_BASE_ID;
enum
{
ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET,
ELM_OBJ_FLIP_SUB_ID_PERSPECTIVE_SET,
ELM_OBJ_FLIP_SUB_ID_GO,
ELM_OBJ_FLIP_SUB_ID_GO_TO,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET,
ELM_OBJ_FLIP_SUB_ID_LAST
};
#define ELM_OBJ_FLIP_ID(sub_id) (ELM_OBJ_FLIP_BASE_ID + sub_id)
/**
* @def elm_obj_flip_front_visible_get
* @since 1.8
*
* @brief Get flip front visibility state
*
* @param[out] ret
*
* @see elm_flip_front_visible_get
*/
#define elm_obj_flip_front_visible_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_flip_go_to
* @since 1.8
*
* @brief Runs the flip animation to front or back.
*
* @param[in] front
* @param[in] mode
*
* @see elm_flip_go_to
*/
#define elm_obj_flip_go_to(front, mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO_TO), EO_TYPECHECK(Eina_Bool, front), EO_TYPECHECK(Elm_Flip_Mode, mode)
/**
* @def elm_obj_flip_go
* @since 1.8
*
* @brief Runs the flip animation
*
* @param[in] mode
*
* @see elm_flip_go
*/
#define elm_obj_flip_go(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO), EO_TYPECHECK(Elm_Flip_Mode, mode)
/**
* @def elm_obj_flip_interaction_set
* @since 1.8
*
* @brief Set the interactive flip mode
*
* @param[in] mode
*
* @see elm_flip_interaction_set
*/
#define elm_obj_flip_interaction_set(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET), EO_TYPECHECK(Elm_Flip_Interaction, mode)
/**
* @def elm_obj_flip_interaction_get
* @since 1.8
*
* @brief Get the interactive flip mode
*
* @param[out] ret
*
* @see elm_flip_interaction_get
*/
#define elm_obj_flip_interaction_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET), EO_TYPECHECK(Elm_Flip_Interaction *, ret)
/**
* @def elm_obj_flip_interaction_direction_enabled_set
* @since 1.8
*
* @brief Set which directions of the flip respond to interactive flip
*
* @param[in] dir
* @param[in] enabled
*
* @see elm_flip_interaction_direction_enabled_set
*/
#define elm_obj_flip_interaction_direction_enabled_set(dir, enabled) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool, enabled)
/**
* @def elm_obj_flip_interaction_direction_enabled_get
* @since 1.8
*
* @brief Get the enabled state of that flip direction
*
* @param[in] dir
* @param[out] ret
*
* @see elm_flip_interaction_direction_enabled_get
*/
#define elm_obj_flip_interaction_direction_enabled_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_flip_interaction_direction_hitsize_set
* @since 1.8
*
* @brief Set the amount of the flip that is sensitive to interactive flip
*
* @param[in] dir
* @param[in] hitsize
*
* @see elm_flip_interaction_direction_hitsize_set
*/
#define elm_obj_flip_interaction_direction_hitsize_set(dir, hitsize) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double, hitsize)
/**
* @def elm_obj_flip_interaction_direction_hitsize_get
* @since 1.8
*
* @brief Get the amount of the flip that is sensitive to interactive flip
*
* @param[in] dir
* @param[out] ret
*
* @see elm_flip_interaction_direction_hitsize_get
*/
#define elm_obj_flip_interaction_direction_hitsize_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double *, ret)
/**
* @brief Add a new flip to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Flip
*/
EAPI Evas_Object *elm_flip_add(Evas_Object *parent);
/**
* @brief Get flip front visibility state
*
* @param obj The flip object
* @return EINA_TRUE if front front is showing, EINA_FALSE if the back is
* showing.
*
* @ingroup Flip
*/
EAPI Eina_Bool elm_flip_front_visible_get(const Evas_Object *obj);
/**
* @brief Set flip perspective
*
* @param obj The flip object
* @param foc The coordinate to set the focus on
* @param x The X coordinate
* @param y The Y coordinate
*
* @warning This function currently does nothing.
*
* @ingroup Flip
*/
EAPI void elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y);
/**
* @brief Runs the flip animation
*
* @param obj The flip object
* @param mode The mode type
*
* Flips the front and back contents using the @p mode animation. This
* effectively hides the currently visible content and shows the hidden one.
*
* There a number of possible animations to use for the flipping:
* @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content
* around a horizontal axis in the middle of its height, the other content
* is shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content
* around a vertical axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its height, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left
* as if the flip was a cube, the other content is show as the right face of
* the cube.
* @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the
* right as if the flip was a cube, the other content is show as the left
* face of the cube.
* @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the
* flip was a cube, the other content is show as the bottom face of the cube.
* @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if
* the flip was a cube, the other content is show as the upper face of the
* cube.
* @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as
* if the flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below
* that.
* @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the
* flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the
* flip was a book, the other content is shown as the page below that.
*
* @image html elm_flip.png
* @image latex elm_flip.eps width=\textwidth
*
* @see elm_flip_go_to()
*
* @ingroup Flip
*/
EAPI void elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode);
/**
* @brief Runs the flip animation to front or back.
*
* @param obj The flip object
* @param front if @c EINA_TRUE, makes front visible, otherwise makes back.
* @param mode The mode type
*
* Flips the front and back contents using the @p mode animation. This
* effectively hides the currently visible content and shows the hidden one.
*
* There a number of possible animations to use for the flipping:
* @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content
* around a horizontal axis in the middle of its height, the other content
* is shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content
* around a vertical axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its height, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left
* as if the flip was a cube, the other content is show as the right face of
* the cube.
* @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the
* right as if the flip was a cube, the other content is show as the left
* face of the cube.
* @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the
* flip was a cube, the other content is show as the bottom face of the cube.
* @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if
* the flip was a cube, the other content is show as the upper face of the
* cube.
* @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as
* if the flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below
* that.
* @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the
* flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the
* flip was a book, the other content is shown as the page below that.
*
* @image html elm_flip.png
* @image latex elm_flip.eps width=\textwidth
*
* @since 1.7
*
* @ingroup Flip
*/
EAPI void elm_flip_go_to(Evas_Object *obj, Eina_Bool front, Elm_Flip_Mode mode);
/**
* @brief Set the interactive flip mode
*
* @param obj The flip object
* @param mode The interactive flip mode to use
*
* This sets if the flip should be interactive (allow user to click and
* drag a side of the flip to reveal the back page and cause it to flip).
* By default a flip is not interactive. You may also need to set which
* sides of the flip are "active" for flipping and how much space they use
* (a minimum of a finger size) with elm_flip_interaction_direction_enabled_set()
* and elm_flip_interaction_direction_hitsize_set()
*
* The four available mode of interaction are:
* @li ELM_FLIP_INTERACTION_NONE - No interaction is allowed
* @li ELM_FLIP_INTERACTION_ROTATE - Interaction will cause rotate animation
* @li ELM_FLIP_INTERACTION_CUBE - Interaction will cause cube animation
* @li ELM_FLIP_INTERACTION_PAGE - Interaction will cause page animation
*
* @note ELM_FLIP_INTERACTION_ROTATE won't cause
* ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to
* happen, those can only be achieved with elm_flip_go();
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_set(Evas_Object *obj, Elm_Flip_Interaction mode);
/**
* @brief Get the interactive flip mode
*
* @param obj The flip object
* @return The interactive flip mode
*
* Returns the interactive flip mode set by elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI Elm_Flip_Interaction elm_flip_interaction_get(const Evas_Object *obj);
/**
* @brief Set which directions of the flip respond to interactive flip
*
* @param obj The flip object
* @param dir The direction to change
* @param enabled If that direction is enabled or not
*
* By default all directions are disabled, so you may want to enable the
* desired directions for flipping if you need interactive flipping. You must
* call this function once for each direction that should be enabled.
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_direction_enabled_set(Evas_Object *obj, Elm_Flip_Direction dir, Eina_Bool enabled);
/**
* @brief Get the enabled state of that flip direction
*
* @param obj The flip object
* @param dir The direction to check
* @return If that direction is enabled or not
*
* Gets the enabled state set by elm_flip_interaction_direction_enabled_set()
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI Eina_Bool elm_flip_interaction_direction_enabled_get(Evas_Object *obj, Elm_Flip_Direction dir);
/**
* @brief Set the amount of the flip that is sensitive to interactive flip
*
* @param obj The flip object
* @param dir The direction to modify
* @param hitsize The amount of that dimension (0.0 to 1.0) to use
*
* Set the amount of the flip that is sensitive to interactive flip, with 0
* representing no area in the flip and 1 representing the entire flip. There
* is however a consideration to be made in that the area will never be
* smaller than the finger size set(as set in your Elementary configuration).
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_direction_hitsize_set(Evas_Object *obj, Elm_Flip_Direction dir, double hitsize);
/**
* @brief Get the amount of the flip that is sensitive to interactive flip
*
* @param obj The flip object
* @param dir The direction to check
* @return The size set for that direction
*
* Returns the amount of sensitive area set by
* elm_flip_interaction_direction_hitsize_set().
*
* @ingroup Flip
*/
EAPI double elm_flip_interaction_direction_hitsize_get(Evas_Object *obj, Elm_Flip_Direction dir);
#include "elm_flip_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_flip_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_flip_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,32 @@
typedef enum
{
ELM_FLIP_ROTATE_Y_CENTER_AXIS,
ELM_FLIP_ROTATE_X_CENTER_AXIS,
ELM_FLIP_ROTATE_XZ_CENTER_AXIS,
ELM_FLIP_ROTATE_YZ_CENTER_AXIS,
ELM_FLIP_CUBE_LEFT,
ELM_FLIP_CUBE_RIGHT,
ELM_FLIP_CUBE_UP,
ELM_FLIP_CUBE_DOWN,
ELM_FLIP_PAGE_LEFT,
ELM_FLIP_PAGE_RIGHT,
ELM_FLIP_PAGE_UP,
ELM_FLIP_PAGE_DOWN
} Elm_Flip_Mode;
typedef enum
{
ELM_FLIP_INTERACTION_NONE,
ELM_FLIP_INTERACTION_ROTATE,
ELM_FLIP_INTERACTION_CUBE,
ELM_FLIP_INTERACTION_PAGE
} Elm_Flip_Interaction;
typedef enum
{
ELM_FLIP_DIRECTION_UP, /**< Allows interaction with the top of the widget */
ELM_FLIP_DIRECTION_DOWN, /**< Allows interaction with the bottom of the widget */
ELM_FLIP_DIRECTION_LEFT, /**< Allows interaction with the left portion of the widget */
ELM_FLIP_DIRECTION_RIGHT /**< Allows interaction with the right portion of the widget */
} Elm_Flip_Direction;

View File

@ -0,0 +1,154 @@
#define ELM_OBJ_FLIP_CLASS elm_obj_flip_class_get()
const Eo_Class *elm_obj_flip_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FLIP_BASE_ID;
enum
{
ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET,
ELM_OBJ_FLIP_SUB_ID_PERSPECTIVE_SET,
ELM_OBJ_FLIP_SUB_ID_GO,
ELM_OBJ_FLIP_SUB_ID_GO_TO,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET,
ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET,
ELM_OBJ_FLIP_SUB_ID_LAST
};
#define ELM_OBJ_FLIP_ID(sub_id) (ELM_OBJ_FLIP_BASE_ID + sub_id)
/**
* @def elm_obj_flip_front_visible_get
* @since 1.8
*
* @brief Get flip front visibility state
*
* @param[out] ret
*
* @see elm_flip_front_visible_get
*
* @ingroup Flip
*/
#define elm_obj_flip_front_visible_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_flip_go_to
* @since 1.8
*
* @brief Runs the flip animation to front or back.
*
* @param[in] front
* @param[in] mode
*
* @see elm_flip_go_to
*
* @ingroup Flip
*/
#define elm_obj_flip_go_to(front, mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO_TO), EO_TYPECHECK(Eina_Bool, front), EO_TYPECHECK(Elm_Flip_Mode, mode)
/**
* @def elm_obj_flip_go
* @since 1.8
*
* @brief Runs the flip animation
*
* @param[in] mode
*
* @see elm_flip_go
*
* @ingroup Flip
*/
#define elm_obj_flip_go(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO), EO_TYPECHECK(Elm_Flip_Mode, mode)
/**
* @def elm_obj_flip_interaction_set
* @since 1.8
*
* @brief Set the interactive flip mode
*
* @param[in] mode
*
* @see elm_flip_interaction_set
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_set(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET), EO_TYPECHECK(Elm_Flip_Interaction, mode)
/**
* @def elm_obj_flip_interaction_get
* @since 1.8
*
* @brief Get the interactive flip mode
*
* @param[out] ret
*
* @see elm_flip_interaction_get
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET), EO_TYPECHECK(Elm_Flip_Interaction *, ret)
/**
* @def elm_obj_flip_interaction_direction_enabled_set
* @since 1.8
*
* @brief Set which directions of the flip respond to interactive flip
*
* @param[in] dir
* @param[in] enabled
*
* @see elm_flip_interaction_direction_enabled_set
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_direction_enabled_set(dir, enabled) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool, enabled)
/**
* @def elm_obj_flip_interaction_direction_enabled_get
* @since 1.8
*
* @brief Get the enabled state of that flip direction
*
* @param[in] dir
* @param[out] ret
*
* @see elm_flip_interaction_direction_enabled_get
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_direction_enabled_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_flip_interaction_direction_hitsize_set
* @since 1.8
*
* @brief Set the amount of the flip that is sensitive to interactive flip
*
* @param[in] dir
* @param[in] hitsize
*
* @see elm_flip_interaction_direction_hitsize_set
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_direction_hitsize_set(dir, hitsize) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double, hitsize)
/**
* @def elm_obj_flip_interaction_direction_hitsize_get
* @since 1.8
*
* @brief Get the amount of the flip that is sensitive to interactive flip
*
* @param[in] dir
* @param[out] ret
*
* @see elm_flip_interaction_direction_hitsize_get
*
* @ingroup Flip
*/
#define elm_obj_flip_interaction_direction_hitsize_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double *, ret)

View File

@ -0,0 +1,242 @@
/**
* @brief Add a new flip to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Flip
*/
EAPI Evas_Object *elm_flip_add(Evas_Object *parent);
/**
* @brief Get flip front visibility state
*
* @param obj The flip object
* @return EINA_TRUE if front front is showing, EINA_FALSE if the back is
* showing.
*
* @ingroup Flip
*/
EAPI Eina_Bool elm_flip_front_visible_get(const Evas_Object *obj);
/**
* @brief Set flip perspective
*
* @param obj The flip object
* @param foc The coordinate to set the focus on
* @param x The X coordinate
* @param y The Y coordinate
*
* @warning This function currently does nothing.
*
* @ingroup Flip
*/
EAPI void elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y);
/**
* @brief Runs the flip animation
*
* @param obj The flip object
* @param mode The mode type
*
* Flips the front and back contents using the @p mode animation. This
* effectively hides the currently visible content and shows the hidden one.
*
* There a number of possible animations to use for the flipping:
* @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content
* around a horizontal axis in the middle of its height, the other content
* is shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content
* around a vertical axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its height, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left
* as if the flip was a cube, the other content is show as the right face of
* the cube.
* @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the
* right as if the flip was a cube, the other content is show as the left
* face of the cube.
* @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the
* flip was a cube, the other content is show as the bottom face of the cube.
* @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if
* the flip was a cube, the other content is show as the upper face of the
* cube.
* @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as
* if the flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below
* that.
* @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the
* flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the
* flip was a book, the other content is shown as the page below that.
*
* @image html elm_flip.png
* @image latex elm_flip.eps width=\textwidth
*
* @see elm_flip_go_to()
*
* @ingroup Flip
*/
EAPI void elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode);
/**
* @brief Runs the flip animation to front or back.
*
* @param obj The flip object
* @param front if @c EINA_TRUE, makes front visible, otherwise makes back.
* @param mode The mode type
*
* Flips the front and back contents using the @p mode animation. This
* effectively hides the currently visible content and shows the hidden one.
*
* There a number of possible animations to use for the flipping:
* @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content
* around a horizontal axis in the middle of its height, the other content
* is shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content
* around a vertical axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its width, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content
* around a diagonal axis in the middle of its height, the other content is
* shown as the other side of the flip.
* @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left
* as if the flip was a cube, the other content is show as the right face of
* the cube.
* @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the
* right as if the flip was a cube, the other content is show as the left
* face of the cube.
* @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the
* flip was a cube, the other content is show as the bottom face of the cube.
* @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if
* the flip was a cube, the other content is show as the upper face of the
* cube.
* @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as
* if the flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right
* as if the flip was a book, the other content is shown as the page below
* that.
* @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the
* flip was a book, the other content is shown as the page below that.
* @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the
* flip was a book, the other content is shown as the page below that.
*
* @image html elm_flip.png
* @image latex elm_flip.eps width=\textwidth
*
* @since 1.7
*
* @ingroup Flip
*/
EAPI void elm_flip_go_to(Evas_Object *obj, Eina_Bool front, Elm_Flip_Mode mode);
/**
* @brief Set the interactive flip mode
*
* @param obj The flip object
* @param mode The interactive flip mode to use
*
* This sets if the flip should be interactive (allow user to click and
* drag a side of the flip to reveal the back page and cause it to flip).
* By default a flip is not interactive. You may also need to set which
* sides of the flip are "active" for flipping and how much space they use
* (a minimum of a finger size) with elm_flip_interaction_direction_enabled_set()
* and elm_flip_interaction_direction_hitsize_set()
*
* The four available mode of interaction are:
* @li ELM_FLIP_INTERACTION_NONE - No interaction is allowed
* @li ELM_FLIP_INTERACTION_ROTATE - Interaction will cause rotate animation
* @li ELM_FLIP_INTERACTION_CUBE - Interaction will cause cube animation
* @li ELM_FLIP_INTERACTION_PAGE - Interaction will cause page animation
*
* @note ELM_FLIP_INTERACTION_ROTATE won't cause
* ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to
* happen, those can only be achieved with elm_flip_go();
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_set(Evas_Object *obj, Elm_Flip_Interaction mode);
/**
* @brief Get the interactive flip mode
*
* @param obj The flip object
* @return The interactive flip mode
*
* Returns the interactive flip mode set by elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI Elm_Flip_Interaction elm_flip_interaction_get(const Evas_Object *obj);
/**
* @brief Set which directions of the flip respond to interactive flip
*
* @param obj The flip object
* @param dir The direction to change
* @param enabled If that direction is enabled or not
*
* By default all directions are disabled, so you may want to enable the
* desired directions for flipping if you need interactive flipping. You must
* call this function once for each direction that should be enabled.
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_direction_enabled_set(Evas_Object *obj, Elm_Flip_Direction dir, Eina_Bool enabled);
/**
* @brief Get the enabled state of that flip direction
*
* @param obj The flip object
* @param dir The direction to check
* @return If that direction is enabled or not
*
* Gets the enabled state set by elm_flip_interaction_direction_enabled_set()
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI Eina_Bool elm_flip_interaction_direction_enabled_get(Evas_Object *obj, Elm_Flip_Direction dir);
/**
* @brief Set the amount of the flip that is sensitive to interactive flip
*
* @param obj The flip object
* @param dir The direction to modify
* @param hitsize The amount of that dimension (0.0 to 1.0) to use
*
* Set the amount of the flip that is sensitive to interactive flip, with 0
* representing no area in the flip and 1 representing the entire flip. There
* is however a consideration to be made in that the area will never be
* smaller than the finger size set(as set in your Elementary configuration).
*
* @see elm_flip_interaction_set()
*
* @ingroup Flip
*/
EAPI void elm_flip_interaction_direction_hitsize_set(Evas_Object *obj, Elm_Flip_Direction dir, double hitsize);
/**
* @brief Get the amount of the flip that is sensitive to interactive flip
*
* @param obj The flip object
* @param dir The direction to check
* @return The size set for that direction
*
* Returns the amount of sensitive area set by
* elm_flip_interaction_direction_hitsize_set().
*
* @ingroup Flip
*/
EAPI double elm_flip_interaction_direction_hitsize_get(Evas_Object *obj, Elm_Flip_Direction dir);

View File

@ -49,420 +49,17 @@
* @li @ref flipselector_example
*/
#define ELM_OBJ_FLIPSELECTOR_CLASS elm_obj_flipselector_class_get()
const Eo_Class *elm_obj_flipselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FLIPSELECTOR_BASE_ID;
typedef void (*flipselector_func_type)(void *, Evas_Object *, void *);
enum
{
ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_FLIPSELECTOR_ID(sub_id) (ELM_OBJ_FLIPSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_flipselector_flip_next
* @since 1.8
*
* Programmatically select the next item of a flip selector widget
*
*
* @see elm_flipselector_flip_next
*/
#define elm_obj_flipselector_flip_next() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT)
/**
* @def elm_obj_flipselector_flip_prev
* @since 1.8
*
* Programmatically select the previous item of a flip selector
*
*
* @see elm_flipselector_flip_prev
*/
#define elm_obj_flipselector_flip_prev() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV)
/**
* @def elm_obj_flipselector_item_append
* @since 1.8
*
* Append a (text) item to a flip selector widget
*
* @param[in] label
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_flipselector_item_append
*/
#define elm_obj_flipselector_item_append(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
/**
* @def elm_obj_flipselector_item_prepend
* @since 1.8
*
* Prepend a (text) item to a flip selector widget
*
* @param[in] label
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_flipselector_item_prepend
*/
#define elm_obj_flipselector_item_prepend(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
/**
* @def elm_obj_flipselector_items_get
* @since 1.8
*
* Get the internal list of items in a given flip selector widget.
*
* @param[out] ret
*
* @see elm_flipselector_items_get
*/
#define elm_obj_flipselector_items_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
/**
* @def elm_obj_flipselector_first_item_get
* @since 1.8
*
* Get the first item in the given flip selector widget's list of
*
* @param[out] ret
*
* @see elm_flipselector_first_item_get
*/
#define elm_obj_flipselector_first_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_last_item_get
* @since 1.8
*
* Get the last item in the given flip selector widget's list of
*
* @param[out] ret
*
* @see elm_flipselector_last_item_get
*/
#define elm_obj_flipselector_last_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_selected_item_get
* @since 1.8
*
* Get the currently selected item in a flip selector widget.
*
* @param[out] ret
*
* @see elm_flipselector_selected_item_get
*/
#define elm_obj_flipselector_selected_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_first_interval_set
* @since 1.8
*
* Set the interval on time updates for a user mouse button hold
*
* @param[in] interval
*
* @see elm_flipselector_first_interval_set
*/
#define elm_obj_flipselector_first_interval_set(interval) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET), EO_TYPECHECK(double, interval)
/**
* @def elm_obj_flipselector_first_interval_get
* @since 1.8
*
* Get the interval on time updates for an user mouse button hold
*
* @param[out] ret
*
* @see elm_flipselector_first_interval_get
*/
#define elm_obj_flipselector_first_interval_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET), EO_TYPECHECK(double *, ret)
/**
* @addtogroup Flipselector
* @{
*/
/**
* Add a new flip selector widget to the given parent Elementary
* (container) widget
*
* @param parent The parent object
* @return a new flip selector widget handle or @c NULL, on errors
*
* This function inserts a new flip selector widget on the canvas.
*
* @ingroup Flipselector
*/
EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent);
/**
* Programmatically select the next item of a flip selector widget
*
* @param obj The flipselector object
*
* @note The selection will be animated. Also, if it reaches the
* end of its list of member items, it will continue with the first
* one onwards.
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_flip_next(Evas_Object *obj);
/**
* Programmatically select the previous item of a flip selector
* widget
*
* @param obj The flipselector object
*
* @note The selection will be animated. Also, if it reaches the
* beginning of its list of member items, it will continue with the
* last one backwards.
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_flip_prev(Evas_Object *obj);
/**
* Append a (text) item to a flip selector widget
*
* @param obj The flipselector object
* @param label The (text) label of the new item
* @param func Convenience callback function to take place when
* item is selected
* @param data Data passed to @p func, above
* @return A handle to the item added or @c NULL, on errors
*
* The widget's list of labels to show will be appended with the
* given value. If the user wishes so, a callback function pointer
* can be passed, which will get called when this same item is
* selected.
*
* @note The current selection @b won't be modified by appending an
* element to the list.
*
* @note The maximum length of the text label is going to be
* determined <b>by the widget's theme</b>. Strings larger than
* that value are going to be @b truncated.
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data);
/**
* Prepend a (text) item to a flip selector widget
*
* @param obj The flipselector object
* @param label The (text) label of the new item
* @param func Convenience callback function to take place when
* item is selected
* @param data Data passed to @p func, above
* @return A handle to the item added or @c NULL, on errors
*
* The widget's list of labels to show will be prepended with the
* given value. If the user wishes so, a callback function pointer
* can be passed, which will get called when this same item is
* selected.
*
* @note The current selection @b won't be modified by prepending
* an element to the list.
*
* @note The maximum length of the text label is going to be
* determined <b>by the widget's theme</b>. Strings larger than
* that value are going to be @b truncated.
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data);
/**
* Get the internal list of items in a given flip selector widget.
*
* @param obj The flipselector object
* @return The list of items (#Elm_Object_Item as data) or
* @c NULL on errors.
*
* This list is @b not to be modified in any way and must not be
* freed. Use the list members with functions like
* elm_object_item_text_set(),
* elm_object_item_text_get(),
* elm_object_item_del(),
* elm_flipselector_item_selected_get(),
* elm_flipselector_item_selected_set().
*
* @warning This list is only valid until @p obj object's internal
* items list is changed. It should be fetched again with another
* call to this function when changes happen.
*
* @ingroup Flipselector
*/
EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj);
/**
* Get the first item in the given flip selector widget's list of
* items.
*
* @param obj The flipselector object
* @return The first item or @c NULL, if it has no items (and on
* errors)
*
* @see elm_flipselector_item_append()
* @see elm_flipselector_last_item_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj);
/**
* Get the last item in the given flip selector widget's list of
* items.
*
* @param obj The flipselector object
* @return The last item or @c NULL, if it has no items (and on
* errors)
*
* @see elm_flipselector_item_prepend()
* @see elm_flipselector_first_item_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj);
/**
* Get the currently selected item in a flip selector widget.
*
* @param obj The flipselector object
* @return The selected item or @c NULL, if the widget has no items
* (and on errors)
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj);
/**
* Set whether a given flip selector widget's item should be the
* currently selected one.
*
* @param it The flip selector item
* @param selected @c EINA_TRUE to select it, @c EINA_FALSE to unselect.
*
* This sets whether @p item is or not the selected (thus, under
* display) one. If @p item is different than the one under display,
* the latter will be unselected. If the @p item is set to be
* unselected, on the other hand, the @b first item in the widget's
* internal members list will be the new selected one.
*
* @see elm_flipselector_item_selected_get()
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
/**
* Get whether a given flip selector widget's item is the currently
* selected one.
*
* @param it The flip selector item
* @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
* (or on errors).
*
* @see elm_flipselector_item_selected_set()
*
* @ingroup Flipselector
*/
EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it);
/**
* Gets the item before @p item in a flip selector widget's internal list of
* items.
*
* @param it The item to fetch previous from
* @return The item before the @p item, in its parent's list. If there is no
* previous item for @p item or there's an error, @c NULL is returned.
*
* @see elm_flipselector_item_next_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_prev_get(const Elm_Object_Item *it);
/**
* Gets the item after @p item in a flip selector widget's
* internal list of items.
*
* @param it The item to fetch next from
* @return The item after the @p item, in its parent's list. If there is no next
* item for @p item or there's an error, @c NULL is returned.
*
* @see elm_flipselector_item_prev_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_next_get(const Elm_Object_Item *it);
/**
* Set the interval on time updates for a user mouse button hold
* on a flip selector widget.
*
* @param obj The flip selector object
* @param interval The (first) interval value in seconds
*
* This interval value is @b decreased while the user holds the
* mouse pointer either flipping up or flipping down a given flip
* selector.
*
* This helps the user to get to a given item distant from the
* current one easier/faster, as it will start to flip quicker and
* quicker on mouse button holds.
*
* The calculation for the next flip interval value, starting from
* the one set with this call, is the previous interval divided by
* 1.05, so it decreases a little bit.
*
* The default starting interval value for automatic flips is
* @b 0.85 seconds.
*
* @see elm_flipselector_first_interval_get()
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_first_interval_set(Evas_Object *obj, double interval);
/**
* Get the interval on time updates for an user mouse button hold
* on a flip selector widget.
*
* @param obj The flip selector object
* @return The (first) interval value, in seconds, set on it
*
* @see elm_flipselector_first_interval_set() for more details
*
* @ingroup Flipselector
*/
EAPI double elm_flipselector_first_interval_get(const Evas_Object *obj);
#ifdef EFL_EO_API_SUPPORT
#include "elm_flipselector_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_flipselector_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,171 @@
#define ELM_OBJ_FLIPSELECTOR_CLASS elm_obj_flipselector_class_get()
const Eo_Class *elm_obj_flipselector_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FLIPSELECTOR_BASE_ID;
typedef void (*flipselector_func_type)(void *, Evas_Object *, void *);
enum
{
ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND,
ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET,
ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST
};
#define ELM_OBJ_FLIPSELECTOR_ID(sub_id) (ELM_OBJ_FLIPSELECTOR_BASE_ID + sub_id)
/**
* @def elm_obj_flipselector_flip_next
* @since 1.8
*
* Programmatically select the next item of a flip selector widget
*
*
* @see elm_flipselector_flip_next
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_flip_next() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_NEXT)
/**
* @def elm_obj_flipselector_flip_prev
* @since 1.8
*
* Programmatically select the previous item of a flip selector
*
*
* @see elm_flipselector_flip_prev
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_flip_prev() ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FLIP_PREV)
/**
* @def elm_obj_flipselector_item_append
* @since 1.8
*
* Append a (text) item to a flip selector widget
*
* @param[in] label
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_flipselector_item_append
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_item_append(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
/**
* @def elm_obj_flipselector_item_prepend
* @since 1.8
*
* Prepend a (text) item to a flip selector widget
*
* @param[in] label
* @param[in] func
* @param[in] data
* @param[out] ret
*
* @see elm_flipselector_item_prepend
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_item_prepend(label, func, data, ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(flipselector_func_type, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Flipselector_Item **, ret)
/**
* @def elm_obj_flipselector_items_get
* @since 1.8
*
* Get the internal list of items in a given flip selector widget.
*
* @param[out] ret
*
* @see elm_flipselector_items_get
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_items_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
/**
* @def elm_obj_flipselector_first_item_get
* @since 1.8
*
* Get the first item in the given flip selector widget's list of
*
* @param[out] ret
*
* @see elm_flipselector_first_item_get
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_first_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_last_item_get
* @since 1.8
*
* Get the last item in the given flip selector widget's list of
*
* @param[out] ret
*
* @see elm_flipselector_last_item_get
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_last_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_selected_item_get
* @since 1.8
*
* Get the currently selected item in a flip selector widget.
*
* @param[out] ret
*
* @see elm_flipselector_selected_item_get
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_selected_item_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
/**
* @def elm_obj_flipselector_first_interval_set
* @since 1.8
*
* Set the interval on time updates for a user mouse button hold
*
* @param[in] interval
*
* @see elm_flipselector_first_interval_set
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_first_interval_set(interval) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_SET), EO_TYPECHECK(double, interval)
/**
* @def elm_obj_flipselector_first_interval_get
* @since 1.8
*
* Get the interval on time updates for an user mouse button hold
*
* @param[out] ret
*
* @see elm_flipselector_first_interval_get
*
* @ingroup Flipselector
*/
#define elm_obj_flipselector_first_interval_get(ret) ELM_OBJ_FLIPSELECTOR_ID(ELM_OBJ_FLIPSELECTOR_SUB_ID_FIRST_INTERVAL_GET), EO_TYPECHECK(double *, ret)

View File

@ -0,0 +1,196 @@
/**
* Add a new flip selector widget to the given parent Elementary
* (container) widget
*
* @param parent The parent object
* @return a new flip selector widget handle or @c NULL, on errors
*
* This function inserts a new flip selector widget on the canvas.
*
* @ingroup Flipselector
*/
EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent);
/**
* Programmatically select the next item of a flip selector widget
*
* @param obj The flipselector object
*
* @note The selection will be animated. Also, if it reaches the
* end of its list of member items, it will continue with the first
* one onwards.
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_flip_next(Evas_Object *obj);
/**
* Programmatically select the previous item of a flip selector
* widget
*
* @param obj The flipselector object
*
* @note The selection will be animated. Also, if it reaches the
* beginning of its list of member items, it will continue with the
* last one backwards.
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_flip_prev(Evas_Object *obj);
/**
* Append a (text) item to a flip selector widget
*
* @param obj The flipselector object
* @param label The (text) label of the new item
* @param func Convenience callback function to take place when
* item is selected
* @param data Data passed to @p func, above
* @return A handle to the item added or @c NULL, on errors
*
* The widget's list of labels to show will be appended with the
* given value. If the user wishes so, a callback function pointer
* can be passed, which will get called when this same item is
* selected.
*
* @note The current selection @b won't be modified by appending an
* element to the list.
*
* @note The maximum length of the text label is going to be
* determined <b>by the widget's theme</b>. Strings larger than
* that value are going to be @b truncated.
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data);
/**
* Prepend a (text) item to a flip selector widget
*
* @param obj The flipselector object
* @param label The (text) label of the new item
* @param func Convenience callback function to take place when
* item is selected
* @param data Data passed to @p func, above
* @return A handle to the item added or @c NULL, on errors
*
* The widget's list of labels to show will be prepended with the
* given value. If the user wishes so, a callback function pointer
* can be passed, which will get called when this same item is
* selected.
*
* @note The current selection @b won't be modified by prepending
* an element to the list.
*
* @note The maximum length of the text label is going to be
* determined <b>by the widget's theme</b>. Strings larger than
* that value are going to be @b truncated.
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data);
/**
* Get the internal list of items in a given flip selector widget.
*
* @param obj The flipselector object
* @return The list of items (#Elm_Object_Item as data) or
* @c NULL on errors.
*
* This list is @b not to be modified in any way and must not be
* freed. Use the list members with functions like
* elm_object_item_text_set(),
* elm_object_item_text_get(),
* elm_object_item_del(),
* elm_flipselector_item_selected_get(),
* elm_flipselector_item_selected_set().
*
* @warning This list is only valid until @p obj object's internal
* items list is changed. It should be fetched again with another
* call to this function when changes happen.
*
* @ingroup Flipselector
*/
EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj);
/**
* Get the first item in the given flip selector widget's list of
* items.
*
* @param obj The flipselector object
* @return The first item or @c NULL, if it has no items (and on
* errors)
*
* @see elm_flipselector_item_append()
* @see elm_flipselector_last_item_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj);
/**
* Get the last item in the given flip selector widget's list of
* items.
*
* @param obj The flipselector object
* @return The last item or @c NULL, if it has no items (and on
* errors)
*
* @see elm_flipselector_item_prepend()
* @see elm_flipselector_first_item_get()
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj);
/**
* Get the currently selected item in a flip selector widget.
*
* @param obj The flipselector object
* @return The selected item or @c NULL, if the widget has no items
* (and on errors)
*
* @ingroup Flipselector
*/
EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj);
/**
* Set the interval on time updates for a user mouse button hold
* on a flip selector widget.
*
* @param obj The flip selector object
* @param interval The (first) interval value in seconds
*
* This interval value is @b decreased while the user holds the
* mouse pointer either flipping up or flipping down a given flip
* selector.
*
* This helps the user to get to a given item distant from the
* current one easier/faster, as it will start to flip quicker and
* quicker on mouse button holds.
*
* The calculation for the next flip interval value, starting from
* the one set with this call, is the previous interval divided by
* 1.05, so it decreases a little bit.
*
* The default starting interval value for automatic flips is
* @b 0.85 seconds.
*
* @see elm_flipselector_first_interval_get()
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_first_interval_set(Evas_Object *obj, double interval);
/**
* Get the interval on time updates for an user mouse button hold
* on a flip selector widget.
*
* @param obj The flip selector object
* @return The (first) interval value, in seconds, set on it
*
* @see elm_flipselector_first_interval_set() for more details
*
* @ingroup Flipselector
*/
EAPI double elm_flipselector_first_interval_get(const Evas_Object *obj);

View File

@ -47,154 +47,12 @@
* @{
*/
#define ELM_OBJ_FRAME_CLASS elm_obj_frame_class_get()
const Eo_Class *elm_obj_frame_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FRAME_BASE_ID;
enum
{
ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_SET,
ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_GET,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_SET,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GO,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GET,
ELM_OBJ_FRAME_SUB_ID_LAST
};
#define ELM_OBJ_FRAME_ID(sub_id) (ELM_OBJ_FRAME_BASE_ID + sub_id)
/**
* @def elm_obj_frame_autocollapse_set
* @since 1.8
*
* @brief Toggle autocollapsing of a frame
*
* @param[in] autocollapse
*
* @see elm_frame_autocollapse_set
*/
#define elm_obj_frame_autocollapse_set(autocollapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_SET), EO_TYPECHECK(Eina_Bool, autocollapse)
/**
* @def elm_obj_frame_autocollapse_get
* @since 1.8
*
* @brief Determine autocollapsing of a frame
*
* @param[out] ret
*
* @see elm_frame_autocollapse_get
*/
#define elm_obj_frame_autocollapse_get(ret) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_frame_collapse_set
* @since 1.8
*
* @brief Manually collapse a frame without animations
*
* @param[in] collapse
*
* @see elm_frame_collapse_set
*/
#define elm_obj_frame_collapse_set(collapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_SET), EO_TYPECHECK(Eina_Bool, collapse)
/**
* @def elm_obj_frame_collapse_go
* @since 1.8
*
* @brief Manually collapse a frame with animations
*
* @param[in] collapse
*
* @see elm_frame_collapse_go
*/
#define elm_obj_frame_collapse_go(collapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GO), EO_TYPECHECK(Eina_Bool, collapse)
/**
* @def elm_obj_frame_collapse_get
* @since 1.8
*
* @brief Determine the collapse state of a frame
*
* @param[out] ret
*
* @see elm_frame_collapse_get
*/
#define elm_obj_frame_collapse_get(ret) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @brief Add a new frame to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Frame
*/
EAPI Evas_Object *elm_frame_add(Evas_Object *parent);
/**
* @brief Toggle autocollapsing of a frame
* @param obj The frame
* @param autocollapse Whether to enable autocollapse
*
* When @p enable is EINA_TRUE, clicking a frame's label will collapse the frame
* vertically, shrinking it to the height of the label.
* By default, this is DISABLED.
*
* @ingroup Frame
*/
EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse);
/**
* @brief Determine autocollapsing of a frame
* @param obj The frame
* @return Whether autocollapse is enabled
*
* When this returns EINA_TRUE, clicking a frame's label will collapse the frame
* vertically, shrinking it to the height of the label.
* By default, this is DISABLED.
*
* @ingroup Frame
*/
EAPI Eina_Bool elm_frame_autocollapse_get(const Evas_Object *obj);
/**
* @brief Manually collapse a frame without animations
* @param obj The frame
* @param collapse true to collapse, false to expand
*
* Use this to toggle the collapsed state of a frame, bypassing animations.
*
* @ingroup Frame
*/
EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse);
/**
* @brief Determine the collapse state of a frame
* @param obj The frame
* @return true if collapsed, false otherwise
*
* Use this to determine the collapse state of a frame.
*
* @ingroup Frame
*/
EAPI Eina_Bool elm_frame_collapse_get(const Evas_Object *obj);
/**
* @brief Manually collapse a frame with animations
* @param obj The frame
* @param collapse true to collapse, false to expand
*
* Use this to toggle the collapsed state of a frame, triggering animations.
*
* @ingroup Frame
*/
EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse);
#ifdef EFL_EO_API_SUPPORT
#include "elm_frame_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_frame_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,86 @@
#define ELM_OBJ_FRAME_CLASS elm_obj_frame_class_get()
const Eo_Class *elm_obj_frame_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_FRAME_BASE_ID;
enum
{
ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_SET,
ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_GET,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_SET,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GO,
ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GET,
ELM_OBJ_FRAME_SUB_ID_LAST
};
#define ELM_OBJ_FRAME_ID(sub_id) (ELM_OBJ_FRAME_BASE_ID + sub_id)
/**
* @def elm_obj_frame_autocollapse_set
* @since 1.8
*
* @brief Toggle autocollapsing of a frame
*
* @param[in] autocollapse
*
* @see elm_frame_autocollapse_set
*
* @ingroup Frame
*/
#define elm_obj_frame_autocollapse_set(autocollapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_SET), EO_TYPECHECK(Eina_Bool, autocollapse)
/**
* @def elm_obj_frame_autocollapse_get
* @since 1.8
*
* @brief Determine autocollapsing of a frame
*
* @param[out] ret
*
* @see elm_frame_autocollapse_get
*
* @ingroup Frame
*/
#define elm_obj_frame_autocollapse_get(ret) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_AUTOCOLLAPSE_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_frame_collapse_set
* @since 1.8
*
* @brief Manually collapse a frame without animations
*
* @param[in] collapse
*
* @see elm_frame_collapse_set
*
* @ingroup Frame
*/
#define elm_obj_frame_collapse_set(collapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_SET), EO_TYPECHECK(Eina_Bool, collapse)
/**
* @def elm_obj_frame_collapse_go
* @since 1.8
*
* @brief Manually collapse a frame with animations
*
* @param[in] collapse
*
* @see elm_frame_collapse_go
*/
#define elm_obj_frame_collapse_go(collapse) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GO), EO_TYPECHECK(Eina_Bool, collapse)
/**
* @def elm_obj_frame_collapse_get
* @since 1.8
*
* @brief Determine the collapse state of a frame
*
* @param[out] ret
*
* @see elm_frame_collapse_get
*
* @ingroup Frame
*/
#define elm_obj_frame_collapse_get(ret) ELM_OBJ_FRAME_ID(ELM_OBJ_FRAME_SUB_ID_COLLAPSE_GET), EO_TYPECHECK(Eina_Bool *, ret)

View File

@ -0,0 +1,68 @@
/**
* @brief Add a new frame to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Frame
*/
EAPI Evas_Object *elm_frame_add(Evas_Object *parent);
/**
* @brief Toggle autocollapsing of a frame
* @param obj The frame
* @param autocollapse Whether to enable autocollapse
*
* When @p enable is EINA_TRUE, clicking a frame's label will collapse the frame
* vertically, shrinking it to the height of the label.
* By default, this is DISABLED.
*
* @ingroup Frame
*/
EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse);
/**
* @brief Determine autocollapsing of a frame
* @param obj The frame
* @return Whether autocollapse is enabled
*
* When this returns EINA_TRUE, clicking a frame's label will collapse the frame
* vertically, shrinking it to the height of the label.
* By default, this is DISABLED.
*
* @ingroup Frame
*/
EAPI Eina_Bool elm_frame_autocollapse_get(const Evas_Object *obj);
/**
* @brief Manually collapse a frame without animations
* @param obj The frame
* @param collapse true to collapse, false to expand
*
* Use this to toggle the collapsed state of a frame, bypassing animations.
*
* @ingroup Frame
*/
EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse);
/**
* @brief Manually collapse a frame with animations
* @param obj The frame
* @param collapse true to collapse, false to expand
*
* Use this to toggle the collapsed state of a frame, triggering animations.
*
* @ingroup Frame
*/
EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse);
/**
* @brief Determine the collapse state of a frame
* @param obj The frame
* @return true if collapsed, false otherwise
*
* Use this to determine the collapse state of a frame.
*
* @ingroup Frame
*/
EAPI Eina_Bool elm_frame_collapse_get(const Evas_Object *obj);

View File

@ -67,621 +67,13 @@
*
*/
#define ELM_OBJ_GESTURE_LAYER_CLASS elm_obj_gesture_layer_class_get()
const Eo_Class *elm_obj_gesture_layer_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_GESTURE_LAYER_BASE_ID;
enum
{
ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ATTACH,
ELM_OBJ_GESTURE_LAYER_SUB_ID_CB_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_LAST
};
#define ELM_OBJ_GESTURE_LAYER_ID(sub_id) (ELM_OBJ_GESTURE_LAYER_BASE_ID + sub_id)
/**
* @def elm_obj_gesture_layer_hold_events_get
* @since 1.8
*
* Call this function to get repeat-events settings.
*
* @param[out] ret
*
* @see elm_gesture_layer_hold_events_get
*/
#define elm_obj_gesture_layer_hold_events_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_gesture_layer_hold_events_set
* @since 1.8
*
* This function is to make gesture-layer repeat events.
*
* @param[in] hold_events
*
* @see elm_gesture_layer_hold_events_set
*/
#define elm_obj_gesture_layer_hold_events_set(hold_events) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_SET), EO_TYPECHECK(Eina_Bool, hold_events)
/**
* @def elm_obj_gesture_layer_zoom_step_get
* @since 1.8
*
* This function returns step-value for zoom action.
*
* @param[out] ret
*
* @see elm_gesture_layer_zoom_step_get
*/
#define elm_obj_gesture_layer_zoom_step_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_gesture_layer_zoom_step_set
* @since 1.8
*
* This function sets step-value for zoom action.
*
* @param[in] step
*
* @see elm_gesture_layer_zoom_step_set
*/
#define elm_obj_gesture_layer_zoom_step_set(step) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_SET), EO_TYPECHECK(double, step)
/**
* @def elm_obj_gesture_layer_rotate_step_get
* @since 1.8
*
* This function returns step-value for rotate action.
*
* @param[out] ret
*
* @see elm_gesture_layer_rotate_step_get
*/
#define elm_obj_gesture_layer_rotate_step_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_gesture_layer_rotate_step_set
* @since 1.8
*
* This function sets step-value for rotate action.
*
* @param[in] step
*
* @see elm_gesture_layer_rotate_step_set
*/
#define elm_obj_gesture_layer_rotate_step_set(step) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_SET), EO_TYPECHECK(double, step)
/**
* @def elm_obj_gesture_layer_attach
* @since 1.8
*
* Attach a given gesture layer widget to an Evas object, thus setting
* the widget's @b target.
*
* @param[in] target
* @param[out] ret
*
* @see elm_gesture_layer_attach
*/
#define elm_obj_gesture_layer_attach(target, ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ATTACH), EO_TYPECHECK(Evas_Object *, target), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_gesture_layer_cb_set
* @since 1.8
*
* Use function to set callbacks to be notified about
* change of state of gesture.
*
* @param[in] idx
* @param[in] cb_type
* @param[in] cb
* @param[in] data
*
* @see elm_gesture_layer_cb_set
*/
#define elm_obj_gesture_layer_cb_set(idx, cb_type, cb, data) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_CB_SET), EO_TYPECHECK(Elm_Gesture_Type, idx), EO_TYPECHECK(Elm_Gesture_State, cb_type), EO_TYPECHECK(Elm_Gesture_Event_Cb, cb), EO_TYPECHECK(void *, data)
/**
* @enum _Elm_Gesture_Type
* Enum of supported gesture types.
*/
enum _Elm_Gesture_Type
{
ELM_GESTURE_FIRST = 0,
ELM_GESTURE_N_TAPS, /**< N fingers single taps */
ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */
ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */
ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */
ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */
ELM_GESTURE_N_LINES, /**< N fingers line gesture */
ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */
ELM_GESTURE_ZOOM, /**< Zoom */
ELM_GESTURE_ROTATE, /**< Rotate */
ELM_GESTURE_LAST
};
/**
* @typedef Elm_Gesture_Type
* Convenient macro around #_Elm_Gesture_Type
*/
typedef enum _Elm_Gesture_Type Elm_Gesture_Type;
/**
* @enum _Elm_Gesture_State
* Enum of gesture states.
*/
enum _Elm_Gesture_State
{
ELM_GESTURE_STATE_UNDEFINED = -1, /**< Gesture not STARTed */
ELM_GESTURE_STATE_START, /**< Gesture STARTed */
ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */
ELM_GESTURE_STATE_END, /**< Gesture completed */
ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was ABORTed */
};
/**
* @typedef Elm_Gesture_State
* Convenient macro around #_Elm_Gesture_State
*/
typedef enum _Elm_Gesture_State Elm_Gesture_State;
/**
* @struct _Elm_Gesture_Taps_Info
* Struct holds taps info for user
*/
struct _Elm_Gesture_Taps_Info
{
Evas_Coord x, y; /**< Holds center point between fingers */
unsigned int n; /**< Number of fingers tapped */
unsigned int timestamp; /**< event timestamp */
};
/**
* @typedef Elm_Gesture_Taps_Info
* holds taps info for user
*/
typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info;
/**
* @struct _Elm_Gesture_Momentum_Info
* Struct holds momentum info for user
* x1 and y1 are not necessarily in sync
* x1 holds x value of x direction starting point
* and same holds for y1.
* This is noticeable when doing V-shape movement
*/
struct _Elm_Gesture_Momentum_Info /* Report line ends, timestamps, and momentum computed */
{Evas_Coord x1; /**< Final-swipe direction starting point on X */
Evas_Coord y1; /**< Final-swipe direction starting point on Y */
Evas_Coord x2; /**< Final-swipe direction ending point on X */
Evas_Coord y2; /**< Final-swipe direction ending point on Y */
unsigned int tx; /**< Timestamp of start of final x-swipe */
unsigned int ty; /**< Timestamp of start of final y-swipe */
Evas_Coord mx; /**< Momentum on X */
Evas_Coord my; /**< Momentum on Y */
unsigned int n; /**< Number of fingers */
};
/**
* @typedef Elm_Gesture_Momentum_Info
* holds momentum info for user
*/
typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info;
/**
* @struct _Elm_Gesture_Line_Info
* Struct holds line info for user
*/
struct _Elm_Gesture_Line_Info /* Report line ends, timestamps, and momentum computed */
{Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */
double angle; /**< Angle (direction) of lines */
};
/**
* @typedef Elm_Gesture_Line_Info
* Holds line info for user
*/
typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info;
/**
* @struct _Elm_Gesture_Zoom_Info
* Struct holds zoom info for user
*/
struct _Elm_Gesture_Zoom_Info
{
Evas_Coord x, y; /**< Holds zoom center point reported to user */
Evas_Coord radius; /**< Holds radius between fingers reported to user */
double zoom; /**< Zoom value: 1.0 means no zoom */
double momentum; /**< Zoom momentum: zoom growth per second (NOT YET SUPPORTED) */
};
/**
* @typedef Elm_Gesture_Zoom_Info
* Holds zoom info for user
*/
typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info;
/**
* @struct _Elm_Gesture_Rotate_Info
* Struct holds rotation info for user
*/
struct _Elm_Gesture_Rotate_Info
{
Evas_Coord x, y; /**< Holds zoom center point reported to user */
Evas_Coord radius; /**< Holds radius between fingers reported to user */
double base_angle; /**< Holds start-angle */
double angle; /**< Rotation value: 0.0 means no rotation */
double momentum; /**< Rotation momentum: rotation done per second (NOT YET SUPPORTED) */
};
/**
* @typedef Elm_Gesture_Rotate_Info
* Holds rotation info for user
*/
typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info;
/**
* @typedef Elm_Gesture_Event_Cb
* User callback used to stream gesture info from gesture layer
* @param data user data
* @param event_info gesture report info
* Returns a flag field to be applied on the causing event.
* You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted
* upon the event, in an irreversible way.
*
*/
typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info);
/**
* Use function to set callbacks to be notified about
* change of state of gesture.
* When a user registers a callback with this function
* this means this gesture has to be tested.
*
* When ALL callbacks for a gesture are set to NULL
* it means user isn't interested in gesture-state
* and it will not be tested.
*
* @param obj gesture-layer.
* @param idx The gesture you would like to track its state.
* @param cb callback function pointer.
* @param cb_type what event this callback tracks: START, MOVE, END, ABORT.
* @param data user info to be sent to callback (usually, Smart Data)
*
*/
EAPI void elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);
/**
* Call this function to get repeat-events settings.
*
* @param obj gesture-layer.
*
* @return repeat events settings.
* @see elm_gesture_layer_hold_events_set()
*/
EAPI Eina_Bool elm_gesture_layer_hold_events_get(const Evas_Object *obj);
/**
* This function is to make gesture-layer repeat events.
* Set this if you like to get the raw events only if gestures were not
* detected.
* Clear this if you like gesture layer to forward events as testing gestures.
*
* @param obj gesture layer.
* @param hold_events hold events or not.
*
*/
EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool hold_events);
/**
* This function sets step-value for zoom action.
* Set step to any positive value.
* Cancel step setting by setting to 0
*
* @param obj gesture-layer.
* @param step new zoom step value.
*
* @see elm_gesture_layer_zoom_step_get()
*/
EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double step);
/**
* This function returns step-value for zoom action.
*
* @param obj gesture-layer.
* @return zoom step value.
*
* @see elm_gesture_layer_zoom_step_set()
*/
EAPI double elm_gesture_layer_zoom_step_get(const Evas_Object *obj);
/**
* This function sets step-value for rotate action.
* Set step to any positive value.
* Cancel step setting by setting to 0
*
* @param obj gesture-layer.
* @param step new rotate step value.
*
*/
EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double step);
/**
* This function returns step-value for rotate action.
*
* @param obj gesture-layer.
* @return rotate step value.
*
*/
EAPI double elm_gesture_layer_rotate_step_get(const Evas_Object *obj);
/**
* Attach a given gesture layer widget to an Evas object, thus setting
* the widget's @b target.
*
* @param obj A gesture layer to attach an object to.
* @param target Object to attach to @a obj (target)
*
* A gesture layer target may be whichever Evas object one
* chooses. This will be object @a obj will listen all mouse and key
* events from, to report the gestures made upon it back.
*
* @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise.
*
*/
EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *target);
/**
* Call this function to construct a new gesture-layer object.
*
* @param parent The gesture layer's parent widget.
*
* @return A new gesture layer object.
*
* This does not activate the gesture layer. You have to
* call elm_gesture_layer_attach() in order to 'activate' gesture-layer.
*
*/
EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent);
/**
* @since 1.8
* This function sets the gesture layer line min length of an object
*
* @param obj gesture-layer.
* @param line_min_length the length.
*
*/
EAPI void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length);
/**
* @since 1.8
* This function returns the gesture layer line min length of an object
*
* @param obj gesture-layer.
* @return the length.
*
*/
EAPI int elm_gesture_layer_line_min_length_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom distance tolerance of an object
*
* @param obj gesture-layer.
* @param zoom_distance_tolerance zoom distance tolerance
*
*/
EAPI void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance);
/**
* @since 1.8
* This function returns the gesture layer zoom distance tolerance of an object
*
* @param obj gesture-layer.
* @return zoom distance tolerance
*
*/
EAPI Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer line distance tolerance of an object
*
* @param obj gesture-layer.
* @param line_distance_tolerance line distance tolerance
*
*/
EAPI void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance);
/**
* @since 1.8
* This function returns the gesture layer line distance tolerance of an object
*
* @param obj gesture-layer.
* @return line distance tolerance
*
*/
EAPI Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer line angular tolerance of an object
*
* @param obj gesture-layer.
* @param line_angular_tolerance line angular tolerance
*
*/
EAPI void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance);
/**
* @since 1.8
* This function returns the gesture layer line angular tolerance of an object
*
* @param obj gesture-layer.
* @return line angular tolerance
*
*/
EAPI double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom wheel factor of an object
*
* @param obj gesture-layer.
* @param zoom_wheel_factor zoom wheel factor
*
*/
EAPI void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor);
/**
* @since 1.8
* This function returns the gesture layer zoom wheel factor of an object
*
* @param obj gesture-layer.
* @return zoom wheel factor
*
*/
EAPI double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom finger factor of an object
*
* @param obj gesture-layer.
* @param zoom_finger_factor zoom finger factor
*
*/
EAPI void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor);
/**
* @since 1.8
* This function returns the gesture layer zoom finger factor of an object
*
* @param obj gesture-layer.
* @return zoom finger factor
*
*/
EAPI double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer rotate angular tolerance of an object
*
* @param obj gesture-layer.
* @param rotate_angular_tolerance rotate angular tolerance
*
*/
EAPI void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance);
/**
* @since 1.8
* This function returns the gesture layer rotate angular tolerance of an object
*
* @param obj gesture-layer.
* @return rotate angular tolerance
*
*/
EAPI double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer flick time limit (in ms) of an object
*
* @param obj gesture-layer.
* @param flick_time_limit_ms flick time limit (in ms)
*
*/
EAPI void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms);
/**
* @since 1.8
* This function returns the gesture layer flick time limit (in ms) of an object
*
* @param obj gesture-layer.
* @return flick time limit (in ms)
*
*/
EAPI unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer long tap start timeout of an object
*
* @param obj gesture-layer.
* @param long_tap_start_timeout long tap start timeout
*
*/
EAPI void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout);
/**
* @since 1.8
* this function returns the gesture layer long tap start timeout of an object
*
* @param obj gesture-layer.
* @return long tap start timeout
*
*/
EAPI double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer continues enable of an object
*
* @param obj gesture-layer.
* @param continues_enable continues enable
*
*/
EAPI void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable);
/**
* @since 1.8
* This function returns the gesture layer continues enable of an object
*
* @param obj gesture-layer.
* @return continues enable
*
*/
EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer double tap timeout of an object
*
* @param obj gesture-layer.
* @param double_tap_timeout double tap timeout
*
*/
EAPI void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout);
/**
* @since 1.8
* this function returns the gesture layer double tap timeout of an object
*
* @param obj gesture-layer.
* @return double tap timeout
*
*/
EAPI double elm_gesture_layer_double_tap_timeout_get(const Evas_Object *obj);
#include "elm_gesture_layer_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_gesture_layer_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_gesture_layer_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,379 @@
/**
* @enum _Elm_Gesture_Type
* Enum of supported gesture types.
*/
enum _Elm_Gesture_Type
{
ELM_GESTURE_FIRST = 0,
ELM_GESTURE_N_TAPS, /**< N fingers single taps */
ELM_GESTURE_N_LONG_TAPS, /**< N fingers single long-taps */
ELM_GESTURE_N_DOUBLE_TAPS, /**< N fingers double-single taps */
ELM_GESTURE_N_TRIPLE_TAPS, /**< N fingers triple-single taps */
ELM_GESTURE_MOMENTUM, /**< Reports momentum in the direction of move */
ELM_GESTURE_N_LINES, /**< N fingers line gesture */
ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */
ELM_GESTURE_ZOOM, /**< Zoom */
ELM_GESTURE_ROTATE, /**< Rotate */
ELM_GESTURE_LAST
};
/**
* @typedef Elm_Gesture_Type
* Convenient macro around #_Elm_Gesture_Type
*/
typedef enum _Elm_Gesture_Type Elm_Gesture_Type;
/**
* @enum _Elm_Gesture_State
* Enum of gesture states.
*/
enum _Elm_Gesture_State
{
ELM_GESTURE_STATE_UNDEFINED = -1, /**< Gesture not STARTed */
ELM_GESTURE_STATE_START, /**< Gesture STARTed */
ELM_GESTURE_STATE_MOVE, /**< Gesture is ongoing */
ELM_GESTURE_STATE_END, /**< Gesture completed */
ELM_GESTURE_STATE_ABORT /**< Ongoing gesture was ABORTed */
};
/**
* @typedef Elm_Gesture_State
* Convenient macro around #_Elm_Gesture_State
*/
typedef enum _Elm_Gesture_State Elm_Gesture_State;
/**
* @struct _Elm_Gesture_Taps_Info
* Struct holds taps info for user
*/
struct _Elm_Gesture_Taps_Info
{
Evas_Coord x, y; /**< Holds center point between fingers */
unsigned int n; /**< Number of fingers tapped */
unsigned int timestamp; /**< event timestamp */
};
/**
* @typedef Elm_Gesture_Taps_Info
* holds taps info for user
*/
typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info;
/**
* @struct _Elm_Gesture_Momentum_Info
* Struct holds momentum info for user
* x1 and y1 are not necessarily in sync
* x1 holds x value of x direction starting point
* and same holds for y1.
* This is noticeable when doing V-shape movement
*/
struct _Elm_Gesture_Momentum_Info /* Report line ends, timestamps, and momentum computed */
{Evas_Coord x1; /**< Final-swipe direction starting point on X */
Evas_Coord y1; /**< Final-swipe direction starting point on Y */
Evas_Coord x2; /**< Final-swipe direction ending point on X */
Evas_Coord y2; /**< Final-swipe direction ending point on Y */
unsigned int tx; /**< Timestamp of start of final x-swipe */
unsigned int ty; /**< Timestamp of start of final y-swipe */
Evas_Coord mx; /**< Momentum on X */
Evas_Coord my; /**< Momentum on Y */
unsigned int n; /**< Number of fingers */
};
/**
* @typedef Elm_Gesture_Momentum_Info
* holds momentum info for user
*/
typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info;
/**
* @struct _Elm_Gesture_Line_Info
* Struct holds line info for user
*/
struct _Elm_Gesture_Line_Info /* Report line ends, timestamps, and momentum computed */
{Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */
double angle; /**< Angle (direction) of lines */
};
/**
* @typedef Elm_Gesture_Line_Info
* Holds line info for user
*/
typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info;
/**
* @struct _Elm_Gesture_Zoom_Info
* Struct holds zoom info for user
*/
struct _Elm_Gesture_Zoom_Info
{
Evas_Coord x, y; /**< Holds zoom center point reported to user */
Evas_Coord radius; /**< Holds radius between fingers reported to user */
double zoom; /**< Zoom value: 1.0 means no zoom */
double momentum; /**< Zoom momentum: zoom growth per second (NOT YET SUPPORTED) */
};
/**
* @typedef Elm_Gesture_Zoom_Info
* Holds zoom info for user
*/
typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info;
/**
* @struct _Elm_Gesture_Rotate_Info
* Struct holds rotation info for user
*/
struct _Elm_Gesture_Rotate_Info
{
Evas_Coord x, y; /**< Holds zoom center point reported to user */
Evas_Coord radius; /**< Holds radius between fingers reported to user */
double base_angle; /**< Holds start-angle */
double angle; /**< Rotation value: 0.0 means no rotation */
double momentum; /**< Rotation momentum: rotation done per second (NOT YET SUPPORTED) */
};
/**
* @typedef Elm_Gesture_Rotate_Info
* Holds rotation info for user
*/
typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info;
/**
* @typedef Elm_Gesture_Event_Cb
* User callback used to stream gesture info from gesture layer
* @param data user data
* @param event_info gesture report info
* Returns a flag field to be applied on the causing event.
* You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted
* upon the event, in an irreversible way.
*
*/
typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info);
/**
* @since 1.8
* This function sets the gesture layer line min length of an object
*
* @param obj gesture-layer.
* @param line_min_length the length.
*
*/
EAPI void elm_gesture_layer_line_min_length_set(Evas_Object *obj, int line_min_length);
/**
* @since 1.8
* This function returns the gesture layer line min length of an object
*
* @param obj gesture-layer.
* @return the length.
*
*/
EAPI int elm_gesture_layer_line_min_length_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom distance tolerance of an object
*
* @param obj gesture-layer.
* @param zoom_distance_tolerance zoom distance tolerance
*
*/
EAPI void elm_gesture_layer_zoom_distance_tolerance_set(Evas_Object *obj, Evas_Coord zoom_distance_tolerance);
/**
* @since 1.8
* This function returns the gesture layer zoom distance tolerance of an object
*
* @param obj gesture-layer.
* @return zoom distance tolerance
*
*/
EAPI Evas_Coord elm_gesture_layer_zoom_distance_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer line distance tolerance of an object
*
* @param obj gesture-layer.
* @param line_distance_tolerance line distance tolerance
*
*/
EAPI void elm_gesture_layer_line_distance_tolerance_set(Evas_Object *obj, Evas_Coord line_distance_tolerance);
/**
* @since 1.8
* This function returns the gesture layer line distance tolerance of an object
*
* @param obj gesture-layer.
* @return line distance tolerance
*
*/
EAPI Evas_Coord elm_gesture_layer_line_distance_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer line angular tolerance of an object
*
* @param obj gesture-layer.
* @param line_angular_tolerance line angular tolerance
*
*/
EAPI void elm_gesture_layer_line_angular_tolerance_set(Evas_Object *obj, double line_angular_tolerance);
/**
* @since 1.8
* This function returns the gesture layer line angular tolerance of an object
*
* @param obj gesture-layer.
* @return line angular tolerance
*
*/
EAPI double elm_gesture_layer_line_angular_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom wheel factor of an object
*
* @param obj gesture-layer.
* @param zoom_wheel_factor zoom wheel factor
*
*/
EAPI void elm_gesture_layer_zoom_wheel_factor_set(Evas_Object *obj, double zoom_wheel_factor);
/**
* @since 1.8
* This function returns the gesture layer zoom wheel factor of an object
*
* @param obj gesture-layer.
* @return zoom wheel factor
*
*/
EAPI double elm_gesture_layer_zoom_wheel_factor_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer zoom finger factor of an object
*
* @param obj gesture-layer.
* @param zoom_finger_factor zoom finger factor
*
*/
EAPI void elm_gesture_layer_zoom_finger_factor_set(Evas_Object *obj, double zoom_finger_factor);
/**
* @since 1.8
* This function returns the gesture layer zoom finger factor of an object
*
* @param obj gesture-layer.
* @return zoom finger factor
*
*/
EAPI double elm_gesture_layer_zoom_finger_factor_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer rotate angular tolerance of an object
*
* @param obj gesture-layer.
* @param rotate_angular_tolerance rotate angular tolerance
*
*/
EAPI void elm_gesture_layer_rotate_angular_tolerance_set(Evas_Object *obj, double rotate_angular_tolerance);
/**
* @since 1.8
* This function returns the gesture layer rotate angular tolerance of an object
*
* @param obj gesture-layer.
* @return rotate angular tolerance
*
*/
EAPI double elm_gesture_layer_rotate_angular_tolerance_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer flick time limit (in ms) of an object
*
* @param obj gesture-layer.
* @param flick_time_limit_ms flick time limit (in ms)
*
*/
EAPI void elm_gesture_layer_flick_time_limit_ms_set(Evas_Object *obj, unsigned int flick_time_limit_ms);
/**
* @since 1.8
* This function returns the gesture layer flick time limit (in ms) of an object
*
* @param obj gesture-layer.
* @return flick time limit (in ms)
*
*/
EAPI unsigned int elm_gesture_layer_flick_time_limit_ms_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer long tap start timeout of an object
*
* @param obj gesture-layer.
* @param long_tap_start_timeout long tap start timeout
*
*/
EAPI void elm_gesture_layer_long_tap_start_timeout_set(Evas_Object *obj, double long_tap_start_timeout);
/**
* @since 1.8
* this function returns the gesture layer long tap start timeout of an object
*
* @param obj gesture-layer.
* @return long tap start timeout
*
*/
EAPI double elm_gesture_layer_long_tap_start_timeout_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer continues enable of an object
*
* @param obj gesture-layer.
* @param continues_enable continues enable
*
*/
EAPI void elm_gesture_layer_continues_enable_set(Evas_Object *obj, Eina_Bool continues_enable);
/**
* @since 1.8
* This function returns the gesture layer continues enable of an object
*
* @param obj gesture-layer.
* @return continues enable
*
*/
EAPI Eina_Bool elm_gesture_layer_continues_enable_get(const Evas_Object *obj);
/**
* @since 1.8
* This function sets the gesture layer double tap timeout of an object
*
* @param obj gesture-layer.
* @param double_tap_timeout double tap timeout
*
*/
EAPI void elm_gesture_layer_double_tap_timeout_set(Evas_Object *obj, double double_tap_timeout);
/**
* @since 1.8
* this function returns the gesture layer double tap timeout of an object
*
* @param obj gesture-layer.
* @return double tap timeout
*
*/
EAPI double elm_gesture_layer_double_tap_timeout_get(const Evas_Object *obj);

View File

@ -0,0 +1,139 @@
#define ELM_OBJ_GESTURE_LAYER_CLASS elm_obj_gesture_layer_class_get()
const Eo_Class *elm_obj_gesture_layer_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_GESTURE_LAYER_BASE_ID;
enum
{
ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_GET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_ATTACH,
ELM_OBJ_GESTURE_LAYER_SUB_ID_CB_SET,
ELM_OBJ_GESTURE_LAYER_SUB_ID_LAST
};
#define ELM_OBJ_GESTURE_LAYER_ID(sub_id) (ELM_OBJ_GESTURE_LAYER_BASE_ID + sub_id)
/**
* @def elm_obj_gesture_layer_hold_events_get
* @since 1.8
*
* Call this function to get repeat-events settings.
*
* @param[out] ret
*
* @see elm_gesture_layer_hold_events_get
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_hold_events_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_gesture_layer_hold_events_set
* @since 1.8
*
* This function is to make gesture-layer repeat events.
*
* @param[in] hold_events
*
* @see elm_gesture_layer_hold_events_set
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_hold_events_set(hold_events) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_HOLD_EVENTS_SET), EO_TYPECHECK(Eina_Bool, hold_events)
/**
* @def elm_obj_gesture_layer_zoom_step_get
* @since 1.8
*
* This function returns step-value for zoom action.
*
* @param[out] ret
*
* @see elm_gesture_layer_zoom_step_get
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_zoom_step_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_gesture_layer_zoom_step_set
* @since 1.8
*
* This function sets step-value for zoom action.
*
* @param[in] step
*
* @see elm_gesture_layer_zoom_step_set
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_zoom_step_set(step) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ZOOM_STEP_SET), EO_TYPECHECK(double, step)
/**
* @def elm_obj_gesture_layer_rotate_step_get
* @since 1.8
*
* This function returns step-value for rotate action.
*
* @param[out] ret
*
* @see elm_gesture_layer_rotate_step_get
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_rotate_step_get(ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_gesture_layer_rotate_step_set
* @since 1.8
*
* This function sets step-value for rotate action.
*
* @param[in] step
*
* @see elm_gesture_layer_rotate_step_set
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_rotate_step_set(step) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ROTATE_STEP_SET), EO_TYPECHECK(double, step)
/**
* @def elm_obj_gesture_layer_attach
* @since 1.8
*
* Attach a given gesture layer widget to an Evas object, thus setting
* the widget's @b target.
*
* @param[in] target
* @param[out] ret
*
* @see elm_gesture_layer_attach
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_attach(target, ret) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_ATTACH), EO_TYPECHECK(Evas_Object *, target), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_gesture_layer_cb_set
* @since 1.8
*
* Use function to set callbacks to be notified about
* change of state of gesture.
*
* @param[in] idx
* @param[in] cb_type
* @param[in] cb
* @param[in] data
*
* @see elm_gesture_layer_cb_set
*
* @ingroup Elm_Gesture_Layer
*/
#define elm_obj_gesture_layer_cb_set(idx, cb_type, cb, data) ELM_OBJ_GESTURE_LAYER_ID(ELM_OBJ_GESTURE_LAYER_SUB_ID_CB_SET), EO_TYPECHECK(Elm_Gesture_Type, idx), EO_TYPECHECK(Elm_Gesture_State, cb_type), EO_TYPECHECK(Elm_Gesture_Event_Cb, cb), EO_TYPECHECK(void *, data)

View File

@ -0,0 +1,111 @@
/**
* Call this function to construct a new gesture-layer object.
*
* @param parent The gesture layer's parent widget.
*
* @return A new gesture layer object.
*
* This does not activate the gesture layer. You have to
* call elm_gesture_layer_attach() in order to 'activate' gesture-layer.
*
*/
EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent);
/**
* Call this function to get repeat-events settings.
*
* @param obj gesture-layer.
*
* @return repeat events settings.
* @see elm_gesture_layer_hold_events_set()
*/
EAPI Eina_Bool elm_gesture_layer_hold_events_get(const Evas_Object *obj);
/**
* This function is to make gesture-layer repeat events.
* Set this if you like to get the raw events only if gestures were not
* detected.
* Clear this if you like gesture layer to forward events as testing gestures.
*
* @param obj gesture layer.
* @param hold_events hold events or not.
*
*/
EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool hold_events);
/**
* This function returns step-value for zoom action.
*
* @param obj gesture-layer.
* @return zoom step value.
*
* @see elm_gesture_layer_zoom_step_set()
*/
EAPI double elm_gesture_layer_zoom_step_get(const Evas_Object *obj);
/**
* This function sets step-value for zoom action.
* Set step to any positive value.
* Cancel step setting by setting to 0
*
* @param obj gesture-layer.
* @param step new zoom step value.
*
* @see elm_gesture_layer_zoom_step_get()
*/
EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double step);
/**
* This function returns step-value for rotate action.
*
* @param obj gesture-layer.
* @return rotate step value.
*
*/
EAPI double elm_gesture_layer_rotate_step_get(const Evas_Object *obj);
/**
* This function sets step-value for rotate action.
* Set step to any positive value.
* Cancel step setting by setting to 0
*
* @param obj gesture-layer.
* @param step new rotate step value.
*
*/
EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double step);
/**
* Attach a given gesture layer widget to an Evas object, thus setting
* the widget's @b target.
*
* @param obj A gesture layer to attach an object to.
* @param target Object to attach to @a obj (target)
*
* A gesture layer target may be whichever Evas object one
* chooses. This will be object @a obj will listen all mouse and key
* events from, to report the gestures made upon it back.
*
* @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise.
*
*/
EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *target);
/**
* Use function to set callbacks to be notified about
* change of state of gesture.
* When a user registers a callback with this function
* this means this gesture has to be tested.
*
* When ALL callbacks for a gesture are set to NULL
* it means user isn't interested in gesture-state
* and it will not be tested.
*
* @param obj gesture-layer.
* @param idx The gesture you would like to track its state.
* @param cb callback function pointer.
* @param cb_type what event this callback tracks: START, MOVE, END, ABORT.
* @param data user info to be sent to callback (usually, Smart Data)
*
*/
EAPI void elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Type idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data);

View File

@ -25,382 +25,14 @@
/**
* @ingroup GLView
*/
#define ELM_OBJ_GLVIEW_CLASS elm_obj_glview_class_get()
const Eo_Class *elm_obj_glview_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_GLVIEW_BASE_ID;
enum
{
ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET,
ELM_OBJ_GLVIEW_SUB_ID_MODE_SET,
ELM_OBJ_GLVIEW_SUB_ID_RESIZE_POLICY_SET,
ELM_OBJ_GLVIEW_SUB_ID_RENDER_POLICY_SET,
ELM_OBJ_GLVIEW_SUB_ID_SIZE_SET,
ELM_OBJ_GLVIEW_SUB_ID_SIZE_GET,
ELM_OBJ_GLVIEW_SUB_ID_INIT_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_DEL_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_RESIZE_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_RENDER_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_CHANGED_SET,
ELM_OBJ_GLVIEW_SUB_ID_LAST
};
#define ELM_OBJ_GLVIEW_ID(sub_id) (ELM_OBJ_GLVIEW_BASE_ID + sub_id)
/**
* @def elm_obj_glview_gl_api_get
* @since 1.8
*
* Gets the gl api struct for gl rendering
*
* @param[out] ret
*
* @see elm_glview_gl_api_get
*/
#define elm_obj_glview_gl_api_get(ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET), EO_TYPECHECK(Evas_GL_API **, ret)
/**
* @def elm_obj_glview_mode_set
* @since 1.8
*
* Set the mode of the GLView. Supports alpha, depth, stencil.
*
* @param[in] mode
* @param[out] ret
*
* @see elm_glview_mode_set
*/
#define elm_obj_glview_mode_set(mode, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_GLView_Mode, mode), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_resize_policy_set
* @since 1.8
*
* Set the resize policy for the glview object.
*
* @param[in] policy
* @param[out] ret
*
* @see elm_glview_resize_policy_set
*/
#define elm_obj_glview_resize_policy_set(policy, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RESIZE_POLICY_SET), EO_TYPECHECK(Elm_GLView_Resize_Policy, policy), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_render_policy_set
* @since 1.8
*
* Set the render policy for the glview object.
*
* @param[in] policy
* @param[out] ret
*
* @see elm_glview_render_policy_set
*/
#define elm_obj_glview_render_policy_set(policy, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RENDER_POLICY_SET), EO_TYPECHECK(Elm_GLView_Render_Policy, policy), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_size_set
* @since 1.8
*
* Sets the size of the glview
*
* @param[in] w
* @param[in] h
*
* @see elm_glview_size_set
*/
#define elm_obj_glview_size_set(w, h) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)
/**
* @def elm_obj_glview_size_get
* @since 1.8
*
* Gets the size of the glview.
*
* @param[out] w
* @param[out] h
*
* @see elm_glview_size_get
*/
#define elm_obj_glview_size_get(w, h) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)
/**
* @def elm_obj_glview_init_func_set
* @since 1.8
*
* Set the init function that runs once in the main loop.
*
* @param[in] func
*
* @see elm_glview_init_func_set
*/
#define elm_obj_glview_init_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_INIT_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_del_func_set
* @since 1.8
*
* Set the render function that runs in the main loop.
*
* @param[in] func
*
* @see elm_glview_del_func_set
*/
#define elm_obj_glview_del_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_DEL_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_resize_func_set
* @since 1.8
*
* Set the resize function that gets called when resize happens.
*
* @param[in] func
*
* @see elm_glview_resize_func_set
*/
#define elm_obj_glview_resize_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RESIZE_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_render_func_set
* @since 1.8
*
* Set the render function that runs in the main loop.
*
* @param[in] func
*
* @see elm_glview_render_func_set
*/
#define elm_obj_glview_render_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RENDER_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_changed_set
* @since 1.8
*
* Notifies that there has been changes in the GLView.
*
*
* @see elm_glview_changed_set
*/
#define elm_obj_glview_changed_set() ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_CHANGED_SET)
typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj);
/**
* Defines mode of GLView
*
* @ingroup GLView
*/
typedef enum _Elm_GLView_Mode
{
ELM_GLVIEW_NONE = 0,
ELM_GLVIEW_ALPHA = (1<<1), /**< Alpha channel enabled rendering mode */
ELM_GLVIEW_DEPTH = (1<<2), /**< Depth buffer enabled rendering mode */
ELM_GLVIEW_STENCIL = (1<<3), /**< Stencil buffer enabled rendering mode */
ELM_GLVIEW_DIRECT = (1<<4) /**< Direct rendering optimization hint */
} Elm_GLView_Mode;
/**
* Defines a policy for the glview resizing.
*
* The resizing policy tells glview what to do with the underlying
* surface when resize happens. ELM_GLVIEW_RESIZE_POLICY_RECREATE
* will destroy the current surface and recreate the surface to the
* new size. ELM_GLVIEW_RESIZE_POLICY_SCALE will instead keep the
* current surface but only display the result at the desired size
* scaled.
*
* @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
* @ingroup GLView
*/
typedef enum
{
ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only resize the internal image and not the surface */
} Elm_GLView_Resize_Policy;
/**
* Defines a policy for gl rendering.
*
* The rendering policy tells glview where to run the gl rendering code.
* ELM_GLVIEW_RENDER_POLICY_ON_DEMAND tells glview to call the rendering
* calls on demand, which means that the rendering code gets called
* only when it is visible.
*
* @note Default is ELM_GLVIEW_RENDER_POLICY_ON_DEMAND
* @ingroup GLView
*/
typedef enum
{
ELM_GLVIEW_RENDER_POLICY_ON_DEMAND = 1, /**< Render only when there is a need for redrawing */
ELM_GLVIEW_RENDER_POLICY_ALWAYS = 2 /**< Render always even when it is not visible */
} Elm_GLView_Render_Policy;
/**
* Add a new glview to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup GLView
*/
EAPI Evas_Object *elm_glview_add(Evas_Object *parent);
/**
* Sets the size of the glview
*
* @param obj The glview object
* @param w width of the glview object
* @param h height of the glview object
*
* @ingroup GLView
*/
EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
/**
* Gets the size of the glview.
*
* @param obj The glview object
* @param w width of the glview object
* @param h height of the glview object
*
* Note that this function returns the actual image size of the
* glview. This means that when the scale policy is set to
* ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled
* size.
*
* @ingroup GLView
*/
EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
/**
* Gets the gl api struct for gl rendering
*
* @param obj The glview object
* @return The api object or NULL if it cannot be created
*
* @ingroup GLView
*/
EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj);
/**
* Set the mode of the GLView. Supports alpha, depth, stencil.
*
* @param obj The glview object
* @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil, Direct.
* @return True if set properly.
*
* Direct is a hint for the elm_glview to render directly to the window
* given that the right conditions are met. Otherwise it falls back
* to rendering to an offscreen buffer before it gets composited to the
* window.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode);
/**
* Set the resize policy for the glview object.
*
* @param obj The glview object.
* @param policy The scaling policy.
*
* By default, the resize policy is set to ELM_GLVIEW_RESIZE_POLICY_RECREATE.
* When resize is called it destroys the previous surface and recreates the
* newly specified size. If the policy is set to
* ELM_GLVIEW_RESIZE_POLICY_SCALE, however, glview only scales the image
* object and not the underlying GL Surface.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy);
/**
* Set the render policy for the glview object.
*
* @param obj The glview object.
* @param policy The render policy.
*
* By default, the render policy is set to ELM_GLVIEW_RENDER_POLICY_ON_DEMAND.
* This policy is set such that during the render loop, glview is only
* redrawn if it needs to be redrawn. (i.e. when it is visible) If the policy
* is set to ELM_GLVIEWW_RENDER_POLICY_ALWAYS, it redraws regardless of
* whether it is visible or needs redrawing.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy);
/**
* Set the init function that runs once in the main loop.
*
* @param obj The glview object.
* @param func The init function to be registered.
*
* The registered init function gets called once during the render loop.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* for initialization GL calls.
*
* @ingroup GLView
*/
EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the render function that runs in the main loop.
*
* @param obj The glview object.
* @param func The delete function to be registered.
*
* The registered del function gets called when GLView object is deleted.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* when delete happens.
*
* @ingroup GLView
*/
EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the resize function that gets called when resize happens.
*
* @param obj The glview object.
* @param func The resize function to be registered.
*
* The resize function gets called during the render loop.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* when resize happens.
*
* @ingroup GLView
*/
EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the render function that runs in the main loop.
*
* The render function gets called in the main loop but whether it runs
* depends on the rendering policy and whether elm_glview_changed_set()
* gets called.
*
* @param obj The glview object.
* @param func The render function to be registered.
*
* @ingroup GLView
*/
EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Notifies that there has been changes in the GLView.
*
* @param obj The glview object.
*
* @ingroup GLView
*/
EAPI void elm_glview_changed_set(Evas_Object *obj);
#include "elm_glview_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_glview_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_glview_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,52 @@
typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj);
/**
* Defines mode of GLView
*
* @ingroup GLView
*/
typedef enum _Elm_GLView_Mode
{
ELM_GLVIEW_NONE = 0,
ELM_GLVIEW_ALPHA = (1<<1), /**< Alpha channel enabled rendering mode */
ELM_GLVIEW_DEPTH = (1<<2), /**< Depth buffer enabled rendering mode */
ELM_GLVIEW_STENCIL = (1<<3), /**< Stencil buffer enabled rendering mode */
ELM_GLVIEW_DIRECT = (1<<4) /**< Direct rendering optimization hint */
} Elm_GLView_Mode;
/**
* Defines a policy for the glview resizing.
*
* The resizing policy tells glview what to do with the underlying
* surface when resize happens. ELM_GLVIEW_RESIZE_POLICY_RECREATE
* will destroy the current surface and recreate the surface to the
* new size. ELM_GLVIEW_RESIZE_POLICY_SCALE will instead keep the
* current surface but only display the result at the desired size
* scaled.
*
* @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
* @ingroup GLView
*/
typedef enum
{
ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only resize the internal image and not the surface */
} Elm_GLView_Resize_Policy;
/**
* Defines a policy for gl rendering.
*
* The rendering policy tells glview where to run the gl rendering code.
* ELM_GLVIEW_RENDER_POLICY_ON_DEMAND tells glview to call the rendering
* calls on demand, which means that the rendering code gets called
* only when it is visible.
*
* @note Default is ELM_GLVIEW_RENDER_POLICY_ON_DEMAND
* @ingroup GLView
*/
typedef enum
{
ELM_GLVIEW_RENDER_POLICY_ON_DEMAND = 1, /**< Render only when there is a need for redrawing */
ELM_GLVIEW_RENDER_POLICY_ALWAYS = 2 /**< Render always even when it is not visible */
} Elm_GLView_Render_Policy;

View File

@ -0,0 +1,182 @@
#define ELM_OBJ_GLVIEW_CLASS elm_obj_glview_class_get()
const Eo_Class *elm_obj_glview_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_GLVIEW_BASE_ID;
enum
{
ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET,
ELM_OBJ_GLVIEW_SUB_ID_MODE_SET,
ELM_OBJ_GLVIEW_SUB_ID_RESIZE_POLICY_SET,
ELM_OBJ_GLVIEW_SUB_ID_RENDER_POLICY_SET,
ELM_OBJ_GLVIEW_SUB_ID_SIZE_SET,
ELM_OBJ_GLVIEW_SUB_ID_SIZE_GET,
ELM_OBJ_GLVIEW_SUB_ID_INIT_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_DEL_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_RESIZE_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_RENDER_FUNC_SET,
ELM_OBJ_GLVIEW_SUB_ID_CHANGED_SET,
ELM_OBJ_GLVIEW_SUB_ID_LAST
};
#define ELM_OBJ_GLVIEW_ID(sub_id) (ELM_OBJ_GLVIEW_BASE_ID + sub_id)
/**
* @def elm_obj_glview_gl_api_get
* @since 1.8
*
* Gets the gl api struct for gl rendering
*
* @param[out] ret
*
* @see elm_glview_gl_api_get
*
* @ingroup GLView
*/
#define elm_obj_glview_gl_api_get(ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_GL_API_GET), EO_TYPECHECK(Evas_GL_API **, ret)
/**
* @def elm_obj_glview_mode_set
* @since 1.8
*
* Set the mode of the GLView. Supports alpha, depth, stencil.
*
* @param[in] mode
* @param[out] ret
*
* @see elm_glview_mode_set
*
* @ingroup GLView
*/
#define elm_obj_glview_mode_set(mode, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_GLView_Mode, mode), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_resize_policy_set
* @since 1.8
*
* Set the resize policy for the glview object.
*
* @param[in] policy
* @param[out] ret
*
* @see elm_glview_resize_policy_set
*
* @ingroup GLView
*/
#define elm_obj_glview_resize_policy_set(policy, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RESIZE_POLICY_SET), EO_TYPECHECK(Elm_GLView_Resize_Policy, policy), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_render_policy_set
* @since 1.8
*
* Set the render policy for the glview object.
*
* @param[in] policy
* @param[out] ret
*
* @see elm_glview_render_policy_set
*
* @ingroup GLView
*/
#define elm_obj_glview_render_policy_set(policy, ret) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RENDER_POLICY_SET), EO_TYPECHECK(Elm_GLView_Render_Policy, policy), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_glview_size_set
* @since 1.8
*
* Sets the size of the glview
*
* @param[in] w
* @param[in] h
*
* @see elm_glview_size_set
*
* @ingroup GLView
*/
#define elm_obj_glview_size_set(w, h) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)
/**
* @def elm_obj_glview_size_get
* @since 1.8
*
* Gets the size of the glview.
*
* @param[out] w
* @param[out] h
*
* @see elm_glview_size_get
*
* @ingroup GLView
*/
#define elm_obj_glview_size_get(w, h) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)
/**
* @def elm_obj_glview_init_func_set
* @since 1.8
*
* Set the init function that runs once in the main loop.
*
* @param[in] func
*
* @see elm_glview_init_func_set
*
* @ingroup GLView
*/
#define elm_obj_glview_init_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_INIT_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_del_func_set
* @since 1.8
*
* Set the render function that runs in the main loop.
*
* @param[in] func
*
* @see elm_glview_del_func_set
*
* @ingroup GLView
*/
#define elm_obj_glview_del_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_DEL_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_resize_func_set
* @since 1.8
*
* Set the resize function that gets called when resize happens.
*
* @param[in] func
*
* @see elm_glview_resize_func_set
*
* @ingroup GLView
*/
#define elm_obj_glview_resize_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RESIZE_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_render_func_set
* @since 1.8
*
* Set the render function that runs in the main loop.
*
* @param[in] func
*
* @see elm_glview_render_func_set
*
* @ingroup GLView
*/
#define elm_obj_glview_render_func_set(func) ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_RENDER_FUNC_SET), EO_TYPECHECK(Elm_GLView_Func_Cb, func)
/**
* @def elm_obj_glview_changed_set
* @since 1.8
*
* Notifies that there has been changes in the GLView.
*
*
* @see elm_glview_changed_set
*
* @ingroup GLView
*/
#define elm_obj_glview_changed_set() ELM_OBJ_GLVIEW_ID(ELM_OBJ_GLVIEW_SUB_ID_CHANGED_SET)

View File

@ -0,0 +1,162 @@
/**
* Add a new glview to the parent
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup GLView
*/
EAPI Evas_Object *elm_glview_add(Evas_Object *parent);
/**
* Gets the gl api struct for gl rendering
*
* @param obj The glview object
* @return The api object or NULL if it cannot be created
*
* @ingroup GLView
*/
EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj);
/**
* Set the mode of the GLView. Supports alpha, depth, stencil.
*
* @param obj The glview object
* @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil, Direct.
* @return True if set properly.
*
* Direct is a hint for the elm_glview to render directly to the window
* given that the right conditions are met. Otherwise it falls back
* to rendering to an offscreen buffer before it gets composited to the
* window.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode);
/**
* Set the resize policy for the glview object.
*
* @param obj The glview object.
* @param policy The scaling policy.
*
* By default, the resize policy is set to ELM_GLVIEW_RESIZE_POLICY_RECREATE.
* When resize is called it destroys the previous surface and recreates the
* newly specified size. If the policy is set to
* ELM_GLVIEW_RESIZE_POLICY_SCALE, however, glview only scales the image
* object and not the underlying GL Surface.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy);
/**
* Set the render policy for the glview object.
*
* @param obj The glview object.
* @param policy The render policy.
*
* By default, the render policy is set to ELM_GLVIEW_RENDER_POLICY_ON_DEMAND.
* This policy is set such that during the render loop, glview is only
* redrawn if it needs to be redrawn. (i.e. when it is visible) If the policy
* is set to ELM_GLVIEWW_RENDER_POLICY_ALWAYS, it redraws regardless of
* whether it is visible or needs redrawing.
*
* @ingroup GLView
*/
EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy);
/**
* Sets the size of the glview
*
* @param obj The glview object
* @param w width of the glview object
* @param h height of the glview object
*
* @ingroup GLView
*/
EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
/**
* Gets the size of the glview.
*
* @param obj The glview object
* @param w width of the glview object
* @param h height of the glview object
*
* Note that this function returns the actual image size of the
* glview. This means that when the scale policy is set to
* ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled
* size.
*
* @ingroup GLView
*/
EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
/**
* Set the init function that runs once in the main loop.
*
* @param obj The glview object.
* @param func The init function to be registered.
*
* The registered init function gets called once during the render loop.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* for initialization GL calls.
*
* @ingroup GLView
*/
EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the render function that runs in the main loop.
*
* @param obj The glview object.
* @param func The delete function to be registered.
*
* The registered del function gets called when GLView object is deleted.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* when delete happens.
*
* @ingroup GLView
*/
EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the resize function that gets called when resize happens.
*
* @param obj The glview object.
* @param func The resize function to be registered.
*
* The resize function gets called during the render loop.
* This function allows glview to hide all the rendering context/surface
* details and have the user just call GL calls that they desire
* when resize happens.
*
* @ingroup GLView
*/
EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Set the render function that runs in the main loop.
*
* The render function gets called in the main loop but whether it runs
* depends on the rendering policy and whether elm_glview_changed_set()
* gets called.
*
* @param obj The glview object.
* @param func The render function to be registered.
*
* @ingroup GLView
*/
EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func);
/**
* Notifies that there has been changes in the GLView.
*
* @param obj The glview object.
*
* @ingroup GLView
*/
EAPI void elm_glview_changed_set(Evas_Object *obj);

View File

@ -77,185 +77,13 @@
* @{
*/
#define ELM_OBJ_HOVER_CLASS elm_obj_hover_class_get()
const Eo_Class *elm_obj_hover_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_HOVER_BASE_ID;
enum
{
ELM_OBJ_HOVER_SUB_ID_TARGET_SET,
ELM_OBJ_HOVER_SUB_ID_TARGET_GET,
ELM_OBJ_HOVER_SUB_ID_BEST_CONTENT_LOCATION_GET,
ELM_OBJ_HOVER_SUB_ID_DISMISS,
ELM_OBJ_HOVER_SUB_ID_LAST
};
#define ELM_OBJ_HOVER_ID(sub_id) (ELM_OBJ_HOVER_BASE_ID + sub_id)
/**
* @def elm_obj_hover_target_set
* @since 1.8
*
* @brief Sets the target object for the hover.
*
* @param[in] target
*
* @see elm_hover_target_set
*/
#define elm_obj_hover_target_set(target) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_TARGET_SET), EO_TYPECHECK(Evas_Object *, target)
/**
* @def elm_obj_hover_target_get
* @since 1.8
*
* @brief Gets the target object for the hover.
*
* @param[out] ret
*
* @see elm_hover_target_get
*/
#define elm_obj_hover_target_get(ret) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_TARGET_GET), EO_TYPECHECK(Evas_Object **, ret)
/**
* @def elm_obj_hover_best_content_location_get
* @since 1.8
*
* @brief Returns the best swallow location for content in the hover.
*
* @param[in] pref_axis
* @param[out] ret
*
* @see elm_hover_best_content_location_get
*/
#define elm_obj_hover_best_content_location_get(pref_axis, ret) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_BEST_CONTENT_LOCATION_GET), EO_TYPECHECK(Elm_Hover_Axis, pref_axis), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_hover_dismiss
* @since 1.8
*
* @brief Dismiss a hover object
*
*
* @see elm_hover_dismiss
*/
#define elm_obj_hover_dismiss() ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_DISMISS)
/**
* @typedef Elm_Hover_Axis
*
* The orientation axis for the hover object
*/
typedef enum
{
ELM_HOVER_AXIS_NONE, /**< ELM_HOVER_AXIS_NONE -- no preferred orientation */
ELM_HOVER_AXIS_HORIZONTAL, /**< ELM_HOVER_AXIS_HORIZONTAL -- horizontal */
ELM_HOVER_AXIS_VERTICAL, /**< ELM_HOVER_AXIS_VERTICAL -- vertical */
ELM_HOVER_AXIS_BOTH /**< ELM_HOVER_AXIS_BOTH -- both */
} Elm_Hover_Axis;
/**
* @brief Adds a hover object to @p parent
*
* @param parent The parent object
* @return The hover object or NULL if one could not be created
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
/**
* @brief Sets the target object for the hover.
*
* @param obj The hover object
* @param target The object to center the hover onto.
*
* This function will cause the hover to be centered on the target object.
*
* @ingroup Hover
*/
EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
/**
* @brief Gets the target object for the hover.
*
* @param obj The hover object
* @return The target object for the hover.
*
* @see elm_hover_target_set()
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj);
/**
* @brief Sets the parent object for the hover.
*
* @param obj The hover object
* @param parent The object to locate the hover over.
*
* This function will cause the hover to take up the entire space that the
* parent object fills.
*
* @ingroup Hover
*/
EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
/**
* @brief Gets the parent object for the hover.
*
* @param obj The hover object
* @return The parent object to locate the hover over.
*
* @see elm_hover_parent_set()
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj);
/**
* @brief Returns the best swallow location for content in the hover.
*
* @param obj The hover object
* @param pref_axis The preferred orientation axis for the hover object to use
* @return The edje location to place content into the hover or @c
* NULL, on errors.
*
* Best is defined here as the location at which there is the most available
* space.
*
* @p pref_axis may be one of
* - @c ELM_HOVER_AXIS_NONE -- no preferred orientation
* - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal
* - @c ELM_HOVER_AXIS_VERTICAL -- vertical
* - @c ELM_HOVER_AXIS_BOTH -- both
*
* If ELM_HOVER_AXIS_HORIZONTAL is chosen the returned position will
* necessarily be along the horizontal axis("left" or "right"). If
* ELM_HOVER_AXIS_VERTICAL is chosen the returned position will necessarily
* be along the vertical axis("top" or "bottom"). Choosing
* ELM_HOVER_AXIS_BOTH or ELM_HOVER_AXIS_NONE has the same effect and the
* returned position may be in either axis.
*
* @see elm_object_part_content_set()
*
* @ingroup Hover
*/
EAPI const char *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
/**
* @brief Dismiss a hover object
*
* @param obj The hover object
* Use this function to simulate clicking outside the hover to dismiss it.
* In this way, the hover will be hidden and the "clicked" signal will be emitted.
*
* @ingroup Hover
*/
EAPI void elm_hover_dismiss(Evas_Object *obj);
#include "elm_hover_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_hover_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_hover_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,13 @@
/**
* @typedef Elm_Hover_Axis
*
* The orientation axis for the hover object
*/
typedef enum
{
ELM_HOVER_AXIS_NONE, /**< ELM_HOVER_AXIS_NONE -- no preferred orientation */
ELM_HOVER_AXIS_HORIZONTAL, /**< ELM_HOVER_AXIS_HORIZONTAL -- horizontal */
ELM_HOVER_AXIS_VERTICAL, /**< ELM_HOVER_AXIS_VERTICAL -- vertical */
ELM_HOVER_AXIS_BOTH /**< ELM_HOVER_AXIS_BOTH -- both */
} Elm_Hover_Axis;

View File

@ -0,0 +1,71 @@
#define ELM_OBJ_HOVER_CLASS elm_obj_hover_class_get()
const Eo_Class *elm_obj_hover_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_HOVER_BASE_ID;
enum
{
ELM_OBJ_HOVER_SUB_ID_TARGET_SET,
ELM_OBJ_HOVER_SUB_ID_TARGET_GET,
ELM_OBJ_HOVER_SUB_ID_BEST_CONTENT_LOCATION_GET,
ELM_OBJ_HOVER_SUB_ID_DISMISS,
ELM_OBJ_HOVER_SUB_ID_LAST
};
#define ELM_OBJ_HOVER_ID(sub_id) (ELM_OBJ_HOVER_BASE_ID + sub_id)
/**
* @def elm_obj_hover_target_set
* @since 1.8
*
* @brief Sets the target object for the hover.
*
* @param[in] target
*
* @see elm_hover_target_set
*
* @ingroup Hover
*/
#define elm_obj_hover_target_set(target) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_TARGET_SET), EO_TYPECHECK(Evas_Object *, target)
/**
* @def elm_obj_hover_target_get
* @since 1.8
*
* @brief Gets the target object for the hover.
*
* @param[out] ret
*
* @see elm_hover_target_get
*
* @ingroup Hover
*/
#define elm_obj_hover_target_get(ret) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_TARGET_GET), EO_TYPECHECK(Evas_Object **, ret)
/**
* @def elm_obj_hover_best_content_location_get
* @since 1.8
*
* @brief Returns the best swallow location for content in the hover.
*
* @param[in] pref_axis
* @param[out] ret
*
* @see elm_hover_best_content_location_get
*
* @ingroup Hover
*/
#define elm_obj_hover_best_content_location_get(pref_axis, ret) ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_BEST_CONTENT_LOCATION_GET), EO_TYPECHECK(Elm_Hover_Axis, pref_axis), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_hover_dismiss
* @since 1.8
*
* @brief Dismiss a hover object
*
*
* @see elm_hover_dismiss
*/
#define elm_obj_hover_dismiss() ELM_OBJ_HOVER_ID(ELM_OBJ_HOVER_SUB_ID_DISMISS)

View File

@ -0,0 +1,99 @@
/**
* @brief Adds a hover object to @p parent
*
* @param parent The parent object
* @return The hover object or NULL if one could not be created
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
/**
* @brief Sets the parent object for the hover.
*
* @param obj The hover object
* @param parent The object to locate the hover over.
*
* This function will cause the hover to take up the entire space that the
* parent object fills.
*
* @ingroup Hover
*/
EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
/**
* @brief Gets the parent object for the hover.
*
* @param obj The hover object
* @return The parent object to locate the hover over.
*
* @see elm_hover_parent_set()
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj);
/**
* @brief Sets the target object for the hover.
*
* @param obj The hover object
* @param target The object to center the hover onto.
*
* This function will cause the hover to be centered on the target object.
*
* @ingroup Hover
*/
EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
/**
* @brief Gets the target object for the hover.
*
* @param obj The hover object
* @return The target object for the hover.
*
* @see elm_hover_target_set()
*
* @ingroup Hover
*/
EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj);
/**
* @brief Returns the best swallow location for content in the hover.
*
* @param obj The hover object
* @param pref_axis The preferred orientation axis for the hover object to use
* @return The edje location to place content into the hover or @c
* NULL, on errors.
*
* Best is defined here as the location at which there is the most available
* space.
*
* @p pref_axis may be one of
* - @c ELM_HOVER_AXIS_NONE -- no preferred orientation
* - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal
* - @c ELM_HOVER_AXIS_VERTICAL -- vertical
* - @c ELM_HOVER_AXIS_BOTH -- both
*
* If ELM_HOVER_AXIS_HORIZONTAL is chosen the returned position will
* necessarily be along the horizontal axis("left" or "right"). If
* ELM_HOVER_AXIS_VERTICAL is chosen the returned position will necessarily
* be along the vertical axis("top" or "bottom"). Choosing
* ELM_HOVER_AXIS_BOTH or ELM_HOVER_AXIS_NONE has the same effect and the
* returned position may be in either axis.
*
* @see elm_object_part_content_set()
*
* @ingroup Hover
*/
EAPI const char *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
/**
* @brief Dismiss a hover object
*
* @param obj The hover object
* Use this function to simulate clicking outside the hover to dismiss it.
* In this way, the hover will be hidden and the "clicked" signal will be emitted.
*
* @ingroup Hover
*/
EAPI void elm_hover_dismiss(Evas_Object *obj);

View File

@ -97,220 +97,13 @@
* @li @ref tutorial_icon
*/
#define ELM_OBJ_ICON_CLASS elm_obj_icon_class_get()
const Eo_Class *elm_obj_icon_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_ICON_BASE_ID;
enum
{
ELM_OBJ_ICON_SUB_ID_THUMB_SET,
ELM_OBJ_ICON_SUB_ID_STANDARD_SET,
ELM_OBJ_ICON_SUB_ID_STANDARD_GET,
ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_SET,
ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_GET,
ELM_OBJ_ICON_SUB_ID_LAST
};
#define ELM_OBJ_ICON_ID(sub_id) (ELM_OBJ_ICON_BASE_ID + sub_id)
/**
* @def elm_obj_icon_thumb_set
* @since 1.8
*
* Set the file that will be used, but use a generated thumbnail.
*
* @param[in] file
* @param[in] group
*
* @see elm_icon_thumb_set
*/
#define elm_obj_icon_thumb_set(file, group) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_THUMB_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group)
/**
* @def elm_obj_icon_standard_set
* @since 1.8
*
* Set the icon by icon standards names.
*
* @param[in] name
* @param[out] ret
*
* @see elm_icon_standard_set
*/
#define elm_obj_icon_standard_set(name, ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_STANDARD_SET), EO_TYPECHECK(const char *, name), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_icon_standard_get
* @since 1.8
*
* Get the icon name set by icon standard names.
*
* @param[out] ret
*
* @see elm_icon_standard_get
*/
#define elm_obj_icon_standard_get(ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_STANDARD_GET), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_icon_order_lookup_set
* @since 1.8
*
* Sets the icon lookup order used by elm_icon_standard_set().
*
* @param[in] order
*
* @see elm_icon_order_lookup_set
*/
#define elm_obj_icon_order_lookup_set(order) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order)
/**
* @def elm_obj_icon_order_lookup_get
* @since 1.8
*
* Gets the icon lookup order.
*
* @param[out] ret
*
* @see elm_icon_order_lookup_get
*/
#define elm_obj_icon_order_lookup_get(ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret)
/**
* @addtogroup Icon
* @{
*/
typedef enum
{
ELM_ICON_NONE,
ELM_ICON_FILE,
ELM_ICON_STANDARD
} Elm_Icon_Type;
/**
* @enum Elm_Icon_Lookup_Order
* @typedef Elm_Icon_Lookup_Order
*
* Lookup order used by elm_icon_standard_set(). Should look for icons in the
* theme, FDO paths, or both?
*
* @ingroup Icon
*/
typedef enum
{
ELM_ICON_LOOKUP_FDO_THEME, /**< icon look up order: freedesktop, theme */
ELM_ICON_LOOKUP_THEME_FDO, /**< icon look up order: theme, freedesktop */
ELM_ICON_LOOKUP_FDO, /**< icon look up order: freedesktop */
ELM_ICON_LOOKUP_THEME /**< icon look up order: theme */
} Elm_Icon_Lookup_Order;
/**
* Add a new icon object to the parent.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI Evas_Object *elm_icon_add(Evas_Object *parent);
/**
* Set the file that will be used, but use a generated thumbnail.
*
* @param obj The icon object
* @param file The path to file that will be used as icon image
* @param group The group that the icon belongs to an edje file
*
* This functions like elm_image_file_set() but requires the Ethumb library
* support to be enabled successfully with elm_need_ethumb(). When set
* the file indicated has a thumbnail generated and cached on disk for
* future use or will directly use an existing cached thumbnail if it
* is valid.
*
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group);
/**
* Set the icon by icon standards names.
*
* @param obj The icon object
* @param name The icon name
*
* @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
* For example, freedesktop.org defines standard icon names such as "home",
* "network", etc. There can be different icon sets to match those icon
* keys. The @p name given as parameter is one of these "keys", and will be
* used to look in the freedesktop.org paths and elementary theme. One can
* change the lookup order with elm_icon_order_lookup_set().
*
* If name is not found in any of the expected locations and it is the
* absolute path of an image file, this image will be used.
*
* @note The icon image set by this function can be changed by
* elm_image_file_set().
*
* @note This function does not accept relative icon path.
*
* @see elm_icon_standard_get()
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name);
/**
* Get the icon name set by icon standard names.
*
* @param obj The icon object
* @return The icon name
*
* If the icon image was set using elm_image_file_set() instead of
* elm_icon_standard_set(), then this function will return @c NULL.
*
* @see elm_icon_standard_set()
*
* @ingroup Icon
*/
EAPI const char *elm_icon_standard_get(const Evas_Object *obj);
/**
* Sets the icon lookup order used by elm_icon_standard_set().
*
* @param obj The icon object
* @param order The icon lookup order (can be one of
* ELM_ICON_LOOKUP_FDO_THEME, ELM_ICON_LOOKUP_THEME_FDO, ELM_ICON_LOOKUP_FDO
* or ELM_ICON_LOOKUP_THEME)
*
* @see elm_icon_order_lookup_get()
* @see Elm_Icon_Lookup_Order
*
* @ingroup Icon
*/
EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
/**
* Gets the icon lookup order.
*
* @param obj The icon object
* @return The icon lookup order
*
* @see elm_icon_order_lookup_set()
* @see Elm_Icon_Lookup_Order
*
* @ingroup Icon
*/
EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj);
#include "elm_icon_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_icon_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_icon_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,29 @@
/**
* @addtogroup Icon
* @{
*/
typedef enum
{
ELM_ICON_NONE,
ELM_ICON_FILE,
ELM_ICON_STANDARD
} Elm_Icon_Type;
/**
* @enum Elm_Icon_Lookup_Order
* @typedef Elm_Icon_Lookup_Order
*
* Lookup order used by elm_icon_standard_set(). Should look for icons in the
* theme, FDO paths, or both?
*
* @ingroup Icon
*/
typedef enum
{
ELM_ICON_LOOKUP_FDO_THEME, /**< icon look up order: freedesktop, theme */
ELM_ICON_LOOKUP_THEME_FDO, /**< icon look up order: theme, freedesktop */
ELM_ICON_LOOKUP_FDO, /**< icon look up order: freedesktop */
ELM_ICON_LOOKUP_THEME /**< icon look up order: theme */
} Elm_Icon_Lookup_Order;

View File

@ -0,0 +1,90 @@
#define ELM_OBJ_ICON_CLASS elm_obj_icon_class_get()
const Eo_Class *elm_obj_icon_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_ICON_BASE_ID;
enum
{
ELM_OBJ_ICON_SUB_ID_THUMB_SET,
ELM_OBJ_ICON_SUB_ID_STANDARD_SET,
ELM_OBJ_ICON_SUB_ID_STANDARD_GET,
ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_SET,
ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_GET,
ELM_OBJ_ICON_SUB_ID_LAST
};
#define ELM_OBJ_ICON_ID(sub_id) (ELM_OBJ_ICON_BASE_ID + sub_id)
/**
* @def elm_obj_icon_thumb_set
* @since 1.8
*
* Set the file that will be used, but use a generated thumbnail.
*
* @param[in] file
* @param[in] group
*
* @see elm_icon_thumb_set
*
* @ingroup Icon
*/
#define elm_obj_icon_thumb_set(file, group) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_THUMB_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group)
/**
* @def elm_obj_icon_standard_set
* @since 1.8
*
* Set the icon by icon standards names.
*
* @param[in] name
* @param[out] ret
*
* @see elm_icon_standard_set
*
* @ingroup Icon
*/
#define elm_obj_icon_standard_set(name, ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_STANDARD_SET), EO_TYPECHECK(const char *, name), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_icon_standard_get
* @since 1.8
*
* Get the icon name set by icon standard names.
*
* @param[out] ret
*
* @see elm_icon_standard_get
*
* @ingroup Icon
*/
#define elm_obj_icon_standard_get(ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_STANDARD_GET), EO_TYPECHECK(const char **, ret)
/**
* @def elm_obj_icon_order_lookup_set
* @since 1.8
*
* Sets the icon lookup order used by elm_icon_standard_set().
*
* @param[in] order
*
* @see elm_icon_order_lookup_set
*
* @ingroup Icon
*/
#define elm_obj_icon_order_lookup_set(order) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order)
/**
* @def elm_obj_icon_order_lookup_get
* @since 1.8
*
* Gets the icon lookup order.
*
* @param[out] ret
*
* @see elm_icon_order_lookup_get
*
* @ingroup Icon
*/
#define elm_obj_icon_order_lookup_get(ret) ELM_OBJ_ICON_ID(ELM_OBJ_ICON_SUB_ID_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret)

View File

@ -0,0 +1,102 @@
/**
* Add a new icon object to the parent.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI Evas_Object *elm_icon_add(Evas_Object *parent);
/**
* Set the file that will be used, but use a generated thumbnail.
*
* @param obj The icon object
* @param file The path to file that will be used as icon image
* @param group The group that the icon belongs to an edje file
*
* This functions like elm_image_file_set() but requires the Ethumb library
* support to be enabled successfully with elm_need_ethumb(). When set
* the file indicated has a thumbnail generated and cached on disk for
* future use or will directly use an existing cached thumbnail if it
* is valid.
*
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group);
/**
* Set the icon by icon standards names.
*
* @param obj The icon object
* @param name The icon name
*
* @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
* For example, freedesktop.org defines standard icon names such as "home",
* "network", etc. There can be different icon sets to match those icon
* keys. The @p name given as parameter is one of these "keys", and will be
* used to look in the freedesktop.org paths and elementary theme. One can
* change the lookup order with elm_icon_order_lookup_set().
*
* If name is not found in any of the expected locations and it is the
* absolute path of an image file, this image will be used.
*
* @note The icon image set by this function can be changed by
* elm_image_file_set().
*
* @note This function does not accept relative icon path.
*
* @see elm_icon_standard_get()
* @see elm_image_file_set()
*
* @ingroup Icon
*/
EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name);
/**
* Get the icon name set by icon standard names.
*
* @param obj The icon object
* @return The icon name
*
* If the icon image was set using elm_image_file_set() instead of
* elm_icon_standard_set(), then this function will return @c NULL.
*
* @see elm_icon_standard_set()
*
* @ingroup Icon
*/
EAPI const char *elm_icon_standard_get(const Evas_Object *obj);
/**
* Sets the icon lookup order used by elm_icon_standard_set().
*
* @param obj The icon object
* @param order The icon lookup order (can be one of
* ELM_ICON_LOOKUP_FDO_THEME, ELM_ICON_LOOKUP_THEME_FDO, ELM_ICON_LOOKUP_FDO
* or ELM_ICON_LOOKUP_THEME)
*
* @see elm_icon_order_lookup_get()
* @see Elm_Icon_Lookup_Order
*
* @ingroup Icon
*/
EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
/**
* Gets the icon lookup order.
*
* @param obj The icon object
* @return The icon lookup order
*
* @see elm_icon_order_lookup_set()
* @see Elm_Icon_Lookup_Order
*
* @ingroup Icon
*/
EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj);

View File

@ -41,112 +41,12 @@
* @{
*/
#define ELM_OBJ_WIN_INWIN_CLASS elm_obj_win_inwin_class_get()
const Eo_Class *elm_obj_win_inwin_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_WIN_INWIN_BASE_ID;
enum
{
ELM_OBJ_WIN_INWIN_SUB_ID_ACTIVATE,
ELM_OBJ_WIN_INWIN_SUB_ID_LAST
};
#define ELM_OBJ_WIN_INWIN_ID(sub_id) (ELM_OBJ_WIN_INWIN_BASE_ID + sub_id)
/**
* @def elm_obj_win_inwin_activate
* @since 1.8
*
* No description supplied by the EAPI.
*
*/
#define elm_obj_win_inwin_activate() ELM_OBJ_WIN_INWIN_ID(ELM_OBJ_WIN_INWIN_SUB_ID_ACTIVATE)
/**
* Adds an inwin to the current window
*
* The @p obj used as parent @b MUST be an @ref Win "Elementary Window".
* Never call this function with anything other than the top-most window
* as its parameter, unless you are fond of undefined behavior.
*
* After creating the object, the widget will set itself as resize object
* for the window with elm_win_resize_object_add(), so when shown it will
* appear to cover almost the entire window (how much of it depends on its
* content and the style used). It must not be added into other container
* objects and it needs not be moved or resized manually.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_add(Evas_Object *parent);
/**
* Activates an inwin object, ensuring its visibility
*
* This function will make sure that the inwin @p obj is completely visible
* by calling evas_object_show() and evas_object_raise() on it, to bring it
* to the front. It also sets the keyboard focus to it, which will be passed
* onto its content.
*
* The object's theme will also receive the signal "elm,action,show" with
* source "elm".
*
* @param obj The inwin to activate
*
* @ingroup Inwin
*/
EAPI void elm_win_inwin_activate(Evas_Object *obj);
/**
* Set the content of an inwin 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_win_inwin_content_unset() function.
*
* @param obj The inwin object
* @param content The object to set as content
*
* @ingroup Inwin
*/
EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
/**
* Get the content of an inwin object.
*
* Return the content object for this widget.
*
* The returned object is valid as long as the inwin is still alive and no
* other content is set on it. Deleting the object will notify the inwin
* about it and this one will be left empty.
*
* If you need to remove an inwin's content to be reused somewhere else,
* see elm_win_inwin_content_unset().
*
* @param obj The inwin object
* @return The content that is being used
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj);
/**
* Unset the content of an inwin object.
*
* Unparent and return the content object which was set for this widget.
*
* @param obj The inwin object
* @return The content that was being used
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);
#ifdef EFL_EO_API_SUPPORT
#include "elm_inwin_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_inwin_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,23 @@
#define ELM_OBJ_WIN_INWIN_CLASS elm_obj_win_inwin_class_get()
const Eo_Class *elm_obj_win_inwin_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_WIN_INWIN_BASE_ID;
enum
{
ELM_OBJ_WIN_INWIN_SUB_ID_ACTIVATE,
ELM_OBJ_WIN_INWIN_SUB_ID_LAST
};
#define ELM_OBJ_WIN_INWIN_ID(sub_id) (ELM_OBJ_WIN_INWIN_BASE_ID + sub_id)
/**
* @def elm_obj_win_inwin_activate
* @since 1.8
*
* No description supplied by the EAPI.
*
* @ingroup Inwin
*/
#define elm_obj_win_inwin_activate() ELM_OBJ_WIN_INWIN_ID(ELM_OBJ_WIN_INWIN_SUB_ID_ACTIVATE)

View File

@ -0,0 +1,82 @@
/**
* Adds an inwin to the current window
*
* The @p obj used as parent @b MUST be an @ref Win "Elementary Window".
* Never call this function with anything other than the top-most window
* as its parameter, unless you are fond of undefined behavior.
*
* After creating the object, the widget will set itself as resize object
* for the window with elm_win_resize_object_add(), so when shown it will
* appear to cover almost the entire window (how much of it depends on its
* content and the style used). It must not be added into other container
* objects and it needs not be moved or resized manually.
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_add(Evas_Object *parent);
/**
* Activates an inwin object, ensuring its visibility
*
* This function will make sure that the inwin @p obj is completely visible
* by calling evas_object_show() and evas_object_raise() on it, to bring it
* to the front. It also sets the keyboard focus to it, which will be passed
* onto its content.
*
* The object's theme will also receive the signal "elm,action,show" with
* source "elm".
*
* @param obj The inwin to activate
*
* @ingroup Inwin
*/
EAPI void elm_win_inwin_activate(Evas_Object *obj);
/**
* Set the content of an inwin 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_win_inwin_content_unset() function.
*
* @param obj The inwin object
* @param content The object to set as content
*
* @ingroup Inwin
*/
EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
/**
* Get the content of an inwin object.
*
* Return the content object for this widget.
*
* The returned object is valid as long as the inwin is still alive and no
* other content is set on it. Deleting the object will notify the inwin
* about it and this one will be left empty.
*
* If you need to remove an inwin's content to be reused somewhere else,
* see elm_win_inwin_content_unset().
*
* @param obj The inwin object
* @return The content that is being used
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj);
/**
* Unset the content of an inwin object.
*
* Unparent and return the content object which was set for this widget.
*
* @param obj The inwin object
* @return The content that was being used
*
* @ingroup Inwin
*/
EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);

View File

@ -39,347 +39,13 @@
* See @ref tutorial_label for a demonstration of how to use a label widget.
* @{
*/
#define ELM_OBJ_LABEL_CLASS elm_obj_label_class_get()
const Eo_Class *elm_obj_label_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_LABEL_BASE_ID;
enum
{
ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET,
ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET,
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET,
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET,
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET,
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_GO,
ELM_OBJ_LABEL_SUB_ID_LAST
};
#define ELM_OBJ_LABEL_ID(sub_id) (ELM_OBJ_LABEL_BASE_ID + sub_id)
/**
* @def elm_obj_label_line_wrap_set
* @since 1.8
*
* @brief Set the wrapping behavior of the label
*
* @param[in] wrap
*
* @see elm_label_line_wrap_set
*/
#define elm_obj_label_line_wrap_set(wrap) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET), EO_TYPECHECK(Elm_Wrap_Type, wrap)
/**
* @def elm_obj_label_line_wrap_get
* @since 1.8
*
* @brief Get the wrapping behavior of the label
*
* @param[out] ret
*
* @see elm_label_line_wrap_get
*/
#define elm_obj_label_line_wrap_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET), EO_TYPECHECK(Elm_Wrap_Type *, ret)
/**
* @def elm_obj_label_wrap_width_set
* @since 1.8
*
* @brief Set wrap width of the label
*
* @param[in] w
*
* @see elm_label_wrap_width_set
*/
#define elm_obj_label_wrap_width_set(w) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET), EO_TYPECHECK(Evas_Coord, w)
/**
* @def elm_obj_label_wrap_width_get
* @since 1.8
*
* @brief Get wrap width of the label
*
* @param[out] ret
*
* @see elm_label_wrap_width_get
*/
#define elm_obj_label_wrap_width_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), EO_TYPECHECK(Evas_Coord *, ret)
/**
* @def elm_obj_label_ellipsis_set
* @since 1.8
*
* @brief Set the ellipsis behavior of the label
*
* @param[in] ellipsis
*
* @see elm_label_ellipsis_set
*/
#define elm_obj_label_ellipsis_set(ellipsis) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), EO_TYPECHECK(Eina_Bool, ellipsis)
/**
* @def elm_obj_label_ellipsis_get
* @since 1.8
*
* @brief Get the ellipsis behavior of the label
*
* @param[out] ret
*
* @see elm_label_ellipsis_get
*/
#define elm_obj_label_ellipsis_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_label_slide_mode_set
* @since 1.8
*
* @brief Set slide effect mode of label widget.
*
* @param[in] mode
*
* @see elm_label_slide_mode_set
*/
#define elm_obj_label_slide_mode_set(mode) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), EO_TYPECHECK(Elm_Label_Slide_Mode, mode)
/**
* @def elm_obj_label_slide_mode_get
* @since 1.8
*
* @brief Get current slide effect mode.
*
* @param[out] ret
*
* @see elm_label_slide_mode_get
*/
#define elm_obj_label_slide_mode_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), EO_TYPECHECK(Elm_Label_Slide_Mode *, ret)
/**
* @def elm_obj_label_slide_duration_set
* @since 1.8
*
* @brief Set the slide duration (speed) of the label
*
* @param[in] duration
*
* @see elm_label_slide_duration_set
*/
#define elm_obj_label_slide_duration_set(duration) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), EO_TYPECHECK(double, duration)
/**
* @def elm_obj_label_slide_duration_get
* @since 1.8
*
* @brief Get the slide duration(speed) of the label
*
* @param[out] ret
*
* @see elm_label_slide_duration_get
*/
#define elm_obj_label_slide_duration_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_label_slide_go
* @since 1.8
*
* @brief Start slide effect
*
* @see elm_label_slide_mode_set
*/
#define elm_obj_label_slide_go() ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GO)
typedef enum
{
ELM_LABEL_SLIDE_MODE_NONE = 0, /**< no slide effect */
ELM_LABEL_SLIDE_MODE_AUTO, /**< slide only if the label area is bigger than the text width length */
ELM_LABEL_SLIDE_MODE_ALWAYS /**< slide always */
} Elm_Label_Slide_Mode;
/**
* @brief 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);
/**
* @brief Set the wrapping behavior of the label
*
* @param obj The label object
* @param wrap To wrap text or not
*
* By default no wrapping is done. Possible values for @p wrap are:
* @li ELM_WRAP_NONE - No wrapping
* @li ELM_WRAP_CHAR - wrap between characters
* @li ELM_WRAP_WORD - wrap between words
* @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap
*
* @ingroup Label
*/
EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
/**
* @brief Get the wrapping behavior of the label
*
* @param obj The label object
* @return Wrap type
*
* @see elm_label_line_wrap_set()
*
* @ingroup Label
*/
EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj);
/**
* @brief 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
*
* This function sets the maximum width size hint of the label.
*
* @warning This is only relevant if the label is inside a container.
*
* @ingroup Label
*/
EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w);
/**
* @brief 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
*
* @see elm_label_wrap_width_set()
*
* @ingroup Label
*/
EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj);
/**
* @brief Set the ellipsis behavior of the label
*
* @param obj The label object
* @param ellipsis To ellipsis text or not
*
* If set to true and the text doesn't fit in the label an ellipsis("...")
* will be shown at the end of the widget.
*
* @warning This doesn't work with slide(elm_label_slide_set()) or if the
* chosen wrap method was #ELM_WRAP_WORD.
*
* @ingroup Label
*/
EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
/**
* @brief Get the ellipsis behavior of the label
*
* @param obj The label object
* @return If true, an ellipsis will be shown at the end of the label area.
*
* @see elm_label_ellipsis_set()
*
* @ingroup Label
*/
EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
/**
* @brief Set the slide duration (speed) of the label
*
* @param obj The label object
* @param duration The duration in seconds 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);
/**
* @brief 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
*
* @see elm_label_slide_duration_set()
*
* @ingroup Label
*/
EAPI double elm_label_slide_duration_get(const Evas_Object *obj);
/**
* @brief Slide only if the
*
* @param obj The label object
* @param duration The duration in seconds in moving text from slide begin position
* to slide end position
*
* @ingroup Label
*/
EAPI void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit);
/**
* @brief Set the slide mode of the label widget.
*
* @param obj The label object
* @param mode The slide mode
*
* elm_label_slide_mode_set() changes label slide mode.
* By default, slide mode is none. Possible values for @p mode are:
* @li ELM_LABEL_SLIDE_MODE_NONE - no slide effect
* @li ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
* the text width length
* @li ELM_LABEL_SLIDE_MODE_ALWAYS -slide always
*
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS only work
* with the themes "slide_short", "slide_long" and "slide_bounce".
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS don't work
* if the line wrap(elm_label_line_wrap_set()) or
* ellipsis(elm_label_ellipsis_set()) is set.
*
* @see elm_label_slide_mode_get().
* @since 1.8
*
* @ingroup Label
*/
EAPI void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode);
/**
* @brief Get the slide mode of the label widget.
*
* @param obj The label object
* @return The slide mode
*
* @see elm_label_slide_mode_set()
* @since 1.8
*
* @ingroup Label
*/
EAPI Elm_Label_Slide_Mode elm_label_slide_mode_get(const Evas_Object *obj);
/**
* @brief Start slide effect.
*
* @param obj The label object
*
* @see elm_label_slide_mode_set()
* @since 1.8
*
* @ingroup Label
*/
EAPI void elm_label_slide_go(Evas_Object *obj);
#include "elm_label_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "elm_label_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_label_legacy.h"
#endif
/**
* @}
*/

View File

@ -0,0 +1,7 @@
typedef enum
{
ELM_LABEL_SLIDE_MODE_NONE = 0, /**< no slide effect */
ELM_LABEL_SLIDE_MODE_AUTO, /**< slide only if the label area is bigger than the text width length */
ELM_LABEL_SLIDE_MODE_ALWAYS /**< slide always */
} Elm_Label_Slide_Mode;

View File

@ -0,0 +1,176 @@
#define ELM_OBJ_LABEL_CLASS elm_obj_label_class_get()
const Eo_Class *elm_obj_label_class_get(void) EINA_CONST;
extern EAPI Eo_Op ELM_OBJ_LABEL_BASE_ID;
enum
{
ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET,
ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET,
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET,
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET,
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET,
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET,
ELM_OBJ_LABEL_SUB_ID_SLIDE_GO,
ELM_OBJ_LABEL_SUB_ID_LAST
};
#define ELM_OBJ_LABEL_ID(sub_id) (ELM_OBJ_LABEL_BASE_ID + sub_id)
/**
* @def elm_obj_label_line_wrap_set
* @since 1.8
*
* @brief Set the wrapping behavior of the label
*
* @param[in] wrap
*
* @see elm_label_line_wrap_set
*
* @ingroup Label
*/
#define elm_obj_label_line_wrap_set(wrap) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_SET), EO_TYPECHECK(Elm_Wrap_Type, wrap)
/**
* @def elm_obj_label_line_wrap_get
* @since 1.8
*
* @brief Get the wrapping behavior of the label
*
* @param[out] ret
*
* @see elm_label_line_wrap_get
*
* @ingroup Label
*/
#define elm_obj_label_line_wrap_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_LINE_WRAP_GET), EO_TYPECHECK(Elm_Wrap_Type *, ret)
/**
* @def elm_obj_label_wrap_width_set
* @since 1.8
*
* @brief Set wrap width of the label
*
* @param[in] w
*
* @see elm_label_wrap_width_set
*
* @ingroup Label
*/
#define elm_obj_label_wrap_width_set(w) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_SET), EO_TYPECHECK(Evas_Coord, w)
/**
* @def elm_obj_label_wrap_width_get
* @since 1.8
*
* @brief Get wrap width of the label
*
* @param[out] ret
*
* @see elm_label_wrap_width_get
*
* @ingroup Label
*/
#define elm_obj_label_wrap_width_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), EO_TYPECHECK(Evas_Coord *, ret)
/**
* @def elm_obj_label_ellipsis_set
* @since 1.8
*
* @brief Set the ellipsis behavior of the label
*
* @param[in] ellipsis
*
* @see elm_label_ellipsis_set
*
* @ingroup Label
*/
#define elm_obj_label_ellipsis_set(ellipsis) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), EO_TYPECHECK(Eina_Bool, ellipsis)
/**
* @def elm_obj_label_ellipsis_get
* @since 1.8
*
* @brief Get the ellipsis behavior of the label
*
* @param[out] ret
*
* @see elm_label_ellipsis_get
*
* @ingroup Label
*/
#define elm_obj_label_ellipsis_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)
/**
* @def elm_obj_label_slide_mode_set
* @since 1.8
*
* @brief Set slide effect mode of label widget.
*
* @param[in] mode
*
* @see elm_label_slide_mode_set
*
* @ingroup Label
*/
#define elm_obj_label_slide_mode_set(mode) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), EO_TYPECHECK(Elm_Label_Slide_Mode, mode)
/**
* @def elm_obj_label_slide_mode_get
* @since 1.8
*
* @brief Get current slide effect mode.
*
* @param[out] ret
*
* @see elm_label_slide_mode_get
*
* @ingroup Label
*/
#define elm_obj_label_slide_mode_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), EO_TYPECHECK(Elm_Label_Slide_Mode *, ret)
/**
* @def elm_obj_label_slide_duration_set
* @since 1.8
*
* @brief Set the slide duration (speed) of the label
*
* @param[in] duration
*
* @see elm_label_slide_duration_set
*
* @ingroup Label
*/
#define elm_obj_label_slide_duration_set(duration) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), EO_TYPECHECK(double, duration)
/**
* @def elm_obj_label_slide_duration_get
* @since 1.8
*
* @brief Get the slide duration(speed) of the label
*
* @param[out] ret
*
* @see elm_label_slide_duration_get
*
* @ingroup Label
*/
#define elm_obj_label_slide_duration_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)
/**
* @def elm_obj_label_slide_go
* @since 1.8
*
* @brief Start slide effect
*
* @see elm_label_slide_mode_set
*
* @ingroup Label
*/
#define elm_obj_label_slide_go() ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GO)

View File

@ -0,0 +1,175 @@
/**
* @brief 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);
/**
* @brief Slide only if the
*
* @param obj The label object
* @param duration The duration in seconds in moving text from slide begin position
* to slide end position
*
* @ingroup Label
*/
EAPI void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit);
/**
* @brief Set the wrapping behavior of the label
*
* @param obj The label object
* @param wrap To wrap text or not
*
* By default no wrapping is done. Possible values for @p wrap are:
* @li ELM_WRAP_NONE - No wrapping
* @li ELM_WRAP_CHAR - wrap between characters
* @li ELM_WRAP_WORD - wrap between words
* @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap
*
* @ingroup Label
*/
EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap);
/**
* @brief Get the wrapping behavior of the label
*
* @param obj The label object
* @return Wrap type
*
* @see elm_label_line_wrap_set()
*
* @ingroup Label
*/
EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj);
/**
* @brief 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
*
* This function sets the maximum width size hint of the label.
*
* @warning This is only relevant if the label is inside a container.
*
* @ingroup Label
*/
EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w);
/**
* @brief 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
*
* @see elm_label_wrap_width_set()
*
* @ingroup Label
*/
EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj);
/**
* @brief Set the ellipsis behavior of the label
*
* @param obj The label object
* @param ellipsis To ellipsis text or not
*
* If set to true and the text doesn't fit in the label an ellipsis("...")
* will be shown at the end of the widget.
*
* @warning This doesn't work with slide(elm_label_slide_set()) or if the
* chosen wrap method was #ELM_WRAP_WORD.
*
* @ingroup Label
*/
EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
/**
* @brief Get the ellipsis behavior of the label
*
* @param obj The label object
* @return If true, an ellipsis will be shown at the end of the label area.
*
* @see elm_label_ellipsis_set()
*
* @ingroup Label
*/
EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
/**
* @brief Set the slide mode of the label widget.
*
* @param obj The label object
* @param mode The slide mode
*
* elm_label_slide_mode_set() changes label slide mode.
* By default, slide mode is none. Possible values for @p mode are:
* @li ELM_LABEL_SLIDE_MODE_NONE - no slide effect
* @li ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
* the text width length
* @li ELM_LABEL_SLIDE_MODE_ALWAYS -slide always
*
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS only work
* with the themes "slide_short", "slide_long" and "slide_bounce".
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS don't work
* if the line wrap(elm_label_line_wrap_set()) or
* ellipsis(elm_label_ellipsis_set()) is set.
*
* @see elm_label_slide_mode_get().
* @since 1.8
*
* @ingroup Label
*/
EAPI void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode);
/**
* @brief Get the slide mode of the label widget.
*
* @param obj The label object
* @return The slide mode
*
* @see elm_label_slide_mode_set()
* @since 1.8
*
* @ingroup Label
*/
EAPI Elm_Label_Slide_Mode elm_label_slide_mode_get(const Evas_Object *obj);
/**
* @brief Set the slide duration (speed) of the label
*
* @param obj The label object
* @param duration The duration in seconds 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);
/**
* @brief 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
*
* @see elm_label_slide_duration_set()
*
* @ingroup Label
*/
EAPI double elm_label_slide_duration_get(const Evas_Object *obj);
/**
* @brief Start slide effect.
*
* @param obj The label object
*
* @see elm_label_slide_mode_set()
* @since 1.8
*
* @ingroup Label
*/
EAPI void elm_label_slide_go(Evas_Object *obj);