*
@code
#include <Elementary.h>
-EAPI int
+EAPI_MAIN int
elm_main(int argc, char **argv)
{
// create window(s) here and do any application init
*
* To use autotools (which helps in many ways in the long run, like being able
* to immediately create releases of your software directly from your tree
- * and ensure everything needed to buiuld it is there) you will need a
+ * and ensure everything needed to build it is there) you will need a
* configure.ac, Makefile.am and autogen.sh file.
*
* configure.ac:
* There is a more advanced way of making use of the quicklaunch infrastructure
* in Elementary (which will not be covered here due to its more advanced
* nature).
- *
+ *
* Now let's actually create an interactive "Hello World" gui that you can
* click the ok button to exit. It's more code because this now does something
* much more significant, but it's still very simple:
elm_exit();
}
-EAPI int
+EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *bg, *box, *lab, *btn;
-
+
// new window - do the usual and give it a name, title and delete handler
win = elm_win_add(NULL, "hello", ELM_WIN_BASIC);
elm_win_title_set(win, "Hello");
// when the user clicks "close" on a window there is a request to delete
evas_object_smart_callback_add(win, "delete,request", on_done, NULL);
-
+
// add a standard bg
bg = elm_bg_add(win);
// add object as a resize object for the window (controls window minimum
// size as well as gets resized if window is resized)
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
-
+
// add a box object - default is vertical. a box holds children in a row,
// either horizontally or vertically. nothing more.
box = elm_box_add(win);
// size as well as gets resized if window is resized)
elm_win_resize_object_add(win, box);
evas_object_show(box);
-
+
// add a label widget, set the text and put it in the pad frame
lab = elm_label_add(win);
// set default text of the label
// pack the label at the end of the box
elm_box_pack_end(box, lab);
evas_object_show(lab);
-
+
// add an ok button
btn = elm_button_add(win);
// set default text of button to "OK"
evas_object_show(btn);
// call on_done when button is clicked
evas_object_smart_callback_add(btn, "clicked", on_done, NULL);
-
+
// now we are done, show the window
evas_object_show(win);
-
+
// run the mainloop and process events and callbacks
elm_run();
return 0;
}
ELM_MAIN()
@endcode
- *
+ *
*/
/**
@author Shinwoo Kim <kimcinoo@@gmail.com>
@author Govindaraju SM <govi.sm@@samsung.com> <govism@@gmail.com>
@author Prince Kumar Dubey <prince.dubey@@samsung.com> <prince.dubey@@gmail.com>
+@author Sung W. Park <sungwoo@gmail.com>
+@author Thierry el Borgi <thierry@substantiel.fr>
+@author Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com>
+@author Chanwook Jung <joey.jung@samsung.com>
+@author Hyoyoung Chang <hyoyoung.chang@samsung.com>
+@author Guillaume "Kuri" Friloux <guillaume.friloux@asp64.com>
+@author Kim Yunhan <spbear@gmail.com>
Please contact <enlightenment-devel@lists.sourceforge.net> to get in
contact with the developers and maintainers.
@ELM_EDBUS_DEF@ ELM_EDBUS
@ELM_EFREET_DEF@ ELM_EFREET
@ELM_ETHUMB_DEF@ ELM_ETHUMB
+@ELM_WEB_DEF@ ELM_WEB
@ELM_EMAP_DEF@ ELM_EMAP
@ELM_DEBUG_DEF@ ELM_DEBUG
@ELM_ALLOCA_H_DEF@ ELM_ALLOCA_H
# endif
#endif /* ! _WIN32 */
+#ifdef _WIN32
+# define EAPI_MAIN
+#else
+# define EAPI_MAIN EAPI
+#endif
/* allow usage from c++ */
#ifdef __cplusplus
*/
typedef enum _Elm_Policy
{
- ELM_POLICY_QUIT, /**< under which circunstances the application
+ ELM_POLICY_QUIT, /**< under which circumstances the application
* should quit automatically. @see
* Elm_Policy_Quit.
*/
ELM_WRAP_LAST
} Elm_Wrap_Type;
+ 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
+ } Elm_Input_Panel_Layout;
+
/**
* @typedef Elm_Object_Item
* An Elementary Object item handle.
*/
typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item);
- typedef Eina_Bool (*Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info);
+ typedef Eina_Bool (*Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info); /**< Function prototype definition for callbacks on input events happening on Elementary widgets. @a data will receive the user data pointer passed to elm_object_event_callback_add(). @a src will be a pointer to the widget on which the input event took place. @a type will get the type of this event and @a event_info, the struct with details on this event. */
#ifndef ELM_LIB_QUICKLAUNCH
#define ELM_MAIN() int main(int argc, char **argv) {elm_init(argc, argv); return elm_main(argc, argv);} /**< macro to be used after the elm_main() function */
* @return The init counter value.
*
* This function initializes Elementary and increments a counter of
- * the number of calls to it. It returs the new counter's value.
+ * the number of calls to it. It returns the new counter's value.
*
* @warning This call is exported only for use by the @c ELM_MAIN()
* macro. There is no need to use this if you use this macro (which
EAPI Eina_Bool elm_need_efreet(void);
EAPI Eina_Bool elm_need_e_dbus(void);
+
+ /**
+ * This must be called before any other function that handle with
+ * elm_thumb objects or ethumb_client instances.
+ *
+ * @ingroup Thumb
+ */
EAPI Eina_Bool elm_need_ethumb(void);
/**
+ * This must be called before any other function that handle with
+ * elm_web objects or ewk_view instances.
+ *
+ * @ingroup Web
+ */
+ EAPI Eina_Bool elm_need_web(void);
+
+ /**
* Set a new policy's value (for a given policy group/identifier).
*
* @param policy policy identifier, as in @ref Elm_Policy.
* Set a content of an object item
*
* @param it The Elementary object item
- * @param part The content part name to unset (NULL for the default content)
+ * @param part The content part name to set (NULL for the default content)
* @param content The new content of the object item
*
* @note Elementary object items may have many contents
*
* @ingroup General
*/
- EAPI Evas_Object *elm_object_item_content_part_get(const Elm_Object_Item *it, const char *item);
+ EAPI Evas_Object *elm_object_item_content_part_get(const Elm_Object_Item *it, const char *part);
-#define elm_object_item_content_get(it, content) elm_object_item_content_part_get((it), NULL, (content))
+#define elm_object_item_content_get(it) elm_object_item_content_part_get((it), NULL)
/**
* Unset a content of an object item
*/
EAPI Evas_Object *elm_object_item_content_part_unset(Elm_Object_Item *it, const char *part);
-#define elm_object_item_content_unset(it, content) elm_object_item_content_part_unset((it), (content))
+#define elm_object_item_content_unset(it) elm_object_item_content_part_unset((it), NULL)
/**
* Set a label of an objec itemt
*/
EAPI const char *elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part);
-#define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
+ /**
+ * Set the text to read out when in accessibility mode
+ *
+ * @param obj The object which is to be described
+ * @param txt The text that describes the widget to people with poor or no vision
+ *
+ * @ingroup General
+ */
+ EAPI void elm_object_access_info_set(Evas_Object *obj, const char *txt);
+
+ /**
+ * Set the text to read out when in accessibility mode
+ *
+ * @param it The object item which is to be described
+ * @param txt The text that describes the widget to people with poor or no vision
+ *
+ * @ingroup General
+ */
+ EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
+
+
+#define elm_object_item_text_get(it) elm_object_item_text_part_get((it), NULL)
+
+ /**
+ * Get the data associated with an object item
+ * @param it The object item
+ * @return The data associated with @p it
+ *
+ * @ingroup General
+ */
+ EAPI void *elm_object_item_data_get(const Elm_Object_Item *it);
+
+ /**
+ * Set the data associated with an object item
+ * @param it The object item
+ * @param data The data to be associated with @p it
+ *
+ * @ingroup General
+ */
+ EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data);
+
+ /**
+ * Send a signal to the edje object of the widget item.
+ *
+ * This function sends a signal to the edje object of the obj item. An
+ * edje program can respond to a signal by specifying matching
+ * 'signal' and 'source' fields.
+ *
+ * @param it The Elementary object item
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @ingroup General
+ */
+ EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source) EINA_ARG_NONNULL(1);
/**
* @}
*/
+ /**
+ * @defgroup Caches Caches
+ *
+ * These are functions which let one fine-tune some cache values for
+ * Elementary applications, thus allowing for performance adjustments.
+ *
+ * @{
+ */
+
+ /**
+ * @brief Flush all caches.
+ *
+ * Frees all data that was in cache and is not currently being used to reduce
+ * memory usage. This frees Edje's, Evas' and Eet's cache. This is equivalent
+ * to calling all of the following functions:
+ * @li edje_file_cache_flush()
+ * @li edje_collection_cache_flush()
+ * @li eet_clearcache()
+ * @li evas_image_cache_flush()
+ * @li evas_font_cache_flush()
+ * @li evas_render_dump()
+ * @note Evas caches are flushed for every canvas associated with a window.
+ *
+ * @ingroup Caches
+ */
EAPI void elm_all_flush(void);
+
+ /**
+ * Get the configured cache flush interval time
+ *
+ * This gets the globally configured cache flush interval time, in
+ * ticks
+ *
+ * @return The cache flush interval time
+ * @ingroup Caches
+ *
+ * @see elm_all_flush()
+ */
EAPI int elm_cache_flush_interval_get(void);
+
+ /**
+ * Set the configured cache flush interval time
+ *
+ * This sets the globally configured cache flush interval time, in ticks
+ *
+ * @param size The cache flush interval time
+ * @ingroup Caches
+ *
+ * @see elm_all_flush()
+ */
EAPI void elm_cache_flush_interval_set(int size);
+
+ /**
+ * Set the configured cache flush interval time for all applications on the
+ * display
+ *
+ * This sets the globally configured cache flush interval time -- in ticks
+ * -- for all applications on the display.
+ *
+ * @param size The cache flush interval time
+ * @ingroup Caches
+ */
EAPI void elm_cache_flush_interval_all_set(int size);
+
+ /**
+ * Get the configured cache flush enabled state
+ *
+ * This gets the globally configured cache flush state - if it is enabled
+ * or not. When cache flushing is enabled, elementary will regularly
+ * (see elm_cache_flush_interval_get() ) flush caches and dump data out of
+ * memory and allow usage to re-seed caches and data in memory where it
+ * can do so. An idle application will thus minimise its memory usage as
+ * data will be freed from memory and not be re-loaded as it is idle and
+ * not rendering or doing anything graphically right now.
+ *
+ * @return The cache flush state
+ * @ingroup Caches
+ *
+ * @see elm_all_flush()
+ */
EAPI Eina_Bool elm_cache_flush_enabled_get(void);
+
+ /**
+ * Set the configured cache flush enabled state
+ *
+ * This sets the globally configured cache flush enabled state
+ *
+ * @param size The cache flush enabled state
+ * @ingroup Caches
+ *
+ * @see elm_all_flush()
+ */
EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
+
+ /**
+ * Set the configured cache flush enabled state for all applications on the
+ * display
+ *
+ * This sets the globally configured cache flush enabled state for all
+ * applications on the display.
+ *
+ * @param size The cache flush enabled state
+ * @ingroup Caches
+ */
EAPI void elm_cache_flush_enabled_all_set(Eina_Bool enabled);
+
+ /**
+ * Get the configured font cache size
+ *
+ * This gets the globally configured font cache size, in bytes
+ *
+ * @return The font cache size
+ * @ingroup Caches
+ */
EAPI int elm_font_cache_get(void);
+
+ /**
+ * Set the configured font cache size
+ *
+ * This sets the globally configured font cache size, in bytes
+ *
+ * @param size The font cache size
+ * @ingroup Caches
+ */
EAPI void elm_font_cache_set(int size);
+
+ /**
+ * Set the configured font cache size for all applications on the
+ * display
+ *
+ * This sets the globally configured font cache size -- in bytes
+ * -- for all applications on the display.
+ *
+ * @param size The font cache size
+ * @ingroup Caches
+ */
EAPI void elm_font_cache_all_set(int size);
+
+ /**
+ * Get the configured image cache size
+ *
+ * This gets the globally configured image cache size, in bytes
+ *
+ * @return The image cache size
+ * @ingroup Caches
+ */
EAPI int elm_image_cache_get(void);
+
+ /**
+ * Set the configured image cache size
+ *
+ * This sets the globally configured image cache size, in bytes
+ *
+ * @param size The image cache size
+ * @ingroup Caches
+ */
EAPI void elm_image_cache_set(int size);
+
+ /**
+ * Set the configured image cache size for all applications on the
+ * display
+ *
+ * This sets the globally configured image cache size -- in bytes
+ * -- for all applications on the display.
+ *
+ * @param size The image cache size
+ * @ingroup Caches
+ */
EAPI void elm_image_cache_all_set(int size);
+
+ /**
+ * Get the configured edje file cache size.
+ *
+ * This gets the globally configured edje file cache size, in number
+ * of files.
+ *
+ * @return The edje file cache size
+ * @ingroup Caches
+ */
EAPI int elm_edje_file_cache_get(void);
+
+ /**
+ * Set the configured edje file cache size
+ *
+ * This sets the globally configured edje file cache size, in number
+ * of files.
+ *
+ * @param size The edje file cache size
+ * @ingroup Caches
+ */
EAPI void elm_edje_file_cache_set(int size);
+
+ /**
+ * Set the configured edje file cache size for all applications on the
+ * display
+ *
+ * This sets the globally configured edje file cache size -- in number
+ * of files -- for all applications on the display.
+ *
+ * @param size The edje file cache size
+ * @ingroup Caches
+ */
EAPI void elm_edje_file_cache_all_set(int size);
+
+ /**
+ * Get the configured edje collections (groups) cache size.
+ *
+ * This gets the globally configured edje collections cache size, in
+ * number of collections.
+ *
+ * @return The edje collections cache size
+ * @ingroup Caches
+ */
EAPI int elm_edje_collection_cache_get(void);
+
+ /**
+ * Set the configured edje collections (groups) cache size
+ *
+ * This sets the globally configured edje collections cache size, in
+ * number of collections.
+ *
+ * @param size The edje collections cache size
+ * @ingroup Caches
+ */
EAPI void elm_edje_collection_cache_set(int size);
+
+ /**
+ * Set the configured edje collections (groups) cache size for all
+ * applications on the display
+ *
+ * This sets the globally configured edje collections cache size -- in
+ * number of collections -- for all applications on the display.
+ *
+ * @param size The edje collections cache size
+ * @ingroup Caches
+ */
EAPI void elm_edje_collection_cache_all_set(int size);
/**
- * @defgroup Scaling Selective Widget Scaling
+ * @}
+ */
+
+ /**
+ * @defgroup Scaling Widget Scaling
*
* Different widgets can be scaled independently. These functions
* allow you to manipulate this scaling on a per-widget basis. The
*/
/**
+ * Get the global scaling factor
+ *
+ * This gets the globally configured scaling factor that is applied to all
+ * objects.
+ *
+ * @return The scaling factor
+ * @ingroup Scaling
+ */
+ EAPI double elm_scale_get(void);
+
+ /**
+ * Set the global scaling factor
+ *
+ * This sets the globally configured scaling factor that is applied to all
+ * objects.
+ *
+ * @param scale The scaling factor to set
+ * @ingroup Scaling
+ */
+ EAPI void elm_scale_set(double scale);
+
+ /**
+ * Set the global scaling factor for all applications on the display
+ *
+ * This sets the globally configured scaling factor that is applied to all
+ * objects for all applications.
+ * @param scale The scaling factor to set
+ * @ingroup Scaling
+ */
+ EAPI void elm_scale_all_set(double scale);
+
+ /**
* Set the scaling factor for a given Elementary object
*
* @param obj The Elementary to operate on
* @ingroup Scaling
*/
EAPI double elm_object_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * @defgroup Password_last_show Password last input show
+ *
+ * Last show feature of password mode enables user to view
+ * the last input entered for few seconds before masking it.
+ * These functions allow to set this feature in password mode
+ * of entry widget and also allow to manipulate the duration
+ * for which the input has to be visible.
+ *
+ * @{
+ */
+
+ /**
+ * Get show last setting of password mode.
+ *
+ * This gets the show last input setting of password mode which might be
+ * enabled or disabled.
+ *
+ * @return @c EINA_TRUE, if the last input show setting is enabled, @c EINA_FALSE
+ * if it's disabled.
+ * @ingroup Password_last_show
+ */
+ EAPI Eina_Bool elm_password_show_last_get(void);
+
+ /**
+ * Set show last setting in password mode.
+ *
+ * This enables or disables show last setting of password mode.
+ *
+ * @param password_show_last If EINA_TRUE enable's last input show in password mode.
+ * @see elm_password_show_last_timeout_set()
+ * @ingroup Password_last_show
+ */
+ EAPI void elm_password_show_last_set(Eina_Bool password_show_last);
+
+ /**
+ * Get's the timeout value in last show password mode.
+ *
+ * This gets the time out value for which the last input entered in password
+ * mode will be visible.
+ *
+ * @return The timeout value of last show password mode.
+ * @ingroup Password_last_show
+ */
+ EAPI double elm_password_show_last_timeout_get(void);
+
+ /**
+ * Set's the timeout value in last show password mode.
+ *
+ * This sets the time out value for which the last input entered in password
+ * mode will be visible.
+ *
+ * @param password_show_last_timeout The timeout value.
+ * @see elm_password_show_last_set()
+ * @ingroup Password_last_show
+ */
+ EAPI void elm_password_show_last_timeout_set(double password_show_last_timeout);
+
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup UI-Mirroring Selective Widget mirroring
+ *
+ * These functions allow you to set ui-mirroring on specific
+ * widgets or the whole interface. Widgets can be in one of two
+ * modes, automatic and manual. Automatic means they'll be changed
+ * according to the system mirroring mode and manual means only
+ * explicit changes will matter. You are not supposed to change
+ * mirroring state of a widget set to automatic, will mostly work,
+ * but the behavior is not really defined.
+ *
+ * @{
+ */
+
+ EAPI Eina_Bool elm_mirrored_get(void);
+ EAPI void elm_mirrored_set(Eina_Bool mirrored);
+
+ /**
+ * Get the system mirrored mode. This determines the default mirrored mode
+ * of widgets.
+ *
+ * @return EINA_TRUE if mirrored is set, EINA_FALSE otherwise
+ */
EAPI Eina_Bool elm_object_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the system mirrored mode. This determines the default mirrored mode
+ * of widgets.
+ *
+ * @param mirrored EINA_TRUE to set mirrored mode, EINA_FALSE to unset it.
+ */
EAPI void elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
+
+ /**
+ * Returns the widget's mirrored mode setting.
+ *
+ * @param obj The widget.
+ * @return mirrored mode setting of the object.
+ *
+ **/
EAPI Eina_Bool elm_object_mirrored_automatic_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Sets the widget's mirrored mode setting.
+ * When widget in automatic mode, it follows the system mirrored mode set by
+ * elm_mirrored_set().
+ * @param obj The widget.
+ * @param automatic EINA_TRUE for auto mirrored mode. EINA_FALSE for manual.
+ */
EAPI void elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic) EINA_ARG_NONNULL(1);
+
+ /**
+ * @}
+ */
+
/**
* Set the style to use by a widget
*
* @param style The style name to use
*
* @see elm_theme_extension_add()
+ * @see elm_theme_extension_del()
* @see elm_theme_overlay_add()
+ * @see elm_theme_overlay_del()
*
- * @ingroup Theme
+ * @ingroup Styles
*/
EAPI void elm_object_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
/**
*
* @see elm_object_style_set()
*
- * @ingroup Theme
+ * @ingroup Styles
*/
EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
* some of these functions.
*/
+ /**
+ * Check if the given Evas Object is an Elementary widget.
+ *
+ * @param obj the object to query.
+ * @return @c EINA_TRUE if it is an elementary widget variant,
+ * @c EINA_FALSE otherwise
+ * @ingroup WidgetNavigation
+ */
EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @ingroup WidgetNavigation
*/
EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Evas_Object *elm_object_top_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI const char *elm_object_widget_type_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI double elm_scale_get(void);
- EAPI void elm_scale_set(double scale);
- EAPI void elm_scale_all_set(double scale);
+ /**
+ * Get the top level parent of an Elementary widget.
+ *
+ * @param obj The object to query.
+ * @return The top level Elementary widget, or @c NULL if parent cannot be
+ * found.
+ * @ingroup WidgetNavigation
+ */
+ EAPI Evas_Object *elm_object_top_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_mirrored_get(void);
- EAPI void elm_mirrored_set(Eina_Bool mirrored);
+ /**
+ * Get the string that represents this Elementary widget.
+ *
+ * @note Elementary is weird and exposes itself as a single
+ * Evas_Object_Smart_Class of type "elm_widget", so
+ * evas_object_type_get() always return that, making debug and
+ * language bindings hard. This function tries to mitigate this
+ * problem, but the solution is to change Elementary to use
+ * proper inheritance.
+ *
+ * @param obj the object to query.
+ * @return Elementary widget name, or @c NULL if not a valid widget.
+ * @ingroup WidgetNavigation
+ */
+ EAPI const char *elm_object_widget_type_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * @defgroup Config Elementary Config
+ *
+ * Elementary configuration is formed by a set options bounded to a
+ * given @ref Profile profile, like @ref Theme theme, @ref Fingers
+ * "finger size", etc. These are functions with which one syncronizes
+ * changes made to those values to the configuration storing files, de
+ * facto. You most probably don't want to use the functions in this
+ * group unlees you're writing an elementary configuration manager.
+ *
+ * @{
+ */
+ /**
+ * Save back Elementary's configuration, so that it will persist on
+ * future sessions.
+ *
+ * @return @c EINA_TRUE, when sucessful. @c EINA_FALSE, otherwise.
+ * @ingroup Config
+ *
+ * This function will take effect -- thus, do I/O -- immediately. Use
+ * it when you want to apply all configuration changes at once. The
+ * current configuration set will get saved onto the current profile
+ * configuration file.
+ *
+ */
EAPI Eina_Bool elm_config_save(void);
+
+ /**
+ * Reload Elementary's configuration, bounded to current selected
+ * profile.
+ *
+ * @return @c EINA_TRUE, when sucessful. @c EINA_FALSE, otherwise.
+ * @ingroup Config
+ *
+ * Useful when you want to force reloading of configuration values for
+ * a profile. If one removes user custom configuration directories,
+ * for example, it will force a reload with system values insted.
+ *
+ */
EAPI void elm_config_reload(void);
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Profile Elementary Profile
+ *
+ * Profiles are pre-set options that affect the whole look-and-feel of
+ * Elementary-based applications. There are, for example, profiles
+ * aimed at desktop computer applications and others aimed at mobile,
+ * touchscreen-based ones. You most probably don't want to use the
+ * functions in this group unlees you're writing an elementary
+ * configuration manager.
+ *
+ * @{
+ */
+
+ /**
+ * Get Elementary's profile in use.
+ *
+ * This gets the global profile that is applied to all Elementary
+ * applications.
+ *
+ * @return The profile's name
+ * @ingroup Profile
+ */
EAPI const char *elm_profile_current_get(void);
+
+ /**
+ * Get an Elementary's profile directory path in the filesystem. One
+ * may want to fetch a system profile's dir or an user one (fetched
+ * inside $HOME).
+ *
+ * @param profile The profile's name
+ * @param is_user Whether to lookup for an user profile (@c EINA_TRUE)
+ * or a system one (@c EINA_FALSE)
+ * @return The profile's directory path.
+ * @ingroup Profile
+ *
+ * @note You must free it with elm_profile_dir_free().
+ */
EAPI const char *elm_profile_dir_get(const char *profile, Eina_Bool is_user);
+
+ /**
+ * Free an Elementary's profile directory path, as returned by
+ * elm_profile_dir_get().
+ *
+ * @param p_dir The profile's path
+ * @ingroup Profile
+ *
+ */
EAPI void elm_profile_dir_free(const char *p_dir);
+
+ /**
+ * Get Elementary's list of available profiles.
+ *
+ * @return The profiles list. List node data are the profile name
+ * strings.
+ * @ingroup Profile
+ *
+ * @note One must free this list, after usage, with the function
+ * elm_profile_list_free().
+ */
EAPI Eina_List *elm_profile_list_get(void);
+
+ /**
+ * Free Elementary's list of available profiles.
+ *
+ * @param l The profiles list, as returned by elm_profile_list_get().
+ * @ingroup Profile
+ *
+ */
EAPI void elm_profile_list_free(Eina_List *l);
+
+ /**
+ * Set Elementary's profile.
+ *
+ * This sets the global profile that is applied to Elementary
+ * applications. Just the process the call comes from will be
+ * affected.
+ *
+ * @param profile The profile's name
+ * @ingroup Profile
+ *
+ */
EAPI void elm_profile_set(const char *profile);
+
+ /**
+ * Set Elementary's profile.
+ *
+ * This sets the global profile that is applied to all Elementary
+ * applications. All running Elementary windows will be affected.
+ *
+ * @param profile The profile's name
+ * @ingroup Profile
+ *
+ */
EAPI void elm_profile_all_set(const char *profile);
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Engine Elementary Engine
+ *
+ * These are functions setting and querying which rendering engine
+ * Elementary will use for drawing its windows' pixels.
+ *
+ * The following are the available engines:
+ * @li "software_x11"
+ * @li "fb"
+ * @li "directfb"
+ * @li "software_16_x11"
+ * @li "software_8_x11"
+ * @li "xrender_x11"
+ * @li "opengl_x11"
+ * @li "software_gdi"
+ * @li "software_16_wince_gdi"
+ * @li "sdl"
+ * @li "software_16_sdl"
+ * @li "opengl_sdl"
+ * @li "buffer"
+ *
+ * @{
+ */
+
+ /**
+ * @brief Get Elementary's rendering engine in use.
+ *
+ * @return The rendering engine's name
+ * @note there's no need to free the returned string, here.
+ *
+ * This gets the global rendering engine that is applied to all Elementary
+ * applications.
+ *
+ * @see elm_engine_set()
+ */
EAPI const char *elm_engine_current_get(void);
+
+ /**
+ * @brief Set Elementary's rendering engine for use.
+ *
+ * @param engine The rendering engine's name
+ *
+ * This sets global rendering engine that is applied to all Elementary
+ * applications. Note that it will take effect only to Elementary windows
+ * created after this is called.
+ *
+ * @see elm_win_add()
+ */
EAPI void elm_engine_set(const char *engine);
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Fonts Elementary Fonts
+ *
+ * These are functions dealing with font rendering, selection and the
+ * like for Elementary applications. One might fetch which system
+ * fonts are there to use and set custom fonts for individual classes
+ * of UI items containing text (text classes).
+ *
+ * @{
+ */
+
typedef struct _Elm_Text_Class
{
const char *name;
Eina_List *styles;
} Elm_Font_Properties;
+ /**
+ * Get Elementary's list of supported text classes.
+ *
+ * @return The text classes list, with @c Elm_Text_Class blobs as data.
+ * @ingroup Fonts
+ *
+ * Release the list with elm_text_classes_list_free().
+ */
EAPI const Eina_List *elm_text_classes_list_get(void);
+
+ /**
+ * Free Elementary's list of supported text classes.
+ *
+ * @ingroup Fonts
+ *
+ * @see elm_text_classes_list_get().
+ */
EAPI void elm_text_classes_list_free(const Eina_List *list);
+ /**
+ * Get Elementary's list of font overlays, set with
+ * elm_font_overlay_set().
+ *
+ * @return The font overlays list, with @c Elm_Font_Overlay blobs as
+ * data.
+ *
+ * @ingroup Fonts
+ *
+ * For each text class, one can set a <b>font overlay</b> for it,
+ * overriding the default font properties for that class coming from
+ * the theme in use. There is no need to free this list.
+ *
+ * @see elm_font_overlay_set() and elm_font_overlay_unset().
+ */
EAPI const Eina_List *elm_font_overlay_list_get(void);
+
+ /**
+ * Set a font overlay for a given Elementary text class.
+ *
+ * @param text_class Text class name
+ * @param font Font name and style string
+ * @param size Font size
+ *
+ * @ingroup Fonts
+ *
+ * @p font has to be in the format returned by
+ * elm_font_fontconfig_name_get(). @see elm_font_overlay_list_get()
+ * and elm_font_overlay_unset().
+ */
EAPI void elm_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
+
+ /**
+ * Unset a font overlay for a given Elementary text class.
+ *
+ * @param text_class Text class name
+ *
+ * @ingroup Fonts
+ *
+ * This will bring back text elements belonging to text class
+ * @p text_class back to their default font settings.
+ */
EAPI void elm_font_overlay_unset(const char *text_class);
+
+ /**
+ * Apply the changes made with elm_font_overlay_set() and
+ * elm_font_overlay_unset() on the current Elementary window.
+ *
+ * @ingroup Fonts
+ *
+ * This applies all font overlays set to all objects in the UI.
+ */
EAPI void elm_font_overlay_apply(void);
+
+ /**
+ * Apply the changes made with elm_font_overlay_set() and
+ * elm_font_overlay_unset() on all Elementary application windows.
+ *
+ * @ingroup Fonts
+ *
+ * This applies all font overlays set to all objects in the UI.
+ */
EAPI void elm_font_overlay_all_apply(void);
+ /**
+ * Translate a font (family) name string in fontconfig's font names
+ * syntax into an @c Elm_Font_Properties struct.
+ *
+ * @param font The font name and styles string
+ * @return the font properties struct
+ *
+ * @ingroup Fonts
+ *
+ * @note The reverse translation can be achived with
+ * elm_font_fontconfig_name_get(), for one style only (single font
+ * instance, not family).
+ */
EAPI Elm_Font_Properties *elm_font_properties_get(const char *font) EINA_ARG_NONNULL(1);
+
+ /**
+ * Free font properties return by elm_font_properties_get().
+ *
+ * @param efp the font properties struct
+ *
+ * @ingroup Fonts
+ */
EAPI void elm_font_properties_free(Elm_Font_Properties *efp) EINA_ARG_NONNULL(1);
+
+ /**
+ * Translate a font name, bound to a style, into fontconfig's font names
+ * syntax.
+ *
+ * @param name The font (family) name
+ * @param style The given style (may be @c NULL)
+ *
+ * @return the font name and style string
+ *
+ * @ingroup Fonts
+ *
+ * @note The reverse translation can be achived with
+ * elm_font_properties_get(), for one style only (single font
+ * instance, not family).
+ */
EAPI const char *elm_font_fontconfig_name_get(const char *name, const char *style) EINA_ARG_NONNULL(1);
+
+ /**
+ * Free the font string return by elm_font_fontconfig_name_get().
+ *
+ * @param efp the font properties struct
+ *
+ * @ingroup Fonts
+ */
EAPI void elm_font_fontconfig_name_free(const char *name) EINA_ARG_NONNULL(1);
+
+ /**
+ * Create a font hash table of available system fonts.
+ *
+ * One must call it with @p list being the return value of
+ * evas_font_available_list(). The hash will be indexed by font
+ * (family) names, being its values @c Elm_Font_Properties blobs.
+ *
+ * @param list The list of available system fonts, as returned by
+ * evas_font_available_list().
+ * @return the font hash.
+ *
+ * @ingroup Fonts
+ *
+ * @note The user is supposed to get it populated at least with 3
+ * default font families (Sans, Serif, Monospace), which should be
+ * present on most systems.
+ */
EAPI Eina_Hash *elm_font_available_hash_add(Eina_List *list);
+
+ /**
+ * Free the hash return by elm_font_available_hash_add().
+ *
+ * @param hash the hash to be freed.
+ *
+ * @ingroup Fonts
+ */
EAPI void elm_font_available_hash_del(Eina_Hash *hash);
/**
+ * @}
+ */
+
+ /**
* @defgroup Fingers Fingers
*
* Elementary is designed to be finger-friendly for touchscreens,
*
* @ref general_functions_example_page "This" example contemplates
* some of these functions.
+ *
+ * @{
*/
/**
* @ingroup Fingers
*/
EAPI Evas_Coord elm_finger_size_get(void);
+
+ /**
+ * Set the configured finger size
+ *
+ * This sets the globally configured finger size in pixels
+ *
+ * @param size The finger size
+ * @ingroup Fingers
+ */
EAPI void elm_finger_size_set(Evas_Coord size);
+
+ /**
+ * Set the configured finger size for all applications on the display
+ *
+ * This sets the globally configured finger size in pixels for all
+ * applications on the display
+ *
+ * @param size The finger size
+ * @ingroup Fingers
+ */
EAPI void elm_finger_size_all_set(Evas_Coord size);
/**
+ * @}
+ */
+
+ /**
* @defgroup Focus Focus
*
* An Elementary application has, at all times, one (and only one)
* some of these functions.
*/
+ /**
+ * Get the enable status of the focus highlight
+ *
+ * This gets whether the highlight on focused objects is enabled or not
+ * @ingroup Focus
+ */
EAPI Eina_Bool elm_focus_highlight_enabled_get(void);
+
+ /**
+ * Set the enable status of the focus highlight
+ *
+ * Set whether to show or not the highlight on focused objects
+ * @param enable Enable highlight if EINA_TRUE, disable otherwise
+ * @ingroup Focus
+ */
EAPI void elm_focus_highlight_enabled_set(Eina_Bool enable);
+
+ /**
+ * Get the enable status of the highlight animation
+ *
+ * Get whether the focus highlight, if enabled, will animate its switch from
+ * one object to the next
+ * @ingroup Focus
+ */
EAPI Eina_Bool elm_focus_highlight_animate_get(void);
+
+ /**
+ * Set the enable status of the highlight animation
+ *
+ * Set whether the focus highlight, if enabled, will animate its switch from
+ * one object to the next
+ * @param animate Enable animation if EINA_TRUE, disable otherwise
+ * @ingroup Focus
+ */
EAPI void elm_focus_highlight_animate_set(Eina_Bool animate);
/**
*/
EAPI Eina_Bool elm_object_focus_allow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set custom focus chain.
+ *
+ * This function overwrites any previous custom focus chain within
+ * the list of objects. The previous list will be deleted and this list
+ * will be managed by elementary. After it is set, don't modify it.
+ *
+ * @note On focus cycle, only will be evaluated children of this container.
+ *
+ * @param obj The container object
+ * @param objs Chain of objects to pass focus
+ * @ingroup Focus
+ */
EAPI void elm_object_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs) EINA_ARG_NONNULL(1);
- EAPI void elm_object_focus_custom_chain_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI const Eina_List *elm_object_focus_custom_chain_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_object_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) EINA_ARG_NONNULL(1);
- EAPI void elm_object_focus_direction_go(Evas_Object *obj, int x, int y) EINA_ARG_NONNULL(1);
/**
- * Make the elementary object and its children to be unfocusable (or focusable).
+ * Unset a custom focus chain on a given Elementary widget
*
- * @param obj The Elementary object to operate on
- * @param tree_unfocusable @c EINA_TRUE for unfocusable,
- * @c EINA_FALSE for focusable.
+ * @param obj The container object to remove focus chain from
*
- * This sets whether the object @p obj and its children objects
- * are able to take focus or not. If the tree is set as unfocusable,
- * newest focused object which is not in this tree will get focus.
- * This API can be helpful for an object to be deleted.
- * When an object will be deleted soon, it and its children may not
- * want to get focus (by focus reverting or by other focus controls).
- * Then, just use this API before deleting.
+ * Any focus chain previously set on @p obj (for its child objects)
+ * is removed entirely after this call.
*
- * @see elm_object_tree_unfocusable_get()
+ * @ingroup Focus
+ */
+ EAPI void elm_object_focus_custom_chain_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get custom focus chain
*
+ * @param obj The container object
* @ingroup Focus
*/
- EAPI void elm_object_tree_unfocusable_set(Evas_Object *obj, Eina_Bool tree_unfocusable); EINA_ARG_NONNULL(1);
+ EAPI const Eina_List *elm_object_focus_custom_chain_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether an Elementary object and its children are unfocusable or not.
+ * Append object to custom focus chain.
*
- * @param obj The Elementary object to get the information from
- * @return @c EINA_TRUE, if the tree is unfocussable,
- * @c EINA_FALSE if not (and on errors).
+ * @note If relative_child equal to NULL or not in custom chain, the object
+ * will be added in end.
*
- * @see elm_object_tree_unfocusable_set()
+ * @note On focus cycle, only will be evaluated children of this container.
*
+ * @param obj The container object
+ * @param child The child to be added in custom chain
+ * @param relative_child The relative object to position the child
* @ingroup Focus
*/
- EAPI Eina_Bool elm_object_tree_unfocusable_get(const Evas_Object *obj); EINA_ARG_NONNULL(1);
-
- EAPI Eina_Bool elm_scroll_bounce_enabled_get(void);
- EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled);
- EAPI void elm_scroll_bounce_enabled_all_set(Eina_Bool enabled);
- EAPI double elm_scroll_bounce_friction_get(void);
- EAPI void elm_scroll_bounce_friction_set(double friction);
- EAPI void elm_scroll_bounce_friction_all_set(double friction);
- EAPI double elm_scroll_page_scroll_friction_get(void);
- EAPI void elm_scroll_page_scroll_friction_set(double friction);
- EAPI void elm_scroll_page_scroll_friction_all_set(double friction);
- EAPI double elm_scroll_bring_in_scroll_friction_get(void);
- EAPI void elm_scroll_bring_in_scroll_friction_set(double friction);
- EAPI void elm_scroll_bring_in_scroll_friction_all_set(double friction);
- EAPI double elm_scroll_zoom_friction_get(void);
- EAPI void elm_scroll_zoom_friction_set(double friction);
- EAPI void elm_scroll_zoom_friction_all_set(double friction);
- EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void);
- EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
- EAPI void elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled);
- EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void);
- EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold);
- EAPI void elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold);
- EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void);
- EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold);
- EAPI void elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold);
- EAPI double elm_scroll_thumbscroll_friction_get(void);
- EAPI void elm_scroll_thumbscroll_friction_set(double friction);
- EAPI void elm_scroll_thumbscroll_friction_all_set(double friction);
- EAPI double elm_scroll_thumbscroll_border_friction_get(void);
- EAPI void elm_scroll_thumbscroll_border_friction_set(double friction);
- EAPI void elm_scroll_thumbscroll_border_friction_all_set(double friction);
-
- EAPI void elm_object_scroll_hold_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_object_scroll_hold_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_object_scroll_freeze_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_object_scroll_freeze_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1);
- EAPI void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_object_scroll_lock_x_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
- EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source) EINA_ARG_NONNULL(1);
- EAPI void elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) EINA_ARG_NONNULL(1, 4);
- EAPI void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) EINA_ARG_NONNULL(1, 4);
-
- EAPI void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void *elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2);
/**
- * Adjust size of an element for finger usage.
- *
- * @param times_w How many fingers should fit horizontally
- * @param w Pointer to the width size to adjust
- * @param times_h How many fingers should fit vertically
- * @param h Pointer to the height size to adjust
+ * Prepend object to custom focus chain.
*
- * This takes width and height sizes (in pixels) as input and a
- * size multiple (which is how many fingers you want to place
- * within the area, being "finger" the size set by
- * elm_finger_size_set()), and adjusts the size to be large enough
- * to accommodate the resulting size -- if it doesn't already
- * accommodate it. On return the @p w and @p h sizes pointed to by
- * these parameters will be modified, on those conditions.
+ * @note If relative_child equal to NULL or not in custom chain, the object
+ * will be added in begin.
*
- * @note This is kind of a low level Elementary call, most useful
- * on size evaluation times for widgets. An external user wouldn't
- * be calling, most of the time.
+ * @note On focus cycle, only will be evaluated children of this container.
*
- * @ingroup Fingers
+ * @param obj The container object
+ * @param child The child to be added in custom chain
+ * @param relative_child The relative object to position the child
+ * @ingroup Focus
*/
- EAPI void elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h);
-
- EAPI double elm_longpress_timeout_get(void);
- EAPI void elm_longpress_timeout_set(double longpress_timeout);
+ EAPI void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2);
- /* debug
- * don't use it unless you are sure
+ /**
+ * Give focus to next object in object tree.
+ *
+ * Give focus to next object in focus chain of one object sub-tree.
+ * If the last object of chain already have focus, the focus will go to the
+ * first object of chain.
+ *
+ * @param obj The object root of sub-tree
+ * @param dir Direction to cycle the focus
+ *
+ * @ingroup Focus
*/
- EAPI void elm_object_tree_dump(const Evas_Object *top);
- EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file);
-
+ EAPI void elm_object_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) EINA_ARG_NONNULL(1);
- /* theme */
/**
- * @defgroup Theme Theme
+ * Give focus to near object in one direction.
*
- * Elementary uses Edje to theme its widgets, naturally. But for the most
- * part this is hidden behind a simpler interface that lets the user set
- * extensions and choose the style of widgets in a much easier way.
+ * Give focus to near object in direction of one object.
+ * If none focusable object in given direction, the focus will not change.
*
- * Instead of thinking in terms of paths to Edje files and their groups
- * each time you want to change the appearance of a widget, Elementary
- * works so you can add any theme file with extensions or replace the
- * main theme at one point in the application, and then just set the style
- * of widgets with elm_object_style_set() and related functions. Elementary
- * will then look in its list of themes for a matching group and apply it,
- * and when the theme changes midway through the application, all widgets
- * will be updated accordingly.
+ * @param obj The reference object
+ * @param x Horizontal component of direction to focus
+ * @param y Vertical component of direction to focus
*
- * There are three concepts you need to know to understand how Elementary
- * theming works: default theme, extensions and overlays.
+ * @ingroup Focus
+ */
+ EAPI void elm_object_focus_direction_go(Evas_Object *obj, int x, int y) EINA_ARG_NONNULL(1);
+
+ /**
+ * Make the elementary object and its children to be unfocusable
+ * (or focusable).
*
- * Default theme, obviously enough, is the one that provides the default
- * look of all widgets. End users can change the theme used by Elementary
- * by setting the @c ELM_THEME environment variable before running an
- * application, or globally for all programs using the @c elementary_config
- * utility. Applications can change the default theme using elm_theme_set(),
- * but this can go against the user wishes, so it's not an adviced practice.
+ * @param obj The Elementary object to operate on
+ * @param tree_unfocusable @c EINA_TRUE for unfocusable,
+ * @c EINA_FALSE for focusable.
*
- * Ideally, applications should find everything they need in the already
- * provided theme, but there may be occasions when that's not enough and
- * custom styles are required to correctly express the idea. For this
- * cases, Elementary has extensions.
+ * This sets whether the object @p obj and its children objects
+ * are able to take focus or not. If the tree is set as unfocusable,
+ * newest focused object which is not in this tree will get focus.
+ * This API can be helpful for an object to be deleted.
+ * When an object will be deleted soon, it and its children may not
+ * want to get focus (by focus reverting or by other focus controls).
+ * Then, just use this API before deleting.
*
- * Extensions allow the application developer to write styles of its own
- * to apply to some widgets. This requires knowledge of how each widget
- * is themed, as extensions will always replace the entire group used by
- * the widget, so important signals and parts need to be there for the
- * object to behave properly (see documentation of Edje for details).
- * Once the theme for the extension is done, the application needs to add
- * it to the list of themes Elementary will look into, using
- * elm_theme_extension_add(), and set the style of the desired widgets as
- * he would normally with elm_object_style_set().
+ * @see elm_object_tree_unfocusable_get()
*
- * Overlays, on the other hand, can replace the look of all widgets by
- * overriding the default style. Like extensions, it's up to the application
- * developer to write the theme for the widgets it wants, the difference
- * being that when looking for the theme, Elementary will check first the
- * list of overlays, then the set theme and lastly the list of extensions,
- * so with overlays it's possible to replace the default view and every
- * widget will be affected. This is very much alike to setting the whole
- * theme for the application and will probably clash with the end user
- * options, not to mention the risk of ending up with not matching styles
- * across the program. Unless there's a very special reason to use them,
- * overlays should be avoided for the resons exposed before.
+ * @ingroup Focus
+ */
+ EAPI void elm_object_tree_unfocusable_set(Evas_Object *obj, Eina_Bool tree_unfocusable); EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether an Elementary object and its children are unfocusable or not.
*
- * All these theme lists are handled by ::Elm_Theme instances. Elementary
- * keeps one default internally and every function that receives one of
- * these can be called with NULL to refer to this default (except for
- * elm_theme_free()). It's possible to create a new instance of a
- * ::Elm_Theme to set other theme for a specific widget (and all of its
- * children), but this is as discouraged, if not even more so, than using
- * overlays. Don't use this unless you really know what you are doing.
+ * @param obj The Elementary object to get the information from
+ * @return @c EINA_TRUE, if the tree is unfocussable,
+ * @c EINA_FALSE if not (and on errors).
*
- * But to be less negative about things, you can look at the following
- * examples:
- * @li @ref theme_example_01 "Using extensions"
- * @li @ref theme_example_02 "Using overlays"
+ * @see elm_object_tree_unfocusable_set()
*
- * @{
+ * @ingroup Focus
*/
+ EAPI Eina_Bool elm_object_tree_unfocusable_get(const Evas_Object *obj); EINA_ARG_NONNULL(1);
+
/**
- * @typedef Elm_Theme
+ * @defgroup Scrolling Scrolling
*
- * Opaque handler for the list of themes Elementary looks for when
- * rendering widgets.
+ * These are functions setting how scrollable views in Elementary
+ * widgets should behave on user interaction.
*
- * Stay out of this unless you really know what you are doing. For most
- * cases, sticking to the default is all a developer needs.
+ * @{
*/
- typedef struct _Elm_Theme Elm_Theme;
/**
- * Create a new specific theme
+ * Get whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll.
*
- * This creates an empty specific theme that only uses the default theme. A
- * specific theme has its own private set of extensions and overlays too
- * (which are empty by default). Specific themes do not fall back to themes
- * of parent objects. They are not intended for this use. Use styles, overlays
- * and extensions when needed, but avoid specific themes unless there is no
- * other way (example: you want to have a preview of a new theme you are
- * selecting in a "theme selector" window. The preview is inside a scroller
- * and should display what the theme you selected will look like, but not
- * actually apply it yet. The child of the scroller will have a specific
- * theme set to show this preview before the user decides to apply it to all
- * applications).
+ * @return the thumb scroll bouncing state
+ *
+ * This is the default behavior for touch screens, in general.
+ * @ingroup Scrolling
*/
- EAPI Elm_Theme *elm_theme_new(void);
+ EAPI Eina_Bool elm_scroll_bounce_enabled_get(void);
+
/**
- * Free a specific theme
+ * Set whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll.
*
- * @param th The theme to free
+ * @param enabled the thumb scroll bouncing state
*
- * This frees a theme created with elm_theme_new().
+ * @see elm_thumbscroll_bounce_enabled_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_free(Elm_Theme *th);
+ EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled);
+
/**
- * Copy the theme fom the source to the destination theme
+ * Set whether scrollers should bounce when they reach their
+ * viewport's edge during a scroll, for all Elementary application
+ * windows.
*
- * @param th The source theme to copy from
- * @param thdst The destination theme to copy data to
+ * @param enabled the thumb scroll bouncing state
*
- * This makes a one-time static copy of all the theme config, extensions
- * and overlays from @p th to @p thdst. If @p th references a theme, then
- * @p thdst is also set to reference it, with all the theme settings,
- * overlays and extensions that @p th had.
+ * @see elm_thumbscroll_bounce_enabled_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_copy(Elm_Theme *th, Elm_Theme *thdst);
+ EAPI void elm_scroll_bounce_enabled_all_set(Eina_Bool enabled);
+
/**
- * Tell the source theme to reference the ref theme
+ * Get the amount of inertia a scroller will impose at bounce
+ * animations.
*
- * @param th The theme that will do the referencing
- * @param thref The theme that is the reference source
+ * @return the thumb scroll bounce friction
*
- * This clears @p th to be empty and then sets it to refer to @p thref
- * so @p th acts as an override to @p thref, but where its overrides
- * don't apply, it will fall through to @p thref for configuration.
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref);
+ EAPI double elm_scroll_bounce_friction_get(void);
+
/**
- * Return the theme referred to
+ * Set the amount of inertia a scroller will impose at bounce
+ * animations.
*
- * @param th The theme to get the reference from
- * @return The referenced theme handle
+ * @param friction the thumb scroll bounce friction
*
- * This gets the theme set as the reference theme by elm_theme_ref_set().
- * If no theme is set as a reference, NULL is returned.
+ * @see elm_thumbscroll_bounce_friction_get()
+ * @ingroup Scrolling
*/
- EAPI Elm_Theme *elm_theme_ref_get(Elm_Theme *th);
+ EAPI void elm_scroll_bounce_friction_set(double friction);
+
/**
- * Return the default theme
+ * Set the amount of inertia a scroller will impose at bounce
+ * animations, for all Elementary application windows.
*
- * @return The default theme handle
+ * @param friction the thumb scroll bounce friction
*
- * This returns the internal default theme setup handle that all widgets
- * use implicitly unless a specific theme is set. This is also often use
- * as a shorthand of NULL.
+ * @see elm_thumbscroll_bounce_friction_get()
+ * @ingroup Scrolling
*/
- EAPI Elm_Theme *elm_theme_default_get(void);
+ EAPI void elm_scroll_bounce_friction_all_set(double friction);
+
/**
- * Prepends a theme overlay to the list of overlays
+ * Get the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations.
*
- * @param th The theme to add to, or if NULL, the default theme
- * @param item The Edje file path to be used
- *
- * Use this if your application needs to provide some custom overlay theme
- * (An Edje file that replaces some default styles of widgets) where adding
- * new styles, or changing system theme configuration is not possible. Do
- * NOT use this instead of a proper system theme configuration. Use proper
- * configuration files, profiles, environment variables etc. to set a theme
- * so that the theme can be altered by simple confiugration by a user. Using
- * this call to achieve that effect is abusing the API and will create lots
- * of trouble.
+ * @return the page scroll friction
*
- * @see elm_theme_extension_add()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_overlay_add(Elm_Theme *th, const char *item);
+ EAPI double elm_scroll_page_scroll_friction_get(void);
+
/**
- * Delete a theme overlay from the list of overlays
+ * Set the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations.
*
- * @param th The theme to delete from, or if NULL, the default theme
- * @param item The name of the theme overlay
+ * @param friction the page scroll friction
*
- * @see elm_theme_overlay_add()
+ * @see elm_thumbscroll_page_scroll_friction_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_overlay_del(Elm_Theme *th, const char *item);
+ EAPI void elm_scroll_page_scroll_friction_set(double friction);
+
/**
- * Appends a theme extension to the list of extensions.
+ * Set the amount of inertia a <b>paged</b> scroller will impose at
+ * page fitting animations, for all Elementary application windows.
*
- * @param th The theme to add to, or if NULL, the default theme
- * @param item The Edje file path to be used
- *
- * This is intended when an application needs more styles of widgets or new
- * widget themes that the default does not provide (or may not provide). The
- * application has "extended" usage by coming up with new custom style names
- * for widgets for specific uses, but as these are not "standard", they are
- * not guaranteed to be provided by a default theme. This means the
- * application is required to provide these extra elements itself in specific
- * Edje files. This call adds one of those Edje files to the theme search
- * path to be search after the default theme. The use of this call is
- * encouraged when default styles do not meet the needs of the application.
- * Use this call instead of elm_theme_overlay_add() for almost all cases.
+ * @param friction the page scroll friction
*
- * @see elm_object_style_set()
+ * @see elm_thumbscroll_page_scroll_friction_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_extension_add(Elm_Theme *th, const char *item);
+ EAPI void elm_scroll_page_scroll_friction_all_set(double friction);
+
/**
- * Deletes a theme extension from the list of extensions.
+ * Get the amount of inertia a scroller will impose at region bring
+ * animations.
*
- * @param th The theme to delete from, or if NULL, the default theme
- * @param item The name of the theme extension
+ * @return the bring in scroll friction
*
- * @see elm_theme_extension_add()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_extension_del(Elm_Theme *th, const char *item);
+ EAPI double elm_scroll_bring_in_scroll_friction_get(void);
+
/**
- * Set the theme search order for the given theme
+ * Set the amount of inertia a scroller will impose at region bring
+ * animations.
*
- * @param th The theme to set the search order, or if NULL, the default theme
- * @param theme Theme search string
+ * @param friction the bring in scroll friction
*
- * This sets the search string for the theme in path-notation from first
- * theme to search, to last, delimited by the : character. Example:
+ * @see elm_thumbscroll_bring_in_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_bring_in_scroll_friction_set(double friction);
+
+ /**
+ * Set the amount of inertia a scroller will impose at region bring
+ * animations, for all Elementary application windows.
*
- * "shiny:/path/to/file.edj:default"
+ * @param friction the bring in scroll friction
*
- * See the ELM_THEME environment variable for more information.
+ * @see elm_thumbscroll_bring_in_scroll_friction_get()
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_bring_in_scroll_friction_all_set(double friction);
+
+ /**
+ * Get the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API.
*
- * @see elm_theme_get()
- * @see elm_theme_list_get()
+ * @return the zoom friction
+ *
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_set(Elm_Theme *th, const char *theme);
+ EAPI double elm_scroll_zoom_friction_get(void);
+
/**
- * Return the theme search order
+ * Set the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API.
*
- * @param th The theme to get the search order, or if NULL, the default theme
- * @return The internal search order path
+ * @param friction the zoom friction
*
- * This function returns a colon separated string of theme elements as
- * returned by elm_theme_list_get().
+ * @see elm_thumbscroll_zoom_friction_get()
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_zoom_friction_set(double friction);
+
+ /**
+ * Set the amount of inertia scrollers will impose at animations
+ * triggered by Elementary widgets' zooming API, for all Elementary
+ * application windows.
*
- * @see elm_theme_set()
- * @see elm_theme_list_get()
+ * @param friction the zoom friction
+ *
+ * @see elm_thumbscroll_zoom_friction_get()
+ * @ingroup Scrolling
*/
- EAPI const char *elm_theme_get(Elm_Theme *th);
+ EAPI void elm_scroll_zoom_friction_all_set(double friction);
+
/**
- * Return a list of theme elements to be used in a theme.
+ * Get whether scrollers should be draggable from any point in their
+ * views.
*
- * @param th Theme to get the list of theme elements from.
- * @return The internal list of theme elements
+ * @return the thumb scroll state
*
- * This returns the internal list of theme elements (will only be valid as
- * long as the theme is not modified by elm_theme_set() or theme is not
- * freed by elm_theme_free(). This is a list of strings which must not be
- * altered as they are also internal. If @p th is NULL, then the default
- * theme element list is returned.
+ * @note This is the default behavior for touch screens, in general.
+ * @note All other functions namespaced with "thumbscroll" will only
+ * have effect if this mode is enabled.
*
- * A theme element can consist of a full or relative path to a .edj file,
- * or a name, without extension, for a theme to be searched in the known
- * theme paths for Elemementary.
+ * @ingroup Scrolling
+ */
+ EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void);
+
+ /**
+ * Set whether scrollers should be draggable from any point in their
+ * views.
*
- * @see elm_theme_set()
- * @see elm_theme_get()
+ * @param enabled the thumb scroll state
+ *
+ * @see elm_thumbscroll_enabled_get()
+ * @ingroup Scrolling
*/
- EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th);
+ EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
+
/**
- * Return the full patrh for a theme element
+ * Set whether scrollers should be draggable from any point in their
+ * views, for all Elementary application windows.
*
- * @param f The theme element name
- * @param in_search_path Pointer to a boolean to indicate if item is in the search path or not
- * @return The full path to the file found.
+ * @param enabled the thumb scroll state
*
- * This returns a string you should free with free() on success, NULL on
- * failure. This will search for the given theme element, and if it is a
- * full or relative path element or a simple searchable name. The returned
- * path is the full path to the file, if searched, and the file exists, or it
- * is simply the full path given in the element or a resolved path if
- * relative to home. The @p in_search_path boolean pointed to is set to
- * EINA_TRUE if the file was a searchable file andis in the search path,
- * and EINA_FALSE otherwise.
+ * @see elm_thumbscroll_enabled_get()
+ * @ingroup Scrolling
*/
- EAPI char *elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path);
+ EAPI void elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled);
+
/**
- * Flush the current theme.
+ * Get the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling.
*
- * @param th Theme to flush
+ * @return the thumb scroll threshould
*
- * This flushes caches that let elementary know where to find theme elements
- * in the given theme. If @p th is NULL, then the default theme is flushed.
- * Call this function if source theme data has changed in such a way as to
- * make any caches Elementary kept invalid.
+ * One would use higher values for touch screens, in general, because
+ * of their inherent imprecision.
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_flush(Elm_Theme *th);
+ EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void);
+
/**
- * This flushes all themes (default and specific ones).
+ * Set the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling.
*
- * This will flush all themes in the current application context, by calling
- * elm_theme_flush() on each of them.
+ * @param threshold the thumb scroll threshould
+ *
+ * @see elm_thumbscroll_threshould_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_full_flush(void);
+ EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold);
+
/**
- * Set the theme for all elementary using applications on the current display
+ * Set the number of pixels one should travel while dragging a
+ * scroller's view to actually trigger scrolling, for all Elementary
+ * application windows.
*
- * @param theme The name of the theme to use. Format same as the ELM_THEME
- * environment variable.
+ * @param threshold the thumb scroll threshould
+ *
+ * @see elm_thumbscroll_threshould_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_all_set(const char *theme);
+ EAPI void elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold);
+
/**
- * Return a list of theme elements in the theme search path
+ * Get the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second).
*
- * @return A list of strings that are the theme element names.
+ * @return the thumb scroll momentum threshould
*
- * This lists all available theme files in the standard Elementary search path
- * for theme elements, and returns them in alphabetical order as theme
- * element names in a list of strings. Free this with
- * elm_theme_name_available_list_free() when you are done with the list.
+ * @ingroup Scrolling
*/
- EAPI Eina_List *elm_theme_name_available_list_new(void);
+ EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void);
+
/**
- * Free the list returned by elm_theme_name_available_list_new()
+ * Set the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second).
*
- * This frees the list of themes returned by
- * elm_theme_name_available_list_new(). Once freed the list should no longer
- * be used. a new list mys be created.
+ * @param threshold the thumb scroll momentum threshould
+ *
+ * @see elm_thumbscroll_momentum_threshould_get()
+ * @ingroup Scrolling
*/
- EAPI void elm_theme_name_available_list_free(Eina_List *list);
+ EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold);
+
/**
- * Set a specific theme to be used for this object and its children
+ * Set the minimum speed of mouse cursor movement which will trigger
+ * list self scrolling animation after a mouse up event
+ * (pixels/second), for all Elementary application windows.
*
- * @param obj The object to set the theme on
- * @param th The theme to set
+ * @param threshold the thumb scroll momentum threshould
*
- * This sets a specific theme that will be used for the given object and any
- * child objects it has. If @p th is NULL then the theme to be used is
- * cleared and the object will inherit its theme from its parent (which
- * ultimately will use the default theme if no specific themes are set).
+ * @see elm_thumbscroll_momentum_threshould_get()
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold);
+
+ /**
+ * Get the amount of inertia a scroller will impose at self scrolling
+ * animations.
*
- * Use special themes with great care as this will annoy users and make
- * configuration difficult. Avoid any custom themes at all if it can be
- * helped.
+ * @return the thumb scroll friction
+ *
+ * @ingroup Scrolling
*/
- EAPI void elm_object_theme_set(Evas_Object *obj, Elm_Theme *th) EINA_ARG_NONNULL(1);
+ EAPI double elm_scroll_thumbscroll_friction_get(void);
+
/**
- * Get the specific theme to be used
+ * Set the amount of inertia a scroller will impose at self scrolling
+ * animations.
*
- * @param obj The object to get the specific theme from
- * @return The specifc theme set.
+ * @param friction the thumb scroll friction
*
- * This will return a specific theme set, or NULL if no specific theme is
- * set on that object. It will not return inherited themes from parents, only
- * the specific theme set for that specific object. See elm_object_theme_set()
- * for more information.
+ * @see elm_thumbscroll_friction_get()
+ * @ingroup Scrolling
*/
- EAPI Elm_Theme *elm_object_theme_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_scroll_thumbscroll_friction_set(double friction);
+
/**
- * @}
+ * Set the amount of inertia a scroller will impose at self scrolling
+ * animations, for all Elementary application windows.
+ *
+ * @param friction the thumb scroll friction
+ *
+ * @see elm_thumbscroll_friction_get()
+ * @ingroup Scrolling
*/
+ EAPI void elm_scroll_thumbscroll_friction_all_set(double friction);
- /* win */
- /** @defgroup Win Win
+ /**
+ * Get the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually.
*
- * @image html img/widget/win/preview-00.png
- * @image latex img/widget/win/preview-00.eps
+ * @return the thumb scroll border friction
*
- * The window class of Elementary. Contains functions to manipulate
- * windows. The Evas engine used to render the window contents is specified
- * in the system or user elementary config files (whichever is found last),
- * and can be overridden with the ELM_ENGINE environment variable for
- * testing. Engines that may be supported (depending on Evas and Ecore-Evas
- * compilation setup and modules actually installed at runtime) are (listed
- * in order of best supported and most likely to be complete and work to
- * lowest quality).
+ * @ingroup Scrolling
+ */
+ EAPI double elm_scroll_thumbscroll_border_friction_get(void);
+
+ /**
+ * Set the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually.
*
- * @li "x11", "x", "software-x11", "software_x11" (Software rendering in X11)
- * @li "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2
- * rendering in X11)
- * @li "shot:..." (Virtual screenshot renderer - renders to output file and
- * exits)
- * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
- * rendering)
- * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
- * buffer)
- * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
- * rendering using SDL as the buffer)
- * @li "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via
- * GDI with software)
- * @li "dfb", "directfb" (Rendering to a DirectFB window)
- * @li "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in
- * grayscale using dedicated 8bit software engine in X11)
- * @li "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in
- * X11 using 16bit software engine)
- * @li "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi"
- * (Windows CE rendering via GDI with 16bit software renderer)
- * @li "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL
- * buffer with 16bit software renderer)
+ * @param friction the thumb scroll border friction. @c 0.0 for
+ * perfect synchrony between two movements, @c 1.0 for maximum
+ * lag.
*
- * All engines use a simple string to select the engine to render, EXCEPT
- * the "shot" engine. This actually encodes the output of the virtual
- * screenshot and how long to delay in the engine string. The engine string
- * is encoded in the following way:
+ * @see elm_thumbscroll_border_friction_get()
+ * @note parameter value will get bound to 0.0 - 1.0 interval, always
*
- * "shot:[delay=XX][:][repeat=DDD][:][file=XX]"
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_thumbscroll_border_friction_set(double friction);
+
+ /**
+ * Set the amount of lag between your actual mouse cursor dragging
+ * movement and a scroller's view movement itself, while pushing it
+ * into bounce state manually, for all Elementary application windows.
*
- * Where options are separated by a ":" char if more than one option is
- * given, with delay, if provided being the first option and file the last
- * (order is important). The delay specifies how long to wait after the
- * window is shown before doing the virtual "in memory" rendering and then
- * save the output to the file specified by the file option (and then exit).
- * If no delay is given, the default is 0.5 seconds. If no file is given the
- * default output file is "out.png". Repeat option is for continous
- * capturing screenshots. Repeat range is from 1 to 999 and filename is
- * fixed to "out001.png" Some examples of using the shot engine:
+ * @param friction the thumb scroll border friction. @c 0.0 for
+ * perfect synchrony between two movements, @c 1.0 for maximum
+ * lag.
*
- * ELM_ENGINE="shot:delay=1.0:repeat=5:file=elm_test.png" elementary_test
- * ELM_ENGINE="shot:delay=1.0:file=elm_test.png" elementary_test
- * ELM_ENGINE="shot:file=elm_test2.png" elementary_test
- * ELM_ENGINE="shot:delay=2.0" elementary_test
- * ELM_ENGINE="shot:" elementary_test
+ * @see elm_thumbscroll_border_friction_get()
+ * @note parameter value will get bound to 0.0 - 1.0 interval, always
*
- * Signals that you can add callbacks for are:
+ * @ingroup Scrolling
+ */
+ EAPI void elm_scroll_thumbscroll_border_friction_all_set(double friction);
+
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Scrollhints Scrollhints
*
- * @li "delete,request": the user requested to close the window. See
- * elm_win_autodel_set().
- * @li "focus,in": window got focus
- * @li "focus,out": window lost focus
- * @li "moved": window that holds the canvas was moved
+ * Objects when inside a scroller can scroll, but this may not always be
+ * desirable in certain situations. This allows an object to hint to itself
+ * and parents to "not scroll" in one of 2 ways. If any child object of a
+ * scroller has pushed a scroll freeze or hold then it affects all parent
+ * scrollers until all children have released them.
*
- * Examples:
- * @li @ref win_example_01
+ * 1. To hold on scrolling. This means just flicking and dragging may no
+ * longer scroll, but pressing/dragging near an edge of the scroller will
+ * still scroll. This is automatically used by the entry object when
+ * selecting text.
+ *
+ * 2. To totally freeze scrolling. This means it stops. until
+ * popped/released.
*
* @{
*/
+
/**
- * Defines the types of window that can be created
+ * Push the scroll hold by 1
*
- * These are hints set on the window so that a running Window Manager knows
- * how the window should be handled and/or what kind of decorations it
- * should have.
+ * This increments the scroll hold count by one. If it is more than 0 it will
+ * take effect on the parents of the indicated object.
*
- * Currently, only the X11 backed engines use them.
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- typedef enum _Elm_Win_Type
- {
- ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
- window. Almost every window will be created with this
- type. */
- ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */
- ELM_WIN_DESKTOP, /**< For special desktop windows, like a background
- window holding desktop icons. */
- ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would
- be kept on top of any other window by the Window
- Manager. */
- ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or
- similar. */
- ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */
- ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or
- pallete. */
- ELM_WIN_SPLASH, /**< Splash window for a starting up application. */
- ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an
- entry in a menubar is clicked. Typically used
- with elm_win_override_set(). This hint exists
- for completion only, as the EFL way of
- implementing a menu would not normally use a
- separate window for its contents. */
- ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu
- triggered by right-clicking an object. */
- ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of
- explanatory text that typically appear after the
- mouse cursor hovers over an object for a while.
- Typically used with elm_win_override_set() and also
- not very commonly used in the EFL. */
- ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about
- battery life or a new E-Mail received. */
- ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not
- usually used in the EFL. */
- ELM_WIN_DND, /**< Used to indicate the window is a representation of an
- object being dragged across different windows, or even
- applications. Typically used with
- elm_win_override_set(). */
- ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image
- buffer. No actual window is created for this
- type, instead the window and all of its
- contents will be rendered to an image buffer.
- This allows to have children window inside a
- parent one just like any other object would
- be, and do other things like applying @c
- Evas_Map effects to it. This is the only type
- of window that requires the @c parent
- parameter of elm_win_add() to be a valid @c
- Evas_Object. */
- } Elm_Win_Type;
+ EAPI void elm_object_scroll_hold_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * The differents layouts that can be requested for the virtual keyboard.
+ * Pop the scroll hold by 1
*
- * When the application window is being managed by Illume, it may request
- * any of the following layouts for the virtual keyboard.
+ * This decrements the scroll hold count by one. If it is more than 0 it will
+ * take effect on the parents of the indicated object.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- typedef enum _Elm_Win_Keyboard_Mode
- {
- ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */
- ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */
- ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */
- ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */
- ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */
- ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */
- ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */
- ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */
- ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QUERTY) keyboard layout */
- ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */
- ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */
- ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */
- ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */
- ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */
- ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */
- ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */
- } Elm_Win_Keyboard_Mode;
+ EAPI void elm_object_scroll_hold_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Available commands that can be sent to the Illume manager.
+ * Push the scroll freeze by 1
*
- * When running under an Illume session, a window may send commands to the
- * Illume manager to perform different actions.
+ * This increments the scroll freeze count by one. If it is more
+ * than 0 it will take effect on the parents of the indicated
+ * object.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- typedef enum _Elm_Illume_Command
- {
- ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous
- window */
- ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window\
- in the list */
- ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home
- screen */
- ELM_ILLUME_COMMAND_CLOSE /**< Closes the currently active window */
- } Elm_Illume_Command;
+ EAPI void elm_object_scroll_freeze_push(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Adds a window object. If this is the first window created, pass NULL as
- * @p parent.
- *
- * @param parent Parent object to add the window to, or NULL
- * @param name The name of the window
- * @param type The window type, one of #Elm_Win_Type.
+ * Pop the scroll freeze by 1
*
- * The @p parent paramter can be @c NULL for every window @p type except
- * #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the canvas on
- * which the image object will be created.
+ * This decrements the scroll freeze count by one. If it is more
+ * than 0 it will take effect on the parents of the indicated
+ * object.
*
- * @return The created object, or NULL on failure
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
+ EAPI void elm_object_scroll_freeze_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Add @p subobj as a resize object of window @p obj.
+ * Lock the scrolling of the given widget (and thus all parents)
*
+ * This locks the given object from scrolling in the X axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
*
- * Setting an object as a resize object of the window means that the
- * @p subobj child's size and position will be controlled by the window
- * directly. That is, the object will be resized to match the window size
- * and should never be moved or resized manually by the developer.
- *
- * In addition, resize objects of the window control what the minimum size
- * of it will be, as well as whether it can or not be resized by the user.
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
+ */
+ EAPI void elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1);
+
+ /**
+ * Lock the scrolling of the given widget (and thus all parents)
*
- * For the end user to be able to resize a window by dragging the handles
- * or borders provided by the Window Manager, or using any other similar
- * mechanism, all of the resize objects in the window should have their
- * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND.
+ * This locks the given object from scrolling in the Y axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
*
- * @param obj The window object
- * @param subobj The resize object to add
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
*/
- EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1);
+
/**
- * Delete @p subobj as a resize object of window @p obj.
+ * Get the scrolling lock of the given widget
*
- * This function removes the object @p subobj from the resize objects of
- * the window @p obj. It will not delete the object itself, which will be
- * left unmanaged and should be deleted by the developer, manually handled
- * or set as child of some other container.
+ * This gets the lock for X axis scrolling.
*
- * @param obj The window object
- * @param subobj The resize object to add
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_object_scroll_lock_x_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Set the title of the window
+ * Get the scrolling lock of the given widget
*
- * @param obj The window object
- * @param title The title to set
+ * This gets the lock for X axis scrolling.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
*/
- EAPI void elm_win_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Get the title of the window
+ * @}
+ */
+
+ /**
+ * Send a signal to the widget edje object.
*
- * The returned string is an internal one and should not be freed or
- * modified. It will also be rendered invalid if a new title is set or if
- * the window is destroyed.
+ * This function sends a signal to the edje object of the obj. An
+ * edje program can respond to a signal by specifying matching
+ * 'signal' and 'source' fields.
*
- * @param obj The window object
- * @return The title
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @ingroup General
*/
- EAPI const char *elm_win_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source) EINA_ARG_NONNULL(1);
+
/**
- * Set the window's autodel state.
- *
- * When closing the window in any way outside of the program control, like
- * pressing the X button in the titlebar or using a command from the
- * Window Manager, a "delete,request" signal is emitted to indicate that
- * this event occurred and the developer can take any action, which may
- * include, or not, destroying the window object.
+ * Add a callback for a signal emitted by widget edje object.
*
- * When the @p autodel parameter is set, the window will be automatically
- * destroyed when this event occurs, after the signal is emitted.
- * If @p autodel is @c EINA_FALSE, then the window will not be destroyed
- * and is up to the program to do so when it's required.
+ * This function connects a callback function to a signal emitted by the
+ * edje object of the obj.
+ * Globs can occur in either the emission or source name.
*
- * @param obj The window object
- * @param autodel If true, the window will automatically delete itself when
- * closed
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @param func The callback function to be executed when the signal is
+ * emitted.
+ * @param data A pointer to data to pass in to the callback function.
+ * @ingroup General
*/
- EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) EINA_ARG_NONNULL(1, 4);
+
/**
- * Get the window's autodel state.
+ * Remove a signal-triggered callback from a widget edje object.
*
- * @param obj The window object
- * @return If the window will automatically delete itself when closed
+ * This function removes a callback, previoulsy attached to a
+ * signal emitted by the edje object of the obj. The parameters
+ * emission, source and func must match exactly those passed to a
+ * previous call to elm_object_signal_callback_add(). The data
+ * pointer that was passed to this call will be returned.
*
- * @see elm_win_autodel_set()
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @param func The callback function to be executed when the signal is
+ * emitted.
+ * @return The data pointer
+ * @ingroup General
*/
- EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) EINA_ARG_NONNULL(1, 4);
+
/**
- * Activate a window object.
+ * Add a callback for input events (key up, key down, mouse wheel)
+ * on a given Elementary widget
+ *
+ * @param obj The widget to add an event callback on
+ * @param func The callback function to be executed when the event
+ * happens
+ * @param data Data to pass in to @p func
+ *
+ * Every widget in an Elementary interface set to receive focus,
+ * with elm_object_focus_allow_set(), will propagate @b all of its
+ * key up, key down and mouse wheel input events up to its parent
+ * object, and so on. All of the focusable ones in this chain which
+ * had an event callback set, with this call, will be able to treat
+ * those events. There are two ways of making the propagation of
+ * these event upwards in the tree of widgets to @b cease:
+ * - Just return @c EINA_TRUE on @p func. @c EINA_FALSE will mean
+ * the event was @b not processed, so the propagation will go on.
+ * - The @c event_info pointer passed to @p func will contain the
+ * event's structure and, if you OR its @c event_flags inner
+ * value to @c EVAS_EVENT_FLAG_ON_HOLD, you're telling Elementary
+ * one has already handled it, thus killing the event's
+ * propagation, too.
+ *
+ * @note Your event callback will be issued on those events taking
+ * place only if no other child widget of @obj has consumed the
+ * event already.
+ *
+ * @note Not to be confused with @c
+ * evas_object_event_callback_add(), which will add event callbacks
+ * per type on general Evas objects (no event propagation
+ * infrastructure taken in account).
+ *
+ * @note Not to be confused with @c
+ * elm_object_signal_callback_add(), which will add callbacks to @b
+ * signals coming from a widget's theme, not input events.
+ *
+ * @note Not to be confused with @c
+ * edje_object_signal_callback_add(), which does the same as
+ * elm_object_signal_callback_add(), but directly on an Edje
+ * object.
*
- * This function sends a request to the Window Manager to activate the
- * window pointed by @p obj. If honored by the WM, the window will receive
- * the keyboard focus.
+ * @note Not to be confused with @c
+ * evas_object_smart_callback_add(), which adds callbacks to smart
+ * objects' <b>smart events</b>, and not input events.
*
- * @note This is just a request that a Window Manager may ignore, so calling
- * this function does not ensure in any way that the window will be the
- * active one after it.
+ * @see elm_object_event_callback_del()
*
- * @param obj The window object
+ * @ingroup General
*/
- EAPI void elm_win_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+
/**
- * Lower a window object.
+ * Remove an event callback from a widget.
*
- * Places the window pointed by @p obj at the bottom of the stack, so that
- * no other window is covered by it.
- *
- * If elm_win_override_set() is not set, the Window Manager may ignore this
- * request.
+ * This function removes a callback, previoulsy attached to event emission
+ * by the @p obj.
+ * The parameters func and data must match exactly those passed to
+ * a previous call to elm_object_event_callback_add(). The data pointer that
+ * was passed to this call will be returned.
*
- * @param obj The window object
+ * @param obj The object
+ * @param func The callback function to be executed when the event is
+ * emitted.
+ * @param data Data to pass in to the callback function.
+ * @return The data pointer
+ * @ingroup General
*/
- EAPI void elm_win_lower(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void *elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
+
/**
- * Raise a window object.
+ * Adjust size of an element for finger usage.
*
- * Places the window pointed by @p obj at the top of the stack, so that it's
- * not covered by any other window.
+ * @param times_w How many fingers should fit horizontally
+ * @param w Pointer to the width size to adjust
+ * @param times_h How many fingers should fit vertically
+ * @param h Pointer to the height size to adjust
*
- * If elm_win_override_set() is not set, the Window Manager may ignore this
- * request.
+ * This takes width and height sizes (in pixels) as input and a
+ * size multiple (which is how many fingers you want to place
+ * within the area, being "finger" the size set by
+ * elm_finger_size_set()), and adjusts the size to be large enough
+ * to accommodate the resulting size -- if it doesn't already
+ * accommodate it. On return the @p w and @p h sizes pointed to by
+ * these parameters will be modified, on those conditions.
*
- * @param obj The window object
+ * @note This is kind of a low level Elementary call, most useful
+ * on size evaluation times for widgets. An external user wouldn't
+ * be calling, most of the time.
+ *
+ * @ingroup Fingers
*/
- EAPI void elm_win_raise(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h);
+
/**
- * Set the borderless state of a window.
- *
- * This function requests the Window Manager to not draw any decoration
- * around the window.
+ * Get the duration for occuring long press event.
*
- * @param obj The window object
- * @param borderless If true, the window is borderless
+ * @return Timeout for long press event
+ * @ingroup Longpress
*/
- EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless) EINA_ARG_NONNULL(1);
+ EAPI double elm_longpress_timeout_get(void);
+
/**
- * Get the borderless state of a window.
+ * Set the duration for occuring long press event.
*
- * @param obj The window object
- * @return If true, the window is borderless
+ * @param lonpress_timeout Timeout for long press event
+ * @ingroup Longpress
*/
- EAPI Eina_Bool elm_win_borderless_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_longpress_timeout_set(double longpress_timeout);
+
/**
- * Set the shaped state of a window.
- *
- * Shaped windows, when supported, will render the parts of the window that
- * has no content, transparent.
- *
- * If @p shaped is EINA_FALSE, then it is strongly adviced to have some
- * background object or cover the entire window in any other way, or the
- * parts of the canvas that have no data will show framebuffer artifacts.
- *
- * @param obj The window object
- * @param shaped If true, the window is shaped
+ * @defgroup Debug Debug
+ * don't use it unless you are sure
*
- * @see elm_win_alpha_set()
+ * @{
*/
- EAPI void elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped) EINA_ARG_NONNULL(1);
+
/**
- * Get the shaped state of a window.
- *
- * @param obj The window object
- * @return If true, the window is shaped
+ * Print Tree object hierarchy in stdout
*
- * @see elm_win_shaped_set()
+ * @param obj The root object
+ * @ingroup Debug
*/
- EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_tree_dump(const Evas_Object *top);
+
/**
- * Set the alpha channel state of a window.
- *
- * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled
- * possibly making parts of the window completely or partially transparent.
- * This is also subject to the underlying system supporting it, like for
- * example, running under a compositing manager. If no compositing is
- * available, enabling this option will instead fallback to using shaped
- * windows, with elm_win_shaped_set().
+ * Print Elm Objects tree hierarchy in file as dot(graphviz) syntax.
*
- * @param obj The window object
- * @param alpha If true, the window has an alpha channel
- *
- * @see elm_win_alpha_set()
+ * @param obj The root object
+ * @param file The path of output file
+ * @ingroup Debug
*/
- EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1);
+ EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file);
+
/**
- * Get the transparency state of a window.
- *
- * @param obj The window object
- * @return If true, the window is transparent
- *
- * @see elm_win_transparent_set()
+ * @}
*/
- EAPI Eina_Bool elm_win_transparent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Set the transparency state of a window.
+ * @defgroup Theme Theme
*
- * Use elm_win_alpha_set() instead.
+ * Elementary uses Edje to theme its widgets, naturally. But for the most
+ * part this is hidden behind a simpler interface that lets the user set
+ * extensions and choose the style of widgets in a much easier way.
*
- * @param obj The window object
- * @param transparent If true, the window is transparent
+ * Instead of thinking in terms of paths to Edje files and their groups
+ * each time you want to change the appearance of a widget, Elementary
+ * works so you can add any theme file with extensions or replace the
+ * main theme at one point in the application, and then just set the style
+ * of widgets with elm_object_style_set() and related functions. Elementary
+ * will then look in its list of themes for a matching group and apply it,
+ * and when the theme changes midway through the application, all widgets
+ * will be updated accordingly.
*
- * @see elm_win_alpha_set()
- */
- EAPI void elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent) EINA_ARG_NONNULL(1);
- /**
- * Get the alpha channel state of a window.
+ * There are three concepts you need to know to understand how Elementary
+ * theming works: default theme, extensions and overlays.
*
- * @param obj The window object
- * @return If true, the window has an alpha channel
- */
- EAPI Eina_Bool elm_win_alpha_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set the override state of a window.
+ * Default theme, obviously enough, is the one that provides the default
+ * look of all widgets. End users can change the theme used by Elementary
+ * by setting the @c ELM_THEME environment variable before running an
+ * application, or globally for all programs using the @c elementary_config
+ * utility. Applications can change the default theme using elm_theme_set(),
+ * but this can go against the user wishes, so it's not an adviced practice.
*
- * A window with @p override set to EINA_TRUE will not be managed by the
- * Window Manager. This means that no decorations of any kind will be shown
- * for it, moving and resizing must be handled by the application, as well
- * as the window visibility.
+ * Ideally, applications should find everything they need in the already
+ * provided theme, but there may be occasions when that's not enough and
+ * custom styles are required to correctly express the idea. For this
+ * cases, Elementary has extensions.
*
- * This should not be used for normal windows, and even for not so normal
- * ones, it should only be used when there's a good reason and with a lot
- * of care. Mishandling override windows may result situations that
- * disrupt the normal workflow of the end user.
+ * Extensions allow the application developer to write styles of its own
+ * to apply to some widgets. This requires knowledge of how each widget
+ * is themed, as extensions will always replace the entire group used by
+ * the widget, so important signals and parts need to be there for the
+ * object to behave properly (see documentation of Edje for details).
+ * Once the theme for the extension is done, the application needs to add
+ * it to the list of themes Elementary will look into, using
+ * elm_theme_extension_add(), and set the style of the desired widgets as
+ * he would normally with elm_object_style_set().
*
- * @param obj The window object
- * @param override If true, the window is overridden
+ * Overlays, on the other hand, can replace the look of all widgets by
+ * overriding the default style. Like extensions, it's up to the application
+ * developer to write the theme for the widgets it wants, the difference
+ * being that when looking for the theme, Elementary will check first the
+ * list of overlays, then the set theme and lastly the list of extensions,
+ * so with overlays it's possible to replace the default view and every
+ * widget will be affected. This is very much alike to setting the whole
+ * theme for the application and will probably clash with the end user
+ * options, not to mention the risk of ending up with not matching styles
+ * across the program. Unless there's a very special reason to use them,
+ * overlays should be avoided for the resons exposed before.
+ *
+ * All these theme lists are handled by ::Elm_Theme instances. Elementary
+ * keeps one default internally and every function that receives one of
+ * these can be called with NULL to refer to this default (except for
+ * elm_theme_free()). It's possible to create a new instance of a
+ * ::Elm_Theme to set other theme for a specific widget (and all of its
+ * children), but this is as discouraged, if not even more so, than using
+ * overlays. Don't use this unless you really know what you are doing.
+ *
+ * But to be less negative about things, you can look at the following
+ * examples:
+ * @li @ref theme_example_01 "Using extensions"
+ * @li @ref theme_example_02 "Using overlays"
+ *
+ * @{
*/
- EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override) EINA_ARG_NONNULL(1);
/**
- * Get the override state of a window.
+ * @typedef Elm_Theme
*
- * @param obj The window object
- * @return If true, the window is overridden
+ * Opaque handler for the list of themes Elementary looks for when
+ * rendering widgets.
*
- * @see elm_win_override_set()
+ * Stay out of this unless you really know what you are doing. For most
+ * cases, sticking to the default is all a developer needs.
*/
- EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Theme Elm_Theme;
+
/**
- * Set the fullscreen state of a window.
+ * Create a new specific theme
*
- * @param obj The window object
- * @param fullscreen If true, the window is fullscreen
+ * This creates an empty specific theme that only uses the default theme. A
+ * specific theme has its own private set of extensions and overlays too
+ * (which are empty by default). Specific themes do not fall back to themes
+ * of parent objects. They are not intended for this use. Use styles, overlays
+ * and extensions when needed, but avoid specific themes unless there is no
+ * other way (example: you want to have a preview of a new theme you are
+ * selecting in a "theme selector" window. The preview is inside a scroller
+ * and should display what the theme you selected will look like, but not
+ * actually apply it yet. The child of the scroller will have a specific
+ * theme set to show this preview before the user decides to apply it to all
+ * applications).
*/
- EAPI void elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen) EINA_ARG_NONNULL(1);
+ EAPI Elm_Theme *elm_theme_new(void);
/**
- * Get the fullscreen state of a window.
+ * Free a specific theme
*
- * @param obj The window object
- * @return If true, the window is fullscreen
+ * @param th The theme to free
+ *
+ * This frees a theme created with elm_theme_new().
*/
- EAPI Eina_Bool elm_win_fullscreen_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_free(Elm_Theme *th);
/**
- * Set the maximized state of a window.
+ * Copy the theme fom the source to the destination theme
*
- * @param obj The window object
- * @param maximized If true, the window is maximized
+ * @param th The source theme to copy from
+ * @param thdst The destination theme to copy data to
+ *
+ * This makes a one-time static copy of all the theme config, extensions
+ * and overlays from @p th to @p thdst. If @p th references a theme, then
+ * @p thdst is also set to reference it, with all the theme settings,
+ * overlays and extensions that @p th had.
*/
- EAPI void elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_copy(Elm_Theme *th, Elm_Theme *thdst);
/**
- * Get the maximized state of a window.
+ * Tell the source theme to reference the ref theme
*
- * @param obj The window object
- * @return If true, the window is maximized
+ * @param th The theme that will do the referencing
+ * @param thref The theme that is the reference source
+ *
+ * This clears @p th to be empty and then sets it to refer to @p thref
+ * so @p th acts as an override to @p thref, but where its overrides
+ * don't apply, it will fall through to @p thref for configuration.
*/
- EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref);
/**
- * Set the iconified state of a window.
+ * Return the theme referred to
*
- * @param obj The window object
- * @param iconified If true, the window is iconified
+ * @param th The theme to get the reference from
+ * @return The referenced theme handle
+ *
+ * This gets the theme set as the reference theme by elm_theme_ref_set().
+ * If no theme is set as a reference, NULL is returned.
*/
- EAPI void elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified) EINA_ARG_NONNULL(1);
+ EAPI Elm_Theme *elm_theme_ref_get(Elm_Theme *th);
/**
- * Get the iconified state of a window.
+ * Return the default theme
*
- * @param obj The window object
- * @return If true, the window is iconified
+ * @return The default theme handle
+ *
+ * This returns the internal default theme setup handle that all widgets
+ * use implicitly unless a specific theme is set. This is also often use
+ * as a shorthand of NULL.
*/
- EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Elm_Theme *elm_theme_default_get(void);
/**
- * Set the layer of the window.
+ * Prepends a theme overlay to the list of overlays
*
- * What this means exactly will depend on the underlying engine used.
+ * @param th The theme to add to, or if NULL, the default theme
+ * @param item The Edje file path to be used
*
- * In the case of X11 backed engines, the value in @p layer has the
- * following meanings:
- * @li < 3: The window will be placed below all others.
- * @li > 5: The window will be placed above all others.
- * @li other: The window will be placed in the default layer.
+ * Use this if your application needs to provide some custom overlay theme
+ * (An Edje file that replaces some default styles of widgets) where adding
+ * new styles, or changing system theme configuration is not possible. Do
+ * NOT use this instead of a proper system theme configuration. Use proper
+ * configuration files, profiles, environment variables etc. to set a theme
+ * so that the theme can be altered by simple confiugration by a user. Using
+ * this call to achieve that effect is abusing the API and will create lots
+ * of trouble.
*
- * @param obj The window object
- * @param layer The layer of the window
+ * @see elm_theme_extension_add()
*/
- EAPI void elm_win_layer_set(Evas_Object *obj, int layer) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_overlay_add(Elm_Theme *th, const char *item);
/**
- * Get the layer of the window.
+ * Delete a theme overlay from the list of overlays
*
- * @param obj The window object
- * @return The layer of the window
+ * @param th The theme to delete from, or if NULL, the default theme
+ * @param item The name of the theme overlay
*
- * @see elm_win_layer_set()
+ * @see elm_theme_overlay_add()
*/
- EAPI int elm_win_layer_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_overlay_del(Elm_Theme *th, const char *item);
/**
- * Set the rotation of the window.
+ * Appends a theme extension to the list of extensions.
*
- * Most engines only work with multiples of 90.
+ * @param th The theme to add to, or if NULL, the default theme
+ * @param item The Edje file path to be used
*
- * This function is used to set the orientation of the window @p obj to
- * match that of the screen. The window itself will be resized to adjust
- * to the new geometry of its contents. If you want to keep the window size,
- * see elm_win_rotation_with_resize_set().
+ * This is intended when an application needs more styles of widgets or new
+ * widget themes that the default does not provide (or may not provide). The
+ * application has "extended" usage by coming up with new custom style names
+ * for widgets for specific uses, but as these are not "standard", they are
+ * not guaranteed to be provided by a default theme. This means the
+ * application is required to provide these extra elements itself in specific
+ * Edje files. This call adds one of those Edje files to the theme search
+ * path to be search after the default theme. The use of this call is
+ * encouraged when default styles do not meet the needs of the application.
+ * Use this call instead of elm_theme_overlay_add() for almost all cases.
*
- * @param obj The window object
- * @param rotation The rotation of the window, in degrees (0-360),
- * counter-clockwise.
+ * @see elm_object_style_set()
*/
- EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_extension_add(Elm_Theme *th, const char *item);
/**
- * Rotates the window and resizes it.
+ * Deletes a theme extension from the list of extensions.
*
- * Like elm_win_rotation_set(), but it also resizes the window's contents so
- * that they fit inside the current window geometry.
+ * @param th The theme to delete from, or if NULL, the default theme
+ * @param item The name of the theme extension
*
- * @param obj The window object
- * @param layer The rotation of the window in degrees (0-360),
- * counter-clockwise.
+ * @see elm_theme_extension_add()
*/
- EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_extension_del(Elm_Theme *th, const char *item);
/**
- * Get the rotation of the window.
+ * Set the theme search order for the given theme
*
- * @param obj The window object
- * @return The rotation of the window in degrees (0-360)
+ * @param th The theme to set the search order, or if NULL, the default theme
+ * @param theme Theme search string
*
- * @see elm_win_rotation_set()
- * @see elm_win_rotation_with_resize_set()
- */
- EAPI int elm_win_rotation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set the sticky state of the window.
+ * This sets the search string for the theme in path-notation from first
+ * theme to search, to last, delimited by the : character. Example:
*
- * Hints the Window Manager that the window in @p obj should be left fixed
- * at its position even when the virtual desktop it's on moves or changes.
+ * "shiny:/path/to/file.edj:default"
*
- * @param obj The window object
- * @param sticky If true, the window's sticky state is enabled
+ * See the ELM_THEME environment variable for more information.
+ *
+ * @see elm_theme_get()
+ * @see elm_theme_list_get()
*/
- EAPI void elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_set(Elm_Theme *th, const char *theme);
/**
- * Get the sticky state of the window.
+ * Return the theme search order
*
- * @param obj The window object
- * @return If true, the window's sticky state is enabled
+ * @param th The theme to get the search order, or if NULL, the default theme
+ * @return The internal search order path
*
- * @see elm_win_sticky_set()
- */
- EAPI Eina_Bool elm_win_sticky_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set if this window is an illume conformant window
+ * This function returns a colon separated string of theme elements as
+ * returned by elm_theme_list_get().
*
- * @param obj The window object
- * @param conformant The conformant flag (1 = conformant, 0 = non-conformant)
+ * @see elm_theme_set()
+ * @see elm_theme_list_get()
*/
- EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_theme_get(Elm_Theme *th);
/**
- * Get if this window is an illume conformant window
+ * Return a list of theme elements to be used in a theme.
*
- * @param obj The window object
- * @return A boolean if this window is illume conformant or not
- */
- EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set a window to be an illume quickpanel window
+ * @param th Theme to get the list of theme elements from.
+ * @return The internal list of theme elements
*
- * By default window objects are not quickpanel windows.
+ * This returns the internal list of theme elements (will only be valid as
+ * long as the theme is not modified by elm_theme_set() or theme is not
+ * freed by elm_theme_free(). This is a list of strings which must not be
+ * altered as they are also internal. If @p th is NULL, then the default
+ * theme element list is returned.
*
- * @param obj The window object
- * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window)
- */
- EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel) EINA_ARG_NONNULL(1);
- /**
- * Get if this window is a quickpanel or not
+ * A theme element can consist of a full or relative path to a .edj file,
+ * or a name, without extension, for a theme to be searched in the known
+ * theme paths for Elemementary.
*
- * @param obj The window object
- * @return A boolean if this window is a quickpanel or not
+ * @see elm_theme_set()
+ * @see elm_theme_get()
*/
- EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th);
/**
- * Set the major priority of a quickpanel window
+ * Return the full patrh for a theme element
*
- * @param obj The window object
- * @param priority The major priority for this quickpanel
- */
- EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
- /**
- * Get the major priority of a quickpanel window
+ * @param f The theme element name
+ * @param in_search_path Pointer to a boolean to indicate if item is in the search path or not
+ * @return The full path to the file found.
*
- * @param obj The window object
- * @return The major priority of this quickpanel
+ * This returns a string you should free with free() on success, NULL on
+ * failure. This will search for the given theme element, and if it is a
+ * full or relative path element or a simple searchable name. The returned
+ * path is the full path to the file, if searched, and the file exists, or it
+ * is simply the full path given in the element or a resolved path if
+ * relative to home. The @p in_search_path boolean pointed to is set to
+ * EINA_TRUE if the file was a searchable file andis in the search path,
+ * and EINA_FALSE otherwise.
*/
- EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI char *elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path);
/**
- * Set the minor priority of a quickpanel window
+ * Flush the current theme.
*
- * @param obj The window object
- * @param priority The minor priority for this quickpanel
- */
- EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
- /**
- * Get the minor priority of a quickpanel window
+ * @param th Theme to flush
*
- * @param obj The window object
- * @return The minor priority of this quickpanel
+ * This flushes caches that let elementary know where to find theme elements
+ * in the given theme. If @p th is NULL, then the default theme is flushed.
+ * Call this function if source theme data has changed in such a way as to
+ * make any caches Elementary kept invalid.
*/
- EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_flush(Elm_Theme *th);
/**
- * Set which zone this quickpanel should appear in
+ * This flushes all themes (default and specific ones).
*
- * @param obj The window object
- * @param zone The requested zone for this quickpanel
+ * This will flush all themes in the current application context, by calling
+ * elm_theme_flush() on each of them.
*/
- EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_full_flush(void);
/**
- * Get which zone this quickpanel should appear in
+ * Set the theme for all elementary using applications on the current display
*
- * @param obj The window object
- * @return The requested zone for this quickpanel
+ * @param theme The name of the theme to use. Format same as the ELM_THEME
+ * environment variable.
*/
- EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_all_set(const char *theme);
/**
- * Set the window to be skipped by keyboard focus
- *
- * This sets the window to be skipped by normal keyboard input. This means
- * a window manager will be asked to not focus this window as well as omit
- * it from things like the taskbar, pager, "alt-tab" list etc. etc.
- *
- * Call this and enable it on a window BEFORE you show it for the first time,
- * otherwise it may have no effect.
+ * Return a list of theme elements in the theme search path
*
- * Use this for windows that have only output information or might only be
- * interacted with by the mouse or fingers, and never for typing input.
- * Be careful that this may have side-effects like making the window
- * non-accessible in some cases unless the window is specially handled. Use
- * this with care.
+ * @return A list of strings that are the theme element names.
*
- * @param obj The window object
- * @param skip The skip flag state (EINA_TRUE if it is to be skipped)
+ * This lists all available theme files in the standard Elementary search path
+ * for theme elements, and returns them in alphabetical order as theme
+ * element names in a list of strings. Free this with
+ * elm_theme_name_available_list_free() when you are done with the list.
*/
- EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip) EINA_ARG_NONNULL(1);
+ EAPI Eina_List *elm_theme_name_available_list_new(void);
/**
- * Send a command to the windowing environment
- *
- * This is intended to work in touchscreen or small screen device
- * environments where there is a more simplistic window management policy in
- * place. This uses the window object indicated to select which part of the
- * environment to control (the part that this window lives in), and provides
- * a command and an optional parameter structure (use NULL for this if not
- * needed).
+ * Free the list returned by elm_theme_name_available_list_new()
*
- * @param obj The window object that lives in the environment to control
- * @param command The command to send
- * @param params Optional parameters for the command
+ * This frees the list of themes returned by
+ * elm_theme_name_available_list_new(). Once freed the list should no longer
+ * be used. a new list mys be created.
*/
- EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params) EINA_ARG_NONNULL(1);
+ EAPI void elm_theme_name_available_list_free(Eina_List *list);
/**
- * Get the inlined image object handle
+ * Set a specific theme to be used for this object and its children
*
- * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE,
- * then the window is in fact an evas image object inlined in the parent
- * canvas. You can get this object (be careful to not manipulate it as it
- * is under control of elementary), and use it to do things like get pixel
- * data, save the image to a file, etc.
+ * @param obj The object to set the theme on
+ * @param th The theme to set
*
- * @param obj The window object to get the inlined image from
- * @return The inlined image object, or NULL if none exists
+ * This sets a specific theme that will be used for the given object and any
+ * child objects it has. If @p th is NULL then the theme to be used is
+ * cleared and the object will inherit its theme from its parent (which
+ * ultimately will use the default theme if no specific themes are set).
+ *
+ * Use special themes with great care as this will annoy users and make
+ * configuration difficult. Avoid any custom themes at all if it can be
+ * helped.
*/
- EAPI Evas_Object *elm_win_inlined_image_object_get(Evas_Object *obj);
+ EAPI void elm_object_theme_set(Evas_Object *obj, Elm_Theme *th) EINA_ARG_NONNULL(1);
/**
- * Set the enabled status for the focus highlight in a window
+ * Get the specific theme to be used
*
- * This function will enable or disable the focus highlight only for the
- * given window, regardless of the global setting for it
+ * @param obj The object to get the specific theme from
+ * @return The specifc theme set.
*
- * @param obj The window where to enable the highlight
- * @param enabled The enabled value for the highlight
+ * This will return a specific theme set, or NULL if no specific theme is
+ * set on that object. It will not return inherited themes from parents, only
+ * the specific theme set for that specific object. See elm_object_theme_set()
+ * for more information.
*/
- EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1);
+ EAPI Elm_Theme *elm_object_theme_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Get the enabled value of the focus highlight for this window
+ * Get a data item from a theme
*
- * @param obj The window in which to check if the focus highlight is enabled
+ * @param th The theme, or NULL for default theme
+ * @param key The data key to search with
+ * @return The data value, or NULL on failure
*
- * @return EINA_TRUE if enabled, EINA_FALSE otherwise
+ * This function is used to return data items from edc in @p th, an overlay, or an extension.
+ * It works the same way as edje_file_data_get() except that the return is stringshared.
*/
- EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_theme_data_get(Elm_Theme *th, const char *key) EINA_ARG_NONNULL(2);
/**
- * Set the style for the focus highlight on this window
+ * @}
+ */
+
+ /* win */
+ /** @defgroup Win Win
*
- * Sets the style to use for theming the highlight of focused objects on
- * the given window. If @p style is NULL, the default will be used.
+ * @image html img/widget/win/preview-00.png
+ * @image latex img/widget/win/preview-00.eps
*
- * @param obj The window where to set the style
- * @param style The style to set
- */
- EAPI void elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
- /**
- * Get the style set for the focus highlight object
+ * The window class of Elementary. Contains functions to manipulate
+ * windows. The Evas engine used to render the window contents is specified
+ * in the system or user elementary config files (whichever is found last),
+ * and can be overridden with the ELM_ENGINE environment variable for
+ * testing. Engines that may be supported (depending on Evas and Ecore-Evas
+ * compilation setup and modules actually installed at runtime) are (listed
+ * in order of best supported and most likely to be complete and work to
+ * lowest quality).
*
- * Gets the style set for this windows highilght object, or NULL if none
- * is set.
+ * @li "x11", "x", "software-x11", "software_x11" (Software rendering in X11)
+ * @li "gl", "opengl", "opengl-x11", "opengl_x11" (OpenGL or OpenGL-ES2
+ * rendering in X11)
+ * @li "shot:..." (Virtual screenshot renderer - renders to output file and
+ * exits)
+ * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
+ * rendering)
+ * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
+ * buffer)
+ * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
+ * rendering using SDL as the buffer)
+ * @li "gdi", "software-gdi", "software_gdi" (Windows WIN32 rendering via
+ * GDI with software)
+ * @li "dfb", "directfb" (Rendering to a DirectFB window)
+ * @li "x11-8", "x8", "software-8-x11", "software_8_x11" (Rendering in
+ * grayscale using dedicated 8bit software engine in X11)
+ * @li "x11-16", "x16", "software-16-x11", "software_16_x11" (Rendering in
+ * X11 using 16bit software engine)
+ * @li "wince-gdi", "software-16-wince-gdi", "software_16_wince_gdi"
+ * (Windows CE rendering via GDI with 16bit software renderer)
+ * @li "sdl-16", "software-16-sdl", "software_16_sdl" (Rendering to SDL
+ * buffer with 16bit software renderer)
*
- * @param obj The window to retrieve the highlights style from
+ * All engines use a simple string to select the engine to render, EXCEPT
+ * the "shot" engine. This actually encodes the output of the virtual
+ * screenshot and how long to delay in the engine string. The engine string
+ * is encoded in the following way:
*
- * @return The style set or NULL if none was. Default is used in that case.
- */
- EAPI const char *elm_win_focus_highlight_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /*...
- * ecore_x_icccm_hints_set -> accepts_focus (add to ecore_evas)
- * ecore_x_icccm_hints_set -> window_group (add to ecore_evas)
- * ecore_x_icccm_size_pos_hints_set -> request_pos (add to ecore_evas)
- * ecore_x_icccm_client_leader_set -> l (add to ecore_evas)
- * ecore_x_icccm_window_role_set -> role (add to ecore_evas)
- * ecore_x_icccm_transient_for_set -> forwin (add to ecore_evas)
- * ecore_x_netwm_window_type_set -> type (add to ecore_evas)
+ * "shot:[delay=XX][:][repeat=DDD][:][file=XX]"
*
- * (add to ecore_x) set netwm argb icon! (add to ecore_evas)
- * (blank mouse, private mouse obj, defaultmouse)
+ * Where options are separated by a ":" char if more than one option is
+ * given, with delay, if provided being the first option and file the last
+ * (order is important). The delay specifies how long to wait after the
+ * window is shown before doing the virtual "in memory" rendering and then
+ * save the output to the file specified by the file option (and then exit).
+ * If no delay is given, the default is 0.5 seconds. If no file is given the
+ * default output file is "out.png". Repeat option is for continous
+ * capturing screenshots. Repeat range is from 1 to 999 and filename is
+ * fixed to "out001.png" Some examples of using the shot engine:
*
- */
- /**
- * Sets the keyboard mode of the window.
+ * ELM_ENGINE="shot:delay=1.0:repeat=5:file=elm_test.png" elementary_test
+ * ELM_ENGINE="shot:delay=1.0:file=elm_test.png" elementary_test
+ * ELM_ENGINE="shot:file=elm_test2.png" elementary_test
+ * ELM_ENGINE="shot:delay=2.0" elementary_test
+ * ELM_ENGINE="shot:" elementary_test
*
- * @param obj The window object
- * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode
- */
- EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode) EINA_ARG_NONNULL(1);
- /**
- * Gets the keyboard mode of the window.
+ * Signals that you can add callbacks for are:
*
- * @param obj The window object
- * @return The mode, one of #Elm_Win_Keyboard_Mode
- */
- EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Sets whether the window is a keyboard.
+ * @li "delete,request": the user requested to close the window. See
+ * elm_win_autodel_set().
+ * @li "focus,in": window got focus
+ * @li "focus,out": window lost focus
+ * @li "moved": window that holds the canvas was moved
*
- * @param obj The window object
- * @param is_keyboard If true, the window is a virtual keyboard
+ * Examples:
+ * @li @ref win_example_01
+ *
+ * @{
*/
- EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard) EINA_ARG_NONNULL(1);
/**
- * Gets whether the window is a keyboard.
+ * Defines the types of window that can be created
*
- * @param obj The window object
- * @return If the window is a virtual keyboard
+ * These are hints set on the window so that a running Window Manager knows
+ * how the window should be handled and/or what kind of decorations it
+ * should have.
+ *
+ * Currently, only the X11 backed engines use them.
*/
- EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef enum _Elm_Win_Type
+ {
+ ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
+ window. Almost every window will be created with this
+ type. */
+ ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */
+ ELM_WIN_DESKTOP, /**< For special desktop windows, like a background
+ window holding desktop icons. */
+ ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would
+ be kept on top of any other window by the Window
+ Manager. */
+ ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or
+ similar. */
+ ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */
+ ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or
+ pallete. */
+ ELM_WIN_SPLASH, /**< Splash window for a starting up application. */
+ ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an
+ entry in a menubar is clicked. Typically used
+ with elm_win_override_set(). This hint exists
+ for completion only, as the EFL way of
+ implementing a menu would not normally use a
+ separate window for its contents. */
+ ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu
+ triggered by right-clicking an object. */
+ ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of
+ explanatory text that typically appear after the
+ mouse cursor hovers over an object for a while.
+ Typically used with elm_win_override_set() and also
+ not very commonly used in the EFL. */
+ ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about
+ battery life or a new E-Mail received. */
+ ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not
+ usually used in the EFL. */
+ ELM_WIN_DND, /**< Used to indicate the window is a representation of an
+ object being dragged across different windows, or even
+ applications. Typically used with
+ elm_win_override_set(). */
+ ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image
+ buffer. No actual window is created for this
+ type, instead the window and all of its
+ contents will be rendered to an image buffer.
+ This allows to have children window inside a
+ parent one just like any other object would
+ be, and do other things like applying @c
+ Evas_Map effects to it. This is the only type
+ of window that requires the @c parent
+ parameter of elm_win_add() to be a valid @c
+ Evas_Object. */
+ } Elm_Win_Type;
/**
- * Get the screen position of a window.
+ * The differents layouts that can be requested for the virtual keyboard.
*
- * @param obj The window object
- * @param x The int to store the x coordinate to
- * @param y The int to store the y coordinate to
+ * When the application window is being managed by Illume, it may request
+ * any of the following layouts for the virtual keyboard.
*/
- EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1);
+ typedef enum _Elm_Win_Keyboard_Mode
+ {
+ ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */
+ ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */
+ ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */
+ ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */
+ ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */
+ ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */
+ ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */
+ ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */
+ ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QUERTY) keyboard layout */
+ ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */
+ ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */
+ ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */
+ ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */
+ ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */
+ ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */
+ ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */
+ } Elm_Win_Keyboard_Mode;
+
/**
- * @}
+ * Available commands that can be sent to the Illume manager.
+ *
+ * When running under an Illume session, a window may send commands to the
+ * Illume manager to perform different actions.
*/
+ typedef enum _Elm_Illume_Command
+ {
+ ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous
+ window */
+ ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window\
+ in the list */
+ ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home
+ screen */
+ ELM_ILLUME_COMMAND_CLOSE /**< Closes the currently active window */
+ } Elm_Illume_Command;
/**
- * @defgroup Inwin Inwin
+ * Adds a window object. If this is the first window created, pass NULL as
+ * @p parent.
*
- * @image html img/widget/inwin/preview-00.png
- * @image latex img/widget/inwin/preview-00.eps
- * @image html img/widget/inwin/preview-01.png
- * @image latex img/widget/inwin/preview-01.eps
- * @image html img/widget/inwin/preview-02.png
- * @image latex img/widget/inwin/preview-02.eps
+ * @param parent Parent object to add the window to, or NULL
+ * @param name The name of the window
+ * @param type The window type, one of #Elm_Win_Type.
*
- * An inwin is a window inside a window that is useful for a quick popup.
- * It does not hover.
+ * The @p parent paramter can be @c NULL for every window @p type except
+ * #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the canvas on
+ * which the image object will be created.
*
- * It works by creating an object that will occupy the entire window, so it
- * must be created using an @ref Win "elm_win" as parent only. The inwin
- * object can be hidden or restacked below every other object if it's
- * needed to show what's behind it without destroying it. If this is done,
- * the elm_win_inwin_activate() function can be used to bring it back to
- * full visibility again.
+ * @return The created object, or NULL on failure
+ */
+ EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
+ /**
+ * Add @p subobj as a resize object of window @p obj.
*
- * There are three styles available in the default theme. These are:
- * @li default: The inwin is sized to take over most of the window it's
- * placed in.
- * @li minimal: The size of the inwin will be the minimum necessary to show
- * its contents.
- * @li minimal_vertical: Horizontally, the inwin takes as much space as
- * possible, but it's sized vertically the most it needs to fit its\
- * contents.
*
- * Some examples of Inwin can be found in the following:
- * @li @ref inwin_example_01
+ * Setting an object as a resize object of the window means that the
+ * @p subobj child's size and position will be controlled by the window
+ * directly. That is, the object will be resized to match the window size
+ * and should never be moved or resized manually by the developer.
*
- * @{
+ * In addition, resize objects of the window control what the minimum size
+ * of it will be, as well as whether it can or not be resized by the user.
+ *
+ * For the end user to be able to resize a window by dragging the handles
+ * or borders provided by the Window Manager, or using any other similar
+ * mechanism, all of the resize objects in the window should have their
+ * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND.
+ *
+ * @param obj The window object
+ * @param subobj The resize object to add
*/
+ EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
/**
- * Adds an inwin to the current window
+ * Delete @p subobj as a resize object of window @p obj.
*
- * 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.
+ * This function removes the object @p subobj from the resize objects of
+ * the window @p obj. It will not delete the object itself, which will be
+ * left unmanaged and should be deleted by the developer, manually handled
+ * or set as child of some other container.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The window object
+ * @param subobj The resize object to add
*/
- EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
/**
- * 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".
+ * Set the title of the window
*
- * @param obj The inwin to activate
+ * @param obj The window object
+ * @param title The title to set
*/
- EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
/**
- * Set the content of an inwin object.
+ * Get the title of the window
*
- * 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.
+ * The returned string is an internal one and should not be freed or
+ * modified. It will also be rendered invalid if a new title is set or if
+ * the window is destroyed.
*
- * @param obj The inwin object
- * @param content The object to set as content
+ * @param obj The window object
+ * @return The title
*/
- EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_win_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the content of an inwin object.
- *
- * Return the content object which is set for this widget.
+ * Set the window's autodel state.
*
- * 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.
+ * When closing the window in any way outside of the program control, like
+ * pressing the X button in the titlebar or using a command from the
+ * Window Manager, a "delete,request" signal is emitted to indicate that
+ * this event occurred and the developer can take any action, which may
+ * include, or not, destroying the window object.
*
- * If you need to remove an inwin's content to be reused somewhere else,
- * see elm_win_inwin_content_unset().
+ * When the @p autodel parameter is set, the window will be automatically
+ * destroyed when this event occurs, after the signal is emitted.
+ * If @p autodel is @c EINA_FALSE, then the window will not be destroyed
+ * and is up to the program to do so when it's required.
*
- * @param obj The inwin object
- * @return The content that is being used
+ * @param obj The window object
+ * @param autodel If true, the window will automatically delete itself when
+ * closed
*/
- EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) EINA_ARG_NONNULL(1);
/**
- * Unset the content of an inwin object.
+ * Get the window's autodel state.
*
- * Unparent and return the content object which was set for this widget.
+ * @param obj The window object
+ * @return If the window will automatically delete itself when closed
*
- * @param obj The inwin object
- * @return The content that was being used
- */
- EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * @}
- */
- /* X specific calls - won't work on non-x engines (return 0) */
- EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /* smart callbacks called:
- * "delete,request" - the user requested to delete the window
- * "focus,in" - window got focus
- * "focus,out" - window lost focus
- * "moved" - window that holds the canvas was moved
+ * @see elm_win_autodel_set()
*/
-
+ EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Bg Bg
- *
- * @image html img/widget/bg/preview-00.png
- * @image latex img/widget/bg/preview-00.eps
+ * Activate a window object.
*
- * @brief Background object, used for setting a solid color, image or Edje
- * group as background to a window or any container object.
+ * This function sends a request to the Window Manager to activate the
+ * window pointed by @p obj. If honored by the WM, the window will receive
+ * the keyboard focus.
*
- * The bg object is used for setting a solid background to a window or
- * packing into any container object. It works just like an image, but has
- * some properties useful to a background, like setting it to tiled,
- * centered, scaled or stretched.
+ * @note This is just a request that a Window Manager may ignore, so calling
+ * this function does not ensure in any way that the window will be the
+ * active one after it.
*
- * Here is some sample code using it:
- * @li @ref bg_01_example_page
- * @li @ref bg_02_example_page
- * @li @ref bg_03_example_page
+ * @param obj The window object
*/
-
- /* bg */
- typedef enum _Elm_Bg_Option
- {
- ELM_BG_OPTION_CENTER, /**< center the background */
- ELM_BG_OPTION_SCALE, /**< scale the background retaining aspect ratio */
- ELM_BG_OPTION_STRETCH, /**< stretch the background to fill */
- ELM_BG_OPTION_TILE /**< tile background at its original size */
- } Elm_Bg_Option;
-
+ EAPI void elm_win_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Add a new background to the parent
+ * Lower a window object.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * Places the window pointed by @p obj at the bottom of the stack, so that
+ * no other window is covered by it.
*
- * @ingroup Bg
+ * If elm_win_override_set() is not set, the Window Manager may ignore this
+ * request.
+ *
+ * @param obj The window object
*/
- EAPI Evas_Object *elm_bg_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_lower(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the file (image or edje) used for the background
- *
- * @param obj The bg object
- * @param file The file path
- * @param group Optional key (group in Edje) within the file
+ * Raise a window object.
*
- * This sets the image file used in the background object. The image (or edje)
- * will be stretched (retaining aspect if its an image file) to completely fill
- * the bg object. This may mean some parts are not visible.
+ * Places the window pointed by @p obj at the top of the stack, so that it's
+ * not covered by any other window.
*
- * @note Once the image of @p obj is set, a previously set one will be deleted,
- * even if @p file is NULL.
+ * If elm_win_override_set() is not set, the Window Manager may ignore this
+ * request.
*
- * @ingroup Bg
+ * @param obj The window object
*/
- EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_raise(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the file (image or edje) used for the background
+ * Set the borderless state of a window.
*
- * @param obj The bg object
- * @param file The file path
- * @param group Optional key (group in Edje) within the file
+ * This function requests the Window Manager to not draw any decoration
+ * around the window.
*
- * @ingroup Bg
+ * @param obj The window object
+ * @param borderless If true, the window is borderless
*/
- EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless) EINA_ARG_NONNULL(1);
/**
- * Set the option used for the background image
+ * Get the borderless state of a window.
*
- * @param obj The bg object
- * @param option The desired background option (TILE, SCALE)
+ * @param obj The window object
+ * @return If true, the window is borderless
+ */
+ EAPI Eina_Bool elm_win_borderless_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the shaped state of a window.
*
- * This sets the option used for manipulating the display of the background
- * image. The image can be tiled or scaled.
+ * Shaped windows, when supported, will render the parts of the window that
+ * has no content, transparent.
*
- * @ingroup Bg
+ * If @p shaped is EINA_FALSE, then it is strongly adviced to have some
+ * background object or cover the entire window in any other way, or the
+ * parts of the canvas that have no data will show framebuffer artifacts.
+ *
+ * @param obj The window object
+ * @param shaped If true, the window is shaped
+ *
+ * @see elm_win_alpha_set()
*/
- EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped) EINA_ARG_NONNULL(1);
/**
- * Get the option used for the background image
+ * Get the shaped state of a window.
*
- * @param obj The bg object
- * @return The desired background option (CENTER, SCALE, STRETCH or TILE)
+ * @param obj The window object
+ * @return If true, the window is shaped
*
- * @ingroup Bg
+ * @see elm_win_shaped_set()
*/
- EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the option used for the background color
+ * Set the alpha channel state of a window.
*
- * @param obj The bg object
- * @param r
- * @param g
- * @param b
+ * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled
+ * possibly making parts of the window completely or partially transparent.
+ * This is also subject to the underlying system supporting it, like for
+ * example, running under a compositing manager. If no compositing is
+ * available, enabling this option will instead fallback to using shaped
+ * windows, with elm_win_shaped_set().
*
- * This sets the color used for the background rectangle. Its range goes
- * from 0 to 255.
+ * @param obj The window object
+ * @param alpha If true, the window has an alpha channel
*
- * @ingroup Bg
+ * @see elm_win_alpha_set()
*/
- EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1);
/**
- * Get the option used for the background color
+ * Get the transparency state of a window.
*
- * @param obj The bg object
- * @param r
- * @param g
- * @param b
+ * @param obj The window object
+ * @return If true, the window is transparent
*
- * @ingroup Bg
+ * @see elm_win_transparent_set()
*/
- EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_win_transparent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the overlay object used for the background object.
+ * Set the transparency state of a window.
*
- * @param obj The bg object
- * @param overlay The overlay object
+ * Use elm_win_alpha_set() instead.
*
- * This provides a way for elm_bg to have an 'overlay' that will be on top
- * of the bg. Once the over object is set, a previously set one will be
- * deleted, even if you set the new one to NULL. If you want to keep that
- * old content object, use the elm_bg_overlay_unset() function.
+ * @param obj The window object
+ * @param transparent If true, the window is transparent
*
- * @ingroup Bg
+ * @see elm_win_alpha_set()
*/
-
- EAPI void elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent) EINA_ARG_NONNULL(1);
/**
- * Get the overlay object used for the background object.
- *
- * @param obj The bg object
- * @return The content that is being used
- *
- * Return the content object which is set for this widget
+ * Get the alpha channel state of a window.
*
- * @ingroup Bg
+ * @param obj The window object
+ * @return If true, the window has an alpha channel
*/
- EAPI Evas_Object *elm_bg_overlay_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_win_alpha_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the overlay object used for the background object.
+ * Set the override state of a window.
*
- * @param obj The bg object
- * @return The content that was being used
+ * A window with @p override set to EINA_TRUE will not be managed by the
+ * Window Manager. This means that no decorations of any kind will be shown
+ * for it, moving and resizing must be handled by the application, as well
+ * as the window visibility.
*
- * Unparent and return the overlay object which was set for this widget
+ * This should not be used for normal windows, and even for not so normal
+ * ones, it should only be used when there's a good reason and with a lot
+ * of care. Mishandling override windows may result situations that
+ * disrupt the normal workflow of the end user.
*
- * @ingroup Bg
+ * @param obj The window object
+ * @param override If true, the window is overridden
*/
- EAPI Evas_Object *elm_bg_overlay_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override) EINA_ARG_NONNULL(1);
/**
- * Set the size of the pixmap representation of the image.
- *
- * This option just makes sense if an image is going to be set in the bg.
- *
- * @param obj The bg object
- * @param w The new width of the image pixmap representation.
- * @param h The new height of the image pixmap representation.
- *
- * This function sets a new size for pixmap representation of the given bg
- * image. It allows the image to be loaded already in the specified size,
- * reducing the memory usage and load time when loading a big image with load
- * size set to a smaller size.
+ * Get the override state of a window.
*
- * NOTE: this is just a hint, the real size of the pixmap may differ
- * depending on the type of image being loaded, being bigger than requested.
+ * @param obj The window object
+ * @return If true, the window is overridden
*
- * @ingroup Bg
- */
- EAPI void elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
- /* smart callbacks called:
+ * @see elm_win_override_set()
*/
-
+ EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Icon Icon
- *
- * @image html img/widget/icon/preview-00.png
- * @image latex img/widget/icon/preview-00.eps
- *
- * An object that provides standard icon images (delete, edit, arrows, etc.)
- * or a custom file (PNG, JPG, EDJE, etc.) used for an icon.
- *
- * The icon image requested can be in the elementary theme, or in the
- * freedesktop.org paths. It's possible to set the order of preference from
- * where the image will be used.
- *
- * This API is very similar to @ref Image, but with ready to use images.
- *
- * Default images provided by the theme are described below.
- *
- * The first list contains icons that were first intended to be used in
- * toolbars, but can be used in many other places too:
- * @li home
- * @li close
- * @li apps
- * @li arrow_up
- * @li arrow_down
- * @li arrow_left
- * @li arrow_right
- * @li chat
- * @li clock
- * @li delete
- * @li edit
- * @li refresh
- * @li folder
- * @li file
- *
- * Now some icons that were designed to be used in menus (but again, you can
- * use them anywhere else):
- * @li menu/home
- * @li menu/close
- * @li menu/apps
- * @li menu/arrow_up
- * @li menu/arrow_down
- * @li menu/arrow_left
- * @li menu/arrow_right
- * @li menu/chat
- * @li menu/clock
- * @li menu/delete
- * @li menu/edit
- * @li menu/refresh
- * @li menu/folder
- * @li menu/file
- *
- * And here we have some media player specific icons:
- * @li media_player/forward
- * @li media_player/info
- * @li media_player/next
- * @li media_player/pause
- * @li media_player/play
- * @li media_player/prev
- * @li media_player/rewind
- * @li media_player/stop
+ * Set the fullscreen state of a window.
*
- * Signals that you can add callbacks for are:
+ * @param obj The window object
+ * @param fullscreen If true, the window is fullscreen
+ */
+ EAPI void elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen) EINA_ARG_NONNULL(1);
+ /**
+ * Get the fullscreen state of a window.
*
- * "clicked" - This is called when a user has clicked the icon
+ * @param obj The window object
+ * @return If true, the window is fullscreen
+ */
+ EAPI Eina_Bool elm_win_fullscreen_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the maximized state of a window.
*
- * An example of usage for this API follows:
- * @li @ref tutorial_icon
+ * @param obj The window object
+ * @param maximized If true, the window is maximized
*/
-
+ EAPI void elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized) EINA_ARG_NONNULL(1);
/**
- * @addtogroup Icon
- * @{
+ * Get the maximized state of a window.
+ *
+ * @param obj The window object
+ * @return If true, the window is maximized
*/
-
- typedef enum _Elm_Icon_Type
- {
- ELM_ICON_NONE,
- ELM_ICON_FILE,
- ELM_ICON_STANDARD
- } Elm_Icon_Type;
+ EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @enum _Elm_Icon_Lookup_Order
- * @typedef Elm_Icon_Lookup_Order
+ * Set the iconified state of a window.
*
- * Lookup order used by elm_icon_standard_set(). Should look for icons in the
- * theme, FDO paths, or both?
+ * @param obj The window object
+ * @param iconified If true, the window is iconified
+ */
+ EAPI void elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified) EINA_ARG_NONNULL(1);
+ /**
+ * Get the iconified state of a window.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @return If true, the window is iconified
*/
- typedef enum _Elm_Icon_Lookup_Order
- {
- 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;
-
+ EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Add a new icon object to the parent.
+ * Set the layer of the window.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * What this means exactly will depend on the underlying engine used.
*
- * @see elm_icon_file_set()
+ * In the case of X11 backed engines, the value in @p layer has the
+ * following meanings:
+ * @li < 3: The window will be placed below all others.
+ * @li > 5: The window will be placed above all others.
+ * @li other: The window will be placed in the default layer.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param layer The layer of the window
*/
- EAPI Evas_Object *elm_icon_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_layer_set(Evas_Object *obj, int layer) EINA_ARG_NONNULL(1);
/**
- * Set the file that will be used as icon.
+ * Get the layer of the window.
*
- * @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 in edje file
+ * @param obj The window object
+ * @return The layer of the window
*
- * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
+ * @see elm_win_layer_set()
+ */
+ EAPI int elm_win_layer_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the rotation of the window.
*
- * @note The icon image set by this function can be changed by
- * elm_icon_standard_set().
+ * Most engines only work with multiples of 90.
*
- * @see elm_icon_file_get()
+ * This function is used to set the orientation of the window @p obj to
+ * match that of the screen. The window itself will be resized to adjust
+ * to the new geometry of its contents. If you want to keep the window size,
+ * see elm_win_rotation_with_resize_set().
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param rotation The rotation of the window, in degrees (0-360),
+ * counter-clockwise.
*/
- EAPI Eina_Bool elm_icon_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
/**
- * Set a location in memory to be used as an icon
- *
- * @param obj The icon object
- * @param img The binary data that will be used as an image
- * @param size The size of binary data @p img
- * @param format Optional format of @p img to pass to the image loader
- * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
- *
- * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
+ * Rotates the window and resizes it.
*
- * @note The icon image set by this function can be changed by
- * elm_icon_standard_set().
+ * Like elm_win_rotation_set(), but it also resizes the window's contents so
+ * that they fit inside the current window geometry.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param layer The rotation of the window in degrees (0-360),
+ * counter-clockwise.
*/
- EAPI Eina_Bool elm_icon_memfile_set(Evas_Object *obj, const void *img, size_t size, const char *format, const char *key); EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1);
/**
- * Get the file that will be used as icon.
- *
- * @param obj The icon object
- * @param file The path to file that will be used as icon icon image
- * @param group The group that the icon belongs to in edje file
+ * Get the rotation of the window.
*
- * @see elm_icon_file_set()
+ * @param obj The window object
+ * @return The rotation of the window in degrees (0-360)
*
- * @ingroup Icon
+ * @see elm_win_rotation_set()
+ * @see elm_win_rotation_with_resize_set()
*/
- EAPI void elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
- EAPI void elm_icon_thumb_set(const Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
+ EAPI int elm_win_rotation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the icon by icon standards names.
+ * Set the sticky state of the window.
*
- * @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.
+ * Hints the Window Manager that the window in @p obj should be left fixed
+ * at its position even when the virtual desktop it's on moves or changes.
*
- * @note The icon image set by this function can be changed by
- * elm_icon_file_set().
+ * @param obj The window object
+ * @param sticky If true, the window's sticky state is enabled
+ */
+ EAPI void elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky) EINA_ARG_NONNULL(1);
+ /**
+ * Get the sticky state of the window.
*
- * @see elm_icon_standard_get()
- * @see elm_icon_file_set()
+ * @param obj The window object
+ * @return If true, the window's sticky state is enabled
*
- * @ingroup Icon
+ * @see elm_win_sticky_set()
*/
- EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_win_sticky_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the icon name set by icon standard names.
+ * Set if this window is an illume conformant window
*
- * @param obj The icon object
- * @return The icon name
+ * @param obj The window object
+ * @param conformant The conformant flag (1 = conformant, 0 = non-conformant)
+ */
+ EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant) EINA_ARG_NONNULL(1);
+ /**
+ * Get if this window is an illume conformant window
*
- * If the icon image was set using elm_icon_file_set() instead of
- * elm_icon_standard_set(), then this function will return @c NULL.
+ * @param obj The window object
+ * @return A boolean if this window is illume conformant or not
+ */
+ EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set a window to be an illume quickpanel window
*
- * @see elm_icon_standard_set()
+ * By default window objects are not quickpanel windows.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window)
*/
- EAPI const char *elm_icon_standard_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel) EINA_ARG_NONNULL(1);
/**
- * Set the smooth effect for an icon object.
- *
- * @param obj The icon object
- * @param smooth @c EINA_TRUE if smooth scaling should be used, @c EINA_FALSE
- * otherwise. Default is @c EINA_TRUE.
+ * Get if this window is a quickpanel or not
*
- * Set the scaling algorithm to be used when scaling the icon image. Smooth
- * scaling provides a better resulting image, but is slower.
+ * @param obj The window object
+ * @return A boolean if this window is a quickpanel or not
+ */
+ EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the major priority of a quickpanel window
*
- * The smooth scaling should be disabled when making animations that change
- * the icon size, since they will be faster. Animations that don't require
- * resizing of the icon can keep the smooth scaling enabled (even if the icon
- * is already scaled, since the scaled icon image will be cached).
+ * @param obj The window object
+ * @param priority The major priority for this quickpanel
+ */
+ EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
+ /**
+ * Get the major priority of a quickpanel window
*
- * @see elm_icon_smooth_get()
+ * @param obj The window object
+ * @return The major priority of this quickpanel
+ */
+ EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the minor priority of a quickpanel window
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param priority The minor priority for this quickpanel
*/
- EAPI void elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority) EINA_ARG_NONNULL(1);
/**
- * Get the smooth effect for an icon object.
+ * Get the minor priority of a quickpanel window
*
- * @param obj The icon object
- * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise.
+ * @param obj The window object
+ * @return The minor priority of this quickpanel
+ */
+ EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set which zone this quickpanel should appear in
*
- * @see elm_icon_smooth_set()
+ * @param obj The window object
+ * @param zone The requested zone for this quickpanel
+ */
+ EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone) EINA_ARG_NONNULL(1);
+ /**
+ * Get which zone this quickpanel should appear in
*
- * @ingroup Icon
+ * @param obj The window object
+ * @return The requested zone for this quickpanel
*/
- EAPI Eina_Bool elm_icon_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Disable scaling of this object.
+ * Set the window to be skipped by keyboard focus
*
- * @param obj The icon object.
- * @param no_scale @c EINA_TRUE if the object is not scalable, @c EINA_FALSE
- * otherwise. Default is @c EINA_FALSE.
+ * This sets the window to be skipped by normal keyboard input. This means
+ * a window manager will be asked to not focus this window as well as omit
+ * it from things like the taskbar, pager, "alt-tab" list etc. etc.
*
- * This function disables scaling of the icon object through the function
- * elm_object_scale_set(). However, this does not affect the object
- * size/resize in any way. For that effect, take a look at
- * elm_icon_scale_set().
+ * Call this and enable it on a window BEFORE you show it for the first time,
+ * otherwise it may have no effect.
*
- * @see elm_icon_no_scale_get()
- * @see elm_icon_scale_set()
- * @see elm_object_scale_set()
+ * Use this for windows that have only output information or might only be
+ * interacted with by the mouse or fingers, and never for typing input.
+ * Be careful that this may have side-effects like making the window
+ * non-accessible in some cases unless the window is specially handled. Use
+ * this with care.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param skip The skip flag state (EINA_TRUE if it is to be skipped)
*/
- EAPI void elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip) EINA_ARG_NONNULL(1);
/**
- * Get whether scaling is disabled on the object.
- *
- * @param obj The icon object
- * @return @c EINA_TRUE if scaling is disabled, @c EINA_FALSE otherwise
+ * Send a command to the windowing environment
*
- * @see elm_icon_no_scale_set()
+ * This is intended to work in touchscreen or small screen device
+ * environments where there is a more simplistic window management policy in
+ * place. This uses the window object indicated to select which part of the
+ * environment to control (the part that this window lives in), and provides
+ * a command and an optional parameter structure (use NULL for this if not
+ * needed).
*
- * @ingroup Icon
+ * @param obj The window object that lives in the environment to control
+ * @param command The command to send
+ * @param params Optional parameters for the command
*/
- EAPI Eina_Bool elm_icon_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params) EINA_ARG_NONNULL(1);
/**
- * Set if the object is (up/down) resizeable.
+ * Get the inlined image object handle
*
- * @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up. Default is
- * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
- * is @c EINA_TRUE.
+ * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE,
+ * then the window is in fact an evas image object inlined in the parent
+ * canvas. You can get this object (be careful to not manipulate it as it
+ * is under control of elementary), and use it to do things like get pixel
+ * data, save the image to a file, etc.
*
- * This function limits the icon object resize ability. If @p scale_up is set to
- * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original icon size. Same is valid for @p scale_down.
+ * @param obj The window object to get the inlined image from
+ * @return The inlined image object, or NULL if none exists
+ */
+ EAPI Evas_Object *elm_win_inlined_image_object_get(Evas_Object *obj);
+ /**
+ * Set the enabled status for the focus highlight in a window
*
- * @see elm_icon_scale_get()
+ * This function will enable or disable the focus highlight only for the
+ * given window, regardless of the global setting for it
*
- * @ingroup Icon
+ * @param obj The window where to enable the highlight
+ * @param enabled The enabled value for the highlight
*/
- EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1);
/**
- * Get if the object is (up/down) resizeable.
- *
- * @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * Get the enabled value of the focus highlight for this window
*
- * @see elm_icon_scale_set()
+ * @param obj The window in which to check if the focus highlight is enabled
*
- * @ingroup Icon
+ * @return EINA_TRUE if enabled, EINA_FALSE otherwise
*/
- EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the object's image size
+ * Set the style for the focus highlight on this window
*
- * @param obj The icon object
- * @param w A pointer to store the width in
- * @param h A pointer to store the height in
+ * Sets the style to use for theming the highlight of focused objects on
+ * the given window. If @p style is NULL, the default will be used.
*
- * @ingroup Icon
+ * @param obj The window where to set the style
+ * @param style The style to set
*/
- EAPI void elm_icon_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
/**
- * Set if the icon fill the entire object area.
+ * Get the style set for the focus highlight object
*
- * @param obj The icon object
- * @param fill_outside @c EINA_TRUE if the object is filled outside,
- * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
+ * Gets the style set for this windows highilght object, or NULL if none
+ * is set.
*
- * When the icon object is resized to a different aspect ratio from the
- * original icon image, the icon image will still keep its aspect. This flag
- * tells how the image should fill the object's area. They are: keep the
- * entire icon inside the limits of height and width of the object (@p
- * fill_outside is @c EINA_FALSE) or let the extra width or height go outside
- * of the object, and the icon will fill the entire object (@p fill_outside
- * is @c EINA_TRUE).
+ * @param obj The window to retrieve the highlights style from
*
- * @note Unlike @ref Image, there's no option in icon to set the aspect ratio
- * retain property to false. Thus, the icon image will always keep its
- * original aspect ratio.
+ * @return The style set or NULL if none was. Default is used in that case.
+ */
+ EAPI const char *elm_win_focus_highlight_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /*...
+ * ecore_x_icccm_hints_set -> accepts_focus (add to ecore_evas)
+ * ecore_x_icccm_hints_set -> window_group (add to ecore_evas)
+ * ecore_x_icccm_size_pos_hints_set -> request_pos (add to ecore_evas)
+ * ecore_x_icccm_client_leader_set -> l (add to ecore_evas)
+ * ecore_x_icccm_window_role_set -> role (add to ecore_evas)
+ * ecore_x_icccm_transient_for_set -> forwin (add to ecore_evas)
+ * ecore_x_netwm_window_type_set -> type (add to ecore_evas)
*
- * @see elm_icon_fill_outside_get()
- * @see elm_image_fill_outside_set()
+ * (add to ecore_x) set netwm argb icon! (add to ecore_evas)
+ * (blank mouse, private mouse obj, defaultmouse)
*
- * @ingroup Icon
*/
- EAPI void elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1);
/**
- * Get if the object is filled outside.
- *
- * @param obj The icon object
- * @return @c EINA_TRUE if the object is filled outside, @c EINA_FALSE otherwise.
- *
- * @see elm_icon_fill_outside_set()
+ * Sets the keyboard mode of the window.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode
*/
- EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode) EINA_ARG_NONNULL(1);
/**
- * Set the prescale size for the icon.
+ * Gets the keyboard mode of the window.
*
- * @param obj The icon object
- * @param size The prescale size. This value is used for both width and
- * height.
- *
- * This function sets a new size for pixmap representation of the given
- * icon. It allows the icon to be loaded already in the specified size,
- * reducing the memory usage and load time when loading a big icon with load
- * size set to a smaller size.
- *
- * It's equivalent to the elm_bg_load_size_set() function for bg.
- *
- * @note this is just a hint, the real size of the pixmap may differ
- * depending on the type of icon being loaded, being bigger than requested.
- *
- * @see elm_icon_prescale_get()
- * @see elm_bg_load_size_set()
- *
- * @ingroup Icon
+ * @param obj The window object
+ * @return The mode, one of #Elm_Win_Keyboard_Mode
*/
- EAPI void elm_icon_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
+ EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the prescale size for the icon.
- *
- * @param obj The icon object
- * @return The prescale size
- *
- * @see elm_icon_prescale_set()
+ * Sets whether the window is a keyboard.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param is_keyboard If true, the window is a virtual keyboard
*/
- EAPI int elm_icon_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard) EINA_ARG_NONNULL(1);
/**
- * 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
+ * Gets whether the window is a keyboard.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @return If the window is a virtual keyboard
*/
- EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * 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
+ * Get the screen position of a window.
*
- * @ingroup Icon
+ * @param obj The window object
+ * @param x The int to store the x coordinate to
+ * @param y The int to store the y coordinate to
*/
- EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1);
/**
* @}
*/
/**
- * @defgroup Image Image
- *
- * @image html img/widget/image/preview-00.png
- * @image latex img/widget/image/preview-00.eps
+ * @defgroup Inwin Inwin
*
- * An object that allows one to load an image file to it. It can be used
- * anywhere like any other elementary widget.
+ * @image html img/widget/inwin/preview-00.png
+ * @image latex img/widget/inwin/preview-00.eps
+ * @image html img/widget/inwin/preview-01.png
+ * @image latex img/widget/inwin/preview-01.eps
+ * @image html img/widget/inwin/preview-02.png
+ * @image latex img/widget/inwin/preview-02.eps
*
- * This widget provides most of the functionality provided from @ref Bg or @ref
- * Icon, but with a slightly different API (use the one that fits better your
- * needs).
+ * An inwin is a window inside a window that is useful for a quick popup.
+ * It does not hover.
*
- * The features not provided by those two other image widgets are:
- * @li allowing to get the basic @c Evas_Object with elm_image_object_get();
- * @li change the object orientation with elm_image_orient_set();
- * @li and turning the image editable with elm_image_editable_set().
+ * It works by creating an object that will occupy the entire window, so it
+ * must be created using an @ref Win "elm_win" as parent only. The inwin
+ * object can be hidden or restacked below every other object if it's
+ * needed to show what's behind it without destroying it. If this is done,
+ * the elm_win_inwin_activate() function can be used to bring it back to
+ * full visibility again.
*
- * Signals that you can add callbacks for are:
+ * There are three styles available in the default theme. These are:
+ * @li default: The inwin is sized to take over most of the window it's
+ * placed in.
+ * @li minimal: The size of the inwin will be the minimum necessary to show
+ * its contents.
+ * @li minimal_vertical: Horizontally, the inwin takes as much space as
+ * possible, but it's sized vertically the most it needs to fit its\
+ * contents.
*
- * @li @c "clicked" - This is called when a user has clicked the image
+ * Some examples of Inwin can be found in the following:
+ * @li @ref inwin_example_01
*
- * An example of usage for this API follows:
- * @li @ref tutorial_image
- */
-
- /**
- * @addtogroup Image
* @{
*/
-
/**
- * @enum _Elm_Image_Orient
- * @typedef Elm_Image_Orient
- *
- * Possible orientation options for elm_image_orient_set().
+ * Adds an inwin to the current window
*
- * @image html elm_image_orient_set.png
- * @image latex elm_image_orient_set.eps width=\textwidth
+ * 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.
*
- * @ingroup Image
- */
- typedef enum _Elm_Image_Orient
- {
- ELM_IMAGE_ORIENT_NONE, /**< no orientation change */
- ELM_IMAGE_ROTATE_90_CW, /**< rotate 90 degrees clockwise */
- ELM_IMAGE_ROTATE_180_CW, /**< rotate 180 degrees clockwise */
- ELM_IMAGE_ROTATE_90_CCW, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */
- ELM_IMAGE_FLIP_HORIZONTAL, /**< flip image horizontally */
- ELM_IMAGE_FLIP_VERTICAL, /**< flip image vertically */
- ELM_IMAGE_FLIP_TRANSPOSE, /**< flip the image along the y = (side - x) line*/
- ELM_IMAGE_FLIP_TRANSVERSE /**< flip the image along the y = x line */
- } Elm_Image_Orient;
-
- /**
- * Add a new image to the parent.
+ * 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
- *
- * @see elm_image_file_set()
- *
- * @ingroup Image
*/
- EAPI Evas_Object *elm_image_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the file that will be used as image.
- *
- * @param obj The image object
- * @param file The path to file that will be used as image
- * @param group The group that the image belongs in edje file (if it's an
- * edje image)
+ * Activates an inwin object, ensuring its visibility
*
- * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
+ * 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.
*
- * @see elm_image_file_get()
+ * The object's theme will also receive the signal "elm,action,show" with
+ * source "elm".
*
- * @ingroup Image
+ * @param obj The inwin to activate
*/
- EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the file that will be used as image.
- *
- * @param obj The image object
- * @param file The path to file
- * @param group The group that the image belongs in edje file
+ * Set the content of an inwin object.
*
- * @see elm_image_file_set()
+ * 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.
*
- * @ingroup Image
+ * @param obj The inwin object
+ * @param content The object to set as content
*/
- EAPI void elm_image_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
+ EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
- * Set the smooth effect for an image.
- *
- * @param obj The image object
- * @param smooth @c EINA_TRUE if smooth scaling should be used, @c EINA_FALSE
- * otherwise. Default is @c EINA_TRUE.
+ * Get the content of an inwin object.
*
- * Set the scaling algorithm to be used when scaling the image. Smooth
- * scaling provides a better resulting image, but is slower.
+ * Return the content object which is set for this widget.
*
- * The smooth scaling should be disabled when making animations that change
- * the image size, since it will be faster. Animations that don't require
- * resizing of the image can keep the smooth scaling enabled (even if the
- * image is already scaled, since the scaled image will be cached).
+ * 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.
*
- * @see elm_image_smooth_get()
+ * If you need to remove an inwin's content to be reused somewhere else,
+ * see elm_win_inwin_content_unset().
*
- * @ingroup Image
+ * @param obj The inwin object
+ * @return The content that is being used
*/
- EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the smooth effect for an image.
- *
- * @param obj The image object
- * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise.
+ * Unset the content of an inwin object.
*
- * @see elm_image_smooth_get()
+ * Unparent and return the content object which was set for this widget.
*
- * @ingroup Image
+ * @param obj The inwin object
+ * @return The content that was being used
*/
- EAPI Eina_Bool elm_image_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Gets the current size of the image.
- *
- * @param obj The image object.
- * @param w Pointer to store width, or NULL.
- * @param h Pointer to store height, or NULL.
+ * @}
+ */
+ /* X specific calls - won't work on non-x engines (return 0) */
+
+ /**
+ * Get the Ecore_X_Window of an Evas_Object
*
- * This is the real size of the image, not the size of the object.
+ * @param obj The object
*
- * On error, neither w or h will be written.
+ * @return The Ecore_X_Window of @p obj
*
- * @ingroup Image
+ * @ingroup Win
*/
- EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
+ EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /* smart callbacks called:
+ * "delete,request" - the user requested to delete the window
+ * "focus,in" - window got focus
+ * "focus,out" - window lost focus
+ * "moved" - window that holds the canvas was moved
+ */
+
/**
- * Disable scaling of this object.
+ * @defgroup Bg Bg
*
- * @param obj The image object.
- * @param no_scale @c EINA_TRUE if the object is not scalable, @c EINA_FALSE
- * otherwise. Default is @c EINA_FALSE.
+ * @image html img/widget/bg/preview-00.png
+ * @image latex img/widget/bg/preview-00.eps
*
- * This function disables scaling of the elm_image widget through the
- * function elm_object_scale_set(). However, this does not affect the widget
- * size/resize in any way. For that effect, take a look at
- * elm_image_scale_set().
+ * @brief Background object, used for setting a solid color, image or Edje
+ * group as background to a window or any container object.
*
- * @see elm_image_no_scale_get()
- * @see elm_image_scale_set()
- * @see elm_object_scale_set()
+ * The bg object is used for setting a solid background to a window or
+ * packing into any container object. It works just like an image, but has
+ * some properties useful to a background, like setting it to tiled,
+ * centered, scaled or stretched.
*
- * @ingroup Image
+ * Here is some sample code using it:
+ * @li @ref bg_01_example_page
+ * @li @ref bg_02_example_page
+ * @li @ref bg_03_example_page
*/
- EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1);
+
+ /* bg */
+ typedef enum _Elm_Bg_Option
+ {
+ ELM_BG_OPTION_CENTER, /**< center the background */
+ ELM_BG_OPTION_SCALE, /**< scale the background retaining aspect ratio */
+ ELM_BG_OPTION_STRETCH, /**< stretch the background to fill */
+ ELM_BG_OPTION_TILE /**< tile background at its original size */
+ } Elm_Bg_Option;
+
/**
- * Get whether scaling is disabled on the object.
- *
- * @param obj The image object
- * @return @c EINA_TRUE if scaling is disabled, @c EINA_FALSE otherwise
+ * Add a new background to the parent
*
- * @see elm_image_no_scale_set()
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_bg_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
/**
- * Set if the object is (up/down) resizeable.
+ * Set the file (image or edje) used for the background
*
- * @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up. Default is
- * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
- * is @c EINA_TRUE.
+ * @param obj The bg object
+ * @param file The file path
+ * @param group Optional key (group in Edje) within the file
*
- * This function limits the image resize ability. If @p scale_up is set to
- * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original image size. Same is valid for @p scale_down.
+ * This sets the image file used in the background object. The image (or edje)
+ * will be stretched (retaining aspect if its an image file) to completely fill
+ * the bg object. This may mean some parts are not visible.
*
- * @see elm_image_scale_get()
+ * @note Once the image of @p obj is set, a previously set one will be deleted,
+ * even if @p file is NULL.
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
+
/**
- * Get if the object is (up/down) resizeable.
- *
- * @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * Get the file (image or edje) used for the background
*
- * @see elm_image_scale_set()
+ * @param obj The bg object
+ * @param file The file path
+ * @param group Optional key (group in Edje) within the file
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
+
/**
- * Set if the image fill the entire object area when keeping the aspect ratio.
- *
- * @param obj The image object
- * @param fill_outside @c EINA_TRUE if the object is filled outside,
- * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
- *
- * When the image should keep its aspect ratio even if resized to another
- * aspect ratio, there are two possibilities to resize it: keep the entire
- * image inside the limits of height and width of the object (@p fill_outside
- * is @c EINA_FALSE) or let the extra width or height go outside of the object,
- * and the image will fill the entire object (@p fill_outside is @c EINA_TRUE).
+ * Set the option used for the background image
*
- * @note This option will have no effect if
- * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE.
+ * @param obj The bg object
+ * @param option The desired background option (TILE, SCALE)
*
- * @see elm_image_fill_outside_get()
- * @see elm_image_aspect_ratio_retained_set()
+ * This sets the option used for manipulating the display of the background
+ * image. The image can be tiled or scaled.
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) EINA_ARG_NONNULL(1);
+
/**
- * Get if the object is filled outside
- *
- * @param obj The image object
- * @return @c EINA_TRUE if the object is filled outside, @c EINA_FALSE otherwise.
+ * Get the option used for the background image
*
- * @see elm_image_fill_outside_set()
+ * @param obj The bg object
+ * @return The desired background option (CENTER, SCALE, STRETCH or TILE)
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the prescale size for the image
- *
- * @param obj The image object
- * @param size The prescale size. This value is used for both width and
- * height.
- *
- * This function sets a new size for pixmap representation of the given
- * image. It allows the image to be loaded already in the specified size,
- * reducing the memory usage and load time when loading a big image with load
- * size set to a smaller size.
- *
- * It's equivalent to the elm_bg_load_size_set() function for bg.
+ * Set the option used for the background color
*
- * @note this is just a hint, the real size of the pixmap may differ
- * depending on the type of image being loaded, being bigger than requested.
+ * @param obj The bg object
+ * @param r
+ * @param g
+ * @param b
*
- * @see elm_image_prescale_get()
- * @see elm_bg_load_size_set()
+ * This sets the color used for the background rectangle. Its range goes
+ * from 0 to 255.
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b) EINA_ARG_NONNULL(1);
/**
- * Get the prescale size for the image
- *
- * @param obj The image object
- * @return The prescale size
+ * Get the option used for the background color
*
- * @see elm_image_prescale_set()
+ * @param obj The bg object
+ * @param r
+ * @param g
+ * @param b
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI int elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b) EINA_ARG_NONNULL(1);
+
/**
- * Set the image orientation.
- *
- * @param obj The image object
- * @param orient The image orientation
- * (one of #ELM_IMAGE_ORIENT_NONE, #ELM_IMAGE_ROTATE_90_CW,
- * #ELM_IMAGE_ROTATE_180_CW, #ELM_IMAGE_ROTATE_90_CCW,
- * #ELM_IMAGE_FLIP_HORIZONTAL, #ELM_IMAGE_FLIP_VERTICAL,
- * #ELM_IMAGE_FLIP_TRANSPOSE, #ELM_IMAGE_FLIP_TRANSVERSE).
- * Default is #ELM_IMAGE_ORIENT_NONE.
+ * Set the overlay object used for the background object.
*
- * This function allows to rotate or flip the given image.
+ * @param obj The bg object
+ * @param overlay The overlay object
*
- * @see elm_image_orient_get()
- * @see @ref Elm_Image_Orient
+ * This provides a way for elm_bg to have an 'overlay' that will be on top
+ * of the bg. Once the over object is set, a previously set one will be
+ * deleted, even if you set the new one to NULL. If you want to keep that
+ * old content object, use the elm_bg_overlay_unset() function.
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) EINA_ARG_NONNULL(1);
+
+ EAPI void elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay) EINA_ARG_NONNULL(1);
+
/**
- * Get the image orientation.
+ * Get the overlay object used for the background object.
*
- * @param obj The image object
- * @return The image orientation
- * (one of #ELM_IMAGE_ORIENT_NONE, #ELM_IMAGE_ROTATE_90_CW,
- * #ELM_IMAGE_ROTATE_180_CW, #ELM_IMAGE_ROTATE_90_CCW,
- * #ELM_IMAGE_FLIP_HORIZONTAL, #ELM_IMAGE_FLIP_VERTICAL,
- * #ELM_IMAGE_FLIP_TRANSPOSE, #ELM_IMAGE_FLIP_TRANSVERSE)
+ * @param obj The bg object
+ * @return The content that is being used
*
- * @see elm_image_orient_set()
- * @see @ref Elm_Image_Orient
+ * Return the content object which is set for this widget
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_bg_overlay_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Make the image 'editable'.
+ * Get the overlay object used for the background object.
*
- * @param obj Image object.
- * @param set Turn on or off editability. Default is @c EINA_FALSE.
+ * @param obj The bg object
+ * @return The content that was being used
*
- * This means the image is a valid drag target for drag and drop, and can be
- * cut or pasted too.
+ * Unparent and return the overlay object which was set for this widget
*
- * @ingroup Image
+ * @ingroup Bg
*/
- EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_bg_overlay_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Make the image 'editable'.
+ * Set the size of the pixmap representation of the image.
*
- * @param obj Image object.
- * @return Editability.
+ * This option just makes sense if an image is going to be set in the bg.
*
- * This means the image is a valid drag target for drag and drop, and can be
- * cut or pasted too.
+ * @param obj The bg object
+ * @param w The new width of the image pixmap representation.
+ * @param h The new height of the image pixmap representation.
*
- * @ingroup Image
+ * This function sets a new size for pixmap representation of the given bg
+ * image. It allows the image to be loaded already in the specified size,
+ * reducing the memory usage and load time when loading a big image with load
+ * size set to a smaller size.
+ *
+ * NOTE: this is just a hint, the real size of the pixmap may differ
+ * depending on the type of image being loaded, being bigger than requested.
+ *
+ * @ingroup Bg
*/
- EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+ /* smart callbacks called:
+ */
+
/**
- * Get the basic Evas_Image object from this object (widget).
+ * @defgroup Icon Icon
*
- * @param obj The image object to get the inlined image from
- * @return The inlined image object, or NULL if none exists
+ * @image html img/widget/icon/preview-00.png
+ * @image latex img/widget/icon/preview-00.eps
*
- * This function allows one to get the underlying @c Evas_Object of type
- * Image from this elementary widget. It can be useful to do things like get
- * the pixel data, save the image to a file, etc.
+ * An object that provides standard icon images (delete, edit, arrows, etc.)
+ * or a custom file (PNG, JPG, EDJE, etc.) used for an icon.
*
- * @note Be careful to not manipulate it, as it is under control of
- * elementary.
+ * The icon image requested can be in the elementary theme, or in the
+ * freedesktop.org paths. It's possible to set the order of preference from
+ * where the image will be used.
*
- * @ingroup Image
- */
- EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set whether the original aspect ratio of the image should be kept on resize.
+ * This API is very similar to @ref Image, but with ready to use images.
*
- * @param obj The image object.
- * @param retained @c EINA_TRUE if the image should retain the aspect,
- * @c EINA_FALSE otherwise.
+ * Default images provided by the theme are described below.
*
- * The original aspect ratio (width / height) of the image is usually
- * distorted to match the object's size. Enabling this option will retain
- * this original aspect, and the way that the image is fit into the object's
- * area depends on the option set by elm_image_fill_outside_set().
+ * The first list contains icons that were first intended to be used in
+ * toolbars, but can be used in many other places too:
+ * @li home
+ * @li close
+ * @li apps
+ * @li arrow_up
+ * @li arrow_down
+ * @li arrow_left
+ * @li arrow_right
+ * @li chat
+ * @li clock
+ * @li delete
+ * @li edit
+ * @li refresh
+ * @li folder
+ * @li file
*
- * @see elm_image_aspect_ratio_retained_get()
- * @see elm_image_fill_outside_set()
+ * Now some icons that were designed to be used in menus (but again, you can
+ * use them anywhere else):
+ * @li menu/home
+ * @li menu/close
+ * @li menu/apps
+ * @li menu/arrow_up
+ * @li menu/arrow_down
+ * @li menu/arrow_left
+ * @li menu/arrow_right
+ * @li menu/chat
+ * @li menu/clock
+ * @li menu/delete
+ * @li menu/edit
+ * @li menu/refresh
+ * @li menu/folder
+ * @li menu/file
*
- * @ingroup Image
- */
- EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained) EINA_ARG_NONNULL(1);
- /**
- * Get if the object retains the original aspect ratio.
+ * And here we have some media player specific icons:
+ * @li media_player/forward
+ * @li media_player/info
+ * @li media_player/next
+ * @li media_player/pause
+ * @li media_player/play
+ * @li media_player/prev
+ * @li media_player/rewind
+ * @li media_player/stop
*
- * @param obj The image object.
- * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
- * otherwise.
+ * Signals that you can add callbacks for are:
*
- * @ingroup Image
- */
- EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
- /* smart callbacks called:
- * "clicked" - the user clicked the image
+ * "clicked" - This is called when a user has clicked the icon
+ *
+ * An example of usage for this API follows:
+ * @li @ref tutorial_icon
*/
/**
- * @}
+ * @addtogroup Icon
+ * @{
*/
- /* glview */
- typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj);
-
- typedef enum _Elm_GLView_Mode
+ typedef enum _Elm_Icon_Type
{
- ELM_GLVIEW_ALPHA = 1,
- ELM_GLVIEW_DEPTH = 2,
- ELM_GLVIEW_STENCIL = 4
- } Elm_GLView_Mode;
-
+ ELM_ICON_NONE,
+ ELM_ICON_FILE,
+ ELM_ICON_STANDARD
+ } Elm_Icon_Type;
/**
- * Defines a policy for the glview resizing.
+ * @enum _Elm_Icon_Lookup_Order
+ * @typedef Elm_Icon_Lookup_Order
*
- * @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
+ * Lookup order used by elm_icon_standard_set(). Should look for icons in the
+ * theme, FDO paths, or both?
+ *
+ * @ingroup Icon
*/
- typedef enum _Elm_GLView_Resize_Policy
- {
- ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
- ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only reize the internal image and not the surface */
- } Elm_GLView_Resize_Policy;
-
- typedef enum _Elm_GLView_Render_Policy
+ typedef enum _Elm_Icon_Lookup_Order
{
- 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;
-
-
- EAPI Evas_Object *elm_glview_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
- EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
- EAPI void elm_glview_changed_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ 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;
- /* box */
/**
- * @defgroup Box Box
- *
- * @image html img/widget/box/preview-00.png
- * @image latex img/widget/box/preview-00.eps width=\textwidth
- *
- * @image html img/box.png
- * @image latex img/box.eps width=\textwidth
- *
- * A box arranges objects in a linear fashion, governed by a layout function
- * that defines the details of this arrangement.
- *
- * By default, the box will use an internal function to set the layout to
- * a single row, either vertical or horizontal. This layout is affected
- * by a number of parameters, such as the homogeneous flag set by
- * elm_box_homogeneous_set(), the values given by elm_box_padding_set() and
- * elm_box_align_set() and the hints set to each object in the box.
- *
- * For this default layout, it's possible to change the orientation with
- * elm_box_horizontal_set(). The box will start in the vertical orientation,
- * placing its elements ordered from top to bottom. When horizontal is set,
- * the order will go from left to right. If the box is set to be
- * homogeneous, every object in it will be assigned the same space, that
- * of the largest object. Padding can be used to set some spacing between
- * the cell given to each object. The alignment of the box, set with
- * elm_box_align_set(), determines how the bounding box of all the elements
- * will be placed within the space given to the box widget itself.
+ * Add a new icon object to the parent.
*
- * The size hints of each object also affect how they are placed and sized
- * within the box. evas_object_size_hint_min_set() will give the minimum
- * size the object can have, and the box will use it as the basis for all
- * latter calculations. Elementary widgets set their own minimum size as
- * needed, so there's rarely any need to use it manually.
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * evas_object_size_hint_weight_set(), when not in homogeneous mode, is
- * used to tell whether the object will be allocated the minimum size it
- * needs or if the space given to it should be expanded. It's important
- * to realize that expanding the size given to the object is not the same
- * thing as resizing the object. It could very well end being a small
- * widget floating in a much larger empty space. If not set, the weight
- * for objects will normally be 0.0 for both axis, meaning the widget will
- * not be expanded. To take as much space possible, set the weight to
- * EVAS_HINT_EXPAND (defined to 1.0) for the desired axis to expand.
+ * @see elm_icon_file_set()
*
- * Besides how much space each object is allocated, it's possible to control
- * how the widget will be placed within that space using
- * evas_object_size_hint_align_set(). By default, this value will be 0.5
- * for both axis, meaning the object will be centered, but any value from
- * 0.0 (left or top, for the @c x and @c y axis, respectively) to 1.0
- * (right or bottom) can be used. The special value EVAS_HINT_FILL, which
- * is -1.0, means the object will be resized to fill the entire space it
- * was allocated.
+ * @ingroup Icon
+ */
+ EAPI Evas_Object *elm_icon_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Set the file that will be used as icon.
*
- * In addition, customized functions to define the layout can be set, which
- * allow the application developer to organize the objects within the box
- * in any number of ways.
+ * @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 in edje file
*
- * The special elm_box_layout_transition() function can be used
- * to switch from one layout to another, animating the motion of the
- * children of the box.
+ * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
- * @note Objects should not be added to box objects using _add() calls.
+ * @note The icon image set by this function can be changed by
+ * elm_icon_standard_set().
*
- * Some examples on how to use boxes follow:
- * @li @ref box_example_01
- * @li @ref box_example_02
+ * @see elm_icon_file_get()
*
- * @{
+ * @ingroup Icon
*/
+ EAPI Eina_Bool elm_icon_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
/**
- * @typedef Elm_Box_Transition
+ * Set a location in memory to be used as an icon
*
- * Opaque handler containing the parameters to perform an animated
- * transition of the layout the box uses.
+ * @param obj The icon object
+ * @param img The binary data that will be used as an image
+ * @param size The size of binary data @p img
+ * @param format Optional format of @p img to pass to the image loader
+ * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
*
- * @see elm_box_transition_new()
- * @see elm_box_layout_set()
- * @see elm_box_layout_transition()
- */
- typedef struct _Elm_Box_Transition Elm_Box_Transition;
-
- /**
- * Add a new box to the parent
+ * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
- * By default, the box will be in vertical mode and non-homogeneous.
+ * @note The icon image set by this function can be changed by
+ * elm_icon_standard_set().
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @ingroup Icon
*/
- EAPI Evas_Object *elm_box_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_memfile_set(Evas_Object *obj, const void *img, size_t size, const char *format, const char *key); EINA_ARG_NONNULL(1, 2);
/**
- * Set the horizontal orientation
- *
- * By default, box object arranges their contents vertically from top to
- * bottom.
- * By calling this function with @p horizontal as EINA_TRUE, the box will
- * become horizontal, arranging contents from left to right.
+ * Get the file that will be used as icon.
*
- * @note This flag is ignored if a custom layout function is set.
+ * @param obj The icon object
+ * @param file The path to file that will be used as icon icon image
+ * @param group The group that the icon belongs to in edje file
*
- * @param obj The box object
- * @param horizontal The horizontal flag (EINA_TRUE = horizontal,
- * EINA_FALSE = vertical)
- */
- EAPI void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
- /**
- * Get the horizontal orientation
+ * @see elm_icon_file_set()
*
- * @param obj The box object
- * @return EINA_TRUE if the box is set to horizontal mode, EINA_FALSE otherwise
+ * @ingroup Icon
*/
- EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
/**
- * Set the box to arrange its children homogeneously
+ * Set the icon by icon standards names.
*
- * If enabled, homogeneous layout makes all items the same size, according
- * to the size of the largest of its children.
+ * @param obj The icon object
+ * @param name The icon name
*
- * @note This flag is ignored if a custom layout function is set.
+ * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
- * @param obj The box object
- * @param homogeneous The homogeneous flag
- */
- EAPI void elm_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1);
- /**
- * Get whether the box is using homogeneous mode or not
+ * 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().
*
- * @param obj The box object
- * @return EINA_TRUE if it's homogeneous, EINA_FALSE otherwise
- */
- EAPI Eina_Bool elm_box_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI void elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI Eina_Bool elm_box_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Add an object to the beginning of the pack list
+ * 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.
*
- * Pack @p subobj into the box @p obj, placing it first in the list of
- * children objects. The actual position the object will get on screen
- * depends on the layout used. If no custom layout is set, it will be at
- * the top or left, depending if the box is vertical or horizontal,
- * respectively.
+ * @note The icon image set by this function can be changed by
+ * elm_icon_file_set().
*
- * @param obj The box object
- * @param subobj The object to add to the box
+ * @see elm_icon_standard_get()
+ * @see elm_icon_file_set()
*
- * @see elm_box_pack_end()
- * @see elm_box_pack_before()
- * @see elm_box_pack_after()
- * @see elm_box_unpack()
- * @see elm_box_unpack_all()
- * @see elm_box_clear()
+ * @ingroup Icon
*/
- EAPI void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
/**
- * Add an object at the end of the pack list
+ * Get the icon name set by icon standard names.
*
- * Pack @p subobj into the box @p obj, placing it last in the list of
- * children objects. The actual position the object will get on screen
- * depends on the layout used. If no custom layout is set, it will be at
- * the bottom or right, depending if the box is vertical or horizontal,
- * respectively.
+ * @param obj The icon object
+ * @return The icon name
*
- * @param obj The box object
- * @param subobj The object to add to the box
+ * If the icon image was set using elm_icon_file_set() instead of
+ * elm_icon_standard_set(), then this function will return @c NULL.
*
- * @see elm_box_pack_start()
- * @see elm_box_pack_before()
- * @see elm_box_pack_after()
- * @see elm_box_unpack()
- * @see elm_box_unpack_all()
- * @see elm_box_clear()
+ * @see elm_icon_standard_set()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_icon_standard_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Adds an object to the box before the indicated object
+ * Set the smooth effect for an icon object.
*
- * This will add the @p subobj to the box indicated before the object
- * indicated with @p before. If @p before is not already in the box, results
- * are undefined. Before means either to the left of the indicated object or
- * above it depending on orientation.
+ * @param obj The icon object
+ * @param smooth @c EINA_TRUE if smooth scaling should be used, @c EINA_FALSE
+ * otherwise. Default is @c EINA_TRUE.
*
- * @param obj The box object
- * @param subobj The object to add to the box
- * @param before The object before which to add it
+ * Set the scaling algorithm to be used when scaling the icon image. Smooth
+ * scaling provides a better resulting image, but is slower.
*
- * @see elm_box_pack_start()
- * @see elm_box_pack_end()
- * @see elm_box_pack_after()
- * @see elm_box_unpack()
- * @see elm_box_unpack_all()
- * @see elm_box_clear()
+ * The smooth scaling should be disabled when making animations that change
+ * the icon size, since they will be faster. Animations that don't require
+ * resizing of the icon can keep the smooth scaling enabled (even if the icon
+ * is already scaled, since the scaled icon image will be cached).
+ *
+ * @see elm_icon_smooth_get()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1);
/**
- * Adds an object to the box after the indicated object
+ * Get the smooth effect for an icon object.
*
- * This will add the @p subobj to the box indicated after the object
- * indicated with @p after. If @p after is not already in the box, results
- * are undefined. After means either to the right of the indicated object or
- * below it depending on orientation.
+ * @param obj The icon object
+ * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise.
*
- * @param obj The box object
- * @param subobj The object to add to the box
- * @param after The object after which to add it
+ * @see elm_icon_smooth_set()
*
- * @see elm_box_pack_start()
- * @see elm_box_pack_end()
- * @see elm_box_pack_before()
- * @see elm_box_unpack()
- * @see elm_box_unpack_all()
- * @see elm_box_clear()
+ * @ingroup Icon
*/
- EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Clear the box of all children
+ * Disable scaling of this object.
*
- * Remove all the elements contained by the box, deleting the respective
- * objects.
+ * @param obj The icon object.
+ * @param no_scale @c EINA_TRUE if the object is not scalable, @c EINA_FALSE
+ * otherwise. Default is @c EINA_FALSE.
*
- * @param obj The box object
+ * This function disables scaling of the icon object through the function
+ * elm_object_scale_set(). However, this does not affect the object
+ * size/resize in any way. For that effect, take a look at
+ * elm_icon_scale_set().
*
- * @see elm_box_unpack()
- * @see elm_box_unpack_all()
+ * @see elm_icon_no_scale_get()
+ * @see elm_icon_scale_set()
+ * @see elm_object_scale_set()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1);
/**
- * Unpack a box item
+ * Get whether scaling is disabled on the object.
*
- * Remove the object given by @p subobj from the box @p obj without
- * deleting it.
+ * @param obj The icon object
+ * @return @c EINA_TRUE if scaling is disabled, @c EINA_FALSE otherwise
*
- * @param obj The box object
+ * @see elm_icon_no_scale_set()
*
- * @see elm_box_unpack_all()
- * @see elm_box_clear()
+ * @ingroup Icon
*/
- EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Remove all items from the box, without deleting them
+ * Set if the object is (up/down) resizable.
*
- * Clear the box from all children, but don't delete the respective objects.
- * If no other references of the box children exist, the objects will never
- * be deleted, and thus the application will leak the memory. Make sure
- * when using this function that you hold a reference to all the objects
- * in the box @p obj.
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizable down. Default
+ * is @c EINA_TRUE.
*
- * @param obj The box object
+ * This function limits the icon object resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original icon size. Same is valid for @p scale_down.
*
- * @see elm_box_clear()
- * @see elm_box_unpack()
+ * @see elm_icon_scale_get()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1);
/**
- * Retrieve a list of the objects packed into the box
+ * Get if the object is (up/down) resizable.
*
- * Returns a new @c Eina_List with a pointer to @c Evas_Object in its nodes.
- * The order of the list corresponds to the packing order the box uses.
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizable up
+ * @param scale_down A bool to set if the object is resizable down
*
- * You must free this list with eina_list_free() once you are done with it.
+ * @see elm_icon_scale_set()
*
- * @param obj The box object
+ * @ingroup Icon
*/
- EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1);
/**
- * Set the space (padding) between the box's elements.
+ * Get the object's image size
*
- * Extra space in pixels that will be added between a box child and its
- * neighbors after its containing cell has been calculated. This padding
- * is set for all elements in the box, besides any possible padding that
- * individual elements may have through their size hints.
+ * @param obj The icon object
+ * @param w A pointer to store the width in
+ * @param h A pointer to store the height in
*
- * @param obj The box object
- * @param horizontal The horizontal space between elements
- * @param vertical The vertical space between elements
+ * @ingroup Icon
*/
- EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
/**
- * Get the space (padding) between the box's elements.
+ * Set if the icon fill the entire object area.
*
- * @param obj The box object
- * @param horizontal The horizontal space between elements
- * @param vertical The vertical space between elements
+ * @param obj The icon object
+ * @param fill_outside @c EINA_TRUE if the object is filled outside,
+ * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
- * @see elm_box_padding_set()
- */
- EAPI void elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
- /**
- * Set the alignment of the whole bouding box of contents.
+ * When the icon object is resized to a different aspect ratio from the
+ * original icon image, the icon image will still keep its aspect. This flag
+ * tells how the image should fill the object's area. They are: keep the
+ * entire icon inside the limits of height and width of the object (@p
+ * fill_outside is @c EINA_FALSE) or let the extra width or height go outside
+ * of the object, and the icon will fill the entire object (@p fill_outside
+ * is @c EINA_TRUE).
*
- * Sets how the bounding box containing all the elements of the box, after
- * their sizes and position has been calculated, will be aligned within
- * the space given for the whole box widget.
+ * @note Unlike @ref Image, there's no option in icon to set the aspect ratio
+ * retain property to false. Thus, the icon image will always keep its
+ * original aspect ratio.
*
- * @param obj The box object
- * @param horizontal The horizontal alignment of elements
- * @param vertical The vertical alignment of elements
+ * @see elm_icon_fill_outside_get()
+ * @see elm_image_fill_outside_set()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1);
/**
- * Get the alignment of the whole bouding box of contents.
+ * Get if the object is filled outside.
*
- * @param obj The box object
- * @param horizontal The horizontal alignment of elements
- * @param vertical The vertical alignment of elements
+ * @param obj The icon object
+ * @return @c EINA_TRUE if the object is filled outside, @c EINA_FALSE otherwise.
*
- * @see elm_box_align_set()
+ * @see elm_icon_fill_outside_set()
+ *
+ * @ingroup Icon
*/
- EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the layout defining function to be used by the box
+ * Set the prescale size for the icon.
*
- * Whenever anything changes that requires the box in @p obj to recalculate
- * the size and position of its elements, the function @p cb will be called
- * to determine what the layout of the children will be.
+ * @param obj The icon object
+ * @param size The prescale size. This value is used for both width and
+ * height.
*
- * Once a custom function is set, everything about the children layout
- * is defined by it. The flags set by elm_box_horizontal_set() and
- * elm_box_homogeneous_set() no longer have any meaning, and the values
- * given by elm_box_padding_set() and elm_box_align_set() are up to this
- * layout function to decide if they are used and how. These last two
- * will be found in the @c priv parameter, of type @c Evas_Object_Box_Data,
- * passed to @p cb. The @c Evas_Object the function receives is not the
- * Elementary widget, but the internal Evas Box it uses, so none of the
- * functions described here can be used on it.
- *
- * Any of the layout functions in @c Evas can be used here, as well as the
- * special elm_box_layout_transition().
+ * This function sets a new size for pixmap representation of the given
+ * icon. It allows the icon to be loaded already in the specified size,
+ * reducing the memory usage and load time when loading a big icon with load
+ * size set to a smaller size.
*
- * The final @p data argument received by @p cb is the same @p data passed
- * here, and the @p free_data function will be called to free it
- * whenever the box is destroyed or another layout function is set.
+ * It's equivalent to the elm_bg_load_size_set() function for bg.
*
- * Setting @p cb to NULL will revert back to the default layout function.
+ * @note this is just a hint, the real size of the pixmap may differ
+ * depending on the type of icon being loaded, being bigger than requested.
*
- * @param obj The box object
- * @param cb The callback function used for layout
- * @param data Data that will be passed to layout function
- * @param free_data Function called to free @p data
+ * @see elm_icon_prescale_get()
+ * @see elm_bg_load_size_set()
*
- * @see elm_box_layout_transition()
+ * @ingroup Icon
*/
- EAPI void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
/**
- * Special layout function that animates the transition from one layout to another
- *
- * Normally, when switching the layout function for a box, this will be
- * reflected immediately on screen on the next render, but it's also
- * possible to do this through an animated transition.
- *
- * This is done by creating an ::Elm_Box_Transition and setting the box
- * layout to this function.
+ * Get the prescale size for the icon.
*
- * For example:
- * @code
- * Elm_Box_Transition *t = elm_box_transition_new(1.0,
- * evas_object_box_layout_vertical, // start
- * NULL, // data for initial layout
- * NULL, // free function for initial data
- * evas_object_box_layout_horizontal, // end
- * NULL, // data for final layout
- * NULL, // free function for final data
- * anim_end, // will be called when animation ends
- * NULL); // data for anim_end function\
- * elm_box_layout_set(box, elm_box_layout_transition, t,
- * elm_box_transition_free);
- * @endcode
+ * @param obj The icon object
+ * @return The prescale size
*
- * @note This function can only be used with elm_box_layout_set(). Calling
- * it directly will not have the expected results.
+ * @see elm_icon_prescale_set()
*
- * @see elm_box_transition_new
- * @see elm_box_transition_free
- * @see elm_box_layout_set
+ * @ingroup Icon
*/
- EAPI void elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data);
+ EAPI int elm_icon_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Create a new ::Elm_Box_Transition to animate the switch of layouts
- *
- * If you want to animate the change from one layout to another, you need
- * to set the layout function of the box to elm_box_layout_transition(),
- * passing as user data to it an instance of ::Elm_Box_Transition with the
- * necessary information to perform this animation. The free function to
- * set for the layout is elm_box_transition_free().
+ * Sets the icon lookup order used by elm_icon_standard_set().
*
- * The parameters to create an ::Elm_Box_Transition sum up to how long
- * will it be, in seconds, a layout function to describe the initial point,
- * another for the final position of the children and one function to be
- * called when the whole animation ends. This last function is useful to
- * set the definitive layout for the box, usually the same as the end
- * layout for the animation, but could be used to start another transition.
+ * @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)
*
- * @param start_layout The layout function that will be used to start the animation
- * @param start_layout_data The data to be passed the @p start_layout function
- * @param start_layout_free_data Function to free @p start_layout_data
- * @param end_layout The layout function that will be used to end the animation
- * @param end_layout_free_data The data to be passed the @p end_layout function
- * @param end_layout_free_data Function to free @p end_layout_data
- * @param transition_end_cb Callback function called when animation ends
- * @param transition_end_data Data to be passed to @p transition_end_cb
- * @return An instance of ::Elm_Box_Transition
+ * @see elm_icon_order_lookup_get()
+ * @see Elm_Icon_Lookup_Order
*
- * @see elm_box_transition_new
- * @see elm_box_layout_transition
+ * @ingroup Icon
*/
- EAPI Elm_Box_Transition *elm_box_transition_new(const double duration, Evas_Object_Box_Layout start_layout, void *start_layout_data, void(*start_layout_free_data)(void *data), Evas_Object_Box_Layout end_layout, void *end_layout_data, void(*end_layout_free_data)(void *data), void(*transition_end_cb)(void *data), void *transition_end_data) EINA_ARG_NONNULL(2, 5);
+ EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) EINA_ARG_NONNULL(1);
/**
- * Free a Elm_Box_Transition instance created with elm_box_transition_new().
+ * Gets the icon lookup order.
*
- * This function is mostly useful as the @c free_data parameter in
- * elm_box_layout_set() when elm_box_layout_transition().
+ * @param obj The icon object
+ * @return The icon lookup order
*
- * @param data The Elm_Box_Transition instance to be freed.
+ * @see elm_icon_order_lookup_set()
+ * @see Elm_Icon_Lookup_Order
*
- * @see elm_box_transition_new
- * @see elm_box_layout_transition
- */
- EAPI void elm_box_transition_free(void *data);
- /**
- * @}
+ * @ingroup Icon
*/
-
- /* button */
+ EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Button Button
- *
- * @image html img/widget/button/preview-00.png
- * @image latex img/widget/button/preview-00.eps
- * @image html img/widget/button/preview-01.png
- * @image latex img/widget/button/preview-01.eps
- * @image html img/widget/button/preview-02.png
- * @image latex img/widget/button/preview-02.eps
+ * Get if the icon supports animation or not.
*
- * This is a push-button. Press it and run some function. It can contain
- * a simple label and icon object and it also has an autorepeat feature.
+ * @param obj The icon object
+ * @return @c EINA_TRUE if the icon supports animation,
+ * @c EINA_FALSE otherwise.
*
- * This widgets emits the following signals:
- * @li "clicked": the user clicked the button (press/release).
- * @li "repeated": the user pressed the button without releasing it.
- * @li "pressed": button was pressed.
- * @li "unpressed": button was released after being pressed.
- * In all three cases, the @c event parameter of the callback will be
- * @c NULL.
+ * Return if this elm icon's image can be animated. Currently Evas only
+ * supports gif animation. If the return value is EINA_FALSE, other
+ * elm_icon_animated_XXX APIs won't work.
+ * @ingroup Icon
+ */
+ EAPI Eina_Bool elm_icon_animated_available_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set animation mode of the icon.
*
- * Also, defined in the default theme, the button has the following styles
- * available:
- * @li default: a normal button.
- * @li anchor: Like default, but the button fades away when the mouse is not
- * over it, leaving only the text or icon.
- * @li hoversel_vertical: Internally used by @ref Hoversel to give a
- * continuous look across its options.
- * @li hoversel_vertical_entry: Another internal for @ref Hoversel.
+ * @param obj The icon object
+ * @param anim @c EINA_TRUE if the object do animation job,
+ * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
- * Follow through a complete example @ref button_example_01 "here".
- * @{
+ * Even though elm icon's file can be animated,
+ * sometimes appication developer want to just first page of image.
+ * In that time, don't call this function, because default value is EINA_FALSE
+ * Only when you want icon support anition,
+ * use this function and set animated to EINA_TURE
+ * @ingroup Icon
*/
+ EAPI void elm_icon_animated_set(Evas_Object *obj, Eina_Bool animated) EINA_ARG_NONNULL(1);
/**
- * Add a new button to the parent's canvas
+ * Get animation mode of the icon.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The icon object
+ * @return The animation mode of the icon object
+ * @see elm_icon_animated_set
+ * @ingroup Icon
*/
- EAPI Evas_Object *elm_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_animated_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the label used in the button
+ * Set animation play mode of the icon.
*
- * The passed @p label can be NULL to clean any existing text in it and
- * leave the button as an icon only object.
+ * @param obj The icon object
+ * @param play @c EINA_TRUE the object play animation images,
+ * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
- * @param obj The button object
- * @param label The text will be written on the button
- * @deprecated use elm_object_text_set() instead.
+ * If you want to play elm icon's animation, you set play to EINA_TURE.
+ * For example, you make gif player using this set/get API and click event.
+ *
+ * 1. Click event occurs
+ * 2. Check play flag using elm_icon_animaged_play_get
+ * 3. If elm icon was playing, set play to EINA_FALSE.
+ * Then animation will be stopped and vice versa
+ * @ingroup Icon
*/
- EINA_DEPRECATED EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EAPI void elm_icon_animated_play_set(Evas_Object *obj, Eina_Bool play) EINA_ARG_NONNULL(1);
/**
- * Get the label set for the button
+ * Get animation play mode of the icon.
*
- * The string returned is an internal pointer and should not be freed or
- * altered. It will also become invalid when the button is destroyed.
- * The string returned, if not NULL, is a stringshare, so if you need to
- * keep it around even after the button is destroyed, you can use
- * eina_stringshare_ref().
+ * @param obj The icon object
+ * @return The play mode of the icon object
*
- * @param obj The button object
- * @return The text set to the label, or NULL if nothing is set
- * @deprecated use elm_object_text_set() instead.
+ * @see elm_icon_animated_lay_get
+ * @ingroup Icon
*/
- EINA_DEPRECATED EAPI const char *elm_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_icon_animated_play_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Set the icon used for the button
- *
- * Setting a new icon will delete any other that was previously set, making
- * any reference to them invalid. If you need to maintain the previous
- * object alive, unset it first with elm_button_icon_unset().
- *
- * @param obj The button object
- * @param icon The icon object for the button
+ * @}
*/
- EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+
/**
- * Get the icon used for the button
- *
- * Return the icon object which is set for this widget. If the button is
- * destroyed or another icon is set, the returned object will be deleted
- * and any reference to it will be invalid.
+ * @defgroup Image Image
*
- * @param obj The button object
- * @return The icon object that is being used
+ * @image html img/widget/image/preview-00.png
+ * @image latex img/widget/image/preview-00.eps
+
*
- * @see elm_button_icon_unset()
- */
- EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Remove the icon set without deleting it and return the object
+ * An object that allows one to load an image file to it. It can be used
+ * anywhere like any other elementary widget.
*
- * This function drops the reference the button holds of the icon object
- * and returns this last object. It is used in case you want to remove any
- * icon, or set another one, without deleting the actual object. The button
- * will be left without an icon set.
+ * This widget provides most of the functionality provided from @ref Bg or @ref
+ * Icon, but with a slightly different API (use the one that fits better your
+ * needs).
*
- * @param obj The button object
- * @return The icon object that was being used
- */
- EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Turn on/off the autorepeat event generated when the button is kept pressed
+ * The features not provided by those two other image widgets are:
+ * @li allowing to get the basic @c Evas_Object with elm_image_object_get();
+ * @li change the object orientation with elm_image_orient_set();
+ * @li and turning the image editable with elm_image_editable_set().
*
- * When off, no autorepeat is performed and buttons emit a normal @c clicked
- * signal when they are clicked.
+ * Signals that you can add callbacks for are:
*
- * When on, keeping a button pressed will continuously emit a @c repeated
- * signal until the button is released. The time it takes until it starts
- * emitting the signal is given by
- * elm_button_autorepeat_initial_timeout_set(), and the time between each
- * new emission by elm_button_autorepeat_gap_timeout_set().
+ * @li @c "clicked" - This is called when a user has clicked the image
*
- * @param obj The button object
- * @param on A bool to turn on/off the event
+ * An example of usage for this API follows:
+ * @li @ref tutorial_image
*/
- EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on) EINA_ARG_NONNULL(1);
+
/**
- * Get whether the autorepeat feature is enabled
- *
- * @param obj The button object
- * @return EINA_TRUE if autorepeat is on, EINA_FALSE otherwise
- *
- * @see elm_button_autorepeat_set()
+ * @addtogroup Image
+ * @{
*/
- EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Set the initial timeout before the autorepeat event is generated
+ * @enum _Elm_Image_Orient
+ * @typedef Elm_Image_Orient
*
- * Sets the timeout, in seconds, since the button is pressed until the
- * first @c repeated signal is emitted. If @p t is 0.0 or less, there
- * won't be any delay and the even will be fired the moment the button is
- * pressed.
+ * Possible orientation options for elm_image_orient_set().
*
- * @param obj The button object
- * @param t Timeout in seconds
+ * @image html elm_image_orient_set.png
+ * @image latex elm_image_orient_set.eps width=\textwidth
*
- * @see elm_button_autorepeat_set()
- * @see elm_button_autorepeat_gap_timeout_set()
+ * @ingroup Image
*/
- EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
+ typedef enum _Elm_Image_Orient
+ {
+ ELM_IMAGE_ORIENT_NONE, /**< no orientation change */
+ ELM_IMAGE_ROTATE_90_CW, /**< rotate 90 degrees clockwise */
+ ELM_IMAGE_ROTATE_180_CW, /**< rotate 180 degrees clockwise */
+ ELM_IMAGE_ROTATE_90_CCW, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */
+ ELM_IMAGE_FLIP_HORIZONTAL, /**< flip image horizontally */
+ ELM_IMAGE_FLIP_VERTICAL, /**< flip image vertically */
+ ELM_IMAGE_FLIP_TRANSPOSE, /**< flip the image along the y = (side - x) line*/
+ ELM_IMAGE_FLIP_TRANSVERSE /**< flip the image along the y = x line */
+ } Elm_Image_Orient;
+
/**
- * Get the initial timeout before the autorepeat event is generated
+ * Add a new image to the parent.
*
- * @param obj The button object
- * @return Timeout in seconds
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * @see elm_button_autorepeat_initial_timeout_set()
+ * @see elm_image_file_set()
+ *
+ * @ingroup Image
*/
- EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_image_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Set the interval between each generated autorepeat event
+ * Set the file that will be used as image.
*
- * After the first @c repeated event is fired, all subsequent ones will
- * follow after a delay of @p t seconds for each.
+ * @param obj The image object
+ * @param file The path to file that will be used as image
+ * @param group The group that the image belongs in edje file (if it's an
+ * edje image)
*
- * @param obj The button object
- * @param t Interval in seconds
+ * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
- * @see elm_button_autorepeat_initial_timeout_set()
- */
- EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
- /**
- * Get the interval between each generated autorepeat event
+ * @see elm_image_file_get()
*
- * @param obj The button object
- * @return Interval in seconds
- */
- EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * @}
+ * @ingroup Image
*/
-
+ EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
/**
- * @defgroup File_Selector_Button File Selector Button
+ * Get the file that will be used as image.
*
- * @image html img/widget/fileselector_button/preview-00.png
- * @image latex img/widget/fileselector_button/preview-00.eps
- * @image html img/widget/fileselector_button/preview-01.png
- * @image latex img/widget/fileselector_button/preview-01.eps
- * @image html img/widget/fileselector_button/preview-02.png
- * @image latex img/widget/fileselector_button/preview-02.eps
+ * @param obj The image object
+ * @param file The path to file
+ * @param group The group that the image belongs in edje file
*
- * This is a button that, when clicked, creates an Elementary
- * window (or inner window) <b> with a @ref Fileselector "file
- * selector widget" within</b>. When a file is chosen, the (inner)
- * window is closed and the button emits a signal having the
- * selected file as it's @c event_info.
+ * @see elm_image_file_set()
*
- * This widget encapsulates operations on its internal file
- * selector on its own API. There is less control over its file
- * selector than that one would have instatiating one directly.
+ * @ingroup Image
+ */
+ EAPI void elm_image_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
+ /**
+ * Set the smooth effect for an image.
*
- * The following styles are available for this button:
- * @li @c "default"
- * @li @c "anchor"
- * @li @c "hoversel_vertical"
- * @li @c "hoversel_vertical_entry"
+ * @param obj The image object
+ * @param smooth @c EINA_TRUE if smooth scaling should be used, @c EINA_FALSE
+ * otherwise. Default is @c EINA_TRUE.
*
- * Smart callbacks one can register to:
- * - @c "file,chosen" - the user has selected a path, whose string
- * pointer comes as the @c event_info data (a stringshared
- * string)
+ * Set the scaling algorithm to be used when scaling the image. Smooth
+ * scaling provides a better resulting image, but is slower.
*
- * Here is an example on its usage:
- * @li @ref fileselector_button_example
+ * The smooth scaling should be disabled when making animations that change
+ * the image size, since it will be faster. Animations that don't require
+ * resizing of the image can keep the smooth scaling enabled (even if the
+ * image is already scaled, since the scaled image will be cached).
*
- * @see @ref File_Selector_Entry for a similar widget.
- * @{
+ * @see elm_image_smooth_get()
+ *
+ * @ingroup Image
*/
-
+ EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1);
/**
- * Add a new file selector button widget to the given parent
- * Elementary (container) object
+ * Get the smooth effect for an image.
*
- * @param parent The parent object
- * @return a new file selector button widget handle or @c NULL, on
- * errors
+ * @param obj The image object
+ * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise.
+ *
+ * @see elm_image_smooth_get()
+ *
+ * @ingroup Image
*/
- EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_image_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the label for a given file selector button widget
+ * Gets the current size of the image.
*
- * @param obj The file selector button widget
- * @param label The text label to be displayed on @p obj
+ * @param obj The image object.
+ * @param w Pointer to store width, or NULL.
+ * @param h Pointer to store height, or NULL.
*
- * @deprecated use elm_object_text_set() instead.
+ * This is the real size of the image, not the size of the object.
+ *
+ * On error, neither w or h will be written.
+ *
+ * @ingroup Image
*/
- EINA_DEPRECATED EAPI void elm_fileselector_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
/**
- * Get the label set for a given file selector button widget
+ * Disable scaling of this object.
*
- * @param obj The file selector button widget
- * @return The button label
+ * @param obj The image object.
+ * @param no_scale @c EINA_TRUE if the object is not scalable, @c EINA_FALSE
+ * otherwise. Default is @c EINA_FALSE.
*
- * @deprecated use elm_object_text_set() instead.
+ * This function disables scaling of the elm_image widget through the
+ * function elm_object_scale_set(). However, this does not affect the widget
+ * size/resize in any way. For that effect, take a look at
+ * elm_image_scale_set().
+ *
+ * @see elm_image_no_scale_get()
+ * @see elm_image_scale_set()
+ * @see elm_object_scale_set()
+ *
+ * @ingroup Image
*/
- EINA_DEPRECATED EAPI const char *elm_fileselector_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1);
/**
- * Set the icon on a given file selector button widget
+ * Get whether scaling is disabled on the object.
*
- * @param obj The file selector button widget
- * @param icon The icon object for the button
+ * @param obj The image object
+ * @return @c EINA_TRUE if scaling is disabled, @c EINA_FALSE otherwise
*
- * Once the icon object is set, a previously set one will be
- * deleted. If you want to keep the latter, use the
- * elm_fileselector_button_icon_unset() function.
+ * @see elm_image_no_scale_set()
*
- * @see elm_fileselector_button_icon_get()
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the icon set for a given file selector button widget
+ * Set if the object is (up/down) resizable.
*
- * @param obj The file selector button widget
- * @return The icon object currently set on @p obj or @c NULL, if
- * none is
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizable down. Default
+ * is @c EINA_TRUE.
*
- * @see elm_fileselector_button_icon_set()
+ * This function limits the image resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original image size. Same is valid for @p scale_down.
+ *
+ * @see elm_image_scale_get()
+ *
+ * @ingroup Image
*/
- EAPI Evas_Object *elm_fileselector_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1);
/**
- * Unset the icon used in a given file selector button widget
+ * Get if the object is (up/down) resizable.
*
- * @param obj The file selector button widget
- * @return The icon object that was being used on @p obj or @c
- * NULL, on errors
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizable up
+ * @param scale_down A bool to set if the object is resizable down
*
- * Unparent and return the icon object which was set for this
- * widget.
+ * @see elm_image_scale_set()
*
- * @see elm_fileselector_button_icon_set()
+ * @ingroup Image
*/
- EAPI Evas_Object *elm_fileselector_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1);
/**
- * Set the title for a given file selector button widget's window
+ * Set if the image fill the entire object area when keeping the aspect ratio.
*
- * @param obj The file selector button widget
- * @param title The title string
+ * @param obj The image object
+ * @param fill_outside @c EINA_TRUE if the object is filled outside,
+ * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
*
- * This will change the window's title, when the file selector pops
- * out after a click on the button. Those windows have the default
- * (unlocalized) value of @c "Select a file" as titles.
+ * When the image should keep its aspect ratio even if resized to another
+ * aspect ratio, there are two possibilities to resize it: keep the entire
+ * image inside the limits of height and width of the object (@p fill_outside
+ * is @c EINA_FALSE) or let the extra width or height go outside of the object,
+ * and the image will fill the entire object (@p fill_outside is @c EINA_TRUE).
*
- * @note It will only take any effect if the file selector
- * button widget is @b not under "inwin mode".
+ * @note This option will have no effect if
+ * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE.
*
- * @see elm_fileselector_button_window_title_get()
+ * @see elm_image_fill_outside_get()
+ * @see elm_image_aspect_ratio_retained_set()
+ *
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1);
/**
- * Get the title set for a given file selector button widget's
- * window
+ * Get if the object is filled outside
*
- * @param obj The file selector button widget
- * @return Title of the file selector button's window
+ * @param obj The image object
+ * @return @c EINA_TRUE if the object is filled outside, @c EINA_FALSE otherwise.
*
- * @see elm_fileselector_button_window_title_get() for more details
+ * @see elm_image_fill_outside_set()
+ *
+ * @ingroup Image
*/
- EAPI const char *elm_fileselector_button_window_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the size of a given file selector button widget's window,
- * holding the file selector itself.
+ * Set the prescale size for the image
*
- * @param obj The file selector button widget
- * @param width The window's width
- * @param height The window's height
+ * @param obj The image object
+ * @param size The prescale size. This value is used for both width and
+ * height.
*
- * @note it will only take any effect if the file selector button
- * widget is @b not under "inwin mode". The default size for the
- * window (when applicable) is 400x400 pixels.
+ * This function sets a new size for pixmap representation of the given
+ * image. It allows the image to be loaded already in the specified size,
+ * reducing the memory usage and load time when loading a big image with load
+ * size set to a smaller size.
*
- * @see elm_fileselector_button_window_size_get()
+ * It's equivalent to the elm_bg_load_size_set() function for bg.
+ *
+ * @note this is just a hint, the real size of the pixmap may differ
+ * depending on the type of image being loaded, being bigger than requested.
+ *
+ * @see elm_image_prescale_get()
+ * @see elm_bg_load_size_set()
+ *
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
/**
- * Get the size of a given file selector button widget's window,
- * holding the file selector itself.
+ * Get the prescale size for the image
*
- * @param obj The file selector button widget
- * @param width Pointer into which to store the width value
- * @param height Pointer into which to store the height value
+ * @param obj The image object
+ * @return The prescale size
*
- * @note Use @c NULL pointers on the size values you're not
- * interested in: they'll be ignored by the function.
+ * @see elm_image_prescale_set()
*
- * @see elm_fileselector_button_window_size_set(), for more details
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
-
+ EAPI int elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the initial file system path for a given file selector
- * button widget
+ * Set the image orientation.
*
- * @param obj The file selector button widget
- * @param path The path string
+ * @param obj The image object
+ * @param orient The image orientation
+ * (one of #ELM_IMAGE_ORIENT_NONE, #ELM_IMAGE_ROTATE_90_CW,
+ * #ELM_IMAGE_ROTATE_180_CW, #ELM_IMAGE_ROTATE_90_CCW,
+ * #ELM_IMAGE_FLIP_HORIZONTAL, #ELM_IMAGE_FLIP_VERTICAL,
+ * #ELM_IMAGE_FLIP_TRANSPOSE, #ELM_IMAGE_FLIP_TRANSVERSE).
+ * Default is #ELM_IMAGE_ORIENT_NONE.
*
- * It must be a <b>directory</b> path, which will have the contents
- * displayed initially in the file selector's view, when invoked
- * from @p obj. The default initial path is the @c "HOME"
- * environment variable's value.
+ * This function allows to rotate or flip the given image.
*
- * @see elm_fileselector_button_path_get()
+ * @see elm_image_orient_get()
+ * @see @ref Elm_Image_Orient
+ *
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) EINA_ARG_NONNULL(1);
/**
- * Get the initial file system path set for a given file selector
- * button widget
+ * Get the image orientation.
*
- * @param obj The file selector button widget
- * @return path The path string
+ * @param obj The image object
+ * @return The image orientation
+ * (one of #ELM_IMAGE_ORIENT_NONE, #ELM_IMAGE_ROTATE_90_CW,
+ * #ELM_IMAGE_ROTATE_180_CW, #ELM_IMAGE_ROTATE_90_CCW,
+ * #ELM_IMAGE_FLIP_HORIZONTAL, #ELM_IMAGE_FLIP_VERTICAL,
+ * #ELM_IMAGE_FLIP_TRANSPOSE, #ELM_IMAGE_FLIP_TRANSVERSE)
*
- * @see elm_fileselector_button_path_set() for more details
+ * @see elm_image_orient_set()
+ * @see @ref Elm_Image_Orient
+ *
+ * @ingroup Image
*/
- EAPI const char *elm_fileselector_button_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Enable/disable a tree view in the given file selector button
- * widget's internal file selector
+ * Make the image 'editable'.
*
- * @param obj The file selector button widget
- * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to
- * disable
+ * @param obj Image object.
+ * @param set Turn on or off editability. Default is @c EINA_FALSE.
*
- * This has the same effect as elm_fileselector_expandable_set(),
- * but now applied to a file selector button's internal file
- * selector.
+ * This means the image is a valid drag target for drag and drop, and can be
+ * cut or pasted too.
*
- * @note There's no way to put a file selector button's internal
- * file selector in "grid mode", as one may do with "pure" file
- * selectors.
+ * @ingroup Image
+ */
+ EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1);
+ /**
+ * Make the image 'editable'.
*
- * @see elm_fileselector_expandable_get()
+ * @param obj Image object.
+ * @return Editability.
+ *
+ * This means the image is a valid drag target for drag and drop, and can be
+ * cut or pasted too.
+ *
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_expandable_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether tree view is enabled for the given file selector
- * button widget's internal file selector
+ * Get the basic Evas_Image object from this object (widget).
*
- * @param obj The file selector button widget
- * @return @c EINA_TRUE if @p obj widget's internal file selector
- * is in tree view, @c EINA_FALSE otherwise (and or errors)
+ * @param obj The image object to get the inlined image from
+ * @return The inlined image object, or NULL if none exists
*
- * @see elm_fileselector_expandable_set() for more details
+ * This function allows one to get the underlying @c Evas_Object of type
+ * Image from this elementary widget. It can be useful to do things like get
+ * the pixel data, save the image to a file, etc.
+ *
+ * @note Be careful to not manipulate it, as it is under control of
+ * elementary.
+ *
+ * @ingroup Image
*/
- EAPI Eina_Bool elm_fileselector_button_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set whether a given file selector button widget's internal file
- * selector is to display folders only or the directory contents,
- * as well.
+ * Set whether the original aspect ratio of the image should be kept on resize.
*
- * @param obj The file selector button widget
- * @param only @c EINA_TRUE to make @p obj widget's internal file
- * selector only display directories, @c EINA_FALSE to make files
- * to be displayed in it too
+ * @param obj The image object.
+ * @param retained @c EINA_TRUE if the image should retain the aspect,
+ * @c EINA_FALSE otherwise.
*
- * This has the same effect as elm_fileselector_folder_only_set(),
- * but now applied to a file selector button's internal file
- * selector.
+ * The original aspect ratio (width / height) of the image is usually
+ * distorted to match the object's size. Enabling this option will retain
+ * this original aspect, and the way that the image is fit into the object's
+ * area depends on the option set by elm_image_fill_outside_set().
*
- * @see elm_fileselector_folder_only_get()
+ * @see elm_image_aspect_ratio_retained_get()
+ * @see elm_image_fill_outside_set()
+ *
+ * @ingroup Image
*/
- EAPI void elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained) EINA_ARG_NONNULL(1);
/**
- * Get whether a given file selector button widget's internal file
- * selector is displaying folders only or the directory contents,
- * as well.
+ * Get if the object retains the original aspect ratio.
*
- * @param obj The file selector button widget
- * @return @c EINA_TRUE if @p obj widget's internal file
- * selector is only displaying directories, @c EINA_FALSE if files
- * are being displayed in it too (and on errors)
+ * @param obj The image object.
+ * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
+ * otherwise.
*
- * @see elm_fileselector_button_folder_only_set() for more details
+ * @ingroup Image
*/
- EAPI Eina_Bool elm_fileselector_button_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Enable/disable the file name entry box where the user can type
- * in a name for a file, in a given file selector button widget's
- * internal file selector.
+ * @}
+ */
+
+ /* glview */
+ typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj);
+
+ typedef enum _Elm_GLView_Mode
+ {
+ ELM_GLVIEW_ALPHA = 1,
+ ELM_GLVIEW_DEPTH = 2,
+ ELM_GLVIEW_STENCIL = 4
+ } Elm_GLView_Mode;
+
+ /**
+ * Defines a policy for the glview resizing.
*
- * @param obj The file selector button widget
- * @param is_save @c EINA_TRUE to make @p obj widget's internal
- * file selector a "saving dialog", @c EINA_FALSE otherwise
+ * @note Default is ELM_GLVIEW_RESIZE_POLICY_RECREATE
+ */
+ typedef enum _Elm_GLView_Resize_Policy
+ {
+ ELM_GLVIEW_RESIZE_POLICY_RECREATE = 1, /**< Resize the internal surface along with the image */
+ ELM_GLVIEW_RESIZE_POLICY_SCALE = 2 /**< Only reize the internal image and not the surface */
+ } Elm_GLView_Resize_Policy;
+
+ typedef enum _Elm_GLView_Render_Policy
+ {
+ 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;
+
+ /**
+ * @defgroup GLView
*
- * This has the same effect as elm_fileselector_is_save_set(),
- * but now applied to a file selector button's internal file
- * selector.
+ * A simple GLView widget that allows GL rendering.
*
- * @see elm_fileselector_is_save_get()
+ * Signals that you can add callbacks for are:
+ *
+ * @{
*/
- EAPI void elm_fileselector_button_is_save_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
/**
- * Get whether the given file selector button widget's internal
- * file selector is in "saving dialog" mode
+ * Add a new glview to the parent
*
- * @param obj The file selector button widget
- * @return @c EINA_TRUE, if @p obj widget's internal file selector
- * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
- * errors)
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * @see elm_fileselector_button_is_save_set() for more details
+ * @ingroup GLView
*/
- EAPI Eina_Bool elm_fileselector_button_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_glview_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Set whether a given file selector button widget's internal file
- * selector will raise an Elementary "inner window", instead of a
- * dedicated Elementary window. By default, it won't.
+ * Sets the size of the glview
*
- * @param obj The file selector button widget
- * @param value @c EINA_TRUE to make it use an inner window, @c
- * EINA_TRUE to make it use a dedicated window
+ * @param obj The glview object
+ * @param width width of the glview object
+ * @param height height of the glview object
*
- * @see elm_win_inwin_add() for more information on inner windows
- * @see elm_fileselector_button_inwin_mode_get()
+ * @ingroup GLView
*/
- EAPI void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
/**
- * Get whether a given file selector button widget's internal file
- * selector will raise an Elementary "inner window", instead of a
- * dedicated Elementary window.
+ * Gets the size of the glview.
*
- * @param obj The file selector button widget
- * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
- * if it will use a dedicated window
+ * @param obj The glview object
+ * @param width width of the glview object
+ * @param height height of the glview object
*
- * @see elm_fileselector_button_inwin_mode_set() for more details
+ * 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 Eina_Bool elm_fileselector_button_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
/**
- * @}
+ * 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) EINA_ARG_NONNULL(1);
- /**
- * @defgroup File_Selector_Entry File Selector Entry
- *
- * @image html img/widget/fileselector_entry/preview-00.png
- * @image latex img/widget/fileselector_entry/preview-00.eps
- *
- * This is an entry made to be filled with or display a <b>file
- * system path string</b>. Besides the entry itself, the widget has
- * a @ref File_Selector_Button "file selector button" on its side,
- * which will raise an internal @ref Fileselector "file selector widget",
- * when clicked, for path selection aided by file system
- * navigation.
- *
- * This file selector may appear in an Elementary window or in an
- * inner window. When a file is chosen from it, the (inner) window
- * is closed and the selected file's path string is exposed both as
- * an smart event and as the new text on the entry.
- *
- * This widget encapsulates operations on its internal file
- * selector on its own API. There is less control over its file
- * selector than that one would have instatiating one directly.
- *
- * Smart callbacks one can register to:
- * - @c "changed" - The text within the entry was changed
- * - @c "activated" - The entry has had editing finished and
- * changes are to be "committed"
- * - @c "press" - The entry has been clicked
- * - @c "longpressed" - The entry has been clicked (and held) for a
- * couple seconds
- * - @c "clicked" - The entry has been clicked
- * - @c "clicked,double" - The entry has been double clicked
- * - @c "focused" - The entry has received focus
- * - @c "unfocused" - The entry has lost focus
- * - @c "selection,paste" - A paste action has occurred on the
- * entry
- * - @c "selection,copy" - A copy action has occurred on the entry
- * - @c "selection,cut" - A cut action has occurred on the entry
- * - @c "unpressed" - The file selector entry's button was released
- * after being pressed.
- * - @c "file,chosen" - The user has selected a path via the file
- * selector entry's internal file selector, whose string pointer
- * comes as the @c event_info data (a stringshared string)
+ /**
+ * Set the mode of the GLView. Supports Three simple modes.
*
- * Here is an example on its usage:
- * @li @ref fileselector_entry_example
+ * @param obj The glview object
+ * @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil.
+ * @return True if set properly.
*
- * @see @ref File_Selector_Button for a similar widget.
- * @{
+ * @ingroup GLView
*/
+ EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) EINA_ARG_NONNULL(1);
/**
- * Add a new file selector entry widget to the given parent
- * Elementary (container) object
+ * Set the resize policy for the glview object.
*
- * @param parent The parent object
- * @return a new file selector entry widget handle or @c NULL, on
- * errors
- */
- EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
-
- /**
- * Set the label for a given file selector entry widget's button
+ * @param obj The glview object.
+ * @param policy The scaling policy.
*
- * @param obj The file selector entry widget
- * @param label The text label to be displayed on @p obj widget's
- * button
+ * 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.
*
- * @deprecated use elm_object_text_set() instead.
+ * @ingroup GLView
*/
- EINA_DEPRECATED EAPI void elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) EINA_ARG_NONNULL(1);
/**
- * Get the label set for a given file selector entry widget's button
+ * Set the render policy for the glview object.
*
- * @param obj The file selector entry widget
- * @return The widget button's label
+ * @param obj The glview object.
+ * @param policy The render policy.
*
- * @deprecated use elm_object_text_set() instead.
+ * 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/need redrawing or not.
+ *
+ * @ingroup GLView
*/
- EINA_DEPRECATED EAPI const char *elm_fileselector_entry_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) EINA_ARG_NONNULL(1);
/**
- * Set the icon on a given file selector entry widget's button
+ * Set the init function that runs once in the main loop.
*
- * @param obj The file selector entry widget
- * @param icon The icon object for the entry's button
+ * @param obj The glview object.
+ * @param func The init function to be registered.
*
- * Once the icon object is set, a previously set one will be
- * deleted. If you want to keep the latter, use the
- * elm_fileselector_entry_button_icon_unset() function.
+ * The registered init function gets called once during the render loop.
*
- * @see elm_fileselector_entry_button_icon_get()
+ * @ingroup GLView
*/
- EAPI void elm_fileselector_entry_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
/**
- * Get the icon set for a given file selector entry widget's button
+ * Set the render function that runs in the main loop.
*
- * @param obj The file selector entry widget
- * @return The icon object currently set on @p obj widget's button
- * or @c NULL, if none is
+ * @param obj The glview object.
+ * @param func The delete function to be registered.
*
- * @see elm_fileselector_entry_button_icon_set()
+ * The registered del function gets called when GLView object is deleted.
+ *
+ * @ingroup GLView
*/
- EAPI Evas_Object *elm_fileselector_entry_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
/**
- * Unset the icon used in a given file selector entry widget's
- * button
- *
- * @param obj The file selector entry widget
- * @return The icon object that was being used on @p obj widget's
- * button or @c NULL, on errors
+ * Set the resize function that gets called when resize happens.
*
- * Unparent and return the icon object which was set for this
- * widget's button.
+ * @param obj The glview object.
+ * @param func The resize function to be registered.
*
- * @see elm_fileselector_entry_button_icon_set()
+ * @ingroup GLView
*/
- EAPI Evas_Object *elm_fileselector_entry_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
/**
- * Set the title for a given file selector entry widget's window
- *
- * @param obj The file selector entry widget
- * @param title The title string
+ * Set the render function that runs in the main loop.
*
- * This will change the window's title, when the file selector pops
- * out after a click on the entry's button. Those windows have the
- * default (unlocalized) value of @c "Select a file" as titles.
- *
- * @note It will only take any effect if the file selector
- * entry widget is @b not under "inwin mode".
+ * @param obj The glview object.
+ * @param func The render function to be registered.
*
- * @see elm_fileselector_entry_window_title_get()
+ * @ingroup GLView
*/
- EAPI void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1);
/**
- * Get the title set for a given file selector entry widget's
- * window
+ * Notifies that there has been changes in the GLView.
*
- * @param obj The file selector entry widget
- * @return Title of the file selector entry's window
+ * @param obj The glview object.
*
- * @see elm_fileselector_entry_window_title_get() for more details
+ * @ingroup GLView
*/
- EAPI const char *elm_fileselector_entry_window_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_glview_changed_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the size of a given file selector entry widget's window,
- * holding the file selector itself.
- *
- * @param obj The file selector entry widget
- * @param width The window's width
- * @param height The window's height
- *
- * @note it will only take any effect if the file selector entry
- * widget is @b not under "inwin mode". The default size for the
- * window (when applicable) is 400x400 pixels.
- *
- * @see elm_fileselector_entry_window_size_get()
+ * @}
*/
- EAPI void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
+ /* box */
/**
- * Get the size of a given file selector entry widget's window,
- * holding the file selector itself.
+ * @defgroup Box Box
*
- * @param obj The file selector entry widget
- * @param width Pointer into which to store the width value
- * @param height Pointer into which to store the height value
+ * @image html img/widget/box/preview-00.png
+ * @image latex img/widget/box/preview-00.eps width=\textwidth
*
- * @note Use @c NULL pointers on the size values you're not
- * interested in: they'll be ignored by the function.
+ * @image html img/box.png
+ * @image latex img/box.eps width=\textwidth
*
- * @see elm_fileselector_entry_window_size_set(), for more details
- */
- EAPI void elm_fileselector_entry_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
-
- /**
- * Set the initial file system path and the entry's path string for
- * a given file selector entry widget
+ * A box arranges objects in a linear fashion, governed by a layout function
+ * that defines the details of this arrangement.
*
- * @param obj The file selector entry widget
- * @param path The path string
+ * By default, the box will use an internal function to set the layout to
+ * a single row, either vertical or horizontal. This layout is affected
+ * by a number of parameters, such as the homogeneous flag set by
+ * elm_box_homogeneous_set(), the values given by elm_box_padding_set() and
+ * elm_box_align_set() and the hints set to each object in the box.
*
- * It must be a <b>directory</b> path, which will have the contents
- * displayed initially in the file selector's view, when invoked
- * from @p obj. The default initial path is the @c "HOME"
- * environment variable's value.
+ * For this default layout, it's possible to change the orientation with
+ * elm_box_horizontal_set(). The box will start in the vertical orientation,
+ * placing its elements ordered from top to bottom. When horizontal is set,
+ * the order will go from left to right. If the box is set to be
+ * homogeneous, every object in it will be assigned the same space, that
+ * of the largest object. Padding can be used to set some spacing between
+ * the cell given to each object. The alignment of the box, set with
+ * elm_box_align_set(), determines how the bounding box of all the elements
+ * will be placed within the space given to the box widget itself.
*
- * @see elm_fileselector_entry_path_get()
- */
- EAPI void elm_fileselector_entry_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
-
- /**
- * Get the entry's path string for a given file selector entry
- * widget
+ * The size hints of each object also affect how they are placed and sized
+ * within the box. evas_object_size_hint_min_set() will give the minimum
+ * size the object can have, and the box will use it as the basis for all
+ * latter calculations. Elementary widgets set their own minimum size as
+ * needed, so there's rarely any need to use it manually.
*
- * @param obj The file selector entry widget
- * @return path The path string
+ * evas_object_size_hint_weight_set(), when not in homogeneous mode, is
+ * used to tell whether the object will be allocated the minimum size it
+ * needs or if the space given to it should be expanded. It's important
+ * to realize that expanding the size given to the object is not the same
+ * thing as resizing the object. It could very well end being a small
+ * widget floating in a much larger empty space. If not set, the weight
+ * for objects will normally be 0.0 for both axis, meaning the widget will
+ * not be expanded. To take as much space possible, set the weight to
+ * EVAS_HINT_EXPAND (defined to 1.0) for the desired axis to expand.
*
- * @see elm_fileselector_entry_path_set() for more details
- */
- EAPI const char *elm_fileselector_entry_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
- /**
- * Enable/disable a tree view in the given file selector entry
- * widget's internal file selector
+ * Besides how much space each object is allocated, it's possible to control
+ * how the widget will be placed within that space using
+ * evas_object_size_hint_align_set(). By default, this value will be 0.5
+ * for both axis, meaning the object will be centered, but any value from
+ * 0.0 (left or top, for the @c x and @c y axis, respectively) to 1.0
+ * (right or bottom) can be used. The special value EVAS_HINT_FILL, which
+ * is -1.0, means the object will be resized to fill the entire space it
+ * was allocated.
*
- * @param obj The file selector entry widget
- * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to
- * disable
+ * In addition, customized functions to define the layout can be set, which
+ * allow the application developer to organize the objects within the box
+ * in any number of ways.
*
- * This has the same effect as elm_fileselector_expandable_set(),
- * but now applied to a file selector entry's internal file
- * selector.
+ * The special elm_box_layout_transition() function can be used
+ * to switch from one layout to another, animating the motion of the
+ * children of the box.
*
- * @note There's no way to put a file selector entry's internal
- * file selector in "grid mode", as one may do with "pure" file
- * selectors.
+ * @note Objects should not be added to box objects using _add() calls.
*
- * @see elm_fileselector_expandable_get()
+ * Some examples on how to use boxes follow:
+ * @li @ref box_example_01
+ * @li @ref box_example_02
+ *
+ * @{
*/
- EAPI void elm_fileselector_entry_expandable_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
/**
- * Get whether tree view is enabled for the given file selector
- * entry widget's internal file selector
+ * @typedef Elm_Box_Transition
*
- * @param obj The file selector entry widget
- * @return @c EINA_TRUE if @p obj widget's internal file selector
- * is in tree view, @c EINA_FALSE otherwise (and or errors)
+ * Opaque handler containing the parameters to perform an animated
+ * transition of the layout the box uses.
*
- * @see elm_fileselector_expandable_set() for more details
+ * @see elm_box_transition_new()
+ * @see elm_box_layout_set()
+ * @see elm_box_layout_transition()
*/
- EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Box_Transition Elm_Box_Transition;
/**
- * Set whether a given file selector entry widget's internal file
- * selector is to display folders only or the directory contents,
- * as well.
+ * Add a new box to the parent
*
- * @param obj The file selector entry widget
- * @param only @c EINA_TRUE to make @p obj widget's internal file
- * selector only display directories, @c EINA_FALSE to make files
- * to be displayed in it too
- *
- * This has the same effect as elm_fileselector_folder_only_set(),
- * but now applied to a file selector entry's internal file
- * selector.
- *
- * @see elm_fileselector_folder_only_get()
- */
- EAPI void elm_fileselector_entry_folder_only_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
- /**
- * Get whether a given file selector entry widget's internal file
- * selector is displaying folders only or the directory contents,
- * as well.
- *
- * @param obj The file selector entry widget
- * @return @c EINA_TRUE if @p obj widget's internal file
- * selector is only displaying directories, @c EINA_FALSE if files
- * are being displayed in it too (and on errors)
+ * By default, the box will be in vertical mode and non-homogeneous.
*
- * @see elm_fileselector_entry_folder_only_set() for more details
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*/
- EAPI Eina_Bool elm_fileselector_entry_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_box_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Enable/disable the file name entry box where the user can type
- * in a name for a file, in a given file selector entry widget's
- * internal file selector.
+ * Set the horizontal orientation
*
- * @param obj The file selector entry widget
- * @param is_save @c EINA_TRUE to make @p obj widget's internal
- * file selector a "saving dialog", @c EINA_FALSE otherwise
+ * By default, box object arranges their contents vertically from top to
+ * bottom.
+ * By calling this function with @p horizontal as EINA_TRUE, the box will
+ * become horizontal, arranging contents from left to right.
*
- * This has the same effect as elm_fileselector_is_save_set(),
- * but now applied to a file selector entry's internal file
- * selector.
+ * @note This flag is ignored if a custom layout function is set.
*
- * @see elm_fileselector_is_save_get()
+ * @param obj The box object
+ * @param horizontal The horizontal flag (EINA_TRUE = horizontal,
+ * EINA_FALSE = vertical)
*/
- EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
/**
- * Get whether the given file selector entry widget's internal
- * file selector is in "saving dialog" mode
- *
- * @param obj The file selector entry widget
- * @return @c EINA_TRUE, if @p obj widget's internal file selector
- * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
- * errors)
+ * Get the horizontal orientation
*
- * @see elm_fileselector_entry_is_save_set() for more details
+ * @param obj The box object
+ * @return EINA_TRUE if the box is set to horizontal mode, EINA_FALSE otherwise
*/
- EAPI Eina_Bool elm_fileselector_entry_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set whether a given file selector entry widget's internal file
- * selector will raise an Elementary "inner window", instead of a
- * dedicated Elementary window. By default, it won't.
+ * Set the box to arrange its children homogeneously
*
- * @param obj The file selector entry widget
- * @param value @c EINA_TRUE to make it use an inner window, @c
- * EINA_TRUE to make it use a dedicated window
+ * If enabled, homogeneous layout makes all items the same size, according
+ * to the size of the largest of its children.
*
- * @see elm_win_inwin_add() for more information on inner windows
- * @see elm_fileselector_entry_inwin_mode_get()
+ * @note This flag is ignored if a custom layout function is set.
+ *
+ * @param obj The box object
+ * @param homogeneous The homogeneous flag
*/
- EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1);
/**
- * Get whether a given file selector entry widget's internal file
- * selector will raise an Elementary "inner window", instead of a
- * dedicated Elementary window.
- *
- * @param obj The file selector entry widget
- * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
- * if it will use a dedicated window
+ * Get whether the box is using homogeneous mode or not
*
- * @see elm_fileselector_entry_inwin_mode_set() for more details
+ * @param obj The box object
+ * @return EINA_TRUE if it's homogeneous, EINA_FALSE otherwise
*/
- EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_box_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_box_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set the initial file system path for a given file selector entry
- * widget
+ * Add an object to the beginning of the pack list
*
- * @param obj The file selector entry widget
- * @param path The path string
+ * Pack @p subobj into the box @p obj, placing it first in the list of
+ * children objects. The actual position the object will get on screen
+ * depends on the layout used. If no custom layout is set, it will be at
+ * the top or left, depending if the box is vertical or horizontal,
+ * respectively.
*
- * It must be a <b>directory</b> path, which will have the contents
- * displayed initially in the file selector's view, when invoked
- * from @p obj. The default initial path is the @c "HOME"
- * environment variable's value.
+ * @param obj The box object
+ * @param subobj The object to add to the box
*
- * @see elm_fileselector_entry_path_get()
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_before()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
*/
- EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
/**
- * Get the parent directory's path to the latest file selection on
- * a given filer selector entry widget
+ * Add an object at the end of the pack list
*
- * @param obj The file selector object
- * @return The (full) path of the directory of the last selection
- * on @p obj widget, a @b stringshared string
+ * Pack @p subobj into the box @p obj, placing it last in the list of
+ * children objects. The actual position the object will get on screen
+ * depends on the layout used. If no custom layout is set, it will be at
+ * the bottom or right, depending if the box is vertical or horizontal,
+ * respectively.
*
- * @see elm_fileselector_entry_path_set()
- */
- EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
- /**
- * @}
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ *
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_before()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
*/
-
+ EAPI void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Scroller Scroller
- *
- * A scroller holds a single object and "scrolls it around". This means that
- * it allows the user to use a scrollbar (or a finger) to drag the viewable
- * region around, allowing to move through a much larger object that is
- * contained in the scroller. The scroiller will always have a small minimum
- * size by default as it won't be limited by the contents of the scroller.
+ * Adds an object to the box before the indicated object
*
- * Signals that you can add callbacks for are:
- * @li "edge,left" - the left edge of the content has been reached
- * @li "edge,right" - the right edge of the content has been reached
- * @li "edge,top" - the top edge of the content has been reached
- * @li "edge,bottom" - the bottom edge of the content has been reached
- * @li "scroll" - the content has been scrolled (moved)
- * @li "scroll,anim,start" - scrolling animation has started
- * @li "scroll,anim,stop" - scrolling animation has stopped
- * @li "scroll,drag,start" - dragging the contents around has started
- * @li "scroll,drag,stop" - dragging the contents around has stopped
- * @note The "scroll,anim,*" and "scroll,drag,*" signals are only emitted by
- * user intervetion.
+ * This will add the @p subobj to the box indicated before the object
+ * indicated with @p before. If @p before is not already in the box, results
+ * are undefined. Before means either to the left of the indicated object or
+ * above it depending on orientation.
*
- * @note When Elemementary is in embedded mode the scrollbars will not be
- * dragable, they appear merely as indicators of how much has been scrolled.
- * @note When Elementary is in desktop mode the thumbscroll(a.k.a.
- * fingerscroll) won't work.
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ * @param before The object before which to add it
*
- * In @ref tutorial_scroller you'll find an example of how to use most of
- * this API.
- * @{
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_after()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
*/
+ EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before) EINA_ARG_NONNULL(1);
/**
- * @brief Type that controls when scrollbars should appear.
+ * Adds an object to the box after the indicated object
*
- * @see elm_scroller_policy_set()
- */
- typedef enum _Elm_Scroller_Policy
- {
- ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */
- ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */
- ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */
- ELM_SCROLLER_POLICY_LAST
- } Elm_Scroller_Policy;
- /**
- * @brief Add a new scroller to the parent
+ * This will add the @p subobj to the box indicated after the object
+ * indicated with @p after. If @p after is not already in the box, results
+ * are undefined. After means either to the right of the indicated object or
+ * below it depending on orientation.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The box object
+ * @param subobj The object to add to the box
+ * @param after The object after which to add it
+ *
+ * @see elm_box_pack_start()
+ * @see elm_box_pack_end()
+ * @see elm_box_pack_before()
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
*/
- EAPI Evas_Object *elm_scroller_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1);
/**
- * @brief Set the content of the scroller widget (the object to be scrolled around).
+ * Clear the box of all children
*
- * @param obj The scroller object
- * @param content The new content object
+ * Remove all the elements contained by the box, deleting the respective
+ * objects.
*
- * 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_scroller_content_unset() function.
+ * @param obj The box object
+ *
+ * @see elm_box_unpack()
+ * @see elm_box_unpack_all()
*/
- EAPI void elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Get the content of the scroller widget
+ * Unpack a box item
*
- * @param obj The slider object
- * @return The content that is being used
+ * Remove the object given by @p subobj from the box @p obj without
+ * deleting it.
*
- * Return the content object which is set for this widget
+ * @param obj The box object
*
- * @see elm_scroller_content_set()
+ * @see elm_box_unpack_all()
+ * @see elm_box_clear()
*/
- EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
/**
- * @brief Unset the content of the scroller widget
+ * Remove all items from the box, without deleting them
*
- * @param obj The slider object
- * @return The content that was being used
+ * Clear the box from all children, but don't delete the respective objects.
+ * If no other references of the box children exist, the objects will never
+ * be deleted, and thus the application will leak the memory. Make sure
+ * when using this function that you hold a reference to all the objects
+ * in the box @p obj.
*
- * Unparent and return the content object which was set for this widget
+ * @param obj The box object
*
- * @see elm_scroller_content_set()
+ * @see elm_box_clear()
+ * @see elm_box_unpack()
*/
- EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set custom theme elements for the scroller
+ * Retrieve a list of the objects packed into the box
*
- * @param obj The scroller object
- * @param widget The widget name to use (default is "scroller")
- * @param base The base name to use (default is "base")
- */
- EAPI void elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base) EINA_ARG_NONNULL(1, 2, 3);
- /**
- * @brief Make the scroller minimum size limited to the minimum size of the content
+ * Returns a new @c Eina_List with a pointer to @c Evas_Object in its nodes.
+ * The order of the list corresponds to the packing order the box uses.
*
- * @param obj The scroller object
- * @param w Enable limiting minimum size horizontally
- * @param h Enable limiting minimum size vertically
+ * You must free this list with eina_list_free() once you are done with it.
*
- * By default the scroller will be as small as its design allows,
- * irrespective of its content. This will make the scroller minimum size the
- * right size horizontally and/or vertically to perfectly fit its content in
- * that direction.
+ * @param obj The box object
*/
- EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h) EINA_ARG_NONNULL(1);
+ EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Show a specific virtual region within the scroller content object
+ * Set the space (padding) between the box's elements.
*
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
+ * Extra space in pixels that will be added between a box child and its
+ * neighbors after its containing cell has been calculated. This padding
+ * is set for all elements in the box, besides any possible padding that
+ * individual elements may have through their size hints.
*
- * This will ensure all (or part if it does not fit) of the designated
- * region in the virtual content object (0, 0 starting at the top-left of the
- * virtual content object) is shown within the scroller.
+ * @param obj The box object
+ * @param horizontal The horizontal space between elements
+ * @param vertical The vertical space between elements
*/
- EAPI void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
/**
- * @brief Set the scrollbar visibility policy
+ * Get the space (padding) between the box's elements.
*
- * @param obj The scroller object
- * @param policy_h Horizontal scrollbar policy
- * @param policy_v Vertical scrollbar policy
+ * @param obj The box object
+ * @param horizontal The horizontal space between elements
+ * @param vertical The vertical space between elements
*
- * This sets the scrollbar visibility policy for the given scroller.
- * ELM_SCROLLER_POLICY_AUTO means the scrollber is made visible if it is
- * needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all
- * the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies
- * respectively for the horizontal and vertical scrollbars.
+ * @see elm_box_padding_set()
*/
- EAPI void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
/**
- * @brief Gets scrollbar visibility policy
+ * Set the alignment of the whole bouding box of contents.
*
- * @param obj The scroller object
- * @param policy_h Horizontal scrollbar policy
- * @param policy_v Vertical scrollbar policy
+ * Sets how the bounding box containing all the elements of the box, after
+ * their sizes and position has been calculated, will be aligned within
+ * the space given for the whole box widget.
*
- * @see elm_scroller_policy_set()
+ * @param obj The box object
+ * @param horizontal The horizontal alignment of elements
+ * @param vertical The vertical alignment of elements
*/
- EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical) EINA_ARG_NONNULL(1);
/**
- * @brief Get the currently visible content region
- *
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
- *
- * This gets the current region in the content object that is visible through
- * the scroller. The region co-ordinates are returned in the @p x, @p y, @p
- * w, @p h values pointed to.
+ * Get the alignment of the whole bouding box of contents.
*
- * @note All coordinates are relative to the content.
+ * @param obj The box object
+ * @param horizontal The horizontal alignment of elements
+ * @param vertical The vertical alignment of elements
*
- * @see elm_scroller_region_show()
+ * @see elm_box_align_set()
*/
- EAPI void elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the size of the content object
+ * Force the box to recalculate its children packing.
*
- * @param obj The scroller object
- * @param w Width return
- * @param h Height return
+ * If any children was added or removed, box will not calculate the
+ * values immediately rather leaving it to the next main loop
+ * iteration. While this is great as it would save lots of
+ * recalculation, whenever you need to get the position of a just
+ * added item you must force recalculate before doing so.
*
- * This gets the size of the content object of the scroller.
+ * @param obj The box object.
*/
- EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_recalculate(Evas_Object *obj);
+
/**
- * @brief Set bouncing behavior
+ * Set the layout defining function to be used by the box
*
- * @param obj The scroller object
- * @param h_bounce Will the scroller bounce horizontally or not
- * @param v_bounce Will the scroller bounce vertically or not
+ * Whenever anything changes that requires the box in @p obj to recalculate
+ * the size and position of its elements, the function @p cb will be called
+ * to determine what the layout of the children will be.
*
- * When scrolling, the scroller may "bounce" when reaching an edge of the
- * content object. This is a visual way to indicate the end has been reached.
- * This is enabled by default for both axis. This will set if it is enabled
- * for that axis with the boolean parameters for each axis.
- */
- EAPI void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
- /**
- * @brief Get the bounce mode
+ * Once a custom function is set, everything about the children layout
+ * is defined by it. The flags set by elm_box_horizontal_set() and
+ * elm_box_homogeneous_set() no longer have any meaning, and the values
+ * given by elm_box_padding_set() and elm_box_align_set() are up to this
+ * layout function to decide if they are used and how. These last two
+ * will be found in the @c priv parameter, of type @c Evas_Object_Box_Data,
+ * passed to @p cb. The @c Evas_Object the function receives is not the
+ * Elementary widget, but the internal Evas Box it uses, so none of the
+ * functions described here can be used on it.
*
- * @param obj The Scroller object
- * @param h_bounce Allow bounce horizontally
- * @param v_bounce Allow bounce vertically
+ * Any of the layout functions in @c Evas can be used here, as well as the
+ * special elm_box_layout_transition().
*
- * @see elm_scroller_bounce_set()
- */
- EAPI void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
- /**
- * @brief Set scroll page size relative to viewport size.
+ * The final @p data argument received by @p cb is the same @p data passed
+ * here, and the @p free_data function will be called to free it
+ * whenever the box is destroyed or another layout function is set.
*
- * @param obj The scroller object
- * @param h_pagerel The horizontal page relative size
- * @param v_pagerel The vertical page relative size
+ * Setting @p cb to NULL will revert back to the default layout function.
*
- * The scroller is capable of limiting scrolling by the user to "pages". That
- * is to jump by and only show a "whole page" at a time as if the continuous
- * area of the scroller content is split into page sized pieces. This sets
- * the size of a page relative to the viewport of the scroller. 1.0 is "1
- * viewport" is size (horizontally or vertically). 0.0 turns it off in that
- * axis. This is mutually exclusive with page size
- * (see elm_scroller_page_size_set() for more information). Likewise 0.5
- * is "half a viewport". Sane usable valus are normally between 0.0 and 1.0
- * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for
- * the other axis.
+ * @param obj The box object
+ * @param cb The callback function used for layout
+ * @param data Data that will be passed to layout function
+ * @param free_data Function called to free @p data
+ *
+ * @see elm_box_layout_transition()
*/
- EAPI void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1);
/**
- * @brief Set scroll page size.
+ * Special layout function that animates the transition from one layout to another
*
- * @param obj The scroller object
- * @param h_pagesize The horizontal page size
- * @param v_pagesize The vertical page size
+ * Normally, when switching the layout function for a box, this will be
+ * reflected immediately on screen on the next render, but it's also
+ * possible to do this through an animated transition.
*
- * This sets the page size to an absolute fixed value, with 0 turning it off
- * for that axis.
+ * This is done by creating an ::Elm_Box_Transition and setting the box
+ * layout to this function.
*
- * @see elm_scroller_page_relative_set()
+ * For example:
+ * @code
+ * Elm_Box_Transition *t = elm_box_transition_new(1.0,
+ * evas_object_box_layout_vertical, // start
+ * NULL, // data for initial layout
+ * NULL, // free function for initial data
+ * evas_object_box_layout_horizontal, // end
+ * NULL, // data for final layout
+ * NULL, // free function for final data
+ * anim_end, // will be called when animation ends
+ * NULL); // data for anim_end function\
+ * elm_box_layout_set(box, elm_box_layout_transition, t,
+ * elm_box_transition_free);
+ * @endcode
+ *
+ * @note This function can only be used with elm_box_layout_set(). Calling
+ * it directly will not have the expected results.
+ *
+ * @see elm_box_transition_new
+ * @see elm_box_transition_free
+ * @see elm_box_layout_set
*/
- EAPI void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize) EINA_ARG_NONNULL(1);
+ EAPI void elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data);
/**
- * @brief Show a specific virtual region within the scroller content object.
+ * Create a new ::Elm_Box_Transition to animate the switch of layouts
*
- * @param obj The scroller object
- * @param x X coordinate of the region
- * @param y Y coordinate of the region
- * @param w Width of the region
- * @param h Height of the region
+ * If you want to animate the change from one layout to another, you need
+ * to set the layout function of the box to elm_box_layout_transition(),
+ * passing as user data to it an instance of ::Elm_Box_Transition with the
+ * necessary information to perform this animation. The free function to
+ * set for the layout is elm_box_transition_free().
*
- * This will ensure all (or part if it does not fit) of the designated
- * region in the virtual content object (0, 0 starting at the top-left of the
- * virtual content object) is shown within the scroller. Unlike
- * elm_scroller_region_show(), this allow the scroller to "smoothly slide"
- * to this location (if configuration in general calls for transitions). It
- * may not jump immediately to the new location and make take a while and
- * show other content along the way.
+ * The parameters to create an ::Elm_Box_Transition sum up to how long
+ * will it be, in seconds, a layout function to describe the initial point,
+ * another for the final position of the children and one function to be
+ * called when the whole animation ends. This last function is useful to
+ * set the definitive layout for the box, usually the same as the end
+ * layout for the animation, but could be used to start another transition.
*
- * @see elm_scroller_region_show()
+ * @param start_layout The layout function that will be used to start the animation
+ * @param start_layout_data The data to be passed the @p start_layout function
+ * @param start_layout_free_data Function to free @p start_layout_data
+ * @param end_layout The layout function that will be used to end the animation
+ * @param end_layout_free_data The data to be passed the @p end_layout function
+ * @param end_layout_free_data Function to free @p end_layout_data
+ * @param transition_end_cb Callback function called when animation ends
+ * @param transition_end_data Data to be passed to @p transition_end_cb
+ * @return An instance of ::Elm_Box_Transition
+ *
+ * @see elm_box_transition_new
+ * @see elm_box_layout_transition
*/
- EAPI void elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+ EAPI Elm_Box_Transition *elm_box_transition_new(const double duration, Evas_Object_Box_Layout start_layout, void *start_layout_data, void(*start_layout_free_data)(void *data), Evas_Object_Box_Layout end_layout, void *end_layout_data, void(*end_layout_free_data)(void *data), void(*transition_end_cb)(void *data), void *transition_end_data) EINA_ARG_NONNULL(2, 5);
/**
- * @brief Set event propagation on a scroller
+ * Free a Elm_Box_Transition instance created with elm_box_transition_new().
*
- * @param obj The scroller object
- * @param propagation If propagation is enabled or not
+ * This function is mostly useful as the @c free_data parameter in
+ * elm_box_layout_set() when elm_box_layout_transition().
*
- * This enables or disabled event propagation from the scroller content to
- * the scroller and its parent. By default event propagation is disabled.
- */
- EAPI void elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation);
- /**
- * @brief Get event propagation for a scroller
- *
- * @param obj The scroller object
- * @return The propagation state
- *
- * This gets the event propagation for a scroller.
+ * @param data The Elm_Box_Transition instance to be freed.
*
- * @see elm_scroller_propagate_events_set()
+ * @see elm_box_transition_new
+ * @see elm_box_layout_transition
*/
- EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj);
+ EAPI void elm_box_transition_free(void *data);
/**
* @}
*/
+ /* button */
/**
- * @defgroup Label Label
+ * @defgroup Button Button
*
- * @image html img/widget/label/preview-00.png
- * @image latex img/widget/label/preview-00.eps
+ * @image html img/widget/button/preview-00.png
+ * @image latex img/widget/button/preview-00.eps
+ * @image html img/widget/button/preview-01.png
+ * @image latex img/widget/button/preview-01.eps
+ * @image html img/widget/button/preview-02.png
+ * @image latex img/widget/button/preview-02.eps
*
- * @brief Widget to display text, with simple html-like markup.
+ * This is a push-button. Press it and run some function. It can contain
+ * a simple label and icon object and it also has an autorepeat feature.
*
- * The Label widget @b doesn't allow text to overflow its boundaries, if the
- * text doesn't fit the geometry of the label it will be ellipsized or be
- * cut. Elementary provides several themes for this widget:
- * @li default - No animation
- * @li marker - Centers the text in the label and make it bold by default
- * @li slide_long - The entire text appears from the right of the screen and
- * slides until it disappears in the left of the screen(reappering on the
- * right again).
- * @li slide_short - The text appears in the left of the label and slides to
- * the right to show the overflow. When all of the text has been shown the
- * position is reset.
- * @li slide_bounce - The text appears in the left of the label and slides to
- * the right to show the overflow. When all of the text has been shown the
- * animation reverses, moving the text to the left.
+ * This widgets emits the following signals:
+ * @li "clicked": the user clicked the button (press/release).
+ * @li "repeated": the user pressed the button without releasing it.
+ * @li "pressed": button was pressed.
+ * @li "unpressed": button was released after being pressed.
+ * In all three cases, the @c event parameter of the callback will be
+ * @c NULL.
*
- * Custom themes can of course invent new markup tags and style them any way
- * they like.
+ * Also, defined in the default theme, the button has the following styles
+ * available:
+ * @li default: a normal button.
+ * @li anchor: Like default, but the button fades away when the mouse is not
+ * over it, leaving only the text or icon.
+ * @li hoversel_vertical: Internally used by @ref Hoversel to give a
+ * continuous look across its options.
+ * @li hoversel_vertical_entry: Another internal for @ref Hoversel.
*
- * See @ref tutorial_label for a demonstration of how to use a label widget.
+ * Follow through a complete example @ref button_example_01 "here".
* @{
*/
/**
- * @brief Add a new label to the parent
+ * Add a new button to the parent's canvas
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*/
- EAPI Evas_Object *elm_label_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * @brief Set the label on the label object
+ * Set the label used in the button
*
- * @param obj The label object
- * @param label The label will be used on the label object
- * @deprecated See elm_object_text_set()
- */
- EINA_DEPRECATED EAPI void elm_label_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); /* deprecated, use elm_object_text_set instead */
- /**
- * @brief Get the label used on the label object
+ * The passed @p label can be NULL to clean any existing text in it and
+ * leave the button as an icon only object.
*
- * @param obj The label object
- * @return The string inside the label
- * @deprecated See elm_object_text_get()
+ * @param obj The button object
+ * @param label The text will be written on the button
+ * @deprecated use elm_object_text_set() instead.
*/
- EINA_DEPRECATED EAPI const char *elm_label_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /* deprecated, use elm_object_text_get instead */
+ EINA_DEPRECATED EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
/**
- * @brief Set the wrapping behavior of the label
+ * Get the label set for the button
*
- * @param obj The label object
- * @param wrap To wrap text or not
+ * The string returned is an internal pointer and should not be freed or
+ * altered. It will also become invalid when the button is destroyed.
+ * The string returned, if not NULL, is a stringshare, so if you need to
+ * keep it around even after the button is destroyed, you can use
+ * eina_stringshare_ref().
*
- * 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
+ * @param obj The button object
+ * @return The text set to the label, or NULL if nothing is set
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Get the wrapping behavior of the label
+ * Set the icon used for the button
*
- * @param obj The label object
- * @return Wrap type
+ * Setting a new icon will delete any other that was previously set, making
+ * any reference to them invalid. If you need to maintain the previous
+ * object alive, unset it first with elm_button_icon_unset().
*
- * @see elm_label_line_wrap_set()
+ * @param obj The button object
+ * @param icon The icon object for the button
*/
- EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
- * @brief Set wrap width of the label
+ * Get the icon used for the button
*
- * @param obj The label object
- * @param w The wrap width in pixels at a minimum where words need to wrap
+ * Return the icon object which is set for this widget. If the button is
+ * destroyed or another icon is set, the returned object will be deleted
+ * and any reference to it will be invalid.
*
- * This function sets the maximum width size hint of the label.
+ * @param obj The button object
+ * @return The icon object that is being used
*
- * @warning This is only relevant if the label is inside a container.
+ * @see elm_button_icon_unset()
*/
- EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Get wrap width of the label
+ * Remove the icon set without deleting it and return the object
*
- * @param obj The label object
- * @return The wrap width in pixels at a minimum where words need to wrap
+ * This function drops the reference the button holds of the icon object
+ * and returns this last object. It is used in case you want to remove any
+ * icon, or set another one, without deleting the actual object. The button
+ * will be left without an icon set.
*
- * @see elm_label_wrap_width_set()
+ * @param obj The button object
+ * @return The icon object that was being used
*/
- EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set wrap height of the label
+ * Turn on/off the autorepeat event generated when the button is kept pressed
*
- * @param obj The label object
- * @param h The wrap height in pixels at a minimum where words need to wrap
+ * When off, no autorepeat is performed and buttons emit a normal @c clicked
+ * signal when they are clicked.
*
- * This function sets the maximum height size hint of the label.
+ * When on, keeping a button pressed will continuously emit a @c repeated
+ * signal until the button is released. The time it takes until it starts
+ * emitting the signal is given by
+ * elm_button_autorepeat_initial_timeout_set(), and the time between each
+ * new emission by elm_button_autorepeat_gap_timeout_set().
*
- * @warning This is only relevant if the label is inside a container.
+ * @param obj The button object
+ * @param on A bool to turn on/off the event
*/
- EAPI void elm_label_wrap_height_set(Evas_Object *obj, Evas_Coord h) EINA_ARG_NONNULL(1);
+ EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on) EINA_ARG_NONNULL(1);
/**
- * @brief get wrap width of the label
+ * Get whether the autorepeat feature is enabled
*
- * @param obj The label object
- * @return The wrap height in pixels at a minimum where words need to wrap
+ * @param obj The button object
+ * @return EINA_TRUE if autorepeat is on, EINA_FALSE otherwise
+ *
+ * @see elm_button_autorepeat_set()
*/
- EAPI Evas_Coord elm_label_wrap_height_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set the font size on the label object.
+ * Set the initial timeout before the autorepeat event is generated
*
- * @param obj The label object
- * @param size font size
+ * Sets the timeout, in seconds, since the button is pressed until the
+ * first @c repeated signal is emitted. If @p t is 0.0 or less, there
+ * won't be any delay and the even will be fired the moment the button is
+ * pressed.
*
- * @warning NEVER use this. It is for hyper-special cases only. use styles
- * instead. e.g. "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
+ * @param obj The button object
+ * @param t Timeout in seconds
+ *
+ * @see elm_button_autorepeat_set()
+ * @see elm_button_autorepeat_gap_timeout_set()
*/
- EAPI void elm_label_fontsize_set(Evas_Object *obj, int fontsize) EINA_ARG_NONNULL(1);
+ EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
/**
- * @brief Set the text color on the label object
+ * Get the initial timeout before the autorepeat event is generated
*
- * @param obj The label object
- * @param r Red property background color of The label object
- * @param g Green property background color of The label object
- * @param b Blue property background color of The label object
- * @param a Alpha property background color of The label object
+ * @param obj The button object
+ * @return Timeout in seconds
*
- * @warning NEVER use this. It is for hyper-special cases only. use styles
- * instead. e.g. "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
+ * @see elm_button_autorepeat_initial_timeout_set()
*/
- EAPI void elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a) EINA_ARG_NONNULL(1);
+ EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set the text align on the label object
+ * Set the interval between each generated autorepeat event
*
- * @param obj The label object
- * @param align align mode ("left", "center", "right")
+ * After the first @c repeated event is fired, all subsequent ones will
+ * follow after a delay of @p t seconds for each.
*
- * @warning NEVER use this. It is for hyper-special cases only. use styles
- * instead. e.g. "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
+ * @param obj The button object
+ * @param t Interval in seconds
+ *
+ * @see elm_button_autorepeat_initial_timeout_set()
*/
- EAPI void elm_label_text_align_set(Evas_Object *obj, const char *alignmode) EINA_ARG_NONNULL(1);
+ EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1);
/**
- * @brief Set background color of the label
- *
- * @param obj The label object
- * @param r Red property background color of The label object
- * @param g Green property background color of The label object
- * @param b Blue property background color of The label object
- * @param a Alpha property background alpha of The label object
+ * Get the interval between each generated autorepeat event
*
- * @warning NEVER use this. It is for hyper-special cases only. use styles
- * instead. e.g. "big", "medium", "small" - or better name them by use:
- * "title", "footnote", "quote" etc.
+ * @param obj The button object
+ * @return Interval in seconds
*/
- EAPI void elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a) EINA_ARG_NONNULL(1);
+ EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @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
- * choosen wrap method was ELM_WRAP_WORD.
+ * @}
*/
- EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the text slide of the label
+ * @defgroup File_Selector_Button File Selector Button
*
- * @param obj The label object
- * @param slide To start slide or stop
+ * @image html img/widget/fileselector_button/preview-00.png
+ * @image latex img/widget/fileselector_button/preview-00.eps
+ * @image html img/widget/fileselector_button/preview-01.png
+ * @image latex img/widget/fileselector_button/preview-01.eps
+ * @image html img/widget/fileselector_button/preview-02.png
+ * @image latex img/widget/fileselector_button/preview-02.eps
*
- * If set to true the text of the label will slide throught the length of
- * label.
+ * This is a button that, when clicked, creates an Elementary
+ * window (or inner window) <b> with a @ref Fileselector "file
+ * selector widget" within</b>. When a file is chosen, the (inner)
+ * window is closed and the button emits a signal having the
+ * selected file as it's @c event_info.
*
- * @warning This only work with the themes "slide_short", "slide_long" and
- * "slide_bounce".
- */
- EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide) EINA_ARG_NONNULL(1);
- /**
- * @brief Get the text slide mode of the label
+ * This widget encapsulates operations on its internal file
+ * selector on its own API. There is less control over its file
+ * selector than that one would have instatiating one directly.
*
- * @param obj The label object
- * @return slide slide mode value
+ * The following styles are available for this button:
+ * @li @c "default"
+ * @li @c "anchor"
+ * @li @c "hoversel_vertical"
+ * @li @c "hoversel_vertical_entry"
*
- * @see elm_label_slide_set()
+ * Smart callbacks one can register to:
+ * - @c "file,chosen" - the user has selected a path, whose string
+ * pointer comes as the @c event_info data (a stringshared
+ * string)
+ *
+ * Here is an example on its usage:
+ * @li @ref fileselector_button_example
+ *
+ * @see @ref File_Selector_Entry for a similar widget.
+ * @{
*/
- EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the slide duration(speed) of the label
+ * Add a new file selector button widget to the given parent
+ * Elementary (container) object
*
- * @param obj The label object
- * @return The duration in seconds in moving text from slide begin position
- * to slide end position
+ * @param parent The parent object
+ * @return a new file selector button widget handle or @c NULL, on
+ * errors
*/
- EAPI void elm_label_slide_duration_set(Evas_Object *obj, double duration) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the slide duration(speed) of the label
+ * Set the label for a given file selector button widget
*
- * @param obj The label object
- * @return The duration time in moving text from slide begin position to slide end position
+ * @param obj The file selector button widget
+ * @param label The text label to be displayed on @p obj
*
- * @see elm_label_slide_duration_set()
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI double elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_fileselector_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+
/**
- * @}
+ * Get the label set for a given file selector button widget
+ *
+ * @param obj The file selector button widget
+ * @return The button label
+ *
+ * @deprecated use elm_object_text_set() instead.
*/
+ EINA_DEPRECATED EAPI const char *elm_fileselector_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Toggle Toggle
- *
- * @image html img/widget/toggle/preview-00.png
- * @image latex img/widget/toggle/preview-00.eps
+ * Set the icon on a given file selector button widget
*
- * @brief A toggle is a slider which can be used to toggle between
- * two values. It has two states: on and off.
+ * @param obj The file selector button widget
+ * @param icon The icon object for the button
*
- * Signals that you can add callbacks for are:
- * @li "changed" - Whenever the toggle value has been changed. Is not called
- * until the toggle is released by the cursor (assuming it
- * has been triggered by the cursor in the first place).
+ * Once the icon object is set, a previously set one will be
+ * deleted. If you want to keep the latter, use the
+ * elm_fileselector_button_icon_unset() function.
*
- * @ref tutorial_toggle show how to use a toggle.
- * @{
+ * @see elm_fileselector_button_icon_get()
*/
+ EAPI void elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+
/**
- * @brief Add a toggle to @p parent.
+ * Get the icon set for a given file selector button widget
*
- * @param parent The parent object
+ * @param obj The file selector button widget
+ * @return The icon object currently set on @p obj or @c NULL, if
+ * none is
*
- * @return The toggle object
+ * @see elm_fileselector_button_icon_set()
*/
- EAPI Evas_Object *elm_toggle_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Sets the label to be displayed with the toggle.
+ * Unset the icon used in a given file selector button widget
*
- * @param obj The toggle object
- * @param label The label to be displayed
+ * @param obj The file selector button widget
+ * @return The icon object that was being used on @p obj or @c
+ * NULL, on errors
*
- * @deprecated use elm_object_text_set() instead.
+ * Unparent and return the icon object which was set for this
+ * widget.
+ *
+ * @see elm_fileselector_button_icon_set()
*/
- EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Gets the label of the toggle
+ * Set the title for a given file selector button widget's window
*
- * @param obj toggle object
- * @return The label of the toggle
+ * @param obj The file selector button widget
+ * @param title The title string
*
- * @deprecated use elm_object_text_get() instead.
+ * This will change the window's title, when the file selector pops
+ * out after a click on the button. Those windows have the default
+ * (unlocalized) value of @c "Select a file" as titles.
+ *
+ * @note It will only take any effect if the file selector
+ * button widget is @b not under "inwin mode".
+ *
+ * @see elm_fileselector_button_window_title_get()
*/
- EINA_DEPRECATED EAPI const char *elm_toggle_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the icon used for the toggle
+ * Get the title set for a given file selector button widget's
+ * window
*
- * @param obj The toggle object
- * @param icon The icon object for the button
+ * @param obj The file selector button widget
+ * @return Title of the file selector button's window
*
- * Once the icon object is set, a previously set one will be deleted
- * If you want to keep that old content object, use the
- * elm_toggle_icon_unset() function.
+ * @see elm_fileselector_button_window_title_get() for more details
*/
- EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_fileselector_button_window_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the icon used for the toggle
+ * Set the size of a given file selector button widget's window,
+ * holding the file selector itself.
*
- * @param obj The toggle object
- * @return The icon object that is being used
+ * @param obj The file selector button widget
+ * @param width The window's width
+ * @param height The window's height
*
- * Return the icon object which is set for this widget.
+ * @note it will only take any effect if the file selector button
+ * widget is @b not under "inwin mode". The default size for the
+ * window (when applicable) is 400x400 pixels.
*
- * @see elm_toggle_icon_set()
+ * @see elm_fileselector_button_window_size_get()
*/
- EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
+
/**
- * @brief Unset the icon used for the toggle
+ * Get the size of a given file selector button widget's window,
+ * holding the file selector itself.
*
- * @param obj The toggle object
- * @return The icon object that was being used
+ * @param obj The file selector button widget
+ * @param width Pointer into which to store the width value
+ * @param height Pointer into which to store the height value
*
- * Unparent and return the icon object which was set for this widget.
+ * @note Use @c NULL pointers on the size values you're not
+ * interested in: they'll be ignored by the function.
*
- * @see elm_toggle_icon_set()
+ * @see elm_fileselector_button_window_size_set(), for more details
*/
- EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
+
/**
- * @brief Sets the labels to be associated with the on and off states of the toggle.
+ * Set the initial file system path for a given file selector
+ * button widget
*
- * @param obj The toggle object
- * @param onlabel The label displayed when the toggle is in the "on" state
- * @param offlabel The label displayed when the toggle is in the "off" state
- */
- EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) EINA_ARG_NONNULL(1);
- /**
- * @brief Gets the labels associated with the on and off states of the toggle.
+ * @param obj The file selector button widget
+ * @param path The path string
*
- * @param obj The toggle object
- * @param onlabel A char** to place the onlabel of @p obj into
- * @param offlabel A char** to place the offlabel of @p obj into
- */
- EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) EINA_ARG_NONNULL(1);
- /**
- * @brief Sets the state of the toggle to @p state.
+ * It must be a <b>directory</b> path, which will have the contents
+ * displayed initially in the file selector's view, when invoked
+ * from @p obj. The default initial path is the @c "HOME"
+ * environment variable's value.
*
- * @param obj The toggle object
- * @param state The state of @p obj
+ * @see elm_fileselector_button_path_get()
*/
- EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
+
/**
- * @brief Gets the state of the toggle to @p state.
+ * Get the initial file system path set for a given file selector
+ * button widget
*
- * @param obj The toggle object
- * @return The state of @p obj
- */
- EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * @brief Sets the state pointer of the toggle to @p statep.
+ * @param obj The file selector button widget
+ * @return path The path string
*
- * @param obj The toggle object
- * @param statep The state pointer of @p obj
- */
- EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1);
- /**
- * @}
+ * @see elm_fileselector_button_path_set() for more details
*/
+ EAPI const char *elm_fileselector_button_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Frame Frame
- *
- * @image html img/widget/frame/preview-00.png
- * @image latex img/widget/frame/preview-00.eps
- *
- * @brief Frame is a widget that holds some content and has a title.
+ * Enable/disable a tree view in the given file selector button
+ * widget's internal file selector
*
- * The default look is a frame with a title, but Frame supports multple
- * styles:
- * @li default
- * @li pad_small
- * @li pad_medium
- * @li pad_large
- * @li pad_huge
- * @li outdent_top
- * @li outdent_bottom
+ * @param obj The file selector button widget
+ * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to
+ * disable
*
- * Of all this styles only default shows the title. Frame emits no signals.
+ * This has the same effect as elm_fileselector_expandable_set(),
+ * but now applied to a file selector button's internal file
+ * selector.
*
- * For a detailed example see the @ref tutorial_frame.
+ * @note There's no way to put a file selector button's internal
+ * file selector in "grid mode", as one may do with "pure" file
+ * selectors.
*
- * @{
+ * @see elm_fileselector_expandable_get()
*/
+ EAPI void elm_fileselector_button_expandable_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
/**
- * @brief Add a new frame to the parent
+ * Get whether tree view is enabled for the given file selector
+ * button widget's internal file selector
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The file selector button widget
+ * @return @c EINA_TRUE if @p obj widget's internal file selector
+ * is in tree view, @c EINA_FALSE otherwise (and or errors)
+ *
+ * @see elm_fileselector_expandable_set() for more details
*/
- EAPI Evas_Object *elm_frame_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_fileselector_button_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the frame label
+ * Set whether a given file selector button widget's internal file
+ * selector is to display folders only or the directory contents,
+ * as well.
*
- * @param obj The frame object
- * @param label The label of this frame object
+ * @param obj The file selector button widget
+ * @param only @c EINA_TRUE to make @p obj widget's internal file
+ * selector only display directories, @c EINA_FALSE to make files
+ * to be displayed in it too
*
- * @deprecated use elm_object_text_set() instead.
+ * This has the same effect as elm_fileselector_folder_only_set(),
+ * but now applied to a file selector button's internal file
+ * selector.
+ *
+ * @see elm_fileselector_folder_only_get()
*/
- EINA_DEPRECATED EAPI void elm_frame_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the frame label
+ * Get whether a given file selector button widget's internal file
+ * selector is displaying folders only or the directory contents,
+ * as well.
*
- * @param obj The frame object
+ * @param obj The file selector button widget
+ * @return @c EINA_TRUE if @p obj widget's internal file
+ * selector is only displaying directories, @c EINA_FALSE if files
+ * are being displayed in it too (and on errors)
*
- * @return The label of this frame objet or NULL if unable to get frame
+ * @see elm_fileselector_button_folder_only_set() for more details
+ */
+ EAPI Eina_Bool elm_fileselector_button_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Enable/disable the file name entry box where the user can type
+ * in a name for a file, in a given file selector button widget's
+ * internal file selector.
*
- * @deprecated use elm_object_text_get() instead.
+ * @param obj The file selector button widget
+ * @param is_save @c EINA_TRUE to make @p obj widget's internal
+ * file selector a "saving dialog", @c EINA_FALSE otherwise
+ *
+ * This has the same effect as elm_fileselector_is_save_set(),
+ * but now applied to a file selector button's internal file
+ * selector.
+ *
+ * @see elm_fileselector_is_save_get()
*/
- EINA_DEPRECATED EAPI const char *elm_frame_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_is_save_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the content of the frame widget
+ * Get whether the given file selector button widget's internal
+ * file selector is in "saving dialog" mode
*
- * 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_frame_content_unset() function.
+ * @param obj The file selector button widget
+ * @return @c EINA_TRUE, if @p obj widget's internal file selector
+ * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
+ * errors)
*
- * @param obj The frame object
- * @param content The content will be filled in this frame object
+ * @see elm_fileselector_button_is_save_set() for more details
*/
- EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_fileselector_button_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the content of the frame widget
+ * Set whether a given file selector button widget's internal file
+ * selector will raise an Elementary "inner window", instead of a
+ * dedicated Elementary window. By default, it won't.
*
- * Return the content object which is set for this widget
+ * @param obj The file selector button widget
+ * @param value @c EINA_TRUE to make it use an inner window, @c
+ * EINA_TRUE to make it use a dedicated window
*
- * @param obj The frame object
- * @return The content that is being used
+ * @see elm_win_inwin_add() for more information on inner windows
+ * @see elm_fileselector_button_inwin_mode_get()
*/
- EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
/**
- * @brief Unset the content of the frame widget
+ * Get whether a given file selector button widget's internal file
+ * selector will raise an Elementary "inner window", instead of a
+ * dedicated Elementary window.
*
- * Unparent and return the content object which was set for this widget
+ * @param obj The file selector button widget
+ * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
+ * if it will use a dedicated window
*
- * @param obj The frame object
- * @return The content that was being used
+ * @see elm_fileselector_button_inwin_mode_set() for more details
*/
- EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
* @}
*/
- /**
- * @defgroup Table Table
+ /**
+ * @defgroup File_Selector_Entry File Selector Entry
*
- * A container widget to arrange other widgets in a table where items can
- * also span multiple columns or rows - even overlap (and then be raised or
- * lowered accordingly to adjust stacking if they do overlap).
+ * @image html img/widget/fileselector_entry/preview-00.png
+ * @image latex img/widget/fileselector_entry/preview-00.eps
*
- * The followin are examples of how to use a table:
- * @li @ref tutorial_table_01
- * @li @ref tutorial_table_02
+ * This is an entry made to be filled with or display a <b>file
+ * system path string</b>. Besides the entry itself, the widget has
+ * a @ref File_Selector_Button "file selector button" on its side,
+ * which will raise an internal @ref Fileselector "file selector widget",
+ * when clicked, for path selection aided by file system
+ * navigation.
*
+ * This file selector may appear in an Elementary window or in an
+ * inner window. When a file is chosen from it, the (inner) window
+ * is closed and the selected file's path string is exposed both as
+ * an smart event and as the new text on the entry.
+ *
+ * This widget encapsulates operations on its internal file
+ * selector on its own API. There is less control over its file
+ * selector than that one would have instatiating one directly.
+ *
+ * Smart callbacks one can register to:
+ * - @c "changed" - The text within the entry was changed
+ * - @c "activated" - The entry has had editing finished and
+ * changes are to be "committed"
+ * - @c "press" - The entry has been clicked
+ * - @c "longpressed" - The entry has been clicked (and held) for a
+ * couple seconds
+ * - @c "clicked" - The entry has been clicked
+ * - @c "clicked,double" - The entry has been double clicked
+ * - @c "focused" - The entry has received focus
+ * - @c "unfocused" - The entry has lost focus
+ * - @c "selection,paste" - A paste action has occurred on the
+ * entry
+ * - @c "selection,copy" - A copy action has occurred on the entry
+ * - @c "selection,cut" - A cut action has occurred on the entry
+ * - @c "unpressed" - The file selector entry's button was released
+ * after being pressed.
+ * - @c "file,chosen" - The user has selected a path via the file
+ * selector entry's internal file selector, whose string pointer
+ * comes as the @c event_info data (a stringshared string)
+ *
+ * Here is an example on its usage:
+ * @li @ref fileselector_entry_example
+ *
+ * @see @ref File_Selector_Button for a similar widget.
* @{
*/
+
/**
- * @brief Add a new table to the parent
+ * Add a new file selector entry widget to the given parent
+ * Elementary (container) object
*
* @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @return a new file selector entry widget handle or @c NULL, on
+ * errors
*/
- EAPI Evas_Object *elm_table_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the homogeneous layout in the table
+ * Set the label for a given file selector entry widget's button
*
- * @param obj The layout object
- * @param homogeneous A boolean to set if the layout is homogeneous in the
- * table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
- */
- EAPI void elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1);
- /**
- * @brief Get the current table homogeneous mode.
+ * @param obj The file selector entry widget
+ * @param label The text label to be displayed on @p obj widget's
+ * button
*
- * @param obj The table object
- * @return A boolean to indicating if the layout is homogeneous in the table
- * (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
- */
- EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * @warning <b>Use elm_table_homogeneous_set() instead</b>
- */
- EINA_DEPRECATED EAPI void elm_table_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
- /**
- * @warning <b>Use elm_table_homogeneous_get() instead</b>
+ * @deprecated use elm_object_text_set() instead.
*/
- EINA_DEPRECATED EAPI Eina_Bool elm_table_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set padding between cells.
+ * Get the label set for a given file selector entry widget's button
*
- * @param obj The layout object.
- * @param horizontal set the horizontal padding.
- * @param vertical set the vertical padding.
+ * @param obj The file selector entry widget
+ * @return The widget button's label
*
- * Default value is 0.
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_fileselector_entry_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get padding between cells.
+ * Set the icon on a given file selector entry widget's button
*
- * @param obj The layout object.
- * @param horizontal set the horizontal padding.
- * @param vertical set the vertical padding.
- */
- EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
- /**
- * @brief Add a subobject on the table with the coordinates passed
+ * @param obj The file selector entry widget
+ * @param icon The icon object for the entry's button
*
- * @param obj The table object
- * @param subobj The subobject to be added to the table
- * @param x Row number
- * @param y Column number
- * @param w rowspan
- * @param h colspan
+ * Once the icon object is set, a previously set one will be
+ * deleted. If you want to keep the latter, use the
+ * elm_fileselector_entry_button_icon_unset() function.
*
- * @note All positioning inside the table is relative to rows and columns, so
- * a value of 0 for x and y, means the top left cell of the table, and a
- * value of 1 for w and h means @p subobj only takes that 1 cell.
+ * @see elm_fileselector_entry_button_icon_get()
*/
- EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_entry_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
+
/**
- * @brief Remove child from table.
+ * Get the icon set for a given file selector entry widget's button
*
- * @param obj The table object
- * @param subobj The subobject
- */
- EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
- /**
- * @brief Faster way to remove all child objects from a table object.
+ * @param obj The file selector entry widget
+ * @return The icon object currently set on @p obj widget's button
+ * or @c NULL, if none is
*
- * @param obj The table object
- * @param clear If true, will delete children, else just remove from table.
+ * @see elm_fileselector_entry_button_icon_set()
*/
- EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_entry_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Set the packing location of an existing child of the table
+ * Unset the icon used in a given file selector entry widget's
+ * button
*
- * @param subobj The subobject to be modified in the table
- * @param x Row number
- * @param y Column number
- * @param w rowspan
- * @param h colspan
+ * @param obj The file selector entry widget
+ * @return The icon object that was being used on @p obj widget's
+ * button or @c NULL, on errors
*
- * Modifies the position of an object already in the table.
+ * Unparent and return the icon object which was set for this
+ * widget's button.
*
- * @note All positioning inside the table is relative to rows and columns, so
- * a value of 0 for x and y, means the top left cell of the table, and a
- * value of 1 for w and h means @p subobj only takes that 1 cell.
+ * @see elm_fileselector_entry_button_icon_set()
*/
- EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_fileselector_entry_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * @brief Get the packing location of an existing child of the table
+ * Set the title for a given file selector entry widget's window
*
- * @param subobj The subobject to be modified in the table
- * @param x Row number
- * @param y Column number
- * @param w rowspan
- * @param h colspan
+ * @param obj The file selector entry widget
+ * @param title The title string
*
- * @see elm_table_pack_set()
+ * This will change the window's title, when the file selector pops
+ * out after a click on the entry's button. Those windows have the
+ * default (unlocalized) value of @c "Select a file" as titles.
+ *
+ * @note It will only take any effect if the file selector
+ * entry widget is @b not under "inwin mode".
+ *
+ * @see elm_fileselector_entry_window_title_get()
*/
- EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1);
+
/**
- * @}
+ * Get the title set for a given file selector entry widget's
+ * window
+ *
+ * @param obj The file selector entry widget
+ * @return Title of the file selector entry's window
+ *
+ * @see elm_fileselector_entry_window_title_get() for more details
*/
+ EAPI const char *elm_fileselector_entry_window_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Gengrid Gengrid (Generic grid)
+ * Set the size of a given file selector entry widget's window,
+ * holding the file selector itself.
*
- * This widget aims to position objects in a grid layout while
- * actually creating and rendering only the visible ones, using the
- * same idea as the @ref Genlist "genlist": the user defines a @b
- * class for each item, specifying functions that will be called at
- * object creation, deletion, etc. When those items are selected by
- * the user, a callback function is issued. Users may interact with
- * a gengrid via the mouse (by clicking on items to select them and
- * clicking on the grid's viewport and swiping to pan the whole
- * view) or via the keyboard, navigating through item with the
- * arrow keys.
+ * @param obj The file selector entry widget
+ * @param width The window's width
+ * @param height The window's height
*
- * @section Gengrid_Layouts Gengrid layouts
+ * @note it will only take any effect if the file selector entry
+ * widget is @b not under "inwin mode". The default size for the
+ * window (when applicable) is 400x400 pixels.
*
- * Gengrids may layout its items in one of two possible layouts:
- * - horizontal or
- * - vertical.
+ * @see elm_fileselector_entry_window_size_get()
+ */
+ EAPI void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the size of a given file selector entry widget's window,
+ * holding the file selector itself.
*
- * When in "horizontal mode", items will be placed in @b columns,
- * from top to bottom and, when the space for a column is filled,
- * another one is started on the right, thus expanding the grid
- * horizontally, making for horizontal scrolling. When in "vertical
- * mode" , though, items will be placed in @b rows, from left to
- * right and, when the space for a row is filled, another one is
- * started below, thus expanding the grid vertically (and making
- * for vertical scrolling).
+ * @param obj The file selector entry widget
+ * @param width Pointer into which to store the width value
+ * @param height Pointer into which to store the height value
*
- * @section Gengrid_Items Gengrid items
+ * @note Use @c NULL pointers on the size values you're not
+ * interested in: they'll be ignored by the function.
*
- * An item in a gengrid can have 0 or more text labels (they can be
- * regular text or textblock Evas objects - that's up to the style
- * to determine), 0 or more icons (which are simply objects
- * swallowed into the gengrid item's theming Edje object) and 0 or
- * more <b>boolean states</b>, which have the behavior left to the
- * user to define. The Edje part names for each of these properties
- * will be looked up, in the theme file for the gengrid, under the
- * Edje (string) data items named @c "labels", @c "icons" and @c
- * "states", respectively. For each of those properties, if more
- * than one part is provided, they must have names listed separated
- * by spaces in the data fields. For the default gengrid item
- * theme, we have @b one label part (@c "elm.text"), @b two icon
- * parts (@c "elm.swalllow.icon" and @c "elm.swallow.end") and @b
- * no state parts.
+ * @see elm_fileselector_entry_window_size_set(), for more details
+ */
+ EAPI void elm_fileselector_entry_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the initial file system path and the entry's path string for
+ * a given file selector entry widget
*
- * A gengrid item may be at one of several styles. Elementary
- * provides one by default - "default", but this can be extended by
- * system or application custom themes/overlays/extensions (see
- * @ref Theme "themes" for more details).
+ * @param obj The file selector entry widget
+ * @param path The path string
*
- * @section Gengrid_Item_Class Gengrid item classes
+ * It must be a <b>directory</b> path, which will have the contents
+ * displayed initially in the file selector's view, when invoked
+ * from @p obj. The default initial path is the @c "HOME"
+ * environment variable's value.
*
- * In order to have the ability to add and delete items on the fly,
- * gengrid implements a class (callback) system where the
- * application provides a structure with information about that
- * type of item (gengrid may contain multiple different items with
- * different classes, states and styles). Gengrid will call the
- * functions in this struct (methods) when an item is "realized"
- * (i.e., created dynamically, while the user is scrolling the
- * grid). All objects will simply be deleted when no longer needed
- * with evas_object_del(). The #Elm_GenGrid_Item_Class structure
- * contains the following members:
- * - @c item_style - This is a constant string and simply defines
- * the name of the item style. It @b must be specified and the
- * default should be @c "default".
- * - @c func.label_get - This function is called when an item
- * object is actually created. The @c data parameter will point to
- * the same data passed to elm_gengrid_item_append() and related
- * item creation functions. The @c obj parameter is the gengrid
- * object itself, while the @c part one is the name string of one
- * of the existing text parts in the Edje group implementing the
- * item's theme. This function @b must return a strdup'()ed string,
- * as the caller will free() it when done. See
- * #Elm_Gengrid_Item_Label_Get_Cb.
- * - @c func.icon_get - This function is called when an item object
- * is actually created. The @c data parameter will point to the
- * same data passed to elm_gengrid_item_append() and related item
- * creation functions. The @c obj parameter is the gengrid object
- * itself, while the @c part one is the name string of one of the
- * existing (icon) swallow parts in the Edje group implementing the
- * item's theme. It must return @c NULL, when no icon is desired,
- * or a valid object handle, otherwise. The object will be deleted
- * by the gengrid on its deletion or when the item is "unrealized".
- * See #Elm_Gengrid_Item_Icon_Get_Cb.
- * - @c func.state_get - This function is called when an item
- * object is actually created. The @c data parameter will point to
- * the same data passed to elm_gengrid_item_append() and related
- * item creation functions. The @c obj parameter is the gengrid
- * object itself, while the @c part one is the name string of one
- * of the state parts in the Edje group implementing the item's
- * theme. Return @c EINA_FALSE for false/off or @c EINA_TRUE for
- * true/on. Gengrids will emit a signal to its theming Edje object
- * with @c "elm,state,XXX,active" and @c "elm" as "emission" and
- * "source" arguments, respectively, when the state is true (the
- * default is false), where @c XXX is the name of the (state) part.
- * See #Elm_Gengrid_Item_State_Get_Cb.
- * - @c func.del - This is called when elm_gengrid_item_del() is
- * called on an item or elm_gengrid_clear() is called on the
- * gengrid. This is intended for use when gengrid items are
- * deleted, so any data attached to the item (e.g. its data
- * parameter on creation) can be deleted. See #Elm_Gengrid_Item_Del_Cb.
+ * @see elm_fileselector_entry_path_get()
+ */
+ EAPI void elm_fileselector_entry_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the entry's path string for a given file selector entry
+ * widget
*
- * @section Gengrid_Usage_Hints Usage hints
+ * @param obj The file selector entry widget
+ * @return path The path string
*
- * If the user wants to have multiple items selected at the same
- * time, elm_gengrid_multi_select_set() will permit it. If the
- * gengrid is single-selection only (the default), then
- * elm_gengrid_select_item_get() will return the selected item or
- * @c NULL, if none is selected. If the gengrid is under
- * multi-selection, then elm_gengrid_selected_items_get() will
- * return a list (that is only valid as long as no items are
- * modified (added, deleted, selected or unselected) of child items
- * on a gengrid.
+ * @see elm_fileselector_entry_path_set() for more details
+ */
+ EAPI const char *elm_fileselector_entry_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Enable/disable a tree view in the given file selector entry
+ * widget's internal file selector
*
- * If an item changes (internal (boolean) state, label or icon
- * changes), then use elm_gengrid_item_update() to have gengrid
- * update the item with the new state. A gengrid will re-"realize"
- * the item, thus calling the functions in the
- * #Elm_Gengrid_Item_Class set for that item.
+ * @param obj The file selector entry widget
+ * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to
+ * disable
*
- * To programmatically (un)select an item, use
- * elm_gengrid_item_selected_set(). To get its selected state use
- * elm_gengrid_item_selected_get(). To make an item disabled
- * (unable to be selected and appear differently) use
- * elm_gengrid_item_disabled_set() to set this and
- * elm_gengrid_item_disabled_get() to get the disabled state.
+ * This has the same effect as elm_fileselector_expandable_set(),
+ * but now applied to a file selector entry's internal file
+ * selector.
*
- * Grid cells will only have their selection smart callbacks called
- * when firstly getting selected. Any further clicks will do
- * nothing, unless you enable the "always select mode", with
- * elm_gengrid_always_select_mode_set(), thus making every click to
- * issue selection callbacks. elm_gengrid_no_select_mode_set() will
- * turn off the ability to select items entirely in the widget and
- * they will neither appear selected nor call the selection smart
- * callbacks.
+ * @note There's no way to put a file selector entry's internal
+ * file selector in "grid mode", as one may do with "pure" file
+ * selectors.
*
- * Remember that you can create new styles and add your own theme
- * augmentation per application with elm_theme_extension_add(). If
- * you absolutely must have a specific style that overrides any
- * theme the user or system sets up you can use
- * elm_theme_overlay_add() to add such a file.
+ * @see elm_fileselector_expandable_get()
+ */
+ EAPI void elm_fileselector_entry_expandable_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether tree view is enabled for the given file selector
+ * entry widget's internal file selector
*
- * @section Gengrid_Smart_Events Gengrid smart events
+ * @param obj The file selector entry widget
+ * @return @c EINA_TRUE if @p obj widget's internal file selector
+ * is in tree view, @c EINA_FALSE otherwise (and or errors)
*
- * Smart events that you can add callbacks for are:
- * - @c "activated" - The user has double-clicked or pressed
- * (enter|return|spacebar) on an item. The @c event_info parameter
- * is the gengrid item that was activated.
- * - @c "clicked,double" - The user has double-clicked an item.
- * The @c event_info parameter is the gengrid item that was double-clicked.
- * - @c "selected" - The user has made an item selected. The
- * @c event_info parameter is the gengrid item that was selected.
- * - @c "unselected" - The user has made an item unselected. The
- * @c event_info parameter is the gengrid item that was unselected.
- * - @c "realized" - This is called when the item in the gengrid
- * has its implementing Evas object instantiated, de facto. @c
- * event_info is the gengrid item that was created. The object
- * may be deleted at any time, so it is highly advised to the
- * caller @b not to use the object pointer returned from
- * elm_gengrid_item_object_get(), because it may point to freed
- * objects.
- * - @c "unrealized" - This is called when the implementing Evas
- * object for this item is deleted. @c event_info is the gengrid
- * item that was deleted.
- * - @c "changed" - Called when an item is added, removed, resized
- * or moved and when the gengrid is resized or gets "horizontal"
- * property changes.
- * - @c "drag,start,up" - Called when the item in the gengrid has
- * been dragged (not scrolled) up.
- * - @c "drag,start,down" - Called when the item in the gengrid has
- * been dragged (not scrolled) down.
- * - @c "drag,start,left" - Called when the item in the gengrid has
- * been dragged (not scrolled) left.
- * - @c "drag,start,right" - Called when the item in the gengrid has
- * been dragged (not scrolled) right.
- * - @c "drag,stop" - Called when the item in the gengrid has
- * stopped being dragged.
- * - @c "drag" - Called when the item in the gengrid is being
- * dragged.
- * - @c "scroll" - called when the content has been scrolled
- * (moved).
- * - @c "scroll,drag,start" - called when dragging the content has
- * started.
- * - @c "scroll,drag,stop" - called when dragging the content has
- * stopped.
- *
- * List of gendrid examples:
- * @li @ref gengrid_example
+ * @see elm_fileselector_expandable_set() for more details
*/
+ EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @addtogroup Gengrid
- * @{
+ * Set whether a given file selector entry widget's internal file
+ * selector is to display folders only or the directory contents,
+ * as well.
+ *
+ * @param obj The file selector entry widget
+ * @param only @c EINA_TRUE to make @p obj widget's internal file
+ * selector only display directories, @c EINA_FALSE to make files
+ * to be displayed in it too
+ *
+ * This has the same effect as elm_fileselector_folder_only_set(),
+ * but now applied to a file selector entry's internal file
+ * selector.
+ *
+ * @see elm_fileselector_folder_only_get()
*/
-
- typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class; /**< Gengrid item class definition structs */
- typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */
- typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item; /**< Gengrid item handles */
- typedef char *(*Elm_Gengrid_Item_Label_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gengrid item classes. */
- typedef Evas_Object *(*Elm_Gengrid_Item_Icon_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Icon fetching class function for gengrid item classes. */
- typedef Eina_Bool (*Elm_Gengrid_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gengrid item classes. */
- typedef void (*Elm_Gengrid_Item_Del_Cb) (void *data, Evas_Object *obj); /**< Deletion class function for gengrid item classes. */
-
- typedef char *(*GridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Label_Get_Cb. */
- typedef Evas_Object *(*GridItemIconGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Icon_Get_Cb. */
- typedef Eina_Bool (*GridItemStateGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_State_Get_Cb. */
- typedef void (*GridItemDelFunc) (void *data, Evas_Object *obj) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Del_Cb. */
+ EAPI void elm_fileselector_entry_folder_only_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
/**
- * @struct _Elm_Gengrid_Item_Class
+ * Get whether a given file selector entry widget's internal file
+ * selector is displaying folders only or the directory contents,
+ * as well.
*
- * Gengrid item class definition. See @ref Gengrid_Item_Class for
- * field details.
+ * @param obj The file selector entry widget
+ * @return @c EINA_TRUE if @p obj widget's internal file
+ * selector is only displaying directories, @c EINA_FALSE if files
+ * are being displayed in it too (and on errors)
+ *
+ * @see elm_fileselector_entry_folder_only_set() for more details
*/
- struct _Elm_Gengrid_Item_Class
- {
- const char *item_style;
- struct _Elm_Gengrid_Item_Class_Func
- {
- Elm_Gengrid_Item_Label_Get_Cb label_get;
- Elm_Gengrid_Item_Icon_Get_Cb icon_get;
- Elm_Gengrid_Item_State_Get_Cb state_get;
- Elm_Gengrid_Item_Del_Cb del;
- } func;
- }; /**< #Elm_Gengrid_Item_Class member definitions */
+ EAPI Eina_Bool elm_fileselector_entry_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Add a new gengrid widget to the given parent Elementary
- * (container) object
- *
- * @param parent The parent object
- * @return a new gengrid widget handle or @c NULL, on errors
+ * Enable/disable the file name entry box where the user can type
+ * in a name for a file, in a given file selector entry widget's
+ * internal file selector.
*
- * This function inserts a new gengrid widget on the canvas.
+ * @param obj The file selector entry widget
+ * @param is_save @c EINA_TRUE to make @p obj widget's internal
+ * file selector a "saving dialog", @c EINA_FALSE otherwise
*
- * @see elm_gengrid_item_size_set()
- * @see elm_gengrid_horizontal_set()
- * @see elm_gengrid_item_append()
- * @see elm_gengrid_item_del()
- * @see elm_gengrid_clear()
+ * This has the same effect as elm_fileselector_is_save_set(),
+ * but now applied to a file selector entry's internal file
+ * selector.
*
- * @ingroup Gengrid
+ * @see elm_fileselector_is_save_get()
*/
- EAPI Evas_Object *elm_gengrid_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
/**
- * Set the size for the items of a given gengrid widget
- *
- * @param obj The gengrid object.
- * @param w The items' width.
- * @param h The items' height;
- *
- * A gengrid, after creation, has still no information on the size
- * to give to each of its cells. So, you most probably will end up
- * with squares one @ref Fingers "finger" wide, the default
- * size. Use this function to force a custom size for you items,
- * making them as big as you wish.
+ * Get whether the given file selector entry widget's internal
+ * file selector is in "saving dialog" mode
*
- * @see elm_gengrid_item_size_get()
+ * @param obj The file selector entry widget
+ * @return @c EINA_TRUE, if @p obj widget's internal file selector
+ * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
+ * errors)
*
- * @ingroup Gengrid
+ * @see elm_fileselector_entry_is_save_set() for more details
*/
- EAPI void elm_gengrid_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_fileselector_entry_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the size set for the items of a given gengrid widget
- *
- * @param obj The gengrid object.
- * @param w Pointer to a variable where to store the items' width.
- * @param h Pointer to a variable where to store the items' height.
- *
- * @note Use @c NULL pointers on the size values you're not
- * interested in: they'll be ignored by the function.
+ * Set whether a given file selector entry widget's internal file
+ * selector will raise an Elementary "inner window", instead of a
+ * dedicated Elementary window. By default, it won't.
*
- * @see elm_gengrid_item_size_get() for more details
+ * @param obj The file selector entry widget
+ * @param value @c EINA_TRUE to make it use an inner window, @c
+ * EINA_TRUE to make it use a dedicated window
*
- * @ingroup Gengrid
+ * @see elm_win_inwin_add() for more information on inner windows
+ * @see elm_fileselector_entry_inwin_mode_get()
*/
- EAPI void elm_gengrid_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
/**
- * Set the items grid's alignment within a given gengrid widget
- *
- * @param obj The gengrid object.
- * @param align_x Alignment in the horizontal axis (0 <= align_x <= 1).
- * @param align_y Alignment in the vertical axis (0 <= align_y <= 1).
- *
- * This sets the alignment of the whole grid of items of a gengrid
- * within its given viewport. By default, those values are both
- * 0.5, meaning that the gengrid will have its items grid placed
- * exactly in the middle of its viewport.
- *
- * @note If given alignment values are out of the cited ranges,
- * they'll be changed to the nearest boundary values on the valid
- * ranges.
+ * Get whether a given file selector entry widget's internal file
+ * selector will raise an Elementary "inner window", instead of a
+ * dedicated Elementary window.
*
- * @see elm_gengrid_align_get()
+ * @param obj The file selector entry widget
+ * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
+ * if it will use a dedicated window
*
- * @ingroup Gengrid
+ * @see elm_fileselector_entry_inwin_mode_set() for more details
*/
- EAPI void elm_gengrid_align_set(Evas_Object *obj, double align_x, double align_y) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the items grid's alignment values within a given gengrid
+ * Set the initial file system path for a given file selector entry
* widget
*
- * @param obj The gengrid object.
- * @param align_x Pointer to a variable where to store the
- * horizontal alignment.
- * @param align_y Pointer to a variable where to store the vertical
- * alignment.
- *
- * @note Use @c NULL pointers on the alignment values you're not
- * interested in: they'll be ignored by the function.
+ * @param obj The file selector entry widget
+ * @param path The path string
*
- * @see elm_gengrid_align_set() for more details
+ * It must be a <b>directory</b> path, which will have the contents
+ * displayed initially in the file selector's view, when invoked
+ * from @p obj. The default initial path is the @c "HOME"
+ * environment variable's value.
*
- * @ingroup Gengrid
+ * @see elm_fileselector_entry_path_get()
*/
- EAPI void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y) EINA_ARG_NONNULL(1);
+ EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1);
/**
- * Set whether a given gengrid widget is or not able have items
- * @b reordered
- *
- * @param obj The gengrid object
- * @param reorder_mode Use @c EINA_TRUE to turn reoderding on,
- * @c EINA_FALSE to turn it off
- *
- * If a gengrid is set to allow reordering, a click held for more
- * than 0.5 over a given item will highlight it specially,
- * signalling the gengrid has entered the reordering state. From
- * that time on, the user will be able to, while still holding the
- * mouse button down, move the item freely in the gengrid's
- * viewport, replacing to said item to the locations it goes to.
- * The replacements will be animated and, whenever the user
- * releases the mouse button, the item being replaced gets a new
- * definitive place in the grid.
+ * Get the parent directory's path to the latest file selection on
+ * a given filer selector entry widget
*
- * @see elm_gengrid_reorder_mode_get()
+ * @param obj The file selector object
+ * @return The (full) path of the directory of the last selection
+ * on @p obj widget, a @b stringshared string
*
- * @ingroup Gengrid
+ * @see elm_fileselector_entry_path_set()
*/
- EAPI void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether a given gengrid widget is or not able have items
- * @b reordered
- *
- * @param obj The gengrid object
- * @return @c EINA_TRUE, if reoderding is on, @c EINA_FALSE if it's
- * off
- *
- * @see elm_gengrid_reorder_mode_set() for more details
- *
- * @ingroup Gengrid
+ * @}
*/
- EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Append a new item in a given gengrid widget.
- *
- * @param obj The gengrid object.
- * @param gic The item class for the item.
- * @param data The item data.
- * @param func Convenience function called when the item is
- * selected.
- * @param func_data Data to be passed to @p func.
- * @return A handle to the item added or @c NULL, on errors.
+ * @defgroup Scroller Scroller
*
- * This adds an item to the beginning of the gengrid.
+ * A scroller holds a single object and "scrolls it around". This means that
+ * it allows the user to use a scrollbar (or a finger) to drag the viewable
+ * region around, allowing to move through a much larger object that is
+ * contained in the scroller. The scroiller will always have a small minimum
+ * size by default as it won't be limited by the contents of the scroller.
*
- * @see elm_gengrid_item_prepend()
- * @see elm_gengrid_item_insert_before()
- * @see elm_gengrid_item_insert_after()
- * @see elm_gengrid_item_del()
+ * Signals that you can add callbacks for are:
+ * @li "edge,left" - the left edge of the content has been reached
+ * @li "edge,right" - the right edge of the content has been reached
+ * @li "edge,top" - the top edge of the content has been reached
+ * @li "edge,bottom" - the bottom edge of the content has been reached
+ * @li "scroll" - the content has been scrolled (moved)
+ * @li "scroll,anim,start" - scrolling animation has started
+ * @li "scroll,anim,stop" - scrolling animation has stopped
+ * @li "scroll,drag,start" - dragging the contents around has started
+ * @li "scroll,drag,stop" - dragging the contents around has stopped
+ * @note The "scroll,anim,*" and "scroll,drag,*" signals are only emitted by
+ * user intervetion.
*
- * @ingroup Gengrid
+ * @note When Elemementary is in embedded mode the scrollbars will not be
+ * dragable, they appear merely as indicators of how much has been scrolled.
+ * @note When Elementary is in desktop mode the thumbscroll(a.k.a.
+ * fingerscroll) won't work.
+ *
+ * In @ref tutorial_scroller you'll find an example of how to use most of
+ * this API.
+ * @{
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
-
/**
- * Prepend a new item in a given gengrid widget.
- *
- * @param obj The gengrid object.
- * @param gic The item class for the item.
- * @param data The item data.
- * @param func Convenience function called when the item is
- * selected.
- * @param func_data Data to be passed to @p func.
- * @return A handle to the item added or @c NULL, on errors.
- *
- * This adds an item to the end of the gengrid.
- *
- * @see elm_gengrid_item_append()
- * @see elm_gengrid_item_insert_before()
- * @see elm_gengrid_item_insert_after()
- * @see elm_gengrid_item_del()
+ * @brief Type that controls when scrollbars should appear.
*
- * @ingroup Gengrid
+ * @see elm_scroller_policy_set()
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
-
+ typedef enum _Elm_Scroller_Policy
+ {
+ ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */
+ ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */
+ ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */
+ ELM_SCROLLER_POLICY_LAST
+ } Elm_Scroller_Policy;
/**
- * Insert an item before another in a gengrid widget
- *
- * @param obj The gengrid object.
- * @param gic The item class for the item.
- * @param data The item data.
- * @param relative The item to place this new one before.
- * @param func Convenience function called when the item is
- * selected.
- * @param func_data Data to be passed to @p func.
- * @return A handle to the item added or @c NULL, on errors.
+ * @brief Add a new scroller to the parent
*
- * This inserts an item before another in the gengrid.
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_scroller_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the content of the scroller widget (the object to be scrolled around).
*
- * @see elm_gengrid_item_append()
- * @see elm_gengrid_item_prepend()
- * @see elm_gengrid_item_insert_after()
- * @see elm_gengrid_item_del()
+ * @param obj The scroller object
+ * @param content The new content object
*
- * @ingroup Gengrid
+ * 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_scroller_content_unset() function.
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1);
/**
- * Insert an item after another in a gengrid widget
- *
- * @param obj The gengrid object.
- * @param gic The item class for the item.
- * @param data The item data.
- * @param relative The item to place this new one after.
- * @param func Convenience function called when the item is
- * selected.
- * @param func_data Data to be passed to @p func.
- * @return A handle to the item added or @c NULL, on errors.
+ * @brief Get the content of the scroller widget
*
- * This inserts an item after another in the gengrid.
+ * @param obj The slider object
+ * @return The content that is being used
*
- * @see elm_gengrid_item_append()
- * @see elm_gengrid_item_prepend()
- * @see elm_gengrid_item_insert_after()
- * @see elm_gengrid_item_del()
+ * Return the content object which is set for this widget
*
- * @ingroup Gengrid
+ * @see elm_scroller_content_set()
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
-
- EAPI Elm_Gengrid_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
-
- EAPI Elm_Gengrid_Item *elm_gengrid_item_direct_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
-
+ EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set whether items on a given gengrid widget are to get their
- * selection callbacks issued for @b every subsequent selection
- * click on them or just for the first click.
- *
- * @param obj The gengrid object
- * @param always_select @c EINA_TRUE to make items "always
- * selected", @c EINA_FALSE, otherwise
- *
- * By default, grid items will only call their selection callback
- * function when firstly getting selected, any subsequent further
- * clicks will do nothing. With this call, you make those
- * subsequent clicks also to issue the selection callbacks.
+ * @brief Unset the content of the scroller widget
*
- * @note <b>Double clicks</b> will @b always be reported on items.
+ * @param obj The slider object
+ * @return The content that was being used
*
- * @see elm_gengrid_always_select_mode_get()
+ * Unparent and return the content object which was set for this widget
*
- * @ingroup Gengrid
+ * @see elm_scroller_content_set()
*/
- EAPI void elm_gengrid_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether items on a given gengrid widget have their selection
- * callbacks issued for @b every subsequent selection click on them
- * or just for the first click.
+ * @brief Set custom theme elements for the scroller
*
- * @param obj The gengrid object.
- * @return @c EINA_TRUE if the gengrid items are "always selected",
- * @c EINA_FALSE, otherwise
+ * @param obj The scroller object
+ * @param widget The widget name to use (default is "scroller")
+ * @param base The base name to use (default is "base")
+ */
+ EAPI void elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base) EINA_ARG_NONNULL(1, 2, 3);
+ /**
+ * @brief Make the scroller minimum size limited to the minimum size of the content
*
- * @see elm_gengrid_always_select_mode_set() for more details
+ * @param obj The scroller object
+ * @param w Enable limiting minimum size horizontally
+ * @param h Enable limiting minimum size vertically
*
- * @ingroup Gengrid
+ * By default the scroller will be as small as its design allows,
+ * irrespective of its content. This will make the scroller minimum size the
+ * right size horizontally and/or vertically to perfectly fit its content in
+ * that direction.
*/
- EAPI Eina_Bool elm_gengrid_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h) EINA_ARG_NONNULL(1);
/**
- * Set whether items on a given gengrid widget can be selected or not.
+ * @brief Show a specific virtual region within the scroller content object
*
- * @param obj The gengrid object
- * @param no_select @c EINA_TRUE to make items selectable,
- * @c EINA_FALSE otherwise
+ * @param obj The scroller object
+ * @param x X coordinate of the region
+ * @param y Y coordinate of the region
+ * @param w Width of the region
+ * @param h Height of the region
*
- * This will make items in @p obj selectable or not. In the latter
- * case, any user interacion on the gendrid items will neither make
- * them appear selected nor them call their selection callback
- * functions.
+ * This will ensure all (or part if it does not fit) of the designated
+ * region in the virtual content object (0, 0 starting at the top-left of the
+ * virtual content object) is shown within the scroller.
+ */
+ EAPI void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the scrollbar visibility policy
*
- * @see elm_gengrid_no_select_mode_get()
+ * @param obj The scroller object
+ * @param policy_h Horizontal scrollbar policy
+ * @param policy_v Vertical scrollbar policy
*
- * @ingroup Gengrid
+ * This sets the scrollbar visibility policy for the given scroller.
+ * ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is
+ * needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all
+ * the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies
+ * respectively for the horizontal and vertical scrollbars.
*/
- EAPI void elm_gengrid_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1);
/**
- * Get whether items on a given gengrid widget can be selected or
- * not.
- *
- * @param obj The gengrid object
- * @return @c EINA_TRUE, if items are selectable, @c EINA_FALSE
- * otherwise
+ * @brief Gets scrollbar visibility policy
*
- * @see elm_gengrid_no_select_mode_set() for more details
+ * @param obj The scroller object
+ * @param policy_h Horizontal scrollbar policy
+ * @param policy_v Vertical scrollbar policy
*
- * @ingroup Gengrid
+ * @see elm_scroller_policy_set()
*/
- EAPI Eina_Bool elm_gengrid_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1);
/**
- * Enable or disable multi-selection in a given gengrid widget
- *
- * @param obj The gengrid object.
- * @param multi @c EINA_TRUE, to enable multi-selection,
- * @c EINA_FALSE to disable it.
+ * @brief Get the currently visible content region
*
- * Multi-selection is the ability for one to have @b more than one
- * item selected, on a given gengrid, simultaneously. When it is
- * enabled, a sequence of clicks on different items will make them
- * all selected, progressively. A click on an already selected item
- * will unselect it. If interecting via the keyboard,
- * multi-selection is enabled while holding the "Shift" key.
+ * @param obj The scroller object
+ * @param x X coordinate of the region
+ * @param y Y coordinate of the region
+ * @param w Width of the region
+ * @param h Height of the region
*
- * @note By default, multi-selection is @b disabled on gengrids
+ * This gets the current region in the content object that is visible through
+ * the scroller. The region co-ordinates are returned in the @p x, @p y, @p
+ * w, @p h values pointed to.
*
- * @see elm_gengrid_multi_select_get()
+ * @note All coordinates are relative to the content.
*
- * @ingroup Gengrid
+ * @see elm_scroller_region_show()
*/
- EAPI void elm_gengrid_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
/**
- * Get whether multi-selection is enabled or disabled for a given
- * gengrid widget
- *
- * @param obj The gengrid object.
- * @return @c EINA_TRUE, if multi-selection is enabled, @c
- * EINA_FALSE otherwise
+ * @brief Get the size of the content object
*
- * @see elm_gengrid_multi_select_set() for more details
+ * @param obj The scroller object
+ * @param w Width return
+ * @param h Height return
*
- * @ingroup Gengrid
+ * This gets the size of the content object of the scroller.
*/
- EAPI Eina_Bool elm_gengrid_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
/**
- * Enable or disable bouncing effect for a given gengrid widget
+ * @brief Set bouncing behavior
*
- * @param obj The gengrid object
- * @param h_bounce @c EINA_TRUE, to enable @b horizontal bouncing,
- * @c EINA_FALSE to disable it
- * @param v_bounce @c EINA_TRUE, to enable @b vertical bouncing,
- * @c EINA_FALSE to disable it
- *
- * The bouncing effect occurs whenever one reaches the gengrid's
- * edge's while panning it -- it will scroll past its limits a
- * little bit and return to the edge again, in a animated for,
- * automatically.
+ * @param obj The scroller object
+ * @param h_bounce Will the scroller bounce horizontally or not
+ * @param v_bounce Will the scroller bounce vertically or not
*
- * @note By default, gengrids have bouncing enabled on both axis
+ * When scrolling, the scroller may "bounce" when reaching an edge of the
+ * content object. This is a visual way to indicate the end has been reached.
+ * This is enabled by default for both axis. This will set if it is enabled
+ * for that axis with the boolean parameters for each axis.
+ */
+ EAPI void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the bounce mode
*
- * @see elm_gengrid_bounce_get()
+ * @param obj The Scroller object
+ * @param h_bounce Allow bounce horizontally
+ * @param v_bounce Allow bounce vertically
*
- * @ingroup Gengrid
+ * @see elm_scroller_bounce_set()
*/
- EAPI void elm_gengrid_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
/**
- * Get whether bouncing effects are enabled or disabled, for a
- * given gengrid widget, on each axis
- *
- * @param obj The gengrid object
- * @param h_bounce Pointer to a variable where to store the
- * horizontal bouncing flag.
- * @param v_bounce Pointer to a variable where to store the
- * vertical bouncing flag.
+ * @brief Set scroll page size relative to viewport size.
*
- * @see elm_gengrid_bounce_set() for more details
+ * @param obj The scroller object
+ * @param h_pagerel The horizontal page relative size
+ * @param v_pagerel The vertical page relative size
*
- * @ingroup Gengrid
+ * The scroller is capable of limiting scrolling by the user to "pages". That
+ * is to jump by and only show a "whole page" at a time as if the continuous
+ * area of the scroller content is split into page sized pieces. This sets
+ * the size of a page relative to the viewport of the scroller. 1.0 is "1
+ * viewport" is size (horizontally or vertically). 0.0 turns it off in that
+ * axis. This is mutually exclusive with page size
+ * (see elm_scroller_page_size_set() for more information). Likewise 0.5
+ * is "half a viewport". Sane usable valus are normally between 0.0 and 1.0
+ * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for
+ * the other axis.
*/
- EAPI void elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1);
/**
- * Set a given gengrid widget's scrolling page size, relative to
- * its viewport size.
+ * @brief Set scroll page size.
*
- * @param obj The gengrid object
- * @param h_pagerel The horizontal page (relative) size
- * @param v_pagerel The vertical page (relative) size
+ * @param obj The scroller object
+ * @param h_pagesize The horizontal page size
+ * @param v_pagesize The vertical page size
*
- * The gengrid's scroller is capable of binding scrolling by the
- * user to "pages". It means that, while scrolling and, specially
- * after releasing the mouse button, the grid will @b snap to the
- * nearest displaying page's area. When page sizes are set, the
- * grid's continuous content area is split into (equal) page sized
- * pieces.
+ * This sets the page size to an absolute fixed value, with 0 turning it off
+ * for that axis.
*
- * This function sets the size of a page <b>relatively to the
- * viewport dimensions</b> of the gengrid, for each axis. A value
- * @c 1.0 means "the exact viewport's size", in that axis, while @c
- * 0.0 turns paging off in that axis. Likewise, @c 0.5 means "half
- * a viewport". Sane usable values are, than, between @c 0.0 and @c
- * 1.0. Values beyond those will make it behave behave
- * inconsistently. If you only want one axis to snap to pages, use
- * the value @c 0.0 for the other one.
+ * @see elm_scroller_page_relative_set()
+ */
+ EAPI void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get scroll current page number.
*
- * There is a function setting page size values in @b absolute
- * values, too -- elm_gengrid_page_size_set(). Naturally, its use
- * is mutually exclusive to this one.
+ * @param obj The scroller object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
*
- * @see elm_gengrid_page_relative_get()
+ * The page number starts from 0. 0 is the first page.
+ * Current page means the page which meet the top-left of the viewport.
+ * If there are two or more pages in the viewport, it returns the number of page
+ * which meet the top-left of the viewport.
*
- * @ingroup Gengrid
+ * @see elm_scroller_last_page_get()
+ * @see elm_scroller_page_show()
+ * @see elm_scroller_page_brint_in()
*/
- EAPI void elm_gengrid_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1);
/**
- * Get a given gengrid widget's scrolling page size, relative to
- * its viewport size.
+ * @brief Get scroll last page number.
*
- * @param obj The gengrid object
- * @param h_pagerel Pointer to a variable where to store the
- * horizontal page (relative) size
- * @param v_pagerel Pointer to a variable where to store the
- * vertical page (relative) size
+ * @param obj The scroller object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
*
- * @see elm_gengrid_page_relative_set() for more details
+ * The page number starts from 0. 0 is the first page.
+ * This returns the last page number among the pages.
*
- * @ingroup Gengrid
+ * @see elm_scroller_current_page_get()
+ * @see elm_scroller_page_show()
+ * @see elm_scroller_page_brint_in()
*/
- EAPI void elm_gengrid_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1);
/**
- * Set a given gengrid widget's scrolling page size
+ * Show a specific virtual region within the scroller content object by page number.
*
- * @param obj The gengrid object
- * @param h_pagerel The horizontal page size, in pixels
- * @param v_pagerel The vertical page size, in pixels
+ * @param obj The scroller object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
*
- * The gengrid's scroller is capable of binding scrolling by the
- * user to "pages". It means that, while scrolling and, specially
- * after releasing the mouse button, the grid will @b snap to the
- * nearest displaying page's area. When page sizes are set, the
- * grid's continuous content area is split into (equal) page sized
- * pieces.
+ * 0, 0 of the indicated page is located at the top-left of the viewport.
+ * This will jump to the page directly without animation.
*
- * This function sets the size of a page of the gengrid, in pixels,
- * for each axis. Sane usable values are, between @c 0 and the
- * dimensions of @p obj, for each axis. Values beyond those will
- * make it behave behave inconsistently. If you only want one axis
- * to snap to pages, use the value @c 0 for the other one.
+ * Example of usage:
*
- * There is a function setting page size values in @b relative
- * values, too -- elm_gengrid_page_relative_set(). Naturally, its
- * use is mutually exclusive to this one.
+ * @code
+ * sc = elm_scroller_add(win);
+ * elm_scroller_content_set(sc, content);
+ * elm_scroller_page_relative_set(sc, 1, 0);
+ * elm_scroller_current_page_get(sc, &h_page, &v_page);
+ * elm_scroller_page_show(sc, h_page + 1, v_page);
+ * @endcode
*
- * @ingroup Gengrid
+ * @see elm_scroller_page_bring_in()
*/
- EAPI void elm_gengrid_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1);
/**
- * Set for what direction a given gengrid widget will expand while
- * placing its items.
+ * Show a specific virtual region within the scroller content object by page number.
*
- * @param obj The gengrid object.
- * @param setting @c EINA_TRUE to make the gengrid expand
- * horizontally, @c EINA_FALSE to expand vertically.
+ * @param obj The scroller object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
*
- * When in "horizontal mode" (@c EINA_TRUE), items will be placed
- * in @b columns, from top to bottom and, when the space for a
- * column is filled, another one is started on the right, thus
- * expanding the grid horizontally. When in "vertical mode"
- * (@c EINA_FALSE), though, items will be placed in @b rows, from left
- * to right and, when the space for a row is filled, another one is
- * started below, thus expanding the grid vertically.
+ * 0, 0 of the indicated page is located at the top-left of the viewport.
+ * This will slide to the page with animation.
*
- * @see elm_gengrid_horizontal_get()
+ * Example of usage:
*
- * @ingroup Gengrid
+ * @code
+ * sc = elm_scroller_add(win);
+ * elm_scroller_content_set(sc, content);
+ * elm_scroller_page_relative_set(sc, 1, 0);
+ * elm_scroller_last_page_get(sc, &h_page, &v_page);
+ * elm_scroller_page_bring_in(sc, h_page, v_page);
+ * @endcode
+ *
+ * @see elm_scroller_page_show()
*/
- EAPI void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1);
/**
- * Get for what direction a given gengrid widget will expand while
- * placing its items.
+ * @brief Show a specific virtual region within the scroller content object.
*
- * @param obj The gengrid object.
- * @return @c EINA_TRUE, if @p obj is set to expand horizontally,
- * @c EINA_FALSE if it's set to expand vertically.
+ * @param obj The scroller object
+ * @param x X coordinate of the region
+ * @param y Y coordinate of the region
+ * @param w Width of the region
+ * @param h Height of the region
*
- * @see elm_gengrid_horizontal_set() for more detais
+ * This will ensure all (or part if it does not fit) of the designated
+ * region in the virtual content object (0, 0 starting at the top-left of the
+ * virtual content object) is shown within the scroller. Unlike
+ * elm_scroller_region_show(), this allow the scroller to "smoothly slide"
+ * to this location (if configuration in general calls for transitions). It
+ * may not jump immediately to the new location and make take a while and
+ * show other content along the way.
*
- * @ingroup Gengrid
+ * @see elm_scroller_region_show()
*/
- EAPI Eina_Bool elm_gengrid_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
/**
- * Get the first item in a given gengrid widget
- *
- * @param obj The gengrid object
- * @return The first item's handle or @c NULL, if there are no
- * items in @p obj (and on errors)
- *
- * This returns the first item in the @p obj's internal list of
- * items.
+ * @brief Set event propagation on a scroller
*
- * @see elm_gengrid_last_item_get()
+ * @param obj The scroller object
+ * @param propagation If propagation is enabled or not
*
- * @ingroup Gengrid
+ * This enables or disabled event propagation from the scroller content to
+ * the scroller and its parent. By default event propagation is disabled.
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation);
/**
- * Get the last item in a given gengrid widget
- *
- * @param obj The gengrid object
- * @return The last item's handle or @c NULL, if there are no
- * items in @p obj (and on errors)
+ * @brief Get event propagation for a scroller
*
- * This returns the last item in the @p obj's internal list of
- * items.
+ * @param obj The scroller object
+ * @return The propagation state
*
- * @see elm_gengrid_first_item_get()
+ * This gets the event propagation for a scroller.
*
- * @ingroup Gengrid
+ * @see elm_scroller_propagate_events_set()
+ */
+ EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj);
+ /**
+ * @}
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the @b next item in a gengrid widget's internal list of items,
- * given a handle to one of those items.
+ * @defgroup Label Label
*
- * @param item The gengrid item to fetch next from
- * @return The item after @p item, or @c NULL if there's none (and
- * on errors)
+ * @image html img/widget/label/preview-00.png
+ * @image latex img/widget/label/preview-00.eps
*
- * This returns the item placed after the @p item, on the container
- * gengrid.
+ * @brief Widget to display text, with simple html-like markup.
*
- * @see elm_gengrid_item_prev_get()
+ * The Label widget @b doesn't allow text to overflow its boundaries, if the
+ * text doesn't fit the geometry of the label it will be ellipsized or be
+ * cut. Elementary provides several themes for this widget:
+ * @li default - No animation
+ * @li marker - Centers the text in the label and make it bold by default
+ * @li slide_long - The entire text appears from the right of the screen and
+ * slides until it disappears in the left of the screen(reappering on the
+ * right again).
+ * @li slide_short - The text appears in the left of the label and slides to
+ * the right to show the overflow. When all of the text has been shown the
+ * position is reset.
+ * @li slide_bounce - The text appears in the left of the label and slides to
+ * the right to show the overflow. When all of the text has been shown the
+ * animation reverses, moving the text to the left.
*
- * @ingroup Gengrid
+ * Custom themes can of course invent new markup tags and style them any way
+ * they like.
+ *
+ * See @ref tutorial_label for a demonstration of how to use a label widget.
+ * @{
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_next_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
/**
- * Get the @b previous item in a gengrid widget's internal list of items,
- * given a handle to one of those items.
- *
- * @param item The gengrid item to fetch previous from
- * @return The item before @p item, or @c NULL if there's none (and
- * on errors)
+ * @brief Add a new label to the parent
*
- * This returns the item placed before the @p item, on the container
- * gengrid.
- *
- * @see elm_gengrid_item_next_get()
- *
- * @ingroup Gengrid
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_item_prev_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_label_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Get the gengrid object's handle which contains a given gengrid
- * item
- *
- * @param item The item to fetch the container from
- * @return The gengrid (parent) object
- *
- * This returns the gengrid object itself that an item belongs to.
+ * @brief Set the label on the label object
*
- * @ingroup Gengrid
+ * @param obj The label object
+ * @param label The label will be used on the label object
+ * @deprecated See elm_object_text_set()
*/
- EAPI Evas_Object *elm_gengrid_item_gengrid_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EINA_DEPRECATED EAPI void elm_label_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); /* deprecated, use elm_object_text_set instead */
/**
- * Remove a gengrid item from the its parent, deleting it.
+ * @brief Get the label used on the label object
*
- * @param item The item to be removed.
- * @return @c EINA_TRUE on success or @c EINA_FALSE, otherwise.
+ * @param obj The label object
+ * @return The string inside the label
+ * @deprecated See elm_object_text_get()
+ */
+ EINA_DEPRECATED EAPI const char *elm_label_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /* deprecated, use elm_object_text_get instead */
+ /**
+ * @brief Set the wrapping behavior of the label
*
- * @see elm_gengrid_clear(), to remove all items in a gengrid at
- * once.
+ * @param obj The label object
+ * @param wrap To wrap text or not
*
- * @ingroup Gengrid
+ * 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
*/
- EAPI void elm_gengrid_item_del(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
/**
- * Update the contents of a given gengrid item
- *
- * @param item The gengrid item
+ * @brief Get the wrapping behavior of the label
*
- * This updates an item by calling all the item class functions
- * again to get the icons, labels and states. Use this when the
- * original item data has changed and you want thta changes to be
- * reflected.
+ * @param obj The label object
+ * @return Wrap type
*
- * @ingroup Gengrid
+ * @see elm_label_line_wrap_set()
*/
- EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
- EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
- EAPI void elm_gengrid_item_item_class_set(Elm_Gengrid_Item *item, const Elm_Gengrid_Item_Class *gic) EINA_ARG_NONNULL(1, 2);
-
+ EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Return the data associated to a given gengrid item
- *
- * @param item The gengrid item.
- * @return the data associated to this item.
+ * @brief Set wrap width of the label
*
- * This returns the @c data value passed on the
- * elm_gengrid_item_append() and related item addition calls.
+ * @param obj The label object
+ * @param w The wrap width in pixels at a minimum where words need to wrap
*
- * @see elm_gengrid_item_append()
- * @see elm_gengrid_item_data_set()
+ * This function sets the maximum width size hint of the label.
*
- * @ingroup Gengrid
+ * @warning This is only relevant if the label is inside a container.
*/
- EAPI void *elm_gengrid_item_data_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w) EINA_ARG_NONNULL(1);
/**
- * Set the data associated to a given gengrid item
- *
- * @param item The gengrid item
- * @param data The new data pointer to set on it
- *
- * This @b overrides the @c data value passed on the
- * elm_gengrid_item_append() and related item addition calls. This
- * function @b won't call elm_gengrid_item_update() automatically,
- * so you'd issue it afterwards if you want to hove the item
- * updated to reflect the that new data.
+ * @brief Get wrap width of the label
*
- * @see elm_gengrid_item_data_get()
+ * @param obj The label object
+ * @return The wrap width in pixels at a minimum where words need to wrap
*
- * @ingroup Gengrid
+ * @see elm_label_wrap_width_set()
*/
- EAPI void elm_gengrid_item_data_set(Elm_Gengrid_Item *item, const void *data) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get a given gengrid item's position, relative to the whole
- * gengrid's grid area.
+ * @brief Set wrap height of the label
*
- * @param item The Gengrid item.
- * @param x Pointer to variable where to store the item's <b>row
- * number</b>.
- * @param y Pointer to variable where to store the item's <b>column
- * number</b>.
+ * @param obj The label object
+ * @param h The wrap height in pixels at a minimum where words need to wrap
*
- * This returns the "logical" position of the item whithin the
- * gengrid. For example, @c (0, 1) would stand for first row,
- * second column.
+ * This function sets the maximum height size hint of the label.
*
- * @ingroup Gengrid
+ * @warning This is only relevant if the label is inside a container.
*/
- EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_Item *item, unsigned int *x, unsigned int *y) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_wrap_height_set(Evas_Object *obj, Evas_Coord h) EINA_ARG_NONNULL(1);
/**
- * Set whether a given gengrid item is selected or not
- *
- * @param item The gengrid item
- * @param selected Use @c EINA_TRUE, to make it selected, @c
- * EINA_FALSE to make it unselected
+ * @brief get wrap width of the label
*
- * This sets the selected state of an item. If multi selection is
- * not enabled on the containing gengrid and @p selected is @c
- * EINA_TRUE, any other previously selected items will get
- * unselected in favor of this new one.
+ * @param obj The label object
+ * @return The wrap height in pixels at a minimum where words need to wrap
+ */
+ EAPI Evas_Coord elm_label_wrap_height_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the font size on the label object.
*
- * @see elm_gengrid_item_selected_get()
+ * @param obj The label object
+ * @param size font size
*
- * @ingroup Gengrid
+ * @warning NEVER use this. It is for hyper-special cases only. use styles
+ * instead. e.g. "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
*/
- EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_fontsize_set(Evas_Object *obj, int fontsize) EINA_ARG_NONNULL(1);
/**
- * Get whether a given gengrid item is selected or not
- *
- * @param item The gengrid item
- * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
+ * @brief Set the text color on the label object
*
- * @see elm_gengrid_item_selected_set() for more details
+ * @param obj The label object
+ * @param r Red property background color of The label object
+ * @param g Green property background color of The label object
+ * @param b Blue property background color of The label object
+ * @param a Alpha property background color of The label object
*
- * @ingroup Gengrid
+ * @warning NEVER use this. It is for hyper-special cases only. use styles
+ * instead. e.g. "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
*/
- EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a) EINA_ARG_NONNULL(1);
/**
- * Get the real Evas object created to implement the view of a
- * given gengrid item
+ * @brief Set the text align on the label object
*
- * @param item The gengrid item.
- * @return the Evas object implementing this item's view.
+ * @param obj The label object
+ * @param align align mode ("left", "center", "right")
*
- * This returns the actual Evas object used to implement the
- * specified gengrid item's view. This may be @c NULL, as it may
- * not have been created or may have been deleted, at any time, by
- * the gengrid. <b>Do not modify this object</b> (move, resize,
- * show, hide, etc.), as the gengrid is controlling it. This
- * function is for querying, emitting custom signals or hooking
- * lower level callbacks for events on that object. Do not delete
- * this object under any circumstances.
+ * @warning NEVER use this. It is for hyper-special cases only. use styles
+ * instead. e.g. "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
+ */
+ EAPI void elm_label_text_align_set(Evas_Object *obj, const char *alignmode) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set background color of the label
*
- * @see elm_gengrid_item_data_get()
+ * @param obj The label object
+ * @param r Red property background color of The label object
+ * @param g Green property background color of The label object
+ * @param b Blue property background color of The label object
+ * @param a Alpha property background alpha of The label object
*
- * @ingroup Gengrid
+ * @warning NEVER use this. It is for hyper-special cases only. use styles
+ * instead. e.g. "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
*/
- EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a) EINA_ARG_NONNULL(1);
/**
- * Show the portion of a gengrid's internal grid containing a given
- * item, @b immediately.
- *
- * @param item The item to display
+ * @brief Set the ellipsis behavior of the label
*
- * This causes gengrid to @b redraw its viewport's contents to the
- * region contining the given @p item item, if it is not fully
- * visible.
+ * @param obj The label object
+ * @param ellipsis To ellipsis text or not
*
- * @see elm_gengrid_item_bring_in()
+ * If set to true and the text doesn't fit in the label an ellipsis("...")
+ * will be shown at the end of the widget.
*
- * @ingroup Gengrid
+ * @warning This doesn't work with slide(elm_label_slide_set()) or if the
+ * choosen wrap method was ELM_WRAP_WORD.
*/
- EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis) EINA_ARG_NONNULL(1);
/**
- * Animatedly bring in, to the visible are of a gengrid, a given
- * item on it.
- *
- * @param item The gengrid item to display
+ * @brief Set the text slide of the label
*
- * This causes gengrig to jump to the given @p item item and show
- * it (by scrolling), if it is not fully visible. This will use
- * animation to do so and take a period of time to complete.
+ * @param obj The label object
+ * @param slide To start slide or stop
*
- * @see elm_gengrid_item_show()
+ * If set to true the text of the label will slide throught the length of
+ * label.
*
- * @ingroup Gengrid
+ * @warning This only work with the themes "slide_short", "slide_long" and
+ * "slide_bounce".
*/
- EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide) EINA_ARG_NONNULL(1);
/**
- * Set whether a given gengrid item is disabled or not.
- *
- * @param item The gengrid item
- * @param disabled Use @c EINA_TRUE, true disable it, @c EINA_FALSE
- * to enable it back.
- *
- * A disabled item cannot be selected or unselected. It will also
- * change its appearance, to signal the user it's disabled.
+ * @brief Get the text slide mode of the label
*
- * @see elm_gengrid_item_disabled_get()
+ * @param obj The label object
+ * @return slide slide mode value
*
- * @ingroup Gengrid
+ * @see elm_label_slide_set()
*/
- EAPI void elm_gengrid_item_disabled_set(Elm_Gengrid_Item *item, Eina_Bool disabled) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether a given gengrid item is disabled or not.
+ * @brief Set the slide duration(speed) of the label
*
- * @param item The gengrid item
- * @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise
- * (and on errors).
+ * @param obj The label object
+ * @return The duration in seconds in moving text from slide begin position
+ * to slide end position
+ */
+ EAPI void elm_label_slide_duration_set(Evas_Object *obj, double duration) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the slide duration(speed) of the label
*
- * @see elm_gengrid_item_disabled_set() for more details
+ * @param obj The label object
+ * @return The duration time in moving text from slide begin position to slide end position
*
- * @ingroup Gengrid
+ * @see elm_label_slide_duration_set()
+ */
+ EAPI double elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @}
*/
- EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
/**
- * Set the text to be shown in a given gengrid item's tooltips.
+ * @defgroup Toggle Toggle
*
- * @param item The gengrid item
- * @param text The text to set in the content
+ * @image html img/widget/toggle/preview-00.png
+ * @image latex img/widget/toggle/preview-00.eps
*
- * This call will setup the text to be used as tooltip to that item
- * (analogous to elm_object_tooltip_text_set(), but being item
- * tooltips with higher precedence than object tooltips). It can
- * have only one tooltip at a time, so any previous tooltip data
- * will get removed.
+ * @brief A toggle is a slider which can be used to toggle between
+ * two values. It has two states: on and off.
*
- * @ingroup Gengrid
+ * Signals that you can add callbacks for are:
+ * @li "changed" - Whenever the toggle value has been changed. Is not called
+ * until the toggle is released by the cursor (assuming it
+ * has been triggered by the cursor in the first place).
+ *
+ * @ref tutorial_toggle show how to use a toggle.
+ * @{
*/
- EAPI void elm_gengrid_item_tooltip_text_set(Elm_Gengrid_Item *item, const char *text) EINA_ARG_NONNULL(1);
-
/**
- * Set the content to be shown in a given gengrid item's tooltips
+ * @brief Add a toggle to @p parent.
*
- * @param item The gengrid item.
- * @param func The function returning the tooltip contents.
- * @param data What to provide to @a func as callback data/context.
- * @param del_cb Called when data is not needed anymore, either when
- * another callback replaces @p func, the tooltip is unset with
- * elm_gengrid_item_tooltip_unset() or the owner @p item
- * dies. This callback receives as its first parameter the
- * given @p data, being @c event_info the item handle.
+ * @param parent The parent object
*
- * This call will setup the tooltip's contents to @p item
- * (analogous to elm_object_tooltip_content_cb_set(), but being
- * item tooltips with higher precedence than object tooltips). It
- * can have only one tooltip at a time, so any previous tooltip
- * content will get removed. @p func (with @p data) will be called
- * every time Elementary needs to show the tooltip and it should
- * return a valid Evas object, which will be fully managed by the
- * tooltip system, getting deleted when the tooltip is gone.
+ * @return The toggle object
+ */
+ EAPI Evas_Object *elm_toggle_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets the label to be displayed with the toggle.
*
- * @ingroup Gengrid
+ * @param obj The toggle object
+ * @param label The label to be displayed
+ *
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_Gengrid_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1);
-
+ EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
/**
- * Unset a tooltip from a given gengrid item
+ * @brief Gets the label of the toggle
*
- * @param item gengrid item to remove a previously set tooltip from.
+ * @param obj toggle object
+ * @return The label of the toggle
*
- * This call removes any tooltip set on @p item. The callback
- * provided as @c del_cb to
- * elm_gengrid_item_tooltip_content_cb_set() will be called to
- * notify it is not used anymore (and have resources cleaned, if
- * need be).
+ * @deprecated use elm_object_text_get() instead.
+ */
+ EINA_DEPRECATED EAPI const char *elm_toggle_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the icon used for the toggle
*
- * @see elm_gengrid_item_tooltip_content_cb_set()
+ * @param obj The toggle object
+ * @param icon The icon object for the button
*
- * @ingroup Gengrid
+ * Once the icon object is set, a previously set one will be deleted
+ * If you want to keep that old content object, use the
+ * elm_toggle_icon_unset() function.
*/
- EAPI void elm_gengrid_item_tooltip_unset(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
- * Set a different @b style for a given gengrid item's tooltip.
+ * @brief Get the icon used for the toggle
*
- * @param item gengrid item with tooltip set
- * @param style the <b>theme style</b> to use on tooltips (e.g. @c
- * "default", @c "transparent", etc)
+ * @param obj The toggle object
+ * @return The icon object that is being used
*
- * Tooltips can have <b>alternate styles</b> to be displayed on,
- * which are defined by the theme set on Elementary. This function
- * works analogously as elm_object_tooltip_style_set(), but here
- * applied only to gengrid item objects. The default style for
- * tooltips is @c "default".
+ * Return the icon object which is set for this widget.
*
- * @note before you set a style you should define a tooltip with
- * elm_gengrid_item_tooltip_content_cb_set() or
- * elm_gengrid_item_tooltip_text_set()
+ * @see elm_toggle_icon_set()
+ */
+ EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Unset the icon used for the toggle
*
- * @see elm_gengrid_item_tooltip_style_get()
+ * @param obj The toggle object
+ * @return The icon object that was being used
*
- * @ingroup Gengrid
+ * Unparent and return the icon object which was set for this widget.
+ *
+ * @see elm_toggle_icon_set()
*/
- EAPI void elm_gengrid_item_tooltip_style_set(Elm_Gengrid_Item *item, const char *style) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the style set a given gengrid item's tooltip.
+ * @brief Sets the labels to be associated with the on and off states of the toggle.
*
- * @param item gengrid item with tooltip already set on.
- * @return style the theme style in use, which defaults to
- * "default". If the object does not have a tooltip set,
- * then @c NULL is returned.
+ * @param obj The toggle object
+ * @param onlabel The label displayed when the toggle is in the "on" state
+ * @param offlabel The label displayed when the toggle is in the "off" state
+ */
+ EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Gets the labels associated with the on and off states of the toggle.
*
- * @see elm_gengrid_item_tooltip_style_set() for more details
+ * @param obj The toggle object
+ * @param onlabel A char** to place the onlabel of @p obj into
+ * @param offlabel A char** to place the offlabel of @p obj into
+ */
+ EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets the state of the toggle to @p state.
*
- * @ingroup Gengrid
+ * @param obj The toggle object
+ * @param state The state of @p obj
*/
- EAPI const char *elm_gengrid_item_tooltip_style_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+ EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1);
/**
- * @brief Disable size restrictions on an object's tooltip
- * @param item The tooltip's anchor object
- * @param disable If EINA_TRUE, size restrictions are disabled
- * @return EINA_FALSE on failure, EINA_TRUE on success
+ * @brief Gets the state of the toggle to @p state.
*
- * This function allows a tooltip to expand beyond its parant window's canvas.
- * It will instead be limited only by the size of the display.
+ * @param obj The toggle object
+ * @return The state of @p obj
*/
- EAPI Eina_Bool elm_gengrid_item_tooltip_size_restrict_disable(Elm_Gengrid_Item *item, Eina_Bool disable);
+ EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Retrieve size restriction state of an object's tooltip
- * @param item The tooltip's anchor object
- * @return If EINA_TRUE, size restrictions are disabled
+ * @brief Sets the state pointer of the toggle to @p statep.
*
- * This function returns whether a tooltip is allowed to expand beyond
- * its parant window's canvas.
- * It will instead be limited only by the size of the display.
+ * @param obj The toggle object
+ * @param statep The state pointer of @p obj
*/
- EAPI Eina_Bool elm_gengrid_item_tooltip_size_restrict_disabled_get(const Elm_Gengrid_Item *item);
+ EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1);
/**
- * Set the type of mouse pointer/cursor decoration to be shown,
- * when the mouse pointer is over the given gengrid widget item
+ * @}
+ */
+
+ /**
+ * @defgroup Frame Frame
*
- * @param item gengrid item to customize cursor on
- * @param cursor the cursor type's name
+ * @image html img/widget/frame/preview-00.png
+ * @image latex img/widget/frame/preview-00.eps
*
- * This function works analogously as elm_object_cursor_set(), but
- * here the cursor's changing area is restricted to the item's
- * area, and not the whole widget's. Note that that item cursors
- * have precedence over widget cursors, so that a mouse over @p
- * item will always show cursor @p type.
+ * @brief Frame is a widget that holds some content and has a title.
*
- * If this function is called twice for an object, a previously set
- * cursor will be unset on the second call.
+ * The default look is a frame with a title, but Frame supports multple
+ * styles:
+ * @li default
+ * @li pad_small
+ * @li pad_medium
+ * @li pad_large
+ * @li pad_huge
+ * @li outdent_top
+ * @li outdent_bottom
*
- * @see elm_object_cursor_set()
- * @see elm_gengrid_item_cursor_get()
- * @see elm_gengrid_item_cursor_unset()
+ * Of all this styles only default shows the title. Frame emits no signals.
*
- * @ingroup Gengrid
+ * For a detailed example see the @ref tutorial_frame.
+ *
+ * @{
*/
- EAPI void elm_gengrid_item_cursor_set(Elm_Gengrid_Item *item, const char *cursor) EINA_ARG_NONNULL(1);
-
/**
- * Get the type of mouse pointer/cursor decoration set to be shown,
- * when the mouse pointer is over the given gengrid widget item
+ * @brief Add a new frame to the parent
*
- * @param item gengrid item with custom cursor set
- * @return the cursor type's name or @c NULL, if no custom cursors
- * were set to @p item (and on errors)
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_frame_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the frame label
*
- * @see elm_object_cursor_get()
- * @see elm_gengrid_item_cursor_set() for more details
- * @see elm_gengrid_item_cursor_unset()
+ * @param obj The frame object
+ * @param label The label of this frame object
*
- * @ingroup Gengrid
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI const char *elm_gengrid_item_cursor_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EINA_DEPRECATED EAPI void elm_frame_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
/**
- * Unset any custom mouse pointer/cursor decoration set to be
- * shown, when the mouse pointer is over the given gengrid widget
- * item, thus making it show the @b default cursor again.
- *
- * @param item a gengrid item
+ * @brief Get the frame label
*
- * Use this call to undo any custom settings on this item's cursor
- * decoration, bringing it back to defaults (no custom style set).
+ * @param obj The frame object
*
- * @see elm_object_cursor_unset()
- * @see elm_gengrid_item_cursor_set() for more details
+ * @return The label of this frame objet or NULL if unable to get frame
*
- * @ingroup Gengrid
+ * @deprecated use elm_object_text_get() instead.
*/
- EAPI void elm_gengrid_item_cursor_unset(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EINA_DEPRECATED EAPI const char *elm_frame_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set a different @b style for a given custom cursor set for a
- * gengrid item.
+ * @brief Set the content of the frame widget
*
- * @param item gengrid item with custom cursor set
- * @param style the <b>theme style</b> to use (e.g. @c "default",
- * @c "transparent", etc)
+ * 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_frame_content_unset() function.
*
- * This function only makes sense when one is using custom mouse
- * cursor decorations <b>defined in a theme file</b> , which can
- * have, given a cursor name/type, <b>alternate styles</b> on
- * it. It works analogously as elm_object_cursor_style_set(), but
- * here applied only to gengrid item objects.
+ * @param obj The frame object
+ * @param content The content will be filled in this frame object
+ */
+ EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the content of the frame widget
*
- * @warning Before you set a cursor style you should have defined a
- * custom cursor previously on the item, with
- * elm_gengrid_item_cursor_set()
+ * Return the content object which is set for this widget
*
- * @see elm_gengrid_item_cursor_engine_only_set()
- * @see elm_gengrid_item_cursor_style_get()
+ * @param obj The frame object
+ * @return The content that is being used
+ */
+ EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Unset the content of the frame widget
*
- * @ingroup Gengrid
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The frame object
+ * @return The content that was being used
+ */
+ EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @}
*/
- EAPI void elm_gengrid_item_cursor_style_set(Elm_Gengrid_Item *item, const char *style) EINA_ARG_NONNULL(1);
/**
- * Get the current @b style set for a given gengrid item's custom
- * cursor
+ * @defgroup Table Table
*
- * @param item gengrid item with custom cursor set.
- * @return style the cursor style in use. If the object does not
- * have a cursor set, then @c NULL is returned.
+ * A container widget to arrange other widgets in a table where items can
+ * also span multiple columns or rows - even overlap (and then be raised or
+ * lowered accordingly to adjust stacking if they do overlap).
*
- * @see elm_gengrid_item_cursor_style_set() for more details
+ * The followin are examples of how to use a table:
+ * @li @ref tutorial_table_01
+ * @li @ref tutorial_table_02
*
- * @ingroup Gengrid
+ * @{
*/
- EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
/**
- * Set if the (custom) cursor for a given gengrid item should be
- * searched in its theme, also, or should only rely on the
- * rendering engine.
- *
- * @param item item with custom (custom) cursor already set on
- * @param engine_only Use @c EINA_TRUE to have cursors looked for
- * only on those provided by the rendering engine, @c EINA_FALSE to
- * have them searched on the widget's theme, as well.
+ * @brief Add a new table to the parent
*
- * @note This call is of use only if you've set a custom cursor
- * for gengrid items, with elm_gengrid_item_cursor_set().
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_table_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the homogeneous layout in the table
*
- * @note By default, cursors will only be looked for between those
- * provided by the rendering engine.
+ * @param obj The layout object
+ * @param homogeneous A boolean to set if the layout is homogeneous in the
+ * table (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
+ */
+ EAPI void elm_table_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the current table homogeneous mode.
*
- * @ingroup Gengrid
+ * @param obj The table object
+ * @return A boolean to indicating if the layout is homogeneous in the table
+ * (EINA_TRUE = homogeneous, EINA_FALSE = no homogeneous)
*/
- EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Gengrid_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_table_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get if the (custom) cursor for a given gengrid item is being
- * searched in its theme, also, or is only relying on the rendering
- * engine.
+ * @warning <b>Use elm_table_homogeneous_set() instead</b>
+ */
+ EINA_DEPRECATED EAPI void elm_table_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) EINA_ARG_NONNULL(1);
+ /**
+ * @warning <b>Use elm_table_homogeneous_get() instead</b>
+ */
+ EINA_DEPRECATED EAPI Eina_Bool elm_table_homogenous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set padding between cells.
*
- * @param item a gengrid item
- * @return @c EINA_TRUE, if cursors are being looked for only on
- * those provided by the rendering engine, @c EINA_FALSE if they
- * are being searched on the widget's theme, as well.
+ * @param obj The layout object.
+ * @param horizontal set the horizontal padding.
+ * @param vertical set the vertical padding.
*
- * @see elm_gengrid_item_cursor_engine_only_set(), for more details
+ * Default value is 0.
+ */
+ EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get padding between cells.
*
- * @ingroup Gengrid
+ * @param obj The layout object.
+ * @param horizontal set the horizontal padding.
+ * @param vertical set the vertical padding.
*/
- EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
/**
- * Remove all items from a given gengrid widget
+ * @brief Add a subobject on the table with the coordinates passed
*
- * @param obj The gengrid object.
+ * @param obj The table object
+ * @param subobj The subobject to be added to the table
+ * @param x Row number
+ * @param y Column number
+ * @param w rowspan
+ * @param h colspan
*
- * This removes (and deletes) all items in @p obj, leaving it
- * empty.
+ * @note All positioning inside the table is relative to rows and columns, so
+ * a value of 0 for x and y, means the top left cell of the table, and a
+ * value of 1 for w and h means @p subobj only takes that 1 cell.
+ */
+ EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Remove child from table.
*
- * @see elm_gengrid_item_del(), to remove just one item.
+ * @param obj The table object
+ * @param subobj The subobject
+ */
+ EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Faster way to remove all child objects from a table object.
*
- * @ingroup Gengrid
+ * @param obj The table object
+ * @param clear If true, will delete children, else just remove from table.
*/
- EAPI void elm_gengrid_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1);
/**
- * Get the selected item in a given gengrid widget
+ * @brief Set the packing location of an existing child of the table
*
- * @param obj The gengrid object.
- * @return The selected item's handleor @c NULL, if none is
- * selected at the moment (and on errors)
+ * @param subobj The subobject to be modified in the table
+ * @param x Row number
+ * @param y Column number
+ * @param w rowspan
+ * @param h colspan
*
- * This returns the selected item in @p obj. If multi selection is
- * enabled on @p obj (@see elm_gengrid_multi_select_set()), only
- * the first item in the list is selected, which might not be very
- * useful. For that case, see elm_gengrid_selected_items_get().
+ * Modifies the position of an object already in the table.
*
- * @ingroup Gengrid
+ * @note All positioning inside the table is relative to rows and columns, so
+ * a value of 0 for x and y, means the top left cell of the table, and a
+ * value of 1 for w and h means @p subobj only takes that 1 cell.
*/
- EAPI Elm_Gengrid_Item *elm_gengrid_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
/**
- * Get <b>a list</b> of selected items in a given gengrid
- *
- * @param obj The gengrid object.
- * @return The list of selected items or @c NULL, if none is
- * selected at the moment (and on errors)
- *
- * This returns a list of the selected items, in the order that
- * they appear in the grid. This list is only valid as long as no
- * more items are selected or unselected (or unselected implictly
- * by deletion). The list contains #Elm_Gengrid_Item pointers as
- * data, naturally.
+ * @brief Get the packing location of an existing child of the table
*
- * @see elm_gengrid_selected_item_get()
+ * @param subobj The subobject to be modified in the table
+ * @param x Row number
+ * @param y Column number
+ * @param w rowspan
+ * @param h colspan
*
- * @ingroup Gengrid
+ * @see elm_table_pack_set()
*/
- EAPI const Eina_List *elm_gengrid_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
/**
* @}
*/
/**
- * @defgroup Clock Clock
- *
- * @image html img/widget/clock/preview-00.png
- * @image latex img/widget/clock/preview-00.eps
- *
- * This is a @b digital clock widget. In its default theme, it has a
- * vintage "flipping numbers clock" appearance, which will animate
- * sheets of individual algarisms individually as time goes by.
+ * @defgroup Gengrid Gengrid (Generic grid)
*
- * A newly created clock will fetch system's time (already
- * considering local time adjustments) to start with, and will tick
- * accondingly. It may or may not show seconds.
+ * This widget aims to position objects in a grid layout while
+ * actually creating and rendering only the visible ones, using the
+ * same idea as the @ref Genlist "genlist": the user defines a @b
+ * class for each item, specifying functions that will be called at
+ * object creation, deletion, etc. When those items are selected by
+ * the user, a callback function is issued. Users may interact with
+ * a gengrid via the mouse (by clicking on items to select them and
+ * clicking on the grid's viewport and swiping to pan the whole
+ * view) or via the keyboard, navigating through item with the
+ * arrow keys.
*
- * Clocks have an @b edition mode. When in it, the sheets will
- * display extra arrow indications on the top and bottom and the
- * user may click on them to raise or lower the time values. After
- * it's told to exit edition mode, it will keep ticking with that
- * new time set (it keeps the difference from local time).
+ * @section Gengrid_Layouts Gengrid layouts
*
- * Also, when under edition mode, user clicks on the cited arrows
- * which are @b held for some time will make the clock to flip the
- * sheet, thus editing the time, continuosly and automatically for
- * the user. The interval between sheet flips will keep growing in
- * time, so that it helps the user to reach a time which is distant
- * from the one set.
+ * Gengrids may layout its items in one of two possible layouts:
+ * - horizontal or
+ * - vertical.
*
- * The time display is, by default, in military mode (24h), but an
- * am/pm indicator may be optionally shown, too, when it will
- * switch to 12h.
+ * When in "horizontal mode", items will be placed in @b columns,
+ * from top to bottom and, when the space for a column is filled,
+ * another one is started on the right, thus expanding the grid
+ * horizontally, making for horizontal scrolling. When in "vertical
+ * mode" , though, items will be placed in @b rows, from left to
+ * right and, when the space for a row is filled, another one is
+ * started below, thus expanding the grid vertically (and making
+ * for vertical scrolling).
*
- * Smart callbacks one can register to:
- * - "changed" - the clock's user changed the time
+ * @section Gengrid_Items Gengrid items
*
- * Here is an example on its usage:
- * @li @ref clock_example
- */
-
- /**
- * @addtogroup Clock
+ * An item in a gengrid can have 0 or more text labels (they can be
+ * regular text or textblock Evas objects - that's up to the style
+ * to determine), 0 or more icons (which are simply objects
+ * swallowed into the gengrid item's theming Edje object) and 0 or
+ * more <b>boolean states</b>, which have the behavior left to the
+ * user to define. The Edje part names for each of these properties
+ * will be looked up, in the theme file for the gengrid, under the
+ * Edje (string) data items named @c "labels", @c "icons" and @c
+ * "states", respectively. For each of those properties, if more
+ * than one part is provided, they must have names listed separated
+ * by spaces in the data fields. For the default gengrid item
+ * theme, we have @b one label part (@c "elm.text"), @b two icon
+ * parts (@c "elm.swalllow.icon" and @c "elm.swallow.end") and @b
+ * no state parts.
+ *
+ * A gengrid item may be at one of several styles. Elementary
+ * provides one by default - "default", but this can be extended by
+ * system or application custom themes/overlays/extensions (see
+ * @ref Theme "themes" for more details).
+ *
+ * @section Gengrid_Item_Class Gengrid item classes
+ *
+ * In order to have the ability to add and delete items on the fly,
+ * gengrid implements a class (callback) system where the
+ * application provides a structure with information about that
+ * type of item (gengrid may contain multiple different items with
+ * different classes, states and styles). Gengrid will call the
+ * functions in this struct (methods) when an item is "realized"
+ * (i.e., created dynamically, while the user is scrolling the
+ * grid). All objects will simply be deleted when no longer needed
+ * with evas_object_del(). The #Elm_GenGrid_Item_Class structure
+ * contains the following members:
+ * - @c item_style - This is a constant string and simply defines
+ * the name of the item style. It @b must be specified and the
+ * default should be @c "default".
+ * - @c func.label_get - This function is called when an item
+ * object is actually created. The @c data parameter will point to
+ * the same data passed to elm_gengrid_item_append() and related
+ * item creation functions. The @c obj parameter is the gengrid
+ * object itself, while the @c part one is the name string of one
+ * of the existing text parts in the Edje group implementing the
+ * item's theme. This function @b must return a strdup'()ed string,
+ * as the caller will free() it when done. See
+ * #Elm_Gengrid_Item_Label_Get_Cb.
+ * - @c func.icon_get - This function is called when an item object
+ * is actually created. The @c data parameter will point to the
+ * same data passed to elm_gengrid_item_append() and related item
+ * creation functions. The @c obj parameter is the gengrid object
+ * itself, while the @c part one is the name string of one of the
+ * existing (icon) swallow parts in the Edje group implementing the
+ * item's theme. It must return @c NULL, when no icon is desired,
+ * or a valid object handle, otherwise. The object will be deleted
+ * by the gengrid on its deletion or when the item is "unrealized".
+ * See #Elm_Gengrid_Item_Icon_Get_Cb.
+ * - @c func.state_get - This function is called when an item
+ * object is actually created. The @c data parameter will point to
+ * the same data passed to elm_gengrid_item_append() and related
+ * item creation functions. The @c obj parameter is the gengrid
+ * object itself, while the @c part one is the name string of one
+ * of the state parts in the Edje group implementing the item's
+ * theme. Return @c EINA_FALSE for false/off or @c EINA_TRUE for
+ * true/on. Gengrids will emit a signal to its theming Edje object
+ * with @c "elm,state,XXX,active" and @c "elm" as "emission" and
+ * "source" arguments, respectively, when the state is true (the
+ * default is false), where @c XXX is the name of the (state) part.
+ * See #Elm_Gengrid_Item_State_Get_Cb.
+ * - @c func.del - This is called when elm_gengrid_item_del() is
+ * called on an item or elm_gengrid_clear() is called on the
+ * gengrid. This is intended for use when gengrid items are
+ * deleted, so any data attached to the item (e.g. its data
+ * parameter on creation) can be deleted. See #Elm_Gengrid_Item_Del_Cb.
+ *
+ * @section Gengrid_Usage_Hints Usage hints
+ *
+ * If the user wants to have multiple items selected at the same
+ * time, elm_gengrid_multi_select_set() will permit it. If the
+ * gengrid is single-selection only (the default), then
+ * elm_gengrid_select_item_get() will return the selected item or
+ * @c NULL, if none is selected. If the gengrid is under
+ * multi-selection, then elm_gengrid_selected_items_get() will
+ * return a list (that is only valid as long as no items are
+ * modified (added, deleted, selected or unselected) of child items
+ * on a gengrid.
+ *
+ * If an item changes (internal (boolean) state, label or icon
+ * changes), then use elm_gengrid_item_update() to have gengrid
+ * update the item with the new state. A gengrid will re-"realize"
+ * the item, thus calling the functions in the
+ * #Elm_Gengrid_Item_Class set for that item.
+ *
+ * To programmatically (un)select an item, use
+ * elm_gengrid_item_selected_set(). To get its selected state use
+ * elm_gengrid_item_selected_get(). To make an item disabled
+ * (unable to be selected and appear differently) use
+ * elm_gengrid_item_disabled_set() to set this and
+ * elm_gengrid_item_disabled_get() to get the disabled state.
+ *
+ * Grid cells will only have their selection smart callbacks called
+ * when firstly getting selected. Any further clicks will do
+ * nothing, unless you enable the "always select mode", with
+ * elm_gengrid_always_select_mode_set(), thus making every click to
+ * issue selection callbacks. elm_gengrid_no_select_mode_set() will
+ * turn off the ability to select items entirely in the widget and
+ * they will neither appear selected nor call the selection smart
+ * callbacks.
+ *
+ * Remember that you can create new styles and add your own theme
+ * augmentation per application with elm_theme_extension_add(). If
+ * you absolutely must have a specific style that overrides any
+ * theme the user or system sets up you can use
+ * elm_theme_overlay_add() to add such a file.
+ *
+ * @section Gengrid_Smart_Events Gengrid smart events
+ *
+ * Smart events that you can add callbacks for are:
+ * - @c "activated" - The user has double-clicked or pressed
+ * (enter|return|spacebar) on an item. The @c event_info parameter
+ * is the gengrid item that was activated.
+ * - @c "clicked,double" - The user has double-clicked an item.
+ * The @c event_info parameter is the gengrid item that was double-clicked.
+ * - @c "longpressed" - This is called when the item is pressed for a certain
+ * amount of time. By default it's 1 second.
+ * - @c "selected" - The user has made an item selected. The
+ * @c event_info parameter is the gengrid item that was selected.
+ * - @c "unselected" - The user has made an item unselected. The
+ * @c event_info parameter is the gengrid item that was unselected.
+ * - @c "realized" - This is called when the item in the gengrid
+ * has its implementing Evas object instantiated, de facto. @c
+ * event_info is the gengrid item that was created. The object
+ * may be deleted at any time, so it is highly advised to the
+ * caller @b not to use the object pointer returned from
+ * elm_gengrid_item_object_get(), because it may point to freed
+ * objects.
+ * - @c "unrealized" - This is called when the implementing Evas
+ * object for this item is deleted. @c event_info is the gengrid
+ * item that was deleted.
+ * - @c "changed" - Called when an item is added, removed, resized
+ * or moved and when the gengrid is resized or gets "horizontal"
+ * property changes.
+ * - @c "scroll,anim,start" - This is called when scrolling animation has
+ * started.
+ * - @c "scroll,anim,stop" - This is called when scrolling animation has
+ * stopped.
+ * - @c "drag,start,up" - Called when the item in the gengrid has
+ * been dragged (not scrolled) up.
+ * - @c "drag,start,down" - Called when the item in the gengrid has
+ * been dragged (not scrolled) down.
+ * - @c "drag,start,left" - Called when the item in the gengrid has
+ * been dragged (not scrolled) left.
+ * - @c "drag,start,right" - Called when the item in the gengrid has
+ * been dragged (not scrolled) right.
+ * - @c "drag,stop" - Called when the item in the gengrid has
+ * stopped being dragged.
+ * - @c "drag" - Called when the item in the gengrid is being
+ * dragged.
+ * - @c "scroll" - called when the content has been scrolled
+ * (moved).
+ * - @c "scroll,drag,start" - called when dragging the content has
+ * started.
+ * - @c "scroll,drag,stop" - called when dragging the content has
+ * stopped.
+ * - @c "scroll,edge,top" - This is called when the gengrid is scrolled until
+ * the top edge.
+ * - @c "scroll,edge,bottom" - This is called when the gengrid is scrolled
+ * until the bottom edge.
+ * - @c "scroll,edge,left" - This is called when the gengrid is scrolled
+ * until the left edge.
+ * - @c "scroll,edge,right" - This is called when the gengrid is scrolled
+ * until the right edge.
+ *
+ * List of gengrid examples:
+ * @li @ref gengrid_example
+ */
+
+ /**
+ * @addtogroup Gengrid
* @{
*/
+ typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class; /**< Gengrid item class definition structs */
+ typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */
+ typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item; /**< Gengrid item handles */
+ typedef char *(*Elm_Gengrid_Item_Label_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gengrid item classes. */
+ typedef Evas_Object *(*Elm_Gengrid_Item_Icon_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Icon fetching class function for gengrid item classes. */
+ typedef Eina_Bool (*Elm_Gengrid_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gengrid item classes. */
+ typedef void (*Elm_Gengrid_Item_Del_Cb) (void *data, Evas_Object *obj); /**< Deletion class function for gengrid item classes. */
+
+ typedef char *(*GridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Label_Get_Cb. */
+ typedef Evas_Object *(*GridItemIconGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Icon_Get_Cb. */
+ typedef Eina_Bool (*GridItemStateGetFunc) (void *data, Evas_Object *obj, const char *part) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_State_Get_Cb. */
+ typedef void (*GridItemDelFunc) (void *data, Evas_Object *obj) EINA_DEPRECATED; /** DEPRECATED. Use Elm_Gengrid_Item_Del_Cb. */
+
+ /**
+ * @struct _Elm_Gengrid_Item_Class
+ *
+ * Gengrid item class definition. See @ref Gengrid_Item_Class for
+ * field details.
+ */
+ struct _Elm_Gengrid_Item_Class
+ {
+ const char *item_style;
+ struct _Elm_Gengrid_Item_Class_Func
+ {
+ Elm_Gengrid_Item_Label_Get_Cb label_get;
+ Elm_Gengrid_Item_Icon_Get_Cb icon_get;
+ Elm_Gengrid_Item_State_Get_Cb state_get;
+ Elm_Gengrid_Item_Del_Cb del;
+ } func;
+ }; /**< #Elm_Gengrid_Item_Class member definitions */
+
+ /**
+ * Add a new gengrid widget to the given parent Elementary
+ * (container) object
+ *
+ * @param parent The parent object
+ * @return a new gengrid widget handle or @c NULL, on errors
+ *
+ * This function inserts a new gengrid widget on the canvas.
+ *
+ * @see elm_gengrid_item_size_set()
+ * @see elm_gengrid_group_item_size_set()
+ * @see elm_gengrid_horizontal_set()
+ * @see elm_gengrid_item_append()
+ * @see elm_gengrid_item_del()
+ * @see elm_gengrid_clear()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Evas_Object *elm_gengrid_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the size for the items of a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param w The items' width.
+ * @param h The items' height;
+ *
+ * A gengrid, after creation, has still no information on the size
+ * to give to each of its cells. So, you most probably will end up
+ * with squares one @ref Fingers "finger" wide, the default
+ * size. Use this function to force a custom size for you items,
+ * making them as big as you wish.
+ *
+ * @see elm_gengrid_item_size_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the size set for the items of a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param w Pointer to a variable where to store the items' width.
+ * @param h Pointer to a variable where to store the items' height.
+ *
+ * @note Use @c NULL pointers on the size values you're not
+ * interested in: they'll be ignored by the function.
+ *
+ * @see elm_gengrid_item_size_get() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the size for the group items of a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param w The group items' width.
+ * @param h The group items' height;
+ *
+ * A gengrid, after creation, has still no information on the size
+ * to give to each of its cells. So, you most probably will end up
+ * with squares one @ref Fingers "finger" wide, the default
+ * size. Use this function to force a custom size for you group items,
+ * making them as big as you wish.
+ *
+ * @see elm_gengrid_group_item_size_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_group_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the size set for the group items of a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param w Pointer to a variable where to store the group items' width.
+ * @param h Pointer to a variable where to store the group items' height.
+ *
+ * @note Use @c NULL pointers on the size values you're not
+ * interested in: they'll be ignored by the function.
+ *
+ * @see elm_gengrid_group_item_size_get() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_group_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the items grid's alignment within a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param align_x Alignment in the horizontal axis (0 <= align_x <= 1).
+ * @param align_y Alignment in the vertical axis (0 <= align_y <= 1).
+ *
+ * This sets the alignment of the whole grid of items of a gengrid
+ * within its given viewport. By default, those values are both
+ * 0.5, meaning that the gengrid will have its items grid placed
+ * exactly in the middle of its viewport.
+ *
+ * @note If given alignment values are out of the cited ranges,
+ * they'll be changed to the nearest boundary values on the valid
+ * ranges.
+ *
+ * @see elm_gengrid_align_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_align_set(Evas_Object *obj, double align_x, double align_y) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the items grid's alignment values within a given gengrid
+ * widget
+ *
+ * @param obj The gengrid object.
+ * @param align_x Pointer to a variable where to store the
+ * horizontal alignment.
+ * @param align_y Pointer to a variable where to store the vertical
+ * alignment.
+ *
+ * @note Use @c NULL pointers on the alignment values you're not
+ * interested in: they'll be ignored by the function.
+ *
+ * @see elm_gengrid_align_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set whether a given gengrid widget is or not able have items
+ * @b reordered
+ *
+ * @param obj The gengrid object
+ * @param reorder_mode Use @c EINA_TRUE to turn reoderding on,
+ * @c EINA_FALSE to turn it off
+ *
+ * If a gengrid is set to allow reordering, a click held for more
+ * than 0.5 over a given item will highlight it specially,
+ * signalling the gengrid has entered the reordering state. From
+ * that time on, the user will be able to, while still holding the
+ * mouse button down, move the item freely in the gengrid's
+ * viewport, replacing to said item to the locations it goes to.
+ * The replacements will be animated and, whenever the user
+ * releases the mouse button, the item being replaced gets a new
+ * definitive place in the grid.
+ *
+ * @see elm_gengrid_reorder_mode_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether a given gengrid widget is or not able have items
+ * @b reordered
+ *
+ * @param obj The gengrid object
+ * @return @c EINA_TRUE, if reoderding is on, @c EINA_FALSE if it's
+ * off
+ *
+ * @see elm_gengrid_reorder_mode_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Append a new item in a given gengrid widget.
+ *
+ * @param obj The gengrid object.
+ * @param gic The item class for the item.
+ * @param data The item data.
+ * @param func Convenience function called when the item is
+ * selected.
+ * @param func_data Data to be passed to @p func.
+ * @return A handle to the item added or @c NULL, on errors.
+ *
+ * This adds an item to the beginning of the gengrid.
+ *
+ * @see elm_gengrid_item_prepend()
+ * @see elm_gengrid_item_insert_before()
+ * @see elm_gengrid_item_insert_after()
+ * @see elm_gengrid_item_del()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
+
+ /**
+ * Prepend a new item in a given gengrid widget.
+ *
+ * @param obj The gengrid object.
+ * @param gic The item class for the item.
+ * @param data The item data.
+ * @param func Convenience function called when the item is
+ * selected.
+ * @param func_data Data to be passed to @p func.
+ * @return A handle to the item added or @c NULL, on errors.
+ *
+ * This adds an item to the end of the gengrid.
+ *
+ * @see elm_gengrid_item_append()
+ * @see elm_gengrid_item_insert_before()
+ * @see elm_gengrid_item_insert_after()
+ * @see elm_gengrid_item_del()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
+
+ /**
+ * Insert an item before another in a gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param gic The item class for the item.
+ * @param data The item data.
+ * @param relative The item to place this new one before.
+ * @param func Convenience function called when the item is
+ * selected.
+ * @param func_data Data to be passed to @p func.
+ * @return A handle to the item added or @c NULL, on errors.
+ *
+ * This inserts an item before another in the gengrid.
+ *
+ * @see elm_gengrid_item_append()
+ * @see elm_gengrid_item_prepend()
+ * @see elm_gengrid_item_insert_after()
+ * @see elm_gengrid_item_del()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
+
+ /**
+ * Insert an item after another in a gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param gic The item class for the item.
+ * @param data The item data.
+ * @param relative The item to place this new one after.
+ * @param func Convenience function called when the item is
+ * selected.
+ * @param func_data Data to be passed to @p func.
+ * @return A handle to the item added or @c NULL, on errors.
+ *
+ * This inserts an item after another in the gengrid.
+ *
+ * @see elm_gengrid_item_append()
+ * @see elm_gengrid_item_prepend()
+ * @see elm_gengrid_item_insert_after()
+ * @see elm_gengrid_item_del()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Gengrid_Item *relative, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
+
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1);
+
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_direct_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+
+ /**
+ * Set whether items on a given gengrid widget are to get their
+ * selection callbacks issued for @b every subsequent selection
+ * click on them or just for the first click.
+ *
+ * @param obj The gengrid object
+ * @param always_select @c EINA_TRUE to make items "always
+ * selected", @c EINA_FALSE, otherwise
+ *
+ * By default, grid items will only call their selection callback
+ * function when firstly getting selected, any subsequent further
+ * clicks will do nothing. With this call, you make those
+ * subsequent clicks also to issue the selection callbacks.
+ *
+ * @note <b>Double clicks</b> will @b always be reported on items.
+ *
+ * @see elm_gengrid_always_select_mode_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether items on a given gengrid widget have their selection
+ * callbacks issued for @b every subsequent selection click on them
+ * or just for the first click.
+ *
+ * @param obj The gengrid object.
+ * @return @c EINA_TRUE if the gengrid items are "always selected",
+ * @c EINA_FALSE, otherwise
+ *
+ * @see elm_gengrid_always_select_mode_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set whether items on a given gengrid widget can be selected or not.
+ *
+ * @param obj The gengrid object
+ * @param no_select @c EINA_TRUE to make items selectable,
+ * @c EINA_FALSE otherwise
+ *
+ * This will make items in @p obj selectable or not. In the latter
+ * case, any user interaction on the gengrid items will neither make
+ * them appear selected nor them call their selection callback
+ * functions.
+ *
+ * @see elm_gengrid_no_select_mode_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether items on a given gengrid widget can be selected or
+ * not.
+ *
+ * @param obj The gengrid object
+ * @return @c EINA_TRUE, if items are selectable, @c EINA_FALSE
+ * otherwise
+ *
+ * @see elm_gengrid_no_select_mode_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Enable or disable multi-selection in a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @param multi @c EINA_TRUE, to enable multi-selection,
+ * @c EINA_FALSE to disable it.
+ *
+ * Multi-selection is the ability for one to have @b more than one
+ * item selected, on a given gengrid, simultaneously. When it is
+ * enabled, a sequence of clicks on different items will make them
+ * all selected, progressively. A click on an already selected item
+ * will unselect it. If interecting via the keyboard,
+ * multi-selection is enabled while holding the "Shift" key.
+ *
+ * @note By default, multi-selection is @b disabled on gengrids
+ *
+ * @see elm_gengrid_multi_select_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether multi-selection is enabled or disabled for a given
+ * gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @return @c EINA_TRUE, if multi-selection is enabled, @c
+ * EINA_FALSE otherwise
+ *
+ * @see elm_gengrid_multi_select_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Enable or disable bouncing effect for a given gengrid widget
+ *
+ * @param obj The gengrid object
+ * @param h_bounce @c EINA_TRUE, to enable @b horizontal bouncing,
+ * @c EINA_FALSE to disable it
+ * @param v_bounce @c EINA_TRUE, to enable @b vertical bouncing,
+ * @c EINA_FALSE to disable it
+ *
+ * The bouncing effect occurs whenever one reaches the gengrid's
+ * edge's while panning it -- it will scroll past its limits a
+ * little bit and return to the edge again, in a animated for,
+ * automatically.
+ *
+ * @note By default, gengrids have bouncing enabled on both axis
+ *
+ * @see elm_gengrid_bounce_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether bouncing effects are enabled or disabled, for a
+ * given gengrid widget, on each axis
+ *
+ * @param obj The gengrid object
+ * @param h_bounce Pointer to a variable where to store the
+ * horizontal bouncing flag.
+ * @param v_bounce Pointer to a variable where to store the
+ * vertical bouncing flag.
+ *
+ * @see elm_gengrid_bounce_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set a given gengrid widget's scrolling page size, relative to
+ * its viewport size.
+ *
+ * @param obj The gengrid object
+ * @param h_pagerel The horizontal page (relative) size
+ * @param v_pagerel The vertical page (relative) size
+ *
+ * The gengrid's scroller is capable of binding scrolling by the
+ * user to "pages". It means that, while scrolling and, specially
+ * after releasing the mouse button, the grid will @b snap to the
+ * nearest displaying page's area. When page sizes are set, the
+ * grid's continuous content area is split into (equal) page sized
+ * pieces.
+ *
+ * This function sets the size of a page <b>relatively to the
+ * viewport dimensions</b> of the gengrid, for each axis. A value
+ * @c 1.0 means "the exact viewport's size", in that axis, while @c
+ * 0.0 turns paging off in that axis. Likewise, @c 0.5 means "half
+ * a viewport". Sane usable values are, than, between @c 0.0 and @c
+ * 1.0. Values beyond those will make it behave behave
+ * inconsistently. If you only want one axis to snap to pages, use
+ * the value @c 0.0 for the other one.
+ *
+ * There is a function setting page size values in @b absolute
+ * values, too -- elm_gengrid_page_size_set(). Naturally, its use
+ * is mutually exclusive to this one.
+ *
+ * @see elm_gengrid_page_relative_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get a given gengrid widget's scrolling page size, relative to
+ * its viewport size.
+ *
+ * @param obj The gengrid object
+ * @param h_pagerel Pointer to a variable where to store the
+ * horizontal page (relative) size
+ * @param v_pagerel Pointer to a variable where to store the
+ * vertical page (relative) size
+ *
+ * @see elm_gengrid_page_relative_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set a given gengrid widget's scrolling page size
+ *
+ * @param obj The gengrid object
+ * @param h_pagerel The horizontal page size, in pixels
+ * @param v_pagerel The vertical page size, in pixels
+ *
+ * The gengrid's scroller is capable of binding scrolling by the
+ * user to "pages". It means that, while scrolling and, specially
+ * after releasing the mouse button, the grid will @b snap to the
+ * nearest displaying page's area. When page sizes are set, the
+ * grid's continuous content area is split into (equal) page sized
+ * pieces.
+ *
+ * This function sets the size of a page of the gengrid, in pixels,
+ * for each axis. Sane usable values are, between @c 0 and the
+ * dimensions of @p obj, for each axis. Values beyond those will
+ * make it behave behave inconsistently. If you only want one axis
+ * to snap to pages, use the value @c 0 for the other one.
+ *
+ * There is a function setting page size values in @b relative
+ * values, too -- elm_gengrid_page_relative_set(). Naturally, its
+ * use is mutually exclusive to this one.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize) EINA_ARG_NONNULL(1);
+
+ /**
+ * @brief Get gengrid current page number.
+ *
+ * @param obj The gengrid object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
+ *
+ * The page number starts from 0. 0 is the first page.
+ * Current page means the page which meet the top-left of the viewport.
+ * If there are two or more pages in the viewport, it returns the number of page
+ * which meet the top-left of the viewport.
+ *
+ * @see elm_gengrid_last_page_get()
+ * @see elm_gengrid_page_show()
+ * @see elm_gengrid_page_brint_in()
+ */
+ EAPI void elm_gengrid_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1);
+
+ /**
+ * @brief Get scroll last page number.
+ *
+ * @param obj The gengrid object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
+ *
+ * The page number starts from 0. 0 is the first page.
+ * This returns the last page number among the pages.
+ *
+ * @see elm_gengrid_current_page_get()
+ * @see elm_gengrid_page_show()
+ * @see elm_gengrid_page_brint_in()
+ */
+ EAPI void elm_gengrid_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1);
+
+ /**
+ * Show a specific virtual region within the gengrid content object by page number.
+ *
+ * @param obj The gengrid object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
+ *
+ * 0, 0 of the indicated page is located at the top-left of the viewport.
+ * This will jump to the page directly without animation.
+ *
+ * Example of usage:
+ *
+ * @code
+ * sc = elm_gengrid_add(win);
+ * elm_gengrid_content_set(sc, content);
+ * elm_gengrid_page_relative_set(sc, 1, 0);
+ * elm_gengrid_current_page_get(sc, &h_page, &v_page);
+ * elm_gengrid_page_show(sc, h_page + 1, v_page);
+ * @endcode
+ *
+ * @see elm_gengrid_page_bring_in()
+ */
+ EAPI void elm_gengrid_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1);
+
+ /**
+ * Show a specific virtual region within the gengrid content object by page number.
+ *
+ * @param obj The gengrid object
+ * @param h_pagenumber The horizontal page number
+ * @param v_pagenumber The vertical page number
+ *
+ * 0, 0 of the indicated page is located at the top-left of the viewport.
+ * This will slide to the page with animation.
+ *
+ * Example of usage:
+ *
+ * @code
+ * sc = elm_gengrid_add(win);
+ * elm_gengrid_content_set(sc, content);
+ * elm_gengrid_page_relative_set(sc, 1, 0);
+ * elm_gengrid_last_page_get(sc, &h_page, &v_page);
+ * elm_gengrid_page_bring_in(sc, h_page, v_page);
+ * @endcode
+ *
+ * @see elm_gengrid_page_show()
+ */
+ EAPI void elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set for what direction a given gengrid widget will expand while
+ * placing its items.
+ *
+ * @param obj The gengrid object.
+ * @param setting @c EINA_TRUE to make the gengrid expand
+ * horizontally, @c EINA_FALSE to expand vertically.
+ *
+ * When in "horizontal mode" (@c EINA_TRUE), items will be placed
+ * in @b columns, from top to bottom and, when the space for a
+ * column is filled, another one is started on the right, thus
+ * expanding the grid horizontally. When in "vertical mode"
+ * (@c EINA_FALSE), though, items will be placed in @b rows, from left
+ * to right and, when the space for a row is filled, another one is
+ * started below, thus expanding the grid vertically.
+ *
+ * @see elm_gengrid_horizontal_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get for what direction a given gengrid widget will expand while
+ * placing its items.
+ *
+ * @param obj The gengrid object.
+ * @return @c EINA_TRUE, if @p obj is set to expand horizontally,
+ * @c EINA_FALSE if it's set to expand vertically.
+ *
+ * @see elm_gengrid_horizontal_set() for more detais
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the first item in a given gengrid widget
+ *
+ * @param obj The gengrid object
+ * @return The first item's handle or @c NULL, if there are no
+ * items in @p obj (and on errors)
+ *
+ * This returns the first item in the @p obj's internal list of
+ * items.
+ *
+ * @see elm_gengrid_last_item_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the last item in a given gengrid widget
+ *
+ * @param obj The gengrid object
+ * @return The last item's handle or @c NULL, if there are no
+ * items in @p obj (and on errors)
+ *
+ * This returns the last item in the @p obj's internal list of
+ * items.
+ *
+ * @see elm_gengrid_first_item_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the @b next item in a gengrid widget's internal list of items,
+ * given a handle to one of those items.
+ *
+ * @param item The gengrid item to fetch next from
+ * @return The item after @p item, or @c NULL if there's none (and
+ * on errors)
+ *
+ * This returns the item placed after the @p item, on the container
+ * gengrid.
+ *
+ * @see elm_gengrid_item_prev_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_next_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the @b previous item in a gengrid widget's internal list of items,
+ * given a handle to one of those items.
+ *
+ * @param item The gengrid item to fetch previous from
+ * @return The item before @p item, or @c NULL if there's none (and
+ * on errors)
+ *
+ * This returns the item placed before the @p item, on the container
+ * gengrid.
+ *
+ * @see elm_gengrid_item_next_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_item_prev_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the gengrid object's handle which contains a given gengrid
+ * item
+ *
+ * @param item The item to fetch the container from
+ * @return The gengrid (parent) object
+ *
+ * This returns the gengrid object itself that an item belongs to.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Evas_Object *elm_gengrid_item_gengrid_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Remove a gengrid item from the its parent, deleting it.
+ *
+ * @param item The item to be removed.
+ * @return @c EINA_TRUE on success or @c EINA_FALSE, otherwise.
+ *
+ * @see elm_gengrid_clear(), to remove all items in a gengrid at
+ * once.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_del(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Update the contents of a given gengrid item
+ *
+ * @param item The gengrid item
+ *
+ * This updates an item by calling all the item class functions
+ * again to get the icons, labels and states. Use this when the
+ * original item data has changed and you want thta changes to be
+ * reflected.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+ EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+ EAPI void elm_gengrid_item_item_class_set(Elm_Gengrid_Item *item, const Elm_Gengrid_Item_Class *gic) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Return the data associated to a given gengrid item
+ *
+ * @param item The gengrid item.
+ * @return the data associated to this item.
+ *
+ * This returns the @c data value passed on the
+ * elm_gengrid_item_append() and related item addition calls.
+ *
+ * @see elm_gengrid_item_append()
+ * @see elm_gengrid_item_data_set()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void *elm_gengrid_item_data_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the data associated to a given gengrid item
+ *
+ * @param item The gengrid item
+ * @param data The new data pointer to set on it
+ *
+ * This @b overrides the @c data value passed on the
+ * elm_gengrid_item_append() and related item addition calls. This
+ * function @b won't call elm_gengrid_item_update() automatically,
+ * so you'd issue it afterwards if you want to hove the item
+ * updated to reflect the that new data.
+ *
+ * @see elm_gengrid_item_data_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_data_set(Elm_Gengrid_Item *item, const void *data) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get a given gengrid item's position, relative to the whole
+ * gengrid's grid area.
+ *
+ * @param item The Gengrid item.
+ * @param x Pointer to variable where to store the item's <b>row
+ * number</b>.
+ * @param y Pointer to variable where to store the item's <b>column
+ * number</b>.
+ *
+ * This returns the "logical" position of the item whithin the
+ * gengrid. For example, @c (0, 1) would stand for first row,
+ * second column.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_pos_get(const Elm_Gengrid_Item *item, unsigned int *x, unsigned int *y) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set whether a given gengrid item is selected or not
+ *
+ * @param item The gengrid item
+ * @param selected Use @c EINA_TRUE, to make it selected, @c
+ * EINA_FALSE to make it unselected
+ *
+ * This sets the selected state of an item. If multi selection is
+ * not enabled on the containing gengrid and @p selected is @c
+ * EINA_TRUE, any other previously selected items will get
+ * unselected in favor of this new one.
+ *
+ * @see elm_gengrid_item_selected_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_selected_set(Elm_Gengrid_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether a given gengrid item is selected or not
+ *
+ * @param item The gengrid item
+ * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise
+ *
+ * @see elm_gengrid_item_selected_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the real Evas object created to implement the view of a
+ * given gengrid item
+ *
+ * @param item The gengrid item.
+ * @return the Evas object implementing this item's view.
+ *
+ * This returns the actual Evas object used to implement the
+ * specified gengrid item's view. This may be @c NULL, as it may
+ * not have been created or may have been deleted, at any time, by
+ * the gengrid. <b>Do not modify this object</b> (move, resize,
+ * show, hide, etc.), as the gengrid is controlling it. This
+ * function is for querying, emitting custom signals or hooking
+ * lower level callbacks for events on that object. Do not delete
+ * this object under any circumstances.
+ *
+ * @see elm_gengrid_item_data_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Show the portion of a gengrid's internal grid containing a given
+ * item, @b immediately.
+ *
+ * @param item The item to display
+ *
+ * This causes gengrid to @b redraw its viewport's contents to the
+ * region contining the given @p item item, if it is not fully
+ * visible.
+ *
+ * @see elm_gengrid_item_bring_in()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_show(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Animatedly bring in, to the visible are of a gengrid, a given
+ * item on it.
+ *
+ * @param item The gengrid item to display
+ *
+ * This causes gengrig to jump to the given @p item item and show
+ * it (by scrolling), if it is not fully visible. This will use
+ * animation to do so and take a period of time to complete.
+ *
+ * @see elm_gengrid_item_show()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_bring_in(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set whether a given gengrid item is disabled or not.
+ *
+ * @param item The gengrid item
+ * @param disabled Use @c EINA_TRUE, true disable it, @c EINA_FALSE
+ * to enable it back.
+ *
+ * A disabled item cannot be selected or unselected. It will also
+ * change its appearance, to signal the user it's disabled.
+ *
+ * @see elm_gengrid_item_disabled_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_disabled_set(Elm_Gengrid_Item *item, Eina_Bool disabled) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether a given gengrid item is disabled or not.
+ *
+ * @param item The gengrid item
+ * @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise
+ * (and on errors).
+ *
+ * @see elm_gengrid_item_disabled_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the text to be shown in a given gengrid item's tooltips.
+ *
+ * @param item The gengrid item
+ * @param text The text to set in the content
+ *
+ * This call will setup the text to be used as tooltip to that item
+ * (analogous to elm_object_tooltip_text_set(), but being item
+ * tooltips with higher precedence than object tooltips). It can
+ * have only one tooltip at a time, so any previous tooltip data
+ * will get removed.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_tooltip_text_set(Elm_Gengrid_Item *item, const char *text) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the content to be shown in a given gengrid item's tooltips
+ *
+ * @param item The gengrid item.
+ * @param func The function returning the tooltip contents.
+ * @param data What to provide to @a func as callback data/context.
+ * @param del_cb Called when data is not needed anymore, either when
+ * another callback replaces @p func, the tooltip is unset with
+ * elm_gengrid_item_tooltip_unset() or the owner @p item
+ * dies. This callback receives as its first parameter the
+ * given @p data, being @c event_info the item handle.
+ *
+ * This call will setup the tooltip's contents to @p item
+ * (analogous to elm_object_tooltip_content_cb_set(), but being
+ * item tooltips with higher precedence than object tooltips). It
+ * can have only one tooltip at a time, so any previous tooltip
+ * content will get removed. @p func (with @p data) will be called
+ * every time Elementary needs to show the tooltip and it should
+ * return a valid Evas object, which will be fully managed by the
+ * tooltip system, getting deleted when the tooltip is gone.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_Gengrid_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1);
+
+ /**
+ * Unset a tooltip from a given gengrid item
+ *
+ * @param item gengrid item to remove a previously set tooltip from.
+ *
+ * This call removes any tooltip set on @p item. The callback
+ * provided as @c del_cb to
+ * elm_gengrid_item_tooltip_content_cb_set() will be called to
+ * notify it is not used anymore (and have resources cleaned, if
+ * need be).
+ *
+ * @see elm_gengrid_item_tooltip_content_cb_set()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_tooltip_unset(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set a different @b style for a given gengrid item's tooltip.
+ *
+ * @param item gengrid item with tooltip set
+ * @param style the <b>theme style</b> to use on tooltips (e.g. @c
+ * "default", @c "transparent", etc)
+ *
+ * Tooltips can have <b>alternate styles</b> to be displayed on,
+ * which are defined by the theme set on Elementary. This function
+ * works analogously as elm_object_tooltip_style_set(), but here
+ * applied only to gengrid item objects. The default style for
+ * tooltips is @c "default".
+ *
+ * @note before you set a style you should define a tooltip with
+ * elm_gengrid_item_tooltip_content_cb_set() or
+ * elm_gengrid_item_tooltip_text_set()
+ *
+ * @see elm_gengrid_item_tooltip_style_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_tooltip_style_set(Elm_Gengrid_Item *item, const char *style) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the style set a given gengrid item's tooltip.
+ *
+ * @param item gengrid item with tooltip already set on.
+ * @return style the theme style in use, which defaults to
+ * "default". If the object does not have a tooltip set,
+ * then @c NULL is returned.
+ *
+ * @see elm_gengrid_item_tooltip_style_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI const char *elm_gengrid_item_tooltip_style_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Disable size restrictions on an object's tooltip
+ * @param item The tooltip's anchor object
+ * @param disable If EINA_TRUE, size restrictions are disabled
+ * @return EINA_FALSE on failure, EINA_TRUE on success
+ *
+ * This function allows a tooltip to expand beyond its parant window's canvas.
+ * It will instead be limited only by the size of the display.
+ */
+ EAPI Eina_Bool elm_gengrid_item_tooltip_size_restrict_disable(Elm_Gengrid_Item *item, Eina_Bool disable);
+ /**
+ * @brief Retrieve size restriction state of an object's tooltip
+ * @param item The tooltip's anchor object
+ * @return If EINA_TRUE, size restrictions are disabled
+ *
+ * This function returns whether a tooltip is allowed to expand beyond
+ * its parant window's canvas.
+ * It will instead be limited only by the size of the display.
+ */
+ EAPI Eina_Bool elm_gengrid_item_tooltip_size_restrict_disabled_get(const Elm_Gengrid_Item *item);
+ /**
+ * Set the type of mouse pointer/cursor decoration to be shown,
+ * when the mouse pointer is over the given gengrid widget item
+ *
+ * @param item gengrid item to customize cursor on
+ * @param cursor the cursor type's name
+ *
+ * This function works analogously as elm_object_cursor_set(), but
+ * here the cursor's changing area is restricted to the item's
+ * area, and not the whole widget's. Note that that item cursors
+ * have precedence over widget cursors, so that a mouse over @p
+ * item will always show cursor @p type.
+ *
+ * If this function is called twice for an object, a previously set
+ * cursor will be unset on the second call.
+ *
+ * @see elm_object_cursor_set()
+ * @see elm_gengrid_item_cursor_get()
+ * @see elm_gengrid_item_cursor_unset()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_cursor_set(Elm_Gengrid_Item *item, const char *cursor) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the type of mouse pointer/cursor decoration set to be shown,
+ * when the mouse pointer is over the given gengrid widget item
+ *
+ * @param item gengrid item with custom cursor set
+ * @return the cursor type's name or @c NULL, if no custom cursors
+ * were set to @p item (and on errors)
+ *
+ * @see elm_object_cursor_get()
+ * @see elm_gengrid_item_cursor_set() for more details
+ * @see elm_gengrid_item_cursor_unset()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI const char *elm_gengrid_item_cursor_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Unset any custom mouse pointer/cursor decoration set to be
+ * shown, when the mouse pointer is over the given gengrid widget
+ * item, thus making it show the @b default cursor again.
+ *
+ * @param item a gengrid item
+ *
+ * Use this call to undo any custom settings on this item's cursor
+ * decoration, bringing it back to defaults (no custom style set).
+ *
+ * @see elm_object_cursor_unset()
+ * @see elm_gengrid_item_cursor_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_cursor_unset(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set a different @b style for a given custom cursor set for a
+ * gengrid item.
+ *
+ * @param item gengrid item with custom cursor set
+ * @param style the <b>theme style</b> to use (e.g. @c "default",
+ * @c "transparent", etc)
+ *
+ * This function only makes sense when one is using custom mouse
+ * cursor decorations <b>defined in a theme file</b> , which can
+ * have, given a cursor name/type, <b>alternate styles</b> on
+ * it. It works analogously as elm_object_cursor_style_set(), but
+ * here applied only to gengrid item objects.
+ *
+ * @warning Before you set a cursor style you should have defined a
+ * custom cursor previously on the item, with
+ * elm_gengrid_item_cursor_set()
+ *
+ * @see elm_gengrid_item_cursor_engine_only_set()
+ * @see elm_gengrid_item_cursor_style_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_cursor_style_set(Elm_Gengrid_Item *item, const char *style) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the current @b style set for a given gengrid item's custom
+ * cursor
+ *
+ * @param item gengrid item with custom cursor set.
+ * @return style the cursor style in use. If the object does not
+ * have a cursor set, then @c NULL is returned.
+ *
+ * @see elm_gengrid_item_cursor_style_set() for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set if the (custom) cursor for a given gengrid item should be
+ * searched in its theme, also, or should only rely on the
+ * rendering engine.
+ *
+ * @param item item with custom (custom) cursor already set on
+ * @param engine_only Use @c EINA_TRUE to have cursors looked for
+ * only on those provided by the rendering engine, @c EINA_FALSE to
+ * have them searched on the widget's theme, as well.
+ *
+ * @note This call is of use only if you've set a custom cursor
+ * for gengrid items, with elm_gengrid_item_cursor_set().
+ *
+ * @note By default, cursors will only be looked for between those
+ * provided by the rendering engine.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Gengrid_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get if the (custom) cursor for a given gengrid item is being
+ * searched in its theme, also, or is only relying on the rendering
+ * engine.
+ *
+ * @param item a gengrid item
+ * @return @c EINA_TRUE, if cursors are being looked for only on
+ * those provided by the rendering engine, @c EINA_FALSE if they
+ * are being searched on the widget's theme, as well.
+ *
+ * @see elm_gengrid_item_cursor_engine_only_set(), for more details
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Remove all items from a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ *
+ * This removes (and deletes) all items in @p obj, leaving it
+ * empty.
+ *
+ * @see elm_gengrid_item_del(), to remove just one item.
+ *
+ * @ingroup Gengrid
+ */
+ EAPI void elm_gengrid_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the selected item in a given gengrid widget
+ *
+ * @param obj The gengrid object.
+ * @return The selected item's handleor @c NULL, if none is
+ * selected at the moment (and on errors)
+ *
+ * This returns the selected item in @p obj. If multi selection is
+ * enabled on @p obj (@see elm_gengrid_multi_select_set()), only
+ * the first item in the list is selected, which might not be very
+ * useful. For that case, see elm_gengrid_selected_items_get().
+ *
+ * @ingroup Gengrid
+ */
+ EAPI Elm_Gengrid_Item *elm_gengrid_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get <b>a list</b> of selected items in a given gengrid
+ *
+ * @param obj The gengrid object.
+ * @return The list of selected items or @c NULL, if none is
+ * selected at the moment (and on errors)
+ *
+ * This returns a list of the selected items, in the order that
+ * they appear in the grid. This list is only valid as long as no
+ * more items are selected or unselected (or unselected implictly
+ * by deletion). The list contains #Elm_Gengrid_Item pointers as
+ * data, naturally.
+ *
+ * @see elm_gengrid_selected_item_get()
+ *
+ * @ingroup Gengrid
+ */
+ EAPI const Eina_List *elm_gengrid_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Clock Clock
+ *
+ * @image html img/widget/clock/preview-00.png
+ * @image latex img/widget/clock/preview-00.eps
+ *
+ * This is a @b digital clock widget. In its default theme, it has a
+ * vintage "flipping numbers clock" appearance, which will animate
+ * sheets of individual algarisms individually as time goes by.
+ *
+ * A newly created clock will fetch system's time (already
+ * considering local time adjustments) to start with, and will tick
+ * accondingly. It may or may not show seconds.
+ *
+ * Clocks have an @b edition mode. When in it, the sheets will
+ * display extra arrow indications on the top and bottom and the
+ * user may click on them to raise or lower the time values. After
+ * it's told to exit edition mode, it will keep ticking with that
+ * new time set (it keeps the difference from local time).
+ *
+ * Also, when under edition mode, user clicks on the cited arrows
+ * which are @b held for some time will make the clock to flip the
+ * sheet, thus editing the time, continuosly and automatically for
+ * the user. The interval between sheet flips will keep growing in
+ * time, so that it helps the user to reach a time which is distant
+ * from the one set.
+ *
+ * The time display is, by default, in military mode (24h), but an
+ * am/pm indicator may be optionally shown, too, when it will
+ * switch to 12h.
+ *
+ * Smart callbacks one can register to:
+ * - "changed" - the clock's user changed the time
+ *
+ * Here is an example on its usage:
+ * @li @ref clock_example
+ */
+
+ /**
+ * @addtogroup Clock
+ * @{
+ */
+
+ /**
+ * Identifiers for which clock digits should be editable, when a
+ * clock widget is in edition mode. Values may be ORed together to
+ * make a mask, naturally.
+ *
+ * @see elm_clock_edit_set()
+ * @see elm_clock_digit_edit_set()
+ */
+ typedef enum _Elm_Clock_Digedit
+ {
+ ELM_CLOCK_NONE = 0, /**< Default value. Means that all digits are editable, when in edition mode. */
+ ELM_CLOCK_HOUR_DECIMAL = 1 << 0, /**< Decimal algarism of hours value should be editable */
+ ELM_CLOCK_HOUR_UNIT = 1 << 1, /**< Unit algarism of hours value should be editable */
+ ELM_CLOCK_MIN_DECIMAL = 1 << 2, /**< Decimal algarism of minutes value should be editable */
+ ELM_CLOCK_MIN_UNIT = 1 << 3, /**< Unit algarism of minutes value should be editable */
+ ELM_CLOCK_SEC_DECIMAL = 1 << 4, /**< Decimal algarism of seconds value should be editable */
+ ELM_CLOCK_SEC_UNIT = 1 << 5, /**< Unit algarism of seconds value should be editable */
+ ELM_CLOCK_ALL = (1 << 6) - 1 /**< All digits should be editable */
+ } Elm_Clock_Digedit;
+
+ /**
+ * Add a new clock widget to the given parent Elementary
+ * (container) object
+ *
+ * @param parent The parent object
+ * @return a new clock widget handle or @c NULL, on errors
+ *
+ * This function inserts a new clock widget on the canvas.
+ *
+ * @ingroup Clock
+ */
+ EAPI Evas_Object *elm_clock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set a clock widget's time, programmatically
+ *
+ * @param obj The clock widget object
+ * @param hrs The hours to set
+ * @param min The minutes to set
+ * @param sec The secondes to set
+ *
+ * This function updates the time that is showed by the clock
+ * widget.
+ *
+ * Values @b must be set within the following ranges:
+ * - 0 - 23, for hours
+ * - 0 - 59, for minutes
+ * - 0 - 59, for seconds,
+ *
+ * even if the clock is not in "military" mode.
+ *
+ * @warning The behavior for values set out of those ranges is @b
+ * indefined.
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get a clock widget's time values
+ *
+ * @param obj The clock object
+ * @param[out] hrs Pointer to the variable to get the hours value
+ * @param[out] min Pointer to the variable to get the minutes value
+ * @param[out] sec Pointer to the variable to get the seconds value
+ *
+ * This function gets the time set for @p obj, returning
+ * it on the variables passed as the arguments to function
+ *
+ * @note Use @c NULL pointers on the time values you're not
+ * interested in: they'll be ignored by the function.
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set whether a given clock widget is under <b>edition mode</b> or
+ * under (default) displaying-only mode.
+ *
+ * @param obj The clock object
+ * @param edit @c EINA_TRUE to put it in edition, @c EINA_FALSE to
+ * put it back to "displaying only" mode
+ *
+ * This function makes a clock's time to be editable or not <b>by
+ * user interaction</b>. When in edition mode, clocks @b stop
+ * ticking, until one brings them back to canonical mode. The
+ * elm_clock_digit_edit_set() function will influence which digits
+ * of the clock will be editable. By default, all of them will be
+ * (#ELM_CLOCK_NONE).
+ *
+ * @note am/pm sheets, if being shown, will @b always be editable
+ * under edition mode.
+ *
+ * @see elm_clock_edit_get()
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Retrieve whether a given clock widget is under <b>edition
+ * mode</b> or under (default) displaying-only mode.
+ *
+ * @param obj The clock object
+ * @param edit @c EINA_TRUE, if it's in edition mode, @c EINA_FALSE
+ * otherwise
+ *
+ * This function retrieves whether the clock's time can be edited
+ * or not by user interaction.
+ *
+ * @see elm_clock_edit_set() for more details
+ *
+ * @ingroup Clock
+ */
+ EAPI Eina_Bool elm_clock_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set what digits of the given clock widget should be editable
+ * when in edition mode.
+ *
+ * @param obj The clock object
+ * @param digedit Bit mask indicating the digits to be editable
+ * (values in #Elm_Clock_Digedit).
+ *
+ * If the @p digedit param is #ELM_CLOCK_NONE, editing will be
+ * disabled on @p obj (same effect as elm_clock_edit_set(), with @c
+ * EINA_FALSE).
+ *
+ * @see elm_clock_digit_edit_get()
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit) EINA_ARG_NONNULL(1);
+
+ /**
+ * Retrieve what digits of the given clock widget should be
+ * editable when in edition mode.
+ *
+ * @param obj The clock object
+ * @return Bit mask indicating the digits to be editable
+ * (values in #Elm_Clock_Digedit).
+ *
+ * @see elm_clock_digit_edit_set() for more details
+ *
+ * @ingroup Clock
+ */
+ EAPI Elm_Clock_Digedit elm_clock_digit_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set if the given clock widget must show hours in military or
+ * am/pm mode
+ *
+ * @param obj The clock object
+ * @param am_pm @c EINA_TRUE to put it in am/pm mode, @c EINA_FALSE
+ * to military mode
+ *
+ * This function sets if the clock must show hours in military or
+ * am/pm mode. In some countries like Brazil the military mode
+ * (00-24h-format) is used, in opposition to the USA, where the
+ * am/pm mode is more commonly used.
+ *
+ * @see elm_clock_show_am_pm_get()
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get if the given clock widget shows hours in military or am/pm
+ * mode
+ *
+ * @param obj The clock object
+ * @return @c EINA_TRUE, if in am/pm mode, @c EINA_FALSE if in
+ * military
+ *
+ * This function gets if the clock shows hours in military or am/pm
+ * mode.
+ *
+ * @see elm_clock_show_am_pm_set() for more details
+ *
+ * @ingroup Clock
+ */
+ EAPI Eina_Bool elm_clock_show_am_pm_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set if the given clock widget must show time with seconds or not
+ *
+ * @param obj The clock object
+ * @param seconds @c EINA_TRUE to show seconds, @c EINA_FALSE otherwise
+ *
+ * This function sets if the given clock must show or not elapsed
+ * seconds. By default, they are @b not shown.
+ *
+ * @see elm_clock_show_seconds_get()
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether the given clock widget is showing time with seconds
+ * or not
+ *
+ * @param obj The clock object
+ * @return @c EINA_TRUE if it's showing seconds, @c EINA_FALSE otherwise
+ *
+ * This function gets whether @p obj is showing or not the elapsed
+ * seconds.
+ *
+ * @see elm_clock_show_seconds_set()
+ *
+ * @ingroup Clock
+ */
+ EAPI Eina_Bool elm_clock_show_seconds_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the interval on time updates for an user mouse button hold
+ * on clock widgets' time edition.
+ *
+ * @param obj The clock object
+ * @param interval The (first) interval value in seconds
+ *
+ * This interval value is @b decreased while the user holds the
+ * mouse pointer either incrementing or decrementing a given the
+ * clock digit's value.
+ *
+ * This helps the user to get to a given time 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_clock_interval_get()
+ *
+ * @ingroup Clock
+ */
+ EAPI void elm_clock_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the interval on time updates for an user mouse button hold
+ * on clock widgets' time edition.
+ *
+ * @param obj The clock object
+ * @return The (first) interval value, in seconds, set on it
+ *
+ * @see elm_clock_interval_set() for more details
+ *
+ * @ingroup Clock
+ */
+ EAPI double elm_clock_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Layout Layout
+ *
+ * @image html img/widget/layout/preview-00.png
+ * @image latex img/widget/layout/preview-00.eps width=\textwidth
+ *
+ * @image html img/layout-predefined.png
+ * @image latex img/layout-predefined.eps width=\textwidth
+ *
+ * This is a container widget that takes a standard Edje design file and
+ * wraps it very thinly in a widget.
+ *
+ * An Edje design (theme) file has a very wide range of possibilities to
+ * describe the behavior of elements added to the Layout. Check out the Edje
+ * documentation and the EDC reference to get more information about what can
+ * be done with Edje.
+ *
+ * Just like @ref List, @ref Box, and other container widgets, any
+ * object added to the Layout will become its child, meaning that it will be
+ * deleted if the Layout is deleted, move if the Layout is moved, and so on.
+ *
+ * The Layout widget can contain as many Contents, Boxes or Tables as
+ * described in its theme file. For instance, objects can be added to
+ * different Tables by specifying the respective Table part names. The same
+ * is valid for Content and Box.
+ *
+ * The objects added as child of the Layout will behave as described in the
+ * part description where they were added. There are 3 possible types of
+ * parts where a child can be added:
+ *
+ * @section secContent Content (SWALLOW part)
+ *
+ * Only one object can be added to the @c SWALLOW part (but you still can
+ * have many @c SWALLOW parts and one object on each of them). Use the @c
+ * elm_layout_content_* set of functions to set, retrieve and unset objects
+ * as content of the @c SWALLOW. After being set to this part, the object
+ * size, position, visibility, clipping and other description properties
+ * will be totally controled by the description of the given part (inside
+ * the Edje theme file).
+ *
+ * One can use @c evas_object_size_hint_* functions on the child to have some
+ * kind of control over its behavior, but the resulting behavior will still
+ * depend heavily on the @c SWALLOW part description.
+ *
+ * The Edje theme also can change the part description, based on signals or
+ * scripts running inside the theme. This change can also be animated. All of
+ * this will affect the child object set as content accordingly. The object
+ * size will be changed if the part size is changed, it will animate move if
+ * the part is moving, and so on.
+ *
+ * The following picture demonstrates a Layout widget with a child object
+ * added to its @c SWALLOW:
+ *
+ * @image html layout_swallow.png
+ * @image latex layout_swallow.eps width=\textwidth
+ *
+ * @section secBox Box (BOX part)
+ *
+ * An Edje @c BOX part is very similar to the Elementary @ref Box widget. It
+ * allows one to add objects to the box and have them distributed along its
+ * area, accordingly to the specified @a layout property (now by @a layout we
+ * mean the chosen layouting design of the Box, not the Layout widget
+ * itself).
+ *
+ * A similar effect for having a box with its position, size and other things
+ * controled by the Layout theme would be to create an Elementary @ref Box
+ * widget and add it as a Content in the @c SWALLOW part.
+ *
+ * The main difference of using the Layout Box is that its behavior, the box
+ * properties like layouting format, padding, align, etc. will be all
+ * controled by the theme. This means, for example, that a signal could be
+ * sent to the Layout theme (with elm_object_signal_emit()) and the theme
+ * handled the signal by changing the box padding, or align, or both. Using
+ * the Elementary @ref Box widget is not necessarily harder or easier, it
+ * just depends on the circunstances and requirements.
+ *
+ * The Layout Box can be used through the @c elm_layout_box_* set of
+ * functions.
+ *
+ * The following picture demonstrates a Layout widget with many child objects
+ * added to its @c BOX part:
+ *
+ * @image html layout_box.png
+ * @image latex layout_box.eps width=\textwidth
+ *
+ * @section secTable Table (TABLE part)
+ *
+ * Just like the @ref secBox, the Layout Table is very similar to the
+ * Elementary @ref Table widget. It allows one to add objects to the Table
+ * specifying the row and column where the object should be added, and any
+ * column or row span if necessary.
+ *
+ * Again, we could have this design by adding a @ref Table widget to the @c
+ * SWALLOW part using elm_layout_content_set(). The same difference happens
+ * here when choosing to use the Layout Table (a @c TABLE part) instead of
+ * the @ref Table plus @c SWALLOW part. It's just a matter of convenience.
+ *
+ * The Layout Table can be used through the @c elm_layout_table_* set of
+ * functions.
+ *
+ * The following picture demonstrates a Layout widget with many child objects
+ * added to its @c TABLE part:
+ *
+ * @image html layout_table.png
+ * @image latex layout_table.eps width=\textwidth
+ *
+ * @section secPredef Predefined Layouts
+ *
+ * Another interesting thing about the Layout widget is that it offers some
+ * predefined themes that come with the default Elementary theme. These
+ * themes can be set by the call elm_layout_theme_set(), and provide some
+ * basic functionality depending on the theme used.
+ *
+ * Most of them already send some signals, some already provide a toolbar or
+ * back and next buttons.
+ *
+ * These are available predefined theme layouts. All of them have class = @c
+ * layout, group = @c application, and style = one of the following options:
+ *
+ * @li @c toolbar-content - application with toolbar and main content area
+ * @li @c toolbar-content-back - application with toolbar and main content
+ * area with a back button and title area
+ * @li @c toolbar-content-back-next - application with toolbar and main
+ * content area with a back and next buttons and title area
+ * @li @c content-back - application with a main content area with a back
+ * button and title area
+ * @li @c content-back-next - application with a main content area with a
+ * back and next buttons and title area
+ * @li @c toolbar-vbox - application with toolbar and main content area as a
+ * vertical box
+ * @li @c toolbar-table - application with toolbar and main content area as a
+ * table
+ *
+ * @section secExamples Examples
+ *
+ * Some examples of the Layout widget can be found here:
+ * @li @ref layout_example_01
+ * @li @ref layout_example_02
+ * @li @ref layout_example_03
+ * @li @ref layout_example_edc
+ *
+ */
+
+ /**
+ * Add a new layout to the parent
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * @see elm_layout_file_set()
+ * @see elm_layout_theme_set()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Set the file that will be used as layout
+ *
+ * @param obj The layout object
+ * @param file The path to file (edj) that will be used as layout
+ * @param group The group that the layout belongs in edje file
+ *
+ * @return (1 = success, 0 = error)
+ *
+ * @ingroup Layout
+ */
+ EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
+ /**
+ * Set the edje group from the elementary theme that will be used as layout
+ *
+ * @param obj The layout object
+ * @param clas the clas of the group
+ * @param group the group
+ * @param style the style to used
+ *
+ * @return (1 = success, 0 = error)
+ *
+ * @ingroup Layout
+ */
+ EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style) EINA_ARG_NONNULL(1);
+ /**
+ * Set the layout content.
+ *
+ * @param obj The layout object
+ * @param swallow The swallow part name in the edje file
+ * @param content The child that will be added in this layout object
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_layout_content_unset() function.
+ *
+ * @note In an Edje theme, the part used as a content container is called @c
+ * SWALLOW. This is why the parameter name is called @p swallow, but it is
+ * expected to be a part name just like the second parameter of
+ * elm_layout_box_append().
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_content_get()
+ * @see elm_layout_content_unset()
+ * @see @ref secBox
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1);
+ /**
+ * Get the child object in the given content part.
+ *
+ * @param obj The layout object
+ * @param swallow The SWALLOW part to get its content
+ *
+ * @return The swallowed object or NULL if none or an error occurred
+ *
+ * @see elm_layout_content_set()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ /**
+ * Unset the layout content.
+ *
+ * @param obj The layout object
+ * @param swallow The swallow part name in the edje file
+ * @return The content that was being used
+ *
+ * Unparent and return the content object which was set for this part.
+ *
+ * @see elm_layout_content_set()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ /**
+ * Set the text of the given part
+ *
+ * @param obj The layout object
+ * @param part The TEXT part where to set the text
+ * @param text The text to set
+ *
+ * @ingroup Layout
+ * @deprecated use elm_object_text_* instead.
+ */
+ EINA_DEPRECATED EAPI void elm_layout_text_set(Evas_Object *obj, const char *part, const char *text) EINA_ARG_NONNULL(1);
+ /**
+ * Get the text set in the given part
+ *
+ * @param obj The layout object
+ * @param part The TEXT part to retrieve the text off
+ *
+ * @return The text set in @p part
+ *
+ * @ingroup Layout
+ * @deprecated use elm_object_text_* instead.
+ */
+ EINA_DEPRECATED EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part) EINA_ARG_NONNULL(1);
+ /**
+ * Append child to layout box part.
+ *
+ * @param obj the layout object
+ * @param part the box part to which the object will be appended.
+ * @param child the child object to append to box.
+ *
+ * Once the object is appended, it will become child of the layout. Its
+ * lifetime will be bound to the layout, whenever the layout dies the child
+ * will be deleted automatically. One should use elm_layout_box_remove() to
+ * make this layout forget about the object.
+ *
+ * @see elm_layout_box_prepend()
+ * @see elm_layout_box_insert_before()
+ * @see elm_layout_box_insert_at()
+ * @see elm_layout_box_remove()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
+ /**
+ * Prepend child to layout box part.
+ *
+ * @param obj the layout object
+ * @param part the box part to prepend.
+ * @param child the child object to prepend to box.
+ *
+ * Once the object is prepended, it will become child of the layout. Its
+ * lifetime will be bound to the layout, whenever the layout dies the child
+ * will be deleted automatically. One should use elm_layout_box_remove() to
+ * make this layout forget about the object.
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_box_insert_before()
+ * @see elm_layout_box_insert_at()
+ * @see elm_layout_box_remove()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
+ /**
+ * Insert child to layout box part before a reference object.
+ *
+ * @param obj the layout object
+ * @param part the box part to insert.
+ * @param child the child object to insert into box.
+ * @param reference another reference object to insert before in box.
+ *
+ * Once the object is inserted, it will become child of the layout. Its
+ * lifetime will be bound to the layout, whenever the layout dies the child
+ * will be deleted automatically. One should use elm_layout_box_remove() to
+ * make this layout forget about the object.
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_box_prepend()
+ * @see elm_layout_box_insert_before()
+ * @see elm_layout_box_remove()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1);
+ /**
+ * Insert child to layout box part at a given position.
+ *
+ * @param obj the layout object
+ * @param part the box part to insert.
+ * @param child the child object to insert into box.
+ * @param pos the numeric position >=0 to insert the child.
+ *
+ * Once the object is inserted, it will become child of the layout. Its
+ * lifetime will be bound to the layout, whenever the layout dies the child
+ * will be deleted automatically. One should use elm_layout_box_remove() to
+ * make this layout forget about the object.
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_box_prepend()
+ * @see elm_layout_box_insert_before()
+ * @see elm_layout_box_remove()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1);
+ /**
+ * Remove a child of the given part box.
+ *
+ * @param obj The layout object
+ * @param part The box part name to remove child.
+ * @param child The object to remove from box.
+ * @return The object that was being used, or NULL if not found.
+ *
+ * The object will be removed from the box part and its lifetime will
+ * not be handled by the layout anymore. This is equivalent to
+ * elm_layout_content_unset() for box.
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_box_remove_all()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1, 2, 3);
+ /**
+ * Remove all child of the given part box.
+ *
+ * @param obj The layout object
+ * @param part The box part name to remove child.
+ * @param clear If EINA_TRUE, then all objects will be deleted as
+ * well, otherwise they will just be removed and will be
+ * dangling on the canvas.
+ *
+ * The objects will be removed from the box part and their lifetime will
+ * not be handled by the layout anymore. This is equivalent to
+ * elm_layout_box_remove() for all box children.
+ *
+ * @see elm_layout_box_append()
+ * @see elm_layout_box_remove()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Insert child to layout table part.
+ *
+ * @param obj the layout object
+ * @param part the box part to pack child.
+ * @param child_obj the child object to pack into table.
+ * @param col the column to which the child should be added. (>= 0)
+ * @param row the row to which the child should be added. (>= 0)
+ * @param colspan how many columns should be used to store this object. (>=
+ * 1)
+ * @param rowspan how many rows should be used to store this object. (>= 1)
+ *
+ * Once the object is inserted, it will become child of the table. Its
+ * lifetime will be bound to the layout, and whenever the layout dies the
+ * child will be deleted automatically. One should use
+ * elm_layout_table_remove() to make this layout forget about the object.
+ *
+ * If @p colspan or @p rowspan are bigger than 1, that object will occupy
+ * more space than a single cell. For instance, the following code:
+ * @code
+ * elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);
+ * @endcode
+ *
+ * Would result in an object being added like the following picture:
+ *
+ * @image html layout_colspan.png
+ * @image latex layout_colspan.eps width=\textwidth
+ *
+ * @see elm_layout_table_unpack()
+ * @see elm_layout_table_clear()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1);
+ /**
+ * Unpack (remove) a child of the given part table.
+ *
+ * @param obj The layout object
+ * @param part The table part name to remove child.
+ * @param child_obj The object to remove from table.
+ * @return The object that was being used, or NULL if not found.
+ *
+ * The object will be unpacked from the table part and its lifetime
+ * will not be handled by the layout anymore. This is equivalent to
+ * elm_layout_content_unset() for table.
+ *
+ * @see elm_layout_table_pack()
+ * @see elm_layout_table_clear()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj) EINA_ARG_NONNULL(1, 2, 3);
+ /**
+ * Remove all child of the given part table.
+ *
+ * @param obj The layout object
+ * @param part The table part name to remove child.
+ * @param clear If EINA_TRUE, then all objects will be deleted as
+ * well, otherwise they will just be removed and will be
+ * dangling on the canvas.
+ *
+ * The objects will be removed from the table part and their lifetime will
+ * not be handled by the layout anymore. This is equivalent to
+ * elm_layout_table_unpack() for all table children.
+ *
+ * @see elm_layout_table_pack()
+ * @see elm_layout_table_unpack()
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Get the edje layout
+ *
+ * @param obj The layout object
+ *
+ * @return A Evas_Object with the edje layout settings loaded
+ * with function elm_layout_file_set
+ *
+ * This returns the edje object. It is not expected to be used to then
+ * swallow objects via edje_object_part_swallow() for example. Use
+ * elm_layout_content_set() instead so child object handling and sizing is
+ * done properly.
+ *
+ * @note This function should only be used if you really need to call some
+ * low level Edje function on this edje object. All the common stuff (setting
+ * text, emitting signals, hooking callbacks to signals, etc.) can be done
+ * with proper elementary functions.
+ *
+ * @see elm_object_signal_callback_add()
+ * @see elm_object_signal_emit()
+ * @see elm_object_text_part_set()
+ * @see elm_layout_content_set()
+ * @see elm_layout_box_append()
+ * @see elm_layout_table_pack()
+ * @see elm_layout_data_get()
+ *
+ * @ingroup Layout
+ */
+ EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Get the edje data from the given layout
+ *
+ * @param obj The layout object
+ * @param key The data key
+ *
+ * @return The edje data string
+ *
+ * This function fetches data specified inside the edje theme of this layout.
+ * This function return NULL if data is not found.
+ *
+ * In EDC this comes from a data block within the group block that @p
+ * obj was loaded from. E.g.
+ *
+ * @code
+ * collections {
+ * group {
+ * name: "a_group";
+ * data {
+ * item: "key1" "value1";
+ * item: "key2" "value2";
+ * }
+ * }
+ * }
+ * @endcode
+ *
+ * @ingroup Layout
+ */
+ EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Eval sizing
+ *
+ * @param obj The layout object
+ *
+ * Manually forces a sizing re-evaluation. This is useful when the minimum
+ * size required by the edje theme of this layout has changed. The change on
+ * the minimum size required by the edje theme is not immediately reported to
+ * the elementary layout, so one needs to call this function in order to tell
+ * the widget (layout) that it needs to reevaluate its own size.
+ *
+ * The minimum size of the theme is calculated based on minimum size of
+ * parts, the size of elements inside containers like box and table, etc. All
+ * of this can change due to state changes, and that's when this function
+ * should be called.
+ *
+ * Also note that a standard signal of "size,eval" "elm" emitted from the
+ * edje object will cause this to happen too.
+ *
+ * @ingroup Layout
+ */
+ EAPI void elm_layout_sizing_eval(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Identifiers for which clock digits should be editable, when a
- * clock widget is in edition mode. Values may be ORed together to
- * make a mask, naturally.
+ * Sets a specific cursor for an edje part.
*
- * @see elm_clock_edit_set()
- * @see elm_clock_digit_edit_set()
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
+ * @param cursor cursor name to use, see Elementary_Cursor.h
+ *
+ * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
+ * part not exists or it has "mouse_events: 0".
+ *
+ * @ingroup Layout
*/
- typedef enum _Elm_Clock_Digedit
- {
- ELM_CLOCK_NONE = 0, /**< Default value. Means that all digits are editable, when in edition mode. */
- ELM_CLOCK_HOUR_DECIMAL = 1 << 0, /**< Decimal algarism of hours value should be editable */
- ELM_CLOCK_HOUR_UNIT = 1 << 1, /**< Unit algarism of hours value should be editable */
- ELM_CLOCK_MIN_DECIMAL = 1 << 2, /**< Decimal algarism of minutes value should be editable */
- ELM_CLOCK_MIN_UNIT = 1 << 3, /**< Unit algarism of minutes value should be editable */
- ELM_CLOCK_SEC_DECIMAL = 1 << 4, /**< Decimal algarism of seconds value should be editable */
- ELM_CLOCK_SEC_UNIT = 1 << 5, /**< Unit algarism of seconds value should be editable */
- ELM_CLOCK_ALL = (1 << 6) - 1 /**< All digits should be editable */
- } Elm_Clock_Digedit;
+ EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor) EINA_ARG_NONNULL(1, 2);
/**
- * Add a new clock widget to the given parent Elementary
- * (container) object
+ * Get the cursor to be shown when mouse is over an edje part
*
- * @param parent The parent object
- * @return a new clock widget handle or @c NULL, on errors
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
+ * @return the cursor name.
*
- * This function inserts a new clock widget on the canvas.
+ * @ingroup Layout
+ */
+ EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Unsets a cursor previously set with elm_layout_part_cursor_set().
*
- * @ingroup Clock
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group, that had a cursor set
+ * with elm_layout_part_cursor_set().
+ *
+ * @ingroup Layout
*/
- EAPI Evas_Object *elm_clock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
/**
- * Set a clock widget's time, programmatically
+ * Sets a specific cursor style for an edje part.
*
- * @param obj The clock widget object
- * @param hrs The hours to set
- * @param min The minutes to set
- * @param sec The secondes to set
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
+ * @param style the theme style to use (default, transparent, ...)
*
- * This function updates the time that is showed by the clock
- * widget.
+ * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
+ * part not exists or it did not had a cursor set.
*
- * Values @b must be set within the following ranges:
- * - 0 - 23, for hours
- * - 0 - 59, for minutes
- * - 0 - 59, for seconds,
+ * @ingroup Layout
+ */
+ EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Gets a specific cursor style for an edje part.
*
- * even if the clock is not in "military" mode.
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
*
- * @warning The behavior for values set out of those ranges is @b
- * indefined.
+ * @return the theme style in use, defaults to "default". If the
+ * object does not have a cursor set, then NULL is returned.
*
- * @ingroup Clock
+ * @ingroup Layout
*/
- EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
/**
- * Get a clock widget's time values
+ * Sets if the cursor set should be searched on the theme or should use
+ * the provided by the engine, only.
*
- * @param obj The clock object
- * @param[out] hrs Pointer to the variable to get the hours value
- * @param[out] min Pointer to the variable to get the minutes value
- * @param[out] sec Pointer to the variable to get the seconds value
+ * @note before you set if should look on theme you should define a
+ * cursor with elm_layout_part_cursor_set(). By default it will only
+ * look for cursors provided by the engine.
*
- * This function gets the time set for @p obj, returning
- * it on the variables passed as the arguments to function
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
+ * @param engine_only if cursors should be just provided by the engine
+ * or should also search on widget's theme as well
*
- * @note Use @c NULL pointers on the time values you're not
- * interested in: they'll be ignored by the function.
+ * @return EINA_TRUE on success or EINA_FALSE on failure, that may be
+ * part not exists or it did not had a cursor set.
*
- * @ingroup Clock
+ * @ingroup Layout
+ */
+ EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only) EINA_ARG_NONNULL(1, 2);
+
+ /**
+ * Gets a specific cursor engine_only for an edje part.
+ *
+ * @param obj The layout object.
+ * @param part_name a part from loaded edje group.
+ *
+ * @return whenever the cursor is just provided by engine or also from theme.
+ *
+ * @ingroup Layout
+ */
+ EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
+
+/**
+ * @def elm_layout_icon_set
+ * Convienience macro to set the icon object in a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ */
+#define elm_layout_icon_set(_ly, _obj) \
+ do { \
+ const char *sig; \
+ elm_layout_content_set((_ly), "elm.swallow.icon", (_obj)); \
+ if ((_obj)) sig = "elm,state,icon,visible"; \
+ else sig = "elm,state,icon,hidden"; \
+ elm_object_signal_emit((_ly), sig, "elm"); \
+ } while (0)
+
+/**
+ * @def elm_layout_icon_get
+ * Convienience macro to get the icon object from a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ */
+#define elm_layout_icon_get(_ly) \
+ elm_layout_content_get((_ly), "elm.swallow.icon")
+
+/**
+ * @def elm_layout_end_set
+ * Convienience macro to set the end object in a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ */
+#define elm_layout_end_set(_ly, _obj) \
+ do { \
+ const char *sig; \
+ elm_layout_content_set((_ly), "elm.swallow.end", (_obj)); \
+ if ((_obj)) sig = "elm,state,end,visible"; \
+ else sig = "elm,state,end,hidden"; \
+ elm_object_signal_emit((_ly), sig, "elm"); \
+ } while (0)
+
+/**
+ * @def elm_layout_end_get
+ * Convienience macro to get the end object in a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ */
+#define elm_layout_end_get(_ly) \
+ elm_layout_content_get((_ly), "elm.swallow.end")
+
+/**
+ * @def elm_layout_label_set
+ * Convienience macro to set the label in a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ * @deprecated use elm_object_text_* instead.
+ */
+#define elm_layout_label_set(_ly, _txt) \
+ elm_layout_text_set((_ly), "elm.text", (_txt))
+
+/**
+ * @def elm_layout_label_get
+ * Convienience macro to get the label in a layout that follows the
+ * Elementary naming convention for its parts.
+ *
+ * @ingroup Layout
+ * @deprecated use elm_object_text_* instead.
+ */
+#define elm_layout_label_get(_ly) \
+ elm_layout_text_get((_ly), "elm.text")
+
+ /* smart callbacks called:
+ * "theme,changed" - when elm theme is changed.
*/
- EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) EINA_ARG_NONNULL(1);
/**
- * Set whether a given clock widget is under <b>edition mode</b> or
- * under (default) displaying-only mode.
+ * @defgroup Notify Notify
*
- * @param obj The clock object
- * @param edit @c EINA_TRUE to put it in edition, @c EINA_FALSE to
- * put it back to "displaying only" mode
+ * @image html img/widget/notify/preview-00.png
+ * @image latex img/widget/notify/preview-00.eps
*
- * This function makes a clock's time to be editable or not <b>by
- * user interaction</b>. When in edition mode, clocks @b stop
- * ticking, until one brings them back to canonical mode. The
- * elm_clock_digit_edit_set() function will influence which digits
- * of the clock will be editable. By default, all of them will be
- * (#ELM_CLOCK_NONE).
+ * Display a container in a particular region of the parent(top, bottom,
+ * etc. A timeout can be set to automatically hide the notify. This is so
+ * that, after an evas_object_show() on a notify object, if a timeout was set
+ * on it, it will @b automatically get hidden after that time.
*
- * @note am/pm sheets, if being shown, will @b always be editable
- * under edition mode.
+ * Signals that you can add callbacks for are:
+ * @li "timeout" - when timeout happens on notify and it's hidden
+ * @li "block,clicked" - when a click outside of the notify happens
*
- * @see elm_clock_edit_get()
+ * @ref tutorial_notify show usage of the API.
*
- * @ingroup Clock
+ * @{
*/
- EAPI void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1);
-
/**
- * Retrieve whether a given clock widget is under <b>edition
- * mode</b> or under (default) displaying-only mode.
- *
- * @param obj The clock object
- * @param edit @c EINA_TRUE, if it's in edition mode, @c EINA_FALSE
- * otherwise
- *
- * This function retrieves whether the clock's time can be edited
- * or not by user interaction.
- *
- * @see elm_clock_edit_set() for more details
+ * @brief Possible orient values for notify.
*
- * @ingroup Clock
+ * This values should be used in conjunction to elm_notify_orient_set() to
+ * set the position in which the notify should appear(relative to its parent)
+ * and in conjunction with elm_notify_orient_get() to know where the notify
+ * is appearing.
*/
- EAPI Eina_Bool elm_clock_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ typedef enum _Elm_Notify_Orient
+ {
+ ELM_NOTIFY_ORIENT_TOP, /**< Notify should appear in the top of parent, default */
+ ELM_NOTIFY_ORIENT_CENTER, /**< Notify should appear in the center of parent */
+ ELM_NOTIFY_ORIENT_BOTTOM, /**< Notify should appear in the bottom of parent */
+ ELM_NOTIFY_ORIENT_LEFT, /**< Notify should appear in the left of parent */
+ ELM_NOTIFY_ORIENT_RIGHT, /**< Notify should appear in the right of parent */
+ ELM_NOTIFY_ORIENT_TOP_LEFT, /**< Notify should appear in the top left of parent */
+ ELM_NOTIFY_ORIENT_TOP_RIGHT, /**< Notify should appear in the top right of parent */
+ ELM_NOTIFY_ORIENT_BOTTOM_LEFT, /**< Notify should appear in the bottom left of parent */
+ ELM_NOTIFY_ORIENT_BOTTOM_RIGHT, /**< Notify should appear in the bottom right of parent */
+ ELM_NOTIFY_ORIENT_LAST /**< Sentinel value, @b don't use */
+ } Elm_Notify_Orient;
/**
- * Set what digits of the given clock widget should be editable
- * when in edition mode.
- *
- * @param obj The clock object
- * @param digedit Bit mask indicating the digits to be editable
- * (values in #Elm_Clock_Digedit).
+ * @brief Add a new notify to the parent
*
- * If the @p digedit param is #ELM_CLOCK_NONE, editing will be
- * disabled on @p obj (same effect as elm_clock_edit_set(), with @c
- * EINA_FALSE).
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ */
+ EAPI Evas_Object *elm_notify_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set the content of the notify widget
*
- * @see elm_clock_digit_edit_get()
+ * @param obj The notify object
+ * @param content The content will be filled in this notify object
*
- * @ingroup Clock
+ * 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_notify_content_unset() function.
*/
- EAPI void elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
- * Retrieve what digits of the given clock widget should be
- * editable when in edition mode.
+ * @brief Unset the content of the notify widget
*
- * @param obj The clock object
- * @return Bit mask indicating the digits to be editable
- * (values in #Elm_Clock_Digedit).
+ * @param obj The notify object
+ * @return The content that was being used
*
- * @see elm_clock_digit_edit_set() for more details
+ * Unparent and return the content object which was set for this widget
*
- * @ingroup Clock
+ * @see elm_notify_content_set()
*/
- EAPI Elm_Clock_Digedit elm_clock_digit_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set if the given clock widget must show hours in military or
- * am/pm mode
- *
- * @param obj The clock object
- * @param am_pm @c EINA_TRUE to put it in am/pm mode, @c EINA_FALSE
- * to military mode
- *
- * This function sets if the clock must show hours in military or
- * am/pm mode. In some countries like Brazil the military mode
- * (00-24h-format) is used, in opposition to the USA, where the
- * am/pm mode is more commonly used.
+ * @brief Return the content of the notify widget
*
- * @see elm_clock_show_am_pm_get()
+ * @param obj The notify object
+ * @return The content that is being used
*
- * @ingroup Clock
+ * @see elm_notify_content_set()
*/
- EAPI void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get if the given clock widget shows hours in military or am/pm
- * mode
+ * @brief Set the notify parent
*
- * @param obj The clock object
- * @return @c EINA_TRUE, if in am/pm mode, @c EINA_FALSE if in
- * military
+ * @param obj The notify object
+ * @param content The new parent
*
- * This function gets if the clock shows hours in military or am/pm
- * mode.
+ * Once the parent object is set, a previously set one will be disconnected
+ * and replaced.
+ */
+ EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the notify parent
*
- * @see elm_clock_show_am_pm_set() for more details
+ * @param obj The notify object
+ * @return The parent
*
- * @ingroup Clock
+ * @see elm_notify_parent_set()
*/
- EAPI Eina_Bool elm_clock_show_am_pm_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Set if the given clock widget must show time with seconds or not
+ * @brief Set the orientation
*
- * @param obj The clock object
- * @param seconds @c EINA_TRUE to show seconds, @c EINA_FALSE otherwise
+ * @param obj The notify object
+ * @param orient The new orientation
*
- * This function sets if the given clock must show or not elapsed
- * seconds. By default, they are @b not shown.
+ * Sets the position in which the notify will appear in its parent.
*
- * @see elm_clock_show_seconds_get()
+ * @see @ref Elm_Notify_Orient for possible values.
+ */
+ EAPI void elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Return the orientation
+ * @param obj The notify object
+ * @return The orientation of the notification
*
- * @ingroup Clock
+ * @see elm_notify_orient_set()
+ * @see Elm_Notify_Orient
*/
- EAPI void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) EINA_ARG_NONNULL(1);
-
+ EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get whether the given clock widget is showing time with seconds
- * or not
+ * @brief Set the time interval after which the notify window is going to be
+ * hidden.
*
- * @param obj The clock object
- * @return @c EINA_TRUE if it's showing seconds, @c EINA_FALSE otherwise
+ * @param obj The notify object
+ * @param time The timeout in seconds
*
- * This function gets whether @p obj is showing or not the elapsed
- * seconds.
+ * This function sets a timeout and starts the timer controlling when the
+ * notify is hidden. Since calling evas_object_show() on a notify restarts
+ * the timer controlling when the notify is hidden, setting this before the
+ * notify is shown will in effect mean starting the timer when the notify is
+ * shown.
*
- * @see elm_clock_show_seconds_set()
+ * @note Set a value <= 0.0 to disable a running timer.
*
- * @ingroup Clock
+ * @note If the value > 0.0 and the notify is previously visible, the
+ * timer will be started with this value, canceling any running timer.
*/
- EAPI Eina_Bool elm_clock_show_seconds_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_notify_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1);
/**
- * Set the interval on time updates for an user mouse button hold
- * on clock widgets' time edition.
- *
- * @param obj The clock object
- * @param interval The (first) interval value in seconds
- *
- * This interval value is @b decreased while the user holds the
- * mouse pointer either incrementing or decrementing a given the
- * clock digit's value.
- *
- * This helps the user to get to a given time distant from the
- * current one easier/faster, as it will start to flip quicker and
- * quicker on mouse button holds.
+ * @brief Return the timeout value (in seconds)
+ * @param obj the notify object
*
- * 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.
+ * @see elm_notify_timeout_set()
+ */
+ EAPI double elm_notify_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets whether events should be passed to by a click outside
+ * its area.
*
- * The default starting interval value for automatic flips is
- * @b 0.85 seconds.
+ * @param obj The notify object
+ * @param repeats EINA_TRUE Events are repeats, else no
*
- * @see elm_clock_interval_get()
+ * When true if the user clicks outside the window the events will be caught
+ * by the others widgets, else the events are blocked.
*
- * @ingroup Clock
+ * @note The default value is EINA_TRUE.
*/
- EAPI void elm_clock_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
/**
- * Get the interval on time updates for an user mouse button hold
- * on clock widgets' time edition.
- *
- * @param obj The clock object
- * @return The (first) interval value, in seconds, set on it
- *
- * @see elm_clock_interval_set() for more details
+ * @brief Return true if events are repeat below the notify object
+ * @param obj the notify object
*
- * @ingroup Clock
+ * @see elm_notify_repeat_events_set()
*/
- EAPI double elm_clock_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @}
*/
/**
- * @defgroup Layout Layout
+ * @defgroup Hover Hover
*
- * @image html img/widget/layout/preview-00.png
- * @image latex img/widget/layout/preview-00.eps width=\textwidth
+ * @image html img/widget/hover/preview-00.png
+ * @image latex img/widget/hover/preview-00.eps
*
- * @image html img/layout-predefined.png
- * @image latex img/layout-predefined.eps width=\textwidth
+ * A Hover object will hover over its @p parent object at the @p target
+ * location. Anything in the background will be given a darker coloring to
+ * indicate that the hover object is on top (at the default theme). When the
+ * hover is clicked it is dismissed(hidden), if the contents of the hover are
+ * clicked that @b doesn't cause the hover to be dismissed.
*
- * This is a container widget that takes a standard Edje design file and
- * wraps it very thinly in a widget.
+ * @note The hover object will take up the entire space of @p target
+ * object.
*
- * An Edje design (theme) file has a very wide range of possibilities to
- * describe the behavior of elements added to the Layout. Check out the Edje
- * documentation and the EDC reference to get more information about what can
- * be done with Edje.
+ * Elementary has the following styles for the hover widget:
+ * @li default
+ * @li popout
+ * @li menu
+ * @li hoversel_vertical
*
- * Just like @ref List, @ref Box, and other container widgets, any
- * object added to the Layout will become its child, meaning that it will be
- * deleted if the Layout is deleted, move if the Layout is moved, and so on.
+ * The following are the available position for content:
+ * @li left
+ * @li top-left
+ * @li top
+ * @li top-right
+ * @li right
+ * @li bottom-right
+ * @li bottom
+ * @li bottom-left
+ * @li middle
+ * @li smart
*
- * The Layout widget can contain as many Contents, Boxes or Tables as
- * described in its theme file. For instance, objects can be added to
- * different Tables by specifying the respective Table part names. The same
- * is valid for Content and Box.
+ * Signals that you can add callbacks for are:
+ * @li "clicked" - the user clicked the empty space in the hover to dismiss
+ * @li "smart,changed" - a content object placed under the "smart"
+ * policy was replaced to a new slot direction.
*
- * The objects added as child of the Layout will behave as described in the
- * part description where they were added. There are 3 possible types of
- * parts where a child can be added:
+ * See @ref tutorial_hover for more information.
*
- * @section secContent Content (SWALLOW part)
+ * @{
+ */
+ typedef enum _Elm_Hover_Axis
+ {
+ ELM_HOVER_AXIS_NONE, /**< ELM_HOVER_AXIS_NONE -- no prefered 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
*
- * Only one object can be added to the @c SWALLOW part (but you still can
- * have many @c SWALLOW parts and one object on each of them). Use the @c
- * elm_layout_content_* set of functions to set, retrieve and unset objects
- * as content of the @c SWALLOW. After being set to this part, the object
- * size, position, visibility, clipping and other description properties
- * will be totally controled by the description of the given part (inside
- * the Edje theme file).
+ * @param parent The parent object
+ * @return The hover object or NULL if one could not be created
+ */
+ EAPI Evas_Object *elm_hover_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets the target object for the hover.
*
- * One can use @c evas_object_size_hint_* functions on the child to have some
- * kind of control over its behavior, but the resulting behavior will still
- * depend heavily on the @c SWALLOW part description.
+ * @param obj The hover object
+ * @param target The object to center the hover onto. The hover
*
- * The Edje theme also can change the part description, based on signals or
- * scripts running inside the theme. This change can also be animated. All of
- * this will affect the child object set as content accordingly. The object
- * size will be changed if the part size is changed, it will animate move if
- * the part is moving, and so on.
+ * This function will cause the hover to be centered on the target object.
+ */
+ EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Gets the target object for the hover.
*
- * The following picture demonstrates a Layout widget with a child object
- * added to its @c SWALLOW:
+ * @param obj The hover object
+ * @param parent The object to locate the hover over.
*
- * @image html layout_swallow.png
- * @image latex layout_swallow.eps width=\textwidth
+ * @see elm_hover_target_set()
+ */
+ EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets the parent object for the hover.
*
- * @section secBox Box (BOX part)
+ * @param obj The hover object
+ * @param parent The object to locate the hover over.
*
- * An Edje @c BOX part is very similar to the Elementary @ref Box widget. It
- * allows one to add objects to the box and have them distributed along its
- * area, accordingly to the specified @a layout property (now by @a layout we
- * mean the chosen layouting design of the Box, not the Layout widget
- * itself).
+ * This function will cause the hover to take up the entire space that the
+ * parent object fills.
+ */
+ EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Gets the parent object for the hover.
*
- * A similar effect for having a box with its position, size and other things
- * controled by the Layout theme would be to create an Elementary @ref Box
- * widget and add it as a Content in the @c SWALLOW part.
+ * @param obj The hover object
+ * @return The parent object to locate the hover over.
*
- * The main difference of using the Layout Box is that its behavior, the box
- * properties like layouting format, padding, align, etc. will be all
- * controled by the theme. This means, for example, that a signal could be
- * sent to the Layout theme (with elm_object_signal_emit()) and the theme
- * handled the signal by changing the box padding, or align, or both. Using
- * the Elementary @ref Box widget is not necessarily harder or easier, it
- * just depends on the circunstances and requirements.
+ * @see elm_hover_parent_set()
+ */
+ EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Sets the content of the hover object and the direction in which it
+ * will pop out.
*
- * The Layout Box can be used through the @c elm_layout_box_* set of
- * functions.
+ * @param obj The hover object
+ * @param swallow The direction that the object will be displayed
+ * at. Accepted values are "left", "top-left", "top", "top-right",
+ * "right", "bottom-right", "bottom", "bottom-left", "middle" and
+ * "smart".
+ * @param content The content to place at @p swallow
*
- * The following picture demonstrates a Layout widget with many child objects
- * added to its @c BOX part:
+ * Once the content object is set for a given direction, a previously
+ * set one (on the same direction) will be deleted. If you want to
+ * keep that old content object, use the elm_hover_content_unset()
+ * function.
*
- * @image html layout_box.png
- * @image latex layout_box.eps width=\textwidth
+ * All directions may have contents at the same time, except for
+ * "smart". This is a special placement hint and its use case
+ * independs of the calculations coming from
+ * elm_hover_best_content_location_get(). Its use is for cases when
+ * one desires only one hover content, but with a dinamic special
+ * placement within the hover area. The content's geometry, whenever
+ * it changes, will be used to decide on a best location not
+ * extrapolating the hover's parent object view to show it in (still
+ * being the hover's target determinant of its medium part -- move and
+ * resize it to simulate finger sizes, for example). If one of the
+ * directions other than "smart" are used, a previously content set
+ * using it will be deleted, and vice-versa.
+ */
+ EAPI void elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get the content of the hover object, in a given direction.
*
- * @section secTable Table (TABLE part)
+ * Return the content object which was set for this widget in the
+ * @p swallow direction.
*
- * Just like the @ref secBox, the Layout Table is very similar to the
- * Elementary @ref Table widget. It allows one to add objects to the Table
- * specifying the row and column where the object should be added, and any
- * column or row span if necessary.
+ * @param obj The hover object
+ * @param swallow The direction that the object was display at.
+ * @return The content that was being used
*
- * Again, we could have this design by adding a @ref Table widget to the @c
- * SWALLOW part using elm_layout_content_set(). The same difference happens
- * here when choosing to use the Layout Table (a @c TABLE part) instead of
- * the @ref Table plus @c SWALLOW part. It's just a matter of convenience.
+ * @see elm_hover_content_set()
+ */
+ EAPI Evas_Object *elm_hover_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Unset the content of the hover object, in a given direction.
*
- * The Layout Table can be used through the @c elm_layout_table_* set of
- * functions.
+ * Unparent and return the content object set at @p swallow direction.
*
- * The following picture demonstrates a Layout widget with many child objects
- * added to its @c TABLE part:
+ * @param obj The hover object
+ * @param swallow The direction that the object was display at.
+ * @return The content that was being used.
*
- * @image html layout_table.png
- * @image latex layout_table.eps width=\textwidth
+ * @see elm_hover_content_set()
+ */
+ EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Returns the best swallow location for content in the hover.
*
- * @section secPredef Predefined Layouts
+ * @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.
*
- * Another interesting thing about the Layout widget is that it offers some
- * predefined themes that come with the default Elementary theme. These
- * themes can be set by the call elm_layout_theme_set(), and provide some
- * basic functionality depending on the theme used.
+ * Best is defined here as the location at which there is the most available
+ * space.
*
- * Most of them already send some signals, some already provide a toolbar or
- * back and next buttons.
+ * @p pref_axis may be one of
+ * - @c ELM_HOVER_AXIS_NONE -- no prefered orientation
+ * - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal
+ * - @c ELM_HOVER_AXIS_VERTICAL -- vertical
+ * - @c ELM_HOVER_AXIS_BOTH -- both
*
- * These are available predefined theme layouts. All of them have class = @c
- * layout, group = @c application, and style = one of the following options:
+ * If ELM_HOVER_AXIS_HORIZONTAL is choosen the returned position will
+ * nescessarily be along the horizontal axis("left" or "right"). If
+ * ELM_HOVER_AXIS_VERTICAL is choosen the returned position will nescessarily
+ * be along the vertical axis("top" or "bottom"). Chossing
+ * ELM_HOVER_AXIS_BOTH or ELM_HOVER_AXIS_NONE has the same effect and the
+ * returned position may be in either axis.
*
- * @li @c toolbar-content - application with toolbar and main content area
- * @li @c toolbar-content-back - application with toolbar and main content
- * area with a back button and title area
- * @li @c toolbar-content-back-next - application with toolbar and main
- * content area with a back and next buttons and title area
- * @li @c content-back - application with a main content area with a back
- * button and title area
- * @li @c content-back-next - application with a main content area with a
- * back and next buttons and title area
- * @li @c toolbar-vbox - application with toolbar and main content area as a
- * vertical box
- * @li @c toolbar-table - application with toolbar and main content area as a
- * table
+ * @see elm_hover_content_set()
+ */
+ EAPI const char *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis) EINA_ARG_NONNULL(1);
+ /**
+ * @}
+ */
+
+ /* entry */
+ /**
+ * @defgroup Entry Entry
*
- * @section secExamples Examples
+ * @image html img/widget/entry/preview-00.png
+ * @image latex img/widget/entry/preview-00.eps width=\textwidth
+ * @image html img/widget/entry/preview-01.png
+ * @image latex img/widget/entry/preview-01.eps width=\textwidth
+ * @image html img/widget/entry/preview-02.png
+ * @image latex img/widget/entry/preview-02.eps width=\textwidth
+ * @image html img/widget/entry/preview-03.png
+ * @image latex img/widget/entry/preview-03.eps width=\textwidth
*
- * Some examples of the Layout widget can be found here:
- * @li @ref layout_example_01
- * @li @ref layout_example_02
- * @li @ref layout_example_03
- * @li @ref layout_example_edc
+ * An entry is a convenience widget which shows a box that the user can
+ * enter text into. Entries by default don't scroll, so they grow to
+ * accomodate the entire text, resizing the parent window as needed. This
+ * can be changed with the elm_entry_scrollable_set() function.
*
- */
-
- /**
- * Add a new layout to the parent
+ * They can also be single line or multi line (the default) and when set
+ * to multi line mode they support text wrapping in any of the modes
+ * indicated by #Elm_Wrap_Type.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * Other features include password mode, filtering of inserted text with
+ * elm_entry_text_filter_append() and related functions, inline "items" and
+ * formatted markup text.
*
- * @see elm_layout_file_set()
- * @see elm_layout_theme_set()
+ * @section entry-markup Formatted text
*
- * @ingroup Layout
- */
- EAPI Evas_Object *elm_layout_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- /**
- * Set the file that will be used as layout
+ * The markup tags supported by the Entry are defined by the theme, but
+ * even when writing new themes or extensions it's a good idea to stick to
+ * a sane default, to maintain coherency and avoid application breakages.
+ * Currently defined by the default theme are the following tags:
+ * @li \<br\>: Inserts a line break.
+ * @li \<ps\>: Inserts a paragraph separator. This is preferred over line
+ * breaks.
+ * @li \<tab\>: Inserts a tab.
+ * @li \<em\>...\</em\>: Emphasis. Sets the @em oblique style for the
+ * enclosed text.
+ * @li \<b\>...\</b\>: Sets the @b bold style for the enclosed text.
+ * @li \<link\>...\</link\>: Underlines the enclosed text.
+ * @li \<hilight\>...\</hilight\>: Hilights the enclosed text.
*
- * @param obj The layout object
- * @param file The path to file (edj) that will be used as layout
- * @param group The group that the layout belongs in edje file
+ * @section entry-special Special markups
*
- * @return (1 = success, 0 = error)
+ * Besides those used to format text, entries support two special markup
+ * tags used to insert clickable portions of text or items inlined within
+ * the text.
*
- * @ingroup Layout
- */
- EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1);
- /**
- * Set the edje group from the elementary theme that will be used as layout
+ * @subsection entry-anchors Anchors
*
- * @param obj The layout object
- * @param clas the clas of the group
- * @param group the group
- * @param style the style to used
+ * Anchors are similar to HTML anchors. Text can be surrounded by \<a\> and
+ * \</a\> tags and an event will be generated when this text is clicked,
+ * like this:
*
- * @return (1 = success, 0 = error)
+ * @code
+ * This text is outside <a href=anc-01>but this one is an anchor</a>
+ * @endcode
*
- * @ingroup Layout
- */
- EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style) EINA_ARG_NONNULL(1);
- /**
- * Set the layout content.
+ * The @c href attribute in the opening tag gives the name that will be
+ * used to identify the anchor and it can be any valid utf8 string.
*
- * @param obj The layout object
- * @param swallow The swallow part name in the edje file
- * @param content The child that will be added in this layout object
+ * When an anchor is clicked, an @c "anchor,clicked" signal is emitted with
+ * an #Elm_Entry_Anchor_Info in the @c event_info parameter for the
+ * callback function. The same applies for "anchor,in" (mouse in), "anchor,out"
+ * (mouse out), "anchor,down" (mouse down), and "anchor,up" (mouse up) events on
+ * an anchor.
*
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep that old content object, use the
- * elm_layout_content_unset() function.
+ * @subsection entry-items Items
*
- * @note In an Edje theme, the part used as a content container is called @c
- * SWALLOW. This is why the parameter name is called @p swallow, but it is
- * expected to be a part name just like the second parameter of
- * elm_layout_box_append().
+ * Inlined in the text, any other @c Evas_Object can be inserted by using
+ * \<item\> tags this way:
*
- * @see elm_layout_box_append()
- * @see elm_layout_content_get()
- * @see elm_layout_content_unset()
- * @see @ref secBox
+ * @code
+ * <item size=16x16 vsize=full href=emoticon/haha></item>
+ * @endcode
*
- * @ingroup Layout
- */
- EAPI void elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1);
- /**
- * Get the child object in the given content part.
+ * Just like with anchors, the @c href identifies each item, but these need,
+ * in addition, to indicate their size, which is done using any one of
+ * @c size, @c absize or @c relsize attributes. These attributes take their
+ * value in the WxH format, where W is the width and H the height of the
+ * item.
*
- * @param obj The layout object
- * @param swallow The SWALLOW part to get its content
+ * @li absize: Absolute pixel size for the item. Whatever value is set will
+ * be the item's size regardless of any scale value the object may have
+ * been set to. The final line height will be adjusted to fit larger items.
+ * @li size: Similar to @c absize, but it's adjusted to the scale value set
+ * for the object.
+ * @li relsize: Size is adjusted for the item to fit within the current
+ * line height.
*
- * @return The swallowed object or NULL if none or an error occurred
+ * Besides their size, items are specificed a @c vsize value that affects
+ * how their final size and position are calculated. The possible values
+ * are:
+ * @li ascent: Item will be placed within the line's baseline and its
+ * ascent. That is, the height between the line where all characters are
+ * positioned and the highest point in the line. For @c size and @c absize
+ * items, the descent value will be added to the total line height to make
+ * them fit. @c relsize items will be adjusted to fit within this space.
+ * @li full: Items will be placed between the descent and ascent, or the
+ * lowest point in the line and its highest.
*
- * @see elm_layout_content_set()
+ * The next image shows different configurations of items and how they
+ * are the previously mentioned options affect their sizes. In all cases,
+ * the green line indicates the ascent, blue for the baseline and red for
+ * the descent.
*
- * @ingroup Layout
- */
- EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
- /**
- * Unset the layout content.
+ * @image html entry_item.png
+ * @image latex entry_item.eps width=\textwidth
*
- * @param obj The layout object
- * @param swallow The swallow part name in the edje file
- * @return The content that was being used
+ * And another one to show how size differs from absize. In the first one,
+ * the scale value is set to 1.0, while the second one is using one of 2.0.
*
- * Unparent and return the content object which was set for this part.
+ * @image html entry_item_scale.png
+ * @image latex entry_item_scale.eps width=\textwidth
*
- * @see elm_layout_content_set()
+ * After the size for an item is calculated, the entry will request an
+ * object to place in its space. For this, the functions set with
+ * elm_entry_item_provider_append() and related functions will be called
+ * in order until one of them returns a @c non-NULL value. If no providers
+ * are available, or all of them return @c NULL, then the entry falls back
+ * to one of the internal defaults, provided the name matches with one of
+ * them.
*
- * @ingroup Layout
- */
- EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
- /**
- * Set the text of the given part
+ * All of the following are currently supported:
*
- * @param obj The layout object
- * @param part The TEXT part where to set the text
- * @param text The text to set
+ * - emoticon/angry
+ * - emoticon/angry-shout
+ * - emoticon/crazy-laugh
+ * - emoticon/evil-laugh
+ * - emoticon/evil
+ * - emoticon/goggle-smile
+ * - emoticon/grumpy
+ * - emoticon/grumpy-smile
+ * - emoticon/guilty
+ * - emoticon/guilty-smile
+ * - emoticon/haha
+ * - emoticon/half-smile
+ * - emoticon/happy-panting
+ * - emoticon/happy
+ * - emoticon/indifferent
+ * - emoticon/kiss
+ * - emoticon/knowing-grin
+ * - emoticon/laugh
+ * - emoticon/little-bit-sorry
+ * - emoticon/love-lots
+ * - emoticon/love
+ * - emoticon/minimal-smile
+ * - emoticon/not-happy
+ * - emoticon/not-impressed
+ * - emoticon/omg
+ * - emoticon/opensmile
+ * - emoticon/smile
+ * - emoticon/sorry
+ * - emoticon/squint-laugh
+ * - emoticon/surprised
+ * - emoticon/suspicious
+ * - emoticon/tongue-dangling
+ * - emoticon/tongue-poke
+ * - emoticon/uh
+ * - emoticon/unhappy
+ * - emoticon/very-sorry
+ * - emoticon/what
+ * - emoticon/wink
+ * - emoticon/worried
+ * - emoticon/wtf
*
- * @ingroup Layout
- * @deprecated use elm_object_text_* instead.
- */
- EINA_DEPRECATED EAPI void elm_layout_text_set(Evas_Object *obj, const char *part, const char *text) EINA_ARG_NONNULL(1);
- /**
- * Get the text set in the given part
+ * Alternatively, an item may reference an image by its path, using
+ * the URI form @c file:///path/to/an/image.png and the entry will then
+ * use that image for the item.
*
- * @param obj The layout object
- * @param part The TEXT part to retrieve the text off
+ * @section entry-files Loading and saving files
*
- * @return The text set in @p part
+ * Entries have convinience functions to load text from a file and save
+ * changes back to it after a short delay. The automatic saving is enabled
+ * by default, but can be disabled with elm_entry_autosave_set() and files
+ * can be loaded directly as plain text or have any markup in them
+ * recognized. See elm_entry_file_set() for more details.
*
- * @ingroup Layout
- * @deprecated use elm_object_text_* instead.
- */
- EINA_DEPRECATED EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part) EINA_ARG_NONNULL(1);
- /**
- * Append child to layout box part.
+ * @section entry-signals Emitted signals
*
- * @param obj the layout object
- * @param part the box part to which the object will be appended.
- * @param child the child object to append to box.
+ * This widget emits the following signals:
+ *
+ * @li "changed": The text within the entry was changed.
+ * @li "changed,user": The text within the entry was changed because of user interaction.
+ * @li "activated": The enter key was pressed on a single line entry.
+ * @li "press": A mouse button has been pressed on the entry.
+ * @li "longpressed": A mouse button has been pressed and held for a couple
+ * seconds.
+ * @li "clicked": The entry has been clicked (mouse press and release).
+ * @li "clicked,double": The entry has been double clicked.
+ * @li "clicked,triple": The entry has been triple clicked.
+ * @li "focused": The entry has received focus.
+ * @li "unfocused": The entry has lost focus.
+ * @li "selection,paste": A paste of the clipboard contents was requested.
+ * @li "selection,copy": A copy of the selected text into the clipboard was
+ * requested.
+ * @li "selection,cut": A cut of the selected text into the clipboard was
+ * requested.
+ * @li "selection,start": A selection has begun and no previous selection
+ * existed.
+ * @li "selection,changed": The current selection has changed.
+ * @li "selection,cleared": The current selection has been cleared.
+ * @li "cursor,changed": The cursor has changed position.
+ * @li "anchor,clicked": An anchor has been clicked. The event_info
+ * parameter for the callback will be an #Elm_Entry_Anchor_Info.
+ * @li "anchor,in": Mouse cursor has moved into an anchor. The event_info
+ * parameter for the callback will be an #Elm_Entry_Anchor_Info.
+ * @li "anchor,out": Mouse cursor has moved out of an anchor. The event_info
+ * parameter for the callback will be an #Elm_Entry_Anchor_Info.
+ * @li "anchor,up": Mouse button has been unpressed on an anchor. The event_info
+ * parameter for the callback will be an #Elm_Entry_Anchor_Info.
+ * @li "anchor,down": Mouse button has been pressed on an anchor. The event_info
+ * parameter for the callback will be an #Elm_Entry_Anchor_Info.
+ * @li "preedit,changed": The preedit string has changed.
*
- * Once the object is appended, it will become child of the layout. Its
- * lifetime will be bound to the layout, whenever the layout dies the child
- * will be deleted automatically. One should use elm_layout_box_remove() to
- * make this layout forget about the object.
+ * @section entry-examples
*
- * @see elm_layout_box_prepend()
- * @see elm_layout_box_insert_before()
- * @see elm_layout_box_insert_at()
- * @see elm_layout_box_remove()
+ * An overview of the Entry API can be seen in @ref entry_example_01
*
- * @ingroup Layout
+ * @{
*/
- EAPI void elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
/**
- * Prepend child to layout box part.
- *
- * @param obj the layout object
- * @param part the box part to prepend.
- * @param child the child object to prepend to box.
- *
- * Once the object is prepended, it will become child of the layout. Its
- * lifetime will be bound to the layout, whenever the layout dies the child
- * will be deleted automatically. One should use elm_layout_box_remove() to
- * make this layout forget about the object.
- *
- * @see elm_layout_box_append()
- * @see elm_layout_box_insert_before()
- * @see elm_layout_box_insert_at()
- * @see elm_layout_box_remove()
+ * @typedef Elm_Entry_Anchor_Info
*
- * @ingroup Layout
+ * The info sent in the callback for the "anchor,clicked" signals emitted
+ * by entries.
*/
- EAPI void elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
/**
- * Insert child to layout box part before a reference object.
- *
- * @param obj the layout object
- * @param part the box part to insert.
- * @param child the child object to insert into box.
- * @param reference another reference object to insert before in box.
- *
- * Once the object is inserted, it will become child of the layout. Its
- * lifetime will be bound to the layout, whenever the layout dies the child
- * will be deleted automatically. One should use elm_layout_box_remove() to
- * make this layout forget about the object.
- *
- * @see elm_layout_box_append()
- * @see elm_layout_box_prepend()
- * @see elm_layout_box_insert_before()
- * @see elm_layout_box_remove()
+ * @struct _Elm_Entry_Anchor_Info
*
- * @ingroup Layout
+ * The info sent in the callback for the "anchor,clicked" signals emitted
+ * by entries.
*/
- EAPI void elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1);
+ 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 */
+ };
/**
- * Insert child to layout box part at a given position.
- *
- * @param obj the layout object
- * @param part the box part to insert.
- * @param child the child object to insert into box.
- * @param pos the numeric position >=0 to insert the child.
- *
- * Once the object is inserted, it will become child of the layout. Its
- * lifetime will be bound to the layout, whenever the layout dies the child
- * will be deleted automatically. One should use elm_layout_box_remove() to
- * make this layout forget about the object.
- *
- * @see elm_layout_box_append()
- * @see elm_layout_box_prepend()
- * @see elm_layout_box_insert_before()
- * @see elm_layout_box_remove()
- *
- * @ingroup Layout
+ * @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. This data can be modified,
+ * but any additional allocations must be managed by the user.
+ * @see elm_entry_text_filter_append
+ * @see elm_entry_text_filter_prepend
*/
- EAPI void elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1);
+ typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
+
/**
- * Remove a child of the given part box.
- *
- * @param obj The layout object
- * @param part The box part name to remove child.
- * @param child The object to remove from box.
- * @return The object that was being used, or NULL if not found.
- *
- * The object will be removed from the box part and its lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for box.
+ * This adds an entry to @p parent object.
*
- * @see elm_layout_box_append()
- * @see elm_layout_box_remove_all()
+ * By default, entries are:
+ * @li not scrolled
+ * @li multi-line
+ * @li word wrapped
+ * @li autosave is enabled
*
- * @ingroup Layout
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*/
- EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child) EINA_ARG_NONNULL(1, 2, 3);
+ EAPI Evas_Object *elm_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Remove all child of the given part box.
- *
- * @param obj The layout object
- * @param part The box part name to remove child.
- * @param clear If EINA_TRUE, then all objects will be deleted as
- * well, otherwise they will just be removed and will be
- * dangling on the canvas.
+ * Sets the entry to single line mode.
*
- * The objects will be removed from the box part and their lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_box_remove() for all box children.
+ * In single line mode, entries don't ever wrap when the text reaches the
+ * edge, and instead they keep growing horizontally. Pressing the @c Enter
+ * key will generate an @c "activate" event instead of adding a new line.
*
- * @see elm_layout_box_append()
- * @see elm_layout_box_remove()
+ * When @p single_line is @c EINA_FALSE, line wrapping takes effect again
+ * and pressing enter will break the text into a different line
+ * without generating any events.
*
- * @ingroup Layout
+ * @param obj The entry object
+ * @param single_line If true, the text in the entry
+ * will be on a single line.
*/
- EAPI void elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
/**
- * Insert child to layout table part.
- *
- * @param obj the layout object
- * @param part the box part to pack child.
- * @param child_obj the child object to pack into table.
- * @param col the column to which the child should be added. (>= 0)
- * @param row the row to which the child should be added. (>= 0)
- * @param colspan how many columns should be used to store this object. (>=
- * 1)
- * @param rowspan how many rows should be used to store this object. (>= 1)
- *
- * Once the object is inserted, it will become child of the table. Its
- * lifetime will be bound to the layout, and whenever the layout dies the
- * child will be deleted automatically. One should use
- * elm_layout_table_remove() to make this layout forget about the object.
- *
- * If @p colspan or @p rowspan are bigger than 1, that object will occupy
- * more space than a single cell. For instance, the following code:
- * @code
- * elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1);
- * @endcode
- *
- * Would result in an object being added like the following picture:
- *
- * @image html layout_colspan.png
- * @image latex layout_colspan.eps width=\textwidth
+ * Gets whether the entry is set to be single line.
*
- * @see elm_layout_table_unpack()
- * @see elm_layout_table_clear()
+ * @param obj The entry object
+ * @return single_line If true, the text in the entry is set to display
+ * on a single line.
*
- * @ingroup Layout
+ * @see elm_entry_single_line_set()
*/
- EAPI void elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Unpack (remove) a child of the given part table.
- *
- * @param obj The layout object
- * @param part The table part name to remove child.
- * @param child_obj The object to remove from table.
- * @return The object that was being used, or NULL if not found.
- *
- * The object will be unpacked from the table part and its lifetime
- * will not be handled by the layout anymore. This is equivalent to
- * elm_layout_content_unset() for table.
+ * Sets the entry to password mode.
*
- * @see elm_layout_table_pack()
- * @see elm_layout_table_clear()
+ * In password mode, entries are implicitly single line and the display of
+ * any text in them is replaced with asterisks (*).
*
- * @ingroup Layout
+ * @param obj The entry object
+ * @param password If true, password mode is enabled.
*/
- EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj) EINA_ARG_NONNULL(1, 2, 3);
+ EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1);
/**
- * Remove all child of the given part table.
- *
- * @param obj The layout object
- * @param part The table part name to remove child.
- * @param clear If EINA_TRUE, then all objects will be deleted as
- * well, otherwise they will just be removed and will be
- * dangling on the canvas.
- *
- * The objects will be removed from the table part and their lifetime will
- * not be handled by the layout anymore. This is equivalent to
- * elm_layout_table_unpack() for all table children.
+ * Gets whether the entry is set to password mode.
*
- * @see elm_layout_table_pack()
- * @see elm_layout_table_unpack()
+ * @param obj The entry object
+ * @return If true, the entry is set to display all characters
+ * as asterisks (*).
*
- * @ingroup Layout
+ * @see elm_entry_password_set()
*/
- EAPI void elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear) EINA_ARG_NONNULL(1, 2);
+ EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the edje layout
- *
- * @param obj The layout object
- *
- * @return A Evas_Object with the edje layout settings loaded
- * with function elm_layout_file_set
+ * This sets the text displayed within the entry to @p entry.
*
- * This returns the edje object. It is not expected to be used to then
- * swallow objects via edje_object_part_swallow() for example. Use
- * elm_layout_content_set() instead so child object handling and sizing is
- * done properly.
+ * @param obj The entry object
+ * @param entry The text to be displayed
*
- * @note This function should only be used if you really need to call some
- * low level Edje function on this edje object. All the common stuff (setting
- * text, emitting signals, hooking callbacks to signals, etc.) can be done
- * with proper elementary functions.
+ * @deprecated Use elm_object_text_set() instead.
+ */
+ EAPI void elm_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ /**
+ * This returns the text currently shown in object @p entry.
+ * See also elm_entry_entry_set().
*
- * @see elm_object_signal_callback_add()
- * @see elm_object_signal_emit()
- * @see elm_object_text_part_set()
- * @see elm_layout_content_set()
- * @see elm_layout_box_append()
- * @see elm_layout_table_pack()
- * @see elm_layout_data_get()
+ * @param obj The entry object
+ * @return The currently displayed text or NULL on failure
*
- * @ingroup Layout
+ * @deprecated Use elm_object_text_get() instead.
*/
- EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the edje data from the given layout
- *
- * @param obj The layout object
- * @param key The data key
- *
- * @return The edje data string
+ * Appends @p entry to the text of the entry.
*
- * This function fetches data specified inside the edje theme of this layout.
- * This function return NULL if data is not found.
+ * Adds the text in @p entry to the end of any text already present in the
+ * widget.
*
- * In EDC this comes from a data block within the group block that @p
- * obj was loaded from. E.g.
+ * The appended text is subject to any filters set for the widget.
*
- * @code
- * collections {
- * group {
- * name: "a_group";
- * data {
- * item: "key1" "value1";
- * item: "key2" "value2";
- * }
- * }
- * }
- * @endcode
+ * @param obj The entry object
+ * @param entry The text to be displayed
*
- * @ingroup Layout
+ * @see elm_entry_text_filter_append()
*/
- EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
/**
- * Eval sizing
+ * Gets whether the entry is empty.
*
- * @param obj The layout object
+ * Empty means no text at all. If there are any markup tags, like an item
+ * tag for which no provider finds anything, and no text is displayed, this
+ * function still returns EINA_FALSE.
*
- * Manually forces a sizing re-evaluation. This is useful when the minimum
- * size required by the edje theme of this layout has changed. The change on
- * the minimum size required by the edje theme is not immediately reported to
- * the elementary layout, so one needs to call this function in order to tell
- * the widget (layout) that it needs to reevaluate its own size.
+ * @param obj The entry object
+ * @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
+ */
+ EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Gets any selected text within the entry.
*
- * The minimum size of the theme is calculated based on minimum size of
- * parts, the size of elements inside containers like box and table, etc. All
- * of this can change due to state changes, and that's when this function
- * should be called.
+ * If there's any selected text in the entry, this function returns it as
+ * a string in markup format. NULL is returned if no selection exists or
+ * if an error occurred.
*
- * Also note that a standard signal of "size,eval" "elm" emitted from the
- * edje object will cause this to happen too.
+ * The returned value points to an internal string and should not be freed
+ * or modified in any way. If the @p entry object is deleted or its
+ * contents are changed, the returned pointer should be considered invalid.
*
- * @ingroup Layout
- */
- EAPI void elm_layout_sizing_eval(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor) EINA_ARG_NONNULL(1, 2);
- EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
- EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style) EINA_ARG_NONNULL(1, 2);
- EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
- EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only) EINA_ARG_NONNULL(1, 2);
- EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2);
-/**
- * @def elm_layout_icon_set
- * Convienience macro to set the icon object in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- */
-#define elm_layout_icon_set(_ly, _obj) \
- do { \
- const char *sig; \
- elm_layout_content_set((_ly), "elm.swallow.icon", (_obj)); \
- if ((_obj)) sig = "elm,state,icon,visible"; \
- else sig = "elm,state,icon,hidden"; \
- elm_object_signal_emit((_ly), sig, "elm"); \
- } while (0)
-
-/**
- * @def elm_layout_icon_get
- * Convienience macro to get the icon object from a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- */
-#define elm_layout_icon_get(_ly) \
- elm_layout_content_get((_ly), "elm.swallow.icon")
-
-/**
- * @def elm_layout_end_set
- * Convienience macro to set the end object in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- */
-#define elm_layout_end_set(_ly, _obj) \
- do { \
- const char *sig; \
- elm_layout_content_set((_ly), "elm.swallow.end", (_obj)); \
- if ((_obj)) sig = "elm,state,end,visible"; \
- else sig = "elm,state,end,hidden"; \
- elm_object_signal_emit((_ly), sig, "elm"); \
- } while (0)
-
-/**
- * @def elm_layout_end_get
- * Convienience macro to get the end object in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- */
-#define elm_layout_end_get(_ly) \
- elm_layout_content_get((_ly), "elm.swallow.end")
-
-/**
- * @def elm_layout_label_set
- * Convienience macro to set the label in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- * @deprecated use elm_object_text_* instead.
- */
-#define elm_layout_label_set(_ly, _txt) \
- elm_layout_text_set((_ly), "elm.text", (_txt))
-
-/**
- * @def elm_layout_label_get
- * Convienience macro to get the label in a layout that follows the
- * Elementary naming convention for its parts.
- *
- * @ingroup Layout
- * @deprecated use elm_object_text_* instead.
- */
-#define elm_layout_label_get(_ly) \
- elm_layout_text_get((_ly), "elm.text")
-
- /* smart callbacks called:
- * "theme,changed" - when elm theme is changed.
+ * @param obj The entry object
+ * @return The selected text within the entry or NULL on failure
*/
-
+ EAPI const char *elm_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Notify Notify
+ * Inserts the given text into the entry at the current cursor position.
*
- * @image html img/widget/notify/preview-00.png
- * @image latex img/widget/notify/preview-00.eps
+ * This inserts text at the cursor position as if it was typed
+ * by the user (note that this also allows markup which a user
+ * can't just "type" as it would be converted to escaped text, so this
+ * call can be used to insert things like emoticon items or bold push/pop
+ * tags, other font and color change tags etc.)
*
- * Display a container in a particular region of the parent(top, bottom,
- * etc. A timeout can be set to automatically hide the notify. This is so
- * that, after an evas_object_show() on a notify object, if a timeout was set
- * on it, it will @b automatically get hidden after that time.
+ * If any selection exists, it will be replaced by the inserted text.
*
- * Signals that you can add callbacks for are:
- * @li "timeout" - when timeout happens on notify and it's hidden
- * @li "block,clicked" - when a click outside of the notify happens
+ * The inserted text is subject to any filters set for the widget.
*
- * @ref tutorial_notify show usage of the API.
+ * @param obj The entry object
+ * @param entry The text to insert
*
- * @{
+ * @see elm_entry_text_filter_append()
*/
+ EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
/**
- * @brief Possible orient values for notify.
+ * Set the line wrap type to use on multi-line entries.
*
- * This values should be used in conjunction to elm_notify_orient_set() to
- * set the position in which the notify should appear(relative to its parent)
- * and in conjunction with elm_notify_orient_get() to know where the notify
- * is appearing.
- */
- typedef enum _Elm_Notify_Orient
- {
- ELM_NOTIFY_ORIENT_TOP, /**< Notify should appear in the top of parent, default */
- ELM_NOTIFY_ORIENT_CENTER, /**< Notify should appear in the center of parent */
- ELM_NOTIFY_ORIENT_BOTTOM, /**< Notify should appear in the bottom of parent */
- ELM_NOTIFY_ORIENT_LEFT, /**< Notify should appear in the left of parent */
- ELM_NOTIFY_ORIENT_RIGHT, /**< Notify should appear in the right of parent */
- ELM_NOTIFY_ORIENT_TOP_LEFT, /**< Notify should appear in the top left of parent */
- ELM_NOTIFY_ORIENT_TOP_RIGHT, /**< Notify should appear in the top right of parent */
- ELM_NOTIFY_ORIENT_BOTTOM_LEFT, /**< Notify should appear in the bottom left of parent */
- ELM_NOTIFY_ORIENT_BOTTOM_RIGHT, /**< Notify should appear in the bottom right of parent */
- ELM_NOTIFY_ORIENT_LAST /**< Sentinel value, @b don't use */
- } Elm_Notify_Orient;
- /**
- * @brief Add a new notify to the parent
+ * Sets the wrap type used by the entry to any of the specified in
+ * #Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
+ * line (without inserting a line break or paragraph separator) when it
+ * reaches the far edge of the widget.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * Note that this only makes sense for multi-line entries. A widget set
+ * to be single line will never wrap.
+ *
+ * @param obj The entry object
+ * @param wrap The wrap mode to use. See #Elm_Wrap_Type for details on them
*/
- EAPI Evas_Object *elm_notify_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
/**
- * @brief Set the content of the notify widget
+ * Gets the wrap mode the entry was set to use.
*
- * @param obj The notify object
- * @param content The content will be filled in this notify object
+ * @param obj The entry object
+ * @return Wrap type
*
- * 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_notify_content_unset() function.
+ * @see also elm_entry_line_wrap_set()
*/
- EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Unset the content of the notify widget
+ * Sets if the entry is to be editable or not.
*
- * @param obj The notify object
- * @return The content that was being used
+ * By default, entries are editable and when focused, any text input by the
+ * user will be inserted at the current cursor position. But calling this
+ * function with @p editable as EINA_FALSE will prevent the user from
+ * inputting text into the entry.
*
- * Unparent and return the content object which was set for this widget
+ * The only way to change the text of a non-editable entry is to use
+ * elm_object_text_set(), elm_entry_entry_insert() and other related
+ * functions.
*
- * @see elm_notify_content_set()
+ * @param obj The entry object
+ * @param editable If EINA_TRUE, user input will be inserted in the entry,
+ * if not, the entry is read-only and no user input is allowed.
*/
- EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1);
/**
- * @brief Return the content of the notify widget
+ * Gets whether the entry is editable or not.
*
- * @param obj The notify object
- * @return The content that is being used
+ * @param obj The entry object
+ * @return If true, the entry is editable by the user.
+ * If false, it is not editable by the user
+ *
+ * @see elm_entry_editable_set()
+ */
+ EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This drops any existing text selection within the entry.
*
- * @see elm_notify_content_set()
+ * @param obj The entry object
*/
- EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set the notify parent
- *
- * @param obj The notify object
- * @param content The new parent
+ * This selects all text within the entry.
*
- * Once the parent object is set, a previously set one will be disconnected
- * and replaced.
+ * @param obj The entry object
*/
- EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Get the notify parent
- *
- * @param obj The notify object
- * @return The parent
+ * This moves the cursor one place to the right within the entry.
*
- * @see elm_notify_parent_set()
+ * @param obj The entry object
+ * @return EINA_TRUE upon success, EINA_FALSE upon failure
*/
- EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set the orientation
- *
- * @param obj The notify object
- * @param orient The new orientation
- *
- * Sets the position in which the notify will appear in its parent.
+ * This moves the cursor one place to the left within the entry.
*
- * @see @ref Elm_Notify_Orient for possible values.
+ * @param obj The entry object
+ * @return EINA_TRUE upon success, EINA_FALSE upon failure
*/
- EAPI void elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Return the orientation
- * @param obj The notify object
- * @return The orientation of the notification
+ * This moves the cursor one line up within the entry.
*
- * @see elm_notify_orient_set()
- * @see Elm_Notify_Orient
+ * @param obj The entry object
+ * @return EINA_TRUE upon success, EINA_FALSE upon failure
*/
- EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Set the time interval after which the notify window is going to be
- * hidden.
- *
- * @param obj The notify object
- * @param time The timeout in seconds
- *
- * This function sets a timeout and starts the timer controlling when the
- * notify is hidden. Since calling evas_object_show() on a notify restarts
- * the timer controlling when the notify is hidden, setting this before the
- * notify is shown will in effect mean starting the timer when the notify is
- * shown.
- *
- * @note Set a value <= 0.0 to disable a running timer.
+ * This moves the cursor one line down within the entry.
*
- * @note If the value > 0.0 and the notify is previously visible, the
- * timer will be started with this value, canceling any running timer.
+ * @param obj The entry object
+ * @return EINA_TRUE upon success, EINA_FALSE upon failure
*/
- EAPI void elm_notify_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Return the timeout value (in seconds)
- * @param obj the notify object
+ * This moves the cursor to the beginning of the entry.
*
- * @see elm_notify_timeout_set()
+ * @param obj The entry object
*/
- EAPI double elm_notify_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Sets whether events should be passed to by a click outside
- * its area.
- *
- * @param obj The notify object
- * @param repeats EINA_TRUE Events are repeats, else no
- *
- * When true if the user clicks outside the window the events will be caught
- * by the others widgets, else the events are blocked.
+ * This moves the cursor to the end of the entry.
*
- * @note The default value is EINA_TRUE.
+ * @param obj The entry object
*/
- EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Return true if events are repeat below the notify object
- * @param obj the notify object
+ * This moves the cursor to the beginning of the current line.
*
- * @see elm_notify_repeat_events_set()
+ * @param obj The entry object
*/
- EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @}
+ * This moves the cursor to the end of the current line.
+ *
+ * @param obj The entry object
*/
-
+ EAPI void elm_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @defgroup Hover Hover
- *
- * @image html img/widget/hover/preview-00.png
- * @image latex img/widget/hover/preview-00.eps
- *
- * A Hover object will hover over its @p parent object at the @p target
- * location. Anything in the background will be given a darker coloring to
- * indicate that the hover object is on top (at the default theme). When the
- * hover is clicked it is dismissed(hidden), if the contents of the hover are
- * clicked that @b doesn't cause the hover to be dismissed.
- *
- * @note The hover object will take up the entire space of @p target
- * object.
- *
- * Elementary has the following styles for the hover widget:
- * @li default
- * @li popout
- * @li menu
- * @li hoversel_vertical
- *
- * The following are the available position for content:
- * @li left
- * @li top-left
- * @li top
- * @li top-right
- * @li right
- * @li bottom-right
- * @li bottom
- * @li bottom-left
- * @li middle
- * @li smart
- *
- * Signals that you can add callbacks for are:
- * @li "clicked" - the user clicked the empty space in the hover to dismiss
- * @li "smart,changed" - a content object placed under the "smart"
- * policy was replaced to a new slot direction.
- *
- * See @ref tutorial_hover for more information.
+ * This begins a selection within the entry as though
+ * the user were holding down the mouse button to make a selection.
*
- * @{
+ * @param obj The entry object
*/
- typedef enum _Elm_Hover_Axis
- {
- ELM_HOVER_AXIS_NONE, /**< ELM_HOVER_AXIS_NONE -- no prefered 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;
+ EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Adds a hover object to @p parent
+ * This ends a selection within the entry as though
+ * the user had just released the mouse button while making a selection.
*
- * @param parent The parent object
- * @return The hover object or NULL if one could not be created
+ * @param obj The entry object
*/
- EAPI Evas_Object *elm_hover_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Sets the target object for the hover.
+ * Gets whether a format node exists at the current cursor position.
*
- * @param obj The hover object
- * @param target The object to center the hover onto. The hover
+ * A format node is anything that defines how the text is rendered. It can
+ * be a visible format node, such as a line break or a paragraph separator,
+ * or an invisible one, such as bold begin or end tag.
+ * This function returns whether any format node exists at the current
+ * cursor position.
*
- * This function will cause the hover to be centered on the target object.
+ * @param obj The entry object
+ * @return EINA_TRUE if the current cursor position contains a format node,
+ * EINA_FALSE otherwise.
+ *
+ * @see elm_entry_cursor_is_visible_format_get()
*/
- EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Gets the target object for the hover.
+ * Gets if the current cursor position holds a visible format node.
*
- * @param obj The hover object
- * @param parent The object to locate the hover over.
+ * @param obj The entry object
+ * @return EINA_TRUE if the current cursor is a visible format, EINA_FALSE
+ * if it's an invisible one or no format exists.
*
- * @see elm_hover_target_set()
+ * @see elm_entry_cursor_is_format_get()
*/
- EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Sets the parent object for the hover.
+ * Gets the character pointed by the cursor at its current position.
*
- * @param obj The hover object
- * @param parent The object to locate the hover over.
+ * This function returns a string with the utf8 character stored at the
+ * current cursor position.
+ * Only the text is returned, any format that may exist will not be part
+ * of the return value.
*
- * This function will cause the hover to take up the entire space that the
- * parent object fills.
+ * @param obj The entry object
+ * @return The text pointed by the cursors.
*/
- EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Gets the parent object for the hover.
+ * This function returns the geometry of the cursor.
*
- * @param obj The hover object
- * @return The parent object to locate the hover over.
+ * It's useful if you want to draw something on the cursor (or where it is),
+ * or for example in the case of scrolled entry where you want to show the
+ * cursor.
*
- * @see elm_hover_parent_set()
+ * @param obj The entry object
+ * @param x returned geometry
+ * @param y returned geometry
+ * @param w returned geometry
+ * @param h returned geometry
+ * @return EINA_TRUE upon success, EINA_FALSE upon failure
*/
- EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
/**
- * @brief Sets the content of the hover object and the direction in which it
- * will pop out.
- *
- * @param obj The hover object
- * @param swallow The direction that the object will be displayed
- * at. Accepted values are "left", "top-left", "top", "top-right",
- * "right", "bottom-right", "bottom", "bottom-left", "middle" and
- * "smart".
- * @param content The content to place at @p swallow
+ * Sets the cursor position in the entry to the given value
*
- * Once the content object is set for a given direction, a previously
- * set one (on the same direction) will be deleted. If you want to
- * keep that old content object, use the elm_hover_content_unset()
- * function.
+ * The value in @p pos is the index of the character position within the
+ * contents of the string as returned by elm_entry_cursor_pos_get().
*
- * All directions may have contents at the same time, except for
- * "smart". This is a special placement hint and its use case
- * independs of the calculations coming from
- * elm_hover_best_content_location_get(). Its use is for cases when
- * one desires only one hover content, but with a dinamic special
- * placement within the hover area. The content's geometry, whenever
- * it changes, will be used to decide on a best location not
- * extrapolating the hover's parent object view to show it in (still
- * being the hover's target determinant of its medium part -- move and
- * resize it to simulate finger sizes, for example). If one of the
- * directions other than "smart" are used, a previously content set
- * using it will be deleted, and vice-versa.
+ * @param obj The entry object
+ * @param pos The position of the cursor
*/
- EAPI void elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_cursor_pos_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
/**
- * @brief Get the content of the hover object, in a given direction.
- *
- * Return the content object which was set for this widget in the
- * @p swallow direction.
- *
- * @param obj The hover object
- * @param swallow The direction that the object was display at.
- * @return The content that was being used
+ * Retrieves the current position of the cursor in the entry
*
- * @see elm_hover_content_set()
+ * @param obj The entry object
+ * @return The cursor position
*/
- EAPI Evas_Object *elm_hover_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Unset the content of the hover object, in a given direction.
+ * This executes a "cut" action on the selected text in the entry.
*
- * Unparent and return the content object set at @p swallow direction.
+ * @param obj The entry object
+ */
+ EAPI void elm_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This executes a "copy" action on the selected text in the entry.
*
- * @param obj The hover object
- * @param swallow The direction that the object was display at.
- * @return The content that was being used.
+ * @param obj The entry object
+ */
+ EAPI void elm_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This executes a "paste" action in the entry.
*
- * @see elm_hover_content_set()
+ * @param obj The entry object
*/
- EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @brief Returns the best swallow location for content in the hover.
+ * This clears and frees the items in a entry's contextual (longpress)
+ * menu.
*
- * @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.
+ * @param obj The entry object
*
- * Best is defined here as the location at which there is the most available
- * space.
+ * @see elm_entry_context_menu_item_add()
+ */
+ EAPI void elm_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This adds an item to the entry's contextual menu.
*
- * @p pref_axis may be one of
- * - @c ELM_HOVER_AXIS_NONE -- no prefered orientation
- * - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal
- * - @c ELM_HOVER_AXIS_VERTICAL -- vertical
- * - @c ELM_HOVER_AXIS_BOTH -- both
+ * A longpress on an entry will make the contextual menu show up, if this
+ * hasn't been disabled with elm_entry_context_menu_disabled_set().
+ * By default, this menu provides a few options like enabling selection mode,
+ * which is useful on embedded devices that need to be explicit about it,
+ * and when a selection exists it also shows the copy and cut actions.
*
- * If ELM_HOVER_AXIS_HORIZONTAL is choosen the returned position will
- * nescessarily be along the horizontal axis("left" or "right"). If
- * ELM_HOVER_AXIS_VERTICAL is choosen the returned position will nescessarily
- * be along the vertical axis("top" or "bottom"). Chossing
- * ELM_HOVER_AXIS_BOTH or ELM_HOVER_AXIS_NONE has the same effect and the
- * returned position may be in either axis.
+ * With this function, developers can add other options to this menu to
+ * perform any action they deem necessary.
*
- * @see elm_hover_content_set()
+ * @param obj The entry object
+ * @param label The item's text label
+ * @param icon_file The item's icon file
+ * @param icon_type The item's icon type
+ * @param func The callback to execute when the item is clicked
+ * @param data The data to associate with the item for related functions
*/
- EAPI const char *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
/**
- * @}
+ * This disables the entry's contextual (longpress) menu.
+ *
+ * @param obj The entry object
+ * @param disabled If true, the menu is disabled
*/
-
- /* entry */
+ EAPI void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
/**
- * @defgroup Entry Entry
- *
- * @image html img/widget/entry/preview-00.png
- * @image latex img/widget/entry/preview-00.eps width=\textwidth
- * @image html img/widget/entry/preview-01.png
- * @image latex img/widget/entry/preview-01.eps width=\textwidth
- * @image html img/widget/entry/preview-02.png
- * @image latex img/widget/entry/preview-02.eps width=\textwidth
- * @image html img/widget/entry/preview-03.png
- * @image latex img/widget/entry/preview-03.eps width=\textwidth
+ * This returns whether the entry's contextual (longpress) menu is
+ * disabled.
*
- * An entry is a convenience widget which shows a box that the user can
- * enter text into. Entries by default don't scroll, so they grow to
- * accomodate the entire text, resizing the parent window as needed. This
- * can be changed with the elm_entry_scrollable_set() function.
+ * @param obj The entry object
+ * @return If true, the menu is disabled
+ */
+ EAPI Eina_Bool elm_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This appends a custom item provider to the list for that entry
*
- * They can also be single line or multi line (the default) and when set
- * to multi line mode they support text wrapping in any of the modes
- * indicated by #Elm_Wrap_Type.
+ * This appends the given callback. The list is walked from beginning to end
+ * with each function called given the item href string in the text. If the
+ * function returns an object handle other than NULL (it should create an
+ * object to do this), then this object is used to replace that item. If
+ * not the next provider is called until one provides an item object, or the
+ * default provider in entry does.
*
- * Other features include password mode, filtering of inserted text with
- * elm_entry_text_filter_append() and related functions, inline "items" and
- * formatted markup text.
+ * @param obj The entry object
+ * @param func The function called to provide the item object
+ * @param data The data passed to @p func
*
- * @section entry-markup Formatted text
+ * @see @ref entry-items
+ */
+ EAPI void elm_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * This prepends a custom item provider to the list for that entry
*
- * The markup tags supported by the Entry are defined by the theme, but
- * even when writing new themes or extensions it's a good idea to stick to
- * a sane default, to maintain coherency and avoid application breakages.
- * Currently defined by the default theme are the following tags:
- * @li \<br\>: Inserts a line break.
- * @li \<ps\>: Inserts a paragraph separator. This is preferred over line
- * breaks.
- * @li \<tab\>: Inserts a tab.
- * @li \<em\>...\</em\>: Emphasis. Sets the @em oblique style for the
- * enclosed text.
- * @li \<b\>...\</b\>: Sets the @b bold style for the enclosed text.
- * @li \<link\>...\</link\>: Underlines the enclosed text.
- * @li \<hilight\>...\</hilight\>: Hilights the enclosed text.
+ * This prepends the given callback. See elm_entry_item_provider_append() for
+ * more information
*
- * @section entry-special Special markups
+ * @param obj The entry object
+ * @param func The function called to provide the item object
+ * @param data The data passed to @p func
+ */
+ EAPI void elm_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * This removes a custom item provider to the list for that entry
*
- * Besides those used to format text, entries support two special markup
- * tags used to insert clickable portions of text or items inlined within
- * the text.
+ * This removes the given callback. See elm_entry_item_provider_append() for
+ * more information
*
- * @subsection entry-anchors Anchors
+ * @param obj The entry object
+ * @param func The function called to provide the item object
+ * @param data The data passed to @p func
+ */
+ EAPI void elm_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Append a filter function for text inserted in the entry
*
- * Anchors are similar to HTML anchors. Text can be surrounded by \<a\> and
- * \</a\> tags and an event will be generated when this text is clicked,
- * like this:
+ * Append the given callback to the list. This functions will be called
+ * whenever any text is inserted into the entry, with the text to be inserted
+ * as a parameter. The callback function is free to alter the text in any way
+ * it wants, but it must remember to free the given pointer and update it.
+ * If the new text is to be discarded, the function can free it and set its
+ * text parameter to NULL. This will also prevent any following filters from
+ * being called.
*
- * @code
- * This text is outside <a href=anc-01>but this one is an anchor</a>
- * @endcode
+ * @param obj The entry object
+ * @param func The function to use as text filter
+ * @param data User data to pass to @p func
+ */
+ EAPI void elm_entry_text_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Prepend a filter function for text insdrted in the entry
*
- * The @c href attribute in the opening tag gives the name that will be
- * used to identify the anchor and it can be any valid utf8 string.
+ * Prepend the given callback to the list. See elm_entry_text_filter_append()
+ * for more information
*
- * When an anchor is clicked, an @c "anchor,clicked" signal is emitted with
- * an #Elm_Entry_Anchor_Info in the @c event_info parameter for the
- * callback function. The same applies for "anchor,in" (mouse in), "anchor,out"
- * (mouse out), "anchor,down" (mouse down), and "anchor,up" (mouse up) events on
- * an anchor.
+ * @param obj The entry object
+ * @param func The function to use as text filter
+ * @param data User data to pass to @p func
+ */
+ EAPI void elm_entry_text_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Remove a filter from the list
*
- * @subsection entry-items Items
+ * Removes the given callback from the filter list. See
+ * elm_entry_text_filter_append() for more information.
*
- * Inlined in the text, any other @c Evas_Object can be inserted by using
- * \<item\> tags this way:
+ * @param obj The entry object
+ * @param func The filter function to remove
+ * @param data The user data passed when adding the function
+ */
+ EAPI void elm_entry_text_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+ /**
+ * This converts a markup (HTML-like) string into UTF-8.
*
- * @code
- * <item size=16x16 vsize=full href=emoticon/haha></item>
- * @endcode
+ * The returned string is a malloc'ed buffer and it should be freed when
+ * not needed anymore.
*
- * Just like with anchors, the @c href identifies each item, but these need,
- * in addition, to indicate their size, which is done using any one of
- * @c size, @c absize or @c relsize attributes. These attributes take their
- * value in the WxH format, where W is the width and H the height of the
- * item.
+ * @param s The string (in markup) to be converted
+ * @return The converted string (in UTF-8). It should be freed.
+ */
+ EAPI char *elm_entry_markup_to_utf8(const char *s) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
+ /**
+ * This converts a UTF-8 string into markup (HTML-like).
*
- * @li absize: Absolute pixel size for the item. Whatever value is set will
- * be the item's size regardless of any scale value the object may have
- * been set to. The final line height will be adjusted to fit larger items.
- * @li size: Similar to @c absize, but it's adjusted to the scale value set
- * for the object.
- * @li relsize: Size is adjusted for the item to fit within the current
- * line height.
+ * The returned string is a malloc'ed buffer and it should be freed when
+ * not needed anymore.
*
- * Besides their size, items are specificed a @c vsize value that affects
- * how their final size and position are calculated. The possible values
- * are:
- * @li ascent: Item will be placed within the line's baseline and its
- * ascent. That is, the height between the line where all characters are
- * positioned and the highest point in the line. For @c size and @c absize
- * items, the descent value will be added to the total line height to make
- * them fit. @c relsize items will be adjusted to fit within this space.
- * @li full: Items will be placed between the descent and ascent, or the
- * lowest point in the line and its highest.
+ * @param s The string (in UTF-8) to be converted
+ * @return The converted string (in markup). It should be freed.
+ */
+ EAPI char *elm_entry_utf8_to_markup(const char *s) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
+ /**
+ * This sets the file (and implicitly loads it) for the text to display and
+ * then edit. All changes are written back to the file after a short delay if
+ * the entry object is set to autosave (which is the default).
*
- * The next image shows different configurations of items and how they
- * are the previously mentioned options affect their sizes. In all cases,
- * the green line indicates the ascent, blue for the baseline and red for
- * the descent.
+ * If the entry had any other file set previously, any changes made to it
+ * will be saved if the autosave feature is enabled, otherwise, the file
+ * will be silently discarded and any non-saved changes will be lost.
*
- * @image html entry_item.png
- * @image latex entry_item.eps width=\textwidth
+ * @param obj The entry object
+ * @param file The path to the file to load and save
+ * @param format The file format
+ */
+ EAPI void elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1);
+ /**
+ * Gets the file being edited by the entry.
*
- * And another one to show how size differs from absize. In the first one,
- * the scale value is set to 1.0, while the second one is using one of 2.0.
+ * This function can be used to retrieve any file set on the entry for
+ * edition, along with the format used to load and save it.
*
- * @image html entry_item_scale.png
- * @image latex entry_item_scale.eps width=\textwidth
+ * @param obj The entry object
+ * @param file The path to the file to load and save
+ * @param format The file format
+ */
+ EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1);
+ /**
+ * This function writes any changes made to the file set with
+ * elm_entry_file_set()
*
- * After the size for an item is calculated, the entry will request an
- * object to place in its space. For this, the functions set with
- * elm_entry_item_provider_append() and related functions will be called
- * in order until one of them returns a @c non-NULL value. If no providers
- * are available, or all of them return @c NULL, then the entry falls back
- * to one of the internal defaults, provided the name matches with one of
- * them.
+ * @param obj The entry object
+ */
+ EAPI void elm_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * This sets the entry object to 'autosave' the loaded text file or not.
*
- * All of the following are currently supported:
+ * @param obj The entry object
+ * @param autosave Autosave the loaded file or not
*
- * - emoticon/angry
- * - emoticon/angry-shout
- * - emoticon/crazy-laugh
- * - emoticon/evil-laugh
- * - emoticon/evil
- * - emoticon/goggle-smile
- * - emoticon/grumpy
- * - emoticon/grumpy-smile
- * - emoticon/guilty
- * - emoticon/guilty-smile
- * - emoticon/haha
- * - emoticon/half-smile
- * - emoticon/happy-panting
- * - emoticon/happy
- * - emoticon/indifferent
- * - emoticon/kiss
- * - emoticon/knowing-grin
- * - emoticon/laugh
- * - emoticon/little-bit-sorry
- * - emoticon/love-lots
- * - emoticon/love
- * - emoticon/minimal-smile
- * - emoticon/not-happy
- * - emoticon/not-impressed
- * - emoticon/omg
- * - emoticon/opensmile
- * - emoticon/smile
- * - emoticon/sorry
- * - emoticon/squint-laugh
- * - emoticon/surprised
- * - emoticon/suspicious
- * - emoticon/tongue-dangling
- * - emoticon/tongue-poke
- * - emoticon/uh
- * - emoticon/unhappy
- * - emoticon/very-sorry
- * - emoticon/what
- * - emoticon/wink
- * - emoticon/worried
- * - emoticon/wtf
+ * @see elm_entry_file_set()
+ */
+ EAPI void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1);
+ /**
+ * This gets the entry object's 'autosave' status.
*
- * Alternatively, an item may reference an image by its path, using
- * the URI form @c file:///path/to/an/image.png and the entry will then
- * use that image for the item.
+ * @param obj The entry object
+ * @return Autosave the loaded file or not
*
- * @section entry-files Loading and saving files
+ * @see elm_entry_file_set()
+ */
+ EAPI Eina_Bool elm_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Control pasting of text and images for the widget.
*
- * Entries have convinience functions to load text from a file and save
- * changes back to it after a short delay. The automatic saving is enabled
- * by default, but can be disabled with elm_entry_autosave_set() and files
- * can be loaded directly as plain text or have any markup in them
- * recognized. See elm_entry_file_set() for more details.
+ * Normally the entry allows both text and images to be pasted. By setting
+ * textonly to be true, this prevents images from being pasted.
*
- * @section entry-signals Emitted signals
+ * Note this only changes the behaviour of text.
*
- * This widget emits the following signals:
+ * @param obj The entry object
+ * @param textonly paste mode - EINA_TRUE is text only, EINA_FALSE is
+ * text+image+other.
+ */
+ EAPI void elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1);
+ /**
+ * Getting elm_entry text paste/drop mode.
*
- * @li "changed": The text within the entry was changed.
- * @li "changed,user": The text within the entry was changed because of user interaction.
- * @li "activated": The enter key was pressed on a single line entry.
- * @li "press": A mouse button has been pressed on the entry.
- * @li "longpressed": A mouse button has been pressed and held for a couple
- * seconds.
- * @li "clicked": The entry has been clicked (mouse press and release).
- * @li "clicked,double": The entry has been double clicked.
- * @li "clicked,triple": The entry has been triple clicked.
- * @li "focused": The entry has received focus.
- * @li "unfocused": The entry has lost focus.
- * @li "selection,paste": A paste of the clipboard contents was requested.
- * @li "selection,copy": A copy of the selected text into the clipboard was
- * requested.
- * @li "selection,cut": A cut of the selected text into the clipboard was
- * requested.
- * @li "selection,start": A selection has begun and no previous selection
- * existed.
- * @li "selection,changed": The current selection has changed.
- * @li "selection,cleared": The current selection has been cleared.
- * @li "cursor,changed": The cursor has changed position.
- * @li "anchor,clicked": An anchor has been clicked. The event_info
- * parameter for the callback will be an #Elm_Entry_Anchor_Info.
- * @li "anchor,in": Mouse cursor has moved into an anchor. The event_info
- * parameter for the callback will be an #Elm_Entry_Anchor_Info.
- * @li "anchor,out": Mouse cursor has moved out of an anchor. The event_info
- * parameter for the callback will be an #Elm_Entry_Anchor_Info.
- * @li "anchor,up": Mouse button has been unpressed on an anchor. The event_info
- * parameter for the callback will be an #Elm_Entry_Anchor_Info.
- * @li "anchor,down": Mouse button has been pressed on an anchor. The event_info
- * parameter for the callback will be an #Elm_Entry_Anchor_Info.
- * @li "preedit,changed": The preedit string has changed.
+ * In textonly mode, only text may be pasted or dropped into the widget.
*
- * @section entry-examples
+ * @param obj The entry object
+ * @return If the widget only accepts text from pastes.
+ */
+ EAPI Eina_Bool elm_entry_cnp_textonly_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Enable or disable scrolling in entry
*
- * An overview of the Entry API can be seen in @ref entry_example_01
+ * Normally the entry is not scrollable unless you enable it with this call.
*
- * @{
+ * @param obj The entry object
+ * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
*/
+ EAPI void elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
/**
- * @typedef Elm_Entry_Anchor_Info
+ * Get the scrollable state of the entry
*
- * The info sent in the callback for the "anchor,clicked" signals emitted
- * by entries.
+ * Normally the entry is not scrollable. This gets the scrollable state
+ * of the entry. See elm_entry_scrollable_set() for more information.
+ *
+ * @param obj The entry object
+ * @return The scrollable state
*/
- typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info;
+ EAPI Eina_Bool elm_entry_scrollable_get(const Evas_Object *obj);
/**
- * @struct _Elm_Entry_Anchor_Info
+ * This sets a widget to be displayed to the left of a scrolled entry.
*
- * The info sent in the callback for the "anchor,clicked" signals emitted
- * by entries.
+ * @param obj The scrolled entry object
+ * @param icon The widget to display on the left side of the scrolled
+ * entry.
+ *
+ * @note A previously set widget will be destroyed.
+ * @note If the object being set does not have minimum size hints set,
+ * it won't get properly displayed.
+ *
+ * @see elm_entry_end_set()
*/
- 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 */
- };
+ EAPI void elm_entry_icon_set(Evas_Object *obj, Evas_Object *icon);
/**
- * @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. This data can be modified,
- * but any additional allocations must be managed by the user.
- * @see elm_entry_text_filter_append
- * @see elm_entry_text_filter_prepend
+ * Gets the leftmost widget of the scrolled entry. This object is
+ * owned by the scrolled entry and should not be modified.
+ *
+ * @param obj The scrolled entry object
+ * @return the left widget inside the scroller
*/
- typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text);
-
+ EAPI Evas_Object *elm_entry_icon_get(const Evas_Object *obj);
/**
- * This adds an entry to @p parent object.
+ * Unset the leftmost widget of the scrolled entry, unparenting and
+ * returning it.
*
- * By default, entries are:
- * @li not scrolled
- * @li multi-line
- * @li word wrapped
- * @li autosave is enabled
+ * @param obj The scrolled entry object
+ * @return the previously set icon sub-object of this entry, on
+ * success.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @see elm_entry_icon_set()
*/
- EAPI Evas_Object *elm_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_entry_icon_unset(Evas_Object *obj);
/**
- * Sets the entry to single line mode.
+ * Sets the visibility of the left-side widget of the scrolled entry,
+ * set by elm_entry_icon_set().
*
- * In single line mode, entries don't ever wrap when the text reaches the
- * edge, and instead they keep growing horizontally. Pressing the @c Enter
- * key will generate an @c "activate" event instead of adding a new line.
+ * @param obj The scrolled entry object
+ * @param setting EINA_TRUE if the object should be displayed,
+ * EINA_FALSE if not.
+ */
+ EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
+ /**
+ * This sets a widget to be displayed to the end of a scrolled entry.
*
- * When @p single_line is @c EINA_FALSE, line wrapping takes effect again
- * and pressing enter will break the text into a different line
- * without generating any events.
+ * @param obj The scrolled entry object
+ * @param end The widget to display on the right side of the scrolled
+ * entry.
*
- * @param obj The entry object
- * @param single_line If true, the text in the entry
- * will be on a single line.
+ * @note A previously set widget will be destroyed.
+ * @note If the object being set does not have minimum size hints set,
+ * it won't get properly displayed.
+ *
+ * @see elm_entry_icon_set
*/
- EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_end_set(Evas_Object *obj, Evas_Object *end);
/**
- * Gets whether the entry is set to be single line.
- *
- * @param obj The entry object
- * @return single_line If true, the text in the entry is set to display
- * on a single line.
+ * Gets the endmost widget of the scrolled entry. This object is owned
+ * by the scrolled entry and should not be modified.
*
- * @see elm_entry_single_line_set()
+ * @param obj The scrolled entry object
+ * @return the right widget inside the scroller
*/
- EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_entry_end_get(const Evas_Object *obj);
/**
- * Sets the entry to password mode.
+ * Unset the endmost widget of the scrolled entry, unparenting and
+ * returning it.
*
- * In password mode, entries are implicitly single line and the display of
- * any text in them is replaced with asterisks (*).
+ * @param obj The scrolled entry object
+ * @return the previously set icon sub-object of this entry, on
+ * success.
*
- * @param obj The entry object
- * @param password If true, password mode is enabled.
+ * @see elm_entry_icon_set()
*/
- EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_entry_end_unset(Evas_Object *obj);
/**
- * Gets whether the entry is set to password mode.
- *
- * @param obj The entry object
- * @return If true, the entry is set to display all characters
- * as asterisks (*).
+ * Sets the visibility of the end widget of the scrolled entry, set by
+ * elm_entry_end_set().
*
- * @see elm_entry_password_set()
+ * @param obj The scrolled entry object
+ * @param setting EINA_TRUE if the object should be displayed,
+ * EINA_FALSE if not.
*/
- EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
/**
- * This sets the text displayed within the entry to @p entry.
+ * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling
+ * them).
*
- * @param obj The entry object
- * @param entry The text to be displayed
+ * Setting an entry to single-line mode with elm_entry_single_line_set()
+ * will automatically disable the display of scrollbars when the entry
+ * moves inside its scroller.
*
- * @deprecated Use elm_object_text_set() instead.
+ * @param obj The scrolled entry object
+ * @param h The horizontal scrollbar policy to apply
+ * @param v The vertical scrollbar policy to apply
*/
- EAPI void elm_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
/**
- * This returns the text currently shown in object @p entry.
- * See also elm_entry_entry_set().
+ * This enables/disables bouncing within the entry.
*
- * @param obj The entry object
- * @return The currently displayed text or NULL on failure
+ * This function sets whether the entry will bounce when scrolling reaches
+ * the end of the contained entry.
*
- * @deprecated Use elm_object_text_get() instead.
+ * @param obj The scrolled entry object
+ * @param h The horizontal bounce state
+ * @param v The vertical bounce state
*/
- EAPI const char *elm_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
/**
- * Appends @p entry to the text of the entry.
- *
- * Adds the text in @p entry to the end of any text already present in the
- * widget.
- *
- * The appended text is subject to any filters set for the widget.
- *
- * @param obj The entry object
- * @param entry The text to be displayed
+ * Get the bounce mode
*
- * @see elm_entry_text_filter_append()
+ * @param obj The Entry object
+ * @param h_bounce Allow bounce horizontally
+ * @param v_bounce Allow bounce vertically
*/
- EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
+
+ /* pre-made filters for entries */
/**
- * Gets whether the entry is empty.
- *
- * Empty means no text at all. If there are any markup tags, like an item
- * tag for which no provider finds anything, and no text is displayed, this
- * function still returns EINA_FALSE.
+ * @typedef Elm_Entry_Filter_Limit_Size
*
- * @param obj The entry object
- * @return EINA_TRUE if the entry is empty, EINA_FALSE otherwise.
+ * Data for the elm_entry_filter_limit_size() entry filter.
*/
- EAPI Eina_Bool elm_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size;
/**
- * Gets any selected text within the entry.
- *
- * If there's any selected text in the entry, this function returns it as
- * a string in markup format. NULL is returned if no selection exists or
- * if an error occurred.
- *
- * The returned value points to an internal string and should not be freed
- * or modified in any way. If the @p entry object is deleted or its
- * contents are changed, the returned pointer should be considered invalid.
+ * @struct _Elm_Entry_Filter_Limit_Size
*
- * @param obj The entry object
- * @return The selected text within the entry or NULL on failure
+ * Data for the elm_entry_filter_limit_size() entry filter.
*/
- EAPI const char *elm_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ 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*/
+ };
/**
- * Inserts the given text into the entry at the current cursor position.
- *
- * This inserts text at the cursor position as if it was typed
- * by the user (note that this also allows markup which a user
- * can't just "type" as it would be converted to escaped text, so this
- * call can be used to insert things like emoticon items or bold push/pop
- * tags, other font and color change tags etc.)
+ * Filter inserted text based on user defined character and byte limits
*
- * If any selection exists, it will be replaced by the inserted text.
+ * Add this filter to an entry to limit the characters that it will accept
+ * based the the contents of the provided #Elm_Entry_Filter_Limit_Size.
+ * The funtion works on the UTF-8 representation of the string, converting
+ * it from the set markup, thus not accounting for any format in it.
*
- * The inserted text is subject to any filters set for the widget.
+ * 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.
*
- * @param obj The entry object
- * @param entry The text to insert
+ * 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.
*
- * @see elm_entry_text_filter_append()
+ * This filter, like any others, does not apply when setting the entry text
+ * directly with elm_object_text_set() (or the deprecated
+ * elm_entry_entry_set()).
*/
- EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 2, 3);
/**
- * Set the line wrap type to use on multi-line entries.
- *
- * Sets the wrap type used by the entry to any of the specified in
- * #Elm_Wrap_Type. This tells how the text will be implicitly cut into a new
- * line (without inserting a line break or paragraph separator) when it
- * reaches the far edge of the widget.
- *
- * Note that this only makes sense for multi-line entries. A widget set
- * to be single line will never wrap.
+ * @typedef Elm_Entry_Filter_Accept_Set
*
- * @param obj The entry object
- * @param wrap The wrap mode to use. See #Elm_Wrap_Type for details on them
+ * Data for the elm_entry_filter_accept_set() entry filter.
*/
- EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
/**
- * Gets the wrap mode the entry was set to use.
- *
- * @param obj The entry object
- * @return Wrap type
+ * @struct _Elm_Entry_Filter_Accept_Set
*
- * @see also elm_entry_line_wrap_set()
+ * Data for the elm_entry_filter_accept_set() entry filter.
*/
- EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ 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. */
+ };
/**
- * Sets if the entry is to be editable or not.
- *
- * By default, entries are editable and when focused, any text input by the
- * user will be inserted at the current cursor position. But calling this
- * function with @p editable as EINA_FALSE will prevent the user from
- * inputting text into the entry.
+ * Filter inserted text based on accepted or rejected sets of characters
*
- * The only way to change the text of a non-editable entry is to use
- * elm_object_text_set(), elm_entry_entry_insert() and other related
- * functions.
+ * 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.
*
- * @param obj The entry object
- * @param editable If EINA_TRUE, user input will be inserted in the entry,
- * if not, the entry is read-only and no user input is allowed.
- */
- EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1);
- /**
- * Gets whether the entry is editable or not.
+ * 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.
*
- * @param obj The entry object
- * @return If true, the entry is editable by the user.
- * If false, it is not editable by the user
+ * In both cases, the function filters by matching utf8 characters to the
+ * raw markup text, so it can be used to remove formatting tags.
*
- * @see elm_entry_editable_set()
+ * This filter, like any others, does not apply when setting the entry text
+ * directly with elm_object_text_set() (or the deprecated
+ * elm_entry_entry_set()).
*/
- EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 3);
/**
- * This drops any existing text selection within the entry.
+ * Set the input panel layout of the entry
*
* @param obj The entry object
+ * @param layout layout type
*/
- EAPI void elm_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout) EINA_ARG_NONNULL(1);
/**
- * This selects all text within the entry.
+ * Get the input panel layout of the entry
*
* @param obj The entry object
- */
- EAPI void elm_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This moves the cursor one place to the right within the entry.
+ * @return layout type
*
- * @param obj The entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
+ * @see elm_entry_input_panel_layout_set
*/
- EAPI Eina_Bool elm_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This moves the cursor one place to the left within the entry.
- *
- * @param obj The entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
+ * @}
*/
- EAPI Eina_Bool elm_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /* composite widgets - these basically put together basic widgets above
+ * in convenient packages that do more than basic stuff */
+
+ /* anchorview */
/**
- * This moves the cursor one line up within the entry.
+ * @defgroup Anchorview Anchorview
*
- * @param obj The entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- */
- EAPI Eina_Bool elm_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This moves the cursor one line down within the entry.
+ * @image html img/widget/anchorview/preview-00.png
+ * @image latex img/widget/anchorview/preview-00.eps
*
- * @param obj The entry object
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
- */
- EAPI Eina_Bool elm_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This moves the cursor to the beginning of the entry.
+ * Anchorview is for displaying text that contains markup with anchors
+ * like <c>\<a href=1234\>something\</\></c> in it.
*
- * @param obj The entry object
- */
- EAPI void elm_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This moves the cursor to the end of the entry.
+ * Besides being styled differently, the anchorview widget provides the
+ * necessary functionality so that clicking on these anchors brings up a
+ * popup with user defined content such as "call", "add to contacts" or
+ * "open web page". This popup is provided using the @ref Hover widget.
+ *
+ * This widget is very similar to @ref Anchorblock, so refer to that
+ * widget for an example. The only difference Anchorview has is that the
+ * widget is already provided with scrolling functionality, so if the
+ * text set to it is too large to fit in the given space, it will scroll,
+ * whereas the @ref Anchorblock widget will keep growing to ensure all the
+ * text can be displayed.
+ *
+ * This widget emits the following signals:
+ * @li "anchor,clicked": will be called when an anchor is clicked. The
+ * @p event_info parameter on the callback will be a pointer of type
+ * ::Elm_Entry_Anchorview_Info.
*
- * @param obj The entry object
- */
- EAPI void elm_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This moves the cursor to the beginning of the current line.
+ * See @ref Anchorblock for an example on how to use both of them.
*
- * @param obj The entry object
+ * @see Anchorblock
+ * @see Entry
+ * @see Hover
+ *
+ * @{
*/
- EAPI void elm_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This moves the cursor to the end of the current line.
+ * @typedef Elm_Entry_Anchorview_Info
*
- * @param obj The entry object
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorview widget.
*/
- EAPI void elm_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef struct _Elm_Entry_Anchorview_Info Elm_Entry_Anchorview_Info;
/**
- * This begins a selection within the entry as though
- * the user were holding down the mouse button to make a selection.
+ * @struct _Elm_Entry_Anchorview_Info
*
- * @param obj The entry object
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorview widget.
*/
- EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ struct _Elm_Entry_Anchorview_Info
+ {
+ const char *name; /**< Name of the anchor, as indicated in its href
+ attribute */
+ int button; /**< The mouse button used to click on it */
+ Evas_Object *hover; /**< The hover object to use for the popup */
+ struct {
+ Evas_Coord x, y, w, h;
+ } anchor, /**< Geometry selection of text used as anchor */
+ 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 */
+ };
/**
- * This ends a selection within the entry as though
- * the user had just released the mouse button while making a selection.
+ * Add a new Anchorview object
*
- * @param obj The entry object
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*/
- EAPI void elm_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_anchorview_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Gets whether a format node exists at the current cursor position.
- *
- * A format node is anything that defines how the text is rendered. It can
- * be a visible format node, such as a line break or a paragraph separator,
- * or an invisible one, such as bold begin or end tag.
- * This function returns whether any format node exists at the current
- * cursor position.
+ * Set the text to show in the anchorview
*
- * @param obj The entry object
- * @return EINA_TRUE if the current cursor position contains a format node,
- * EINA_FALSE otherwise.
+ * Sets the text of the anchorview to @p text. This text can include markup
+ * format tags, including <c>\<a href=anchorname\></c> to begin a segment of
+ * text that will be specially styled and react to click events, ended with
+ * either of \</a\> or \</\>. When clicked, the anchor will emit an
+ * "anchor,clicked" signal that you can attach a callback to with
+ * evas_object_smart_callback_add(). The name of the anchor given in the
+ * event info struct will be the one set in the href attribute, in this
+ * case, anchorname.
*
- * @see elm_entry_cursor_is_visible_format_get()
+ * Other markup can be used to style the text in different ways, but it's
+ * up to the style defined in the theme which tags do what.
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_anchorview_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
/**
- * Gets if the current cursor position holds a visible format node.
+ * Get the markup text set for the anchorview
*
- * @param obj The entry object
- * @return EINA_TRUE if the current cursor is a visible format, EINA_FALSE
- * if it's an invisible one or no format exists.
+ * Retrieves the text set on the anchorview, with markup tags included.
*
- * @see elm_entry_cursor_is_format_get()
+ * @param obj The anchorview object
+ * @return The markup text set or @c NULL if nothing was set or an error
+ * occurred
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI const char *elm_anchorview_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Gets the character pointed by the cursor at its current position.
+ * Set the parent of the hover popup
*
- * This function returns a string with the utf8 character stored at the
- * current cursor position.
- * Only the text is returned, any format that may exist will not be part
- * of the return value.
+ * Sets the parent object to use by the hover created by the anchorview
+ * when an anchor is clicked. See @ref Hover for more details on this.
+ * If no parent is set, the same anchorview object will be used.
*
- * @param obj The entry object
- * @return The text pointed by the cursors.
+ * @param obj The anchorview object
+ * @param parent The object to use as parent for the hover
*/
- EAPI const char *elm_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * This function returns the geometry of the cursor.
+ * Get the parent of the hover popup
*
- * It's useful if you want to draw something on the cursor (or where it is),
- * or for example in the case of scrolled entry where you want to show the
- * cursor.
+ * Get the object used as parent for the hover created by the anchorview
+ * widget. See @ref Hover for more details on this.
*
- * @param obj The entry object
- * @param x returned geometry
- * @param y returned geometry
- * @param w returned geometry
- * @param h returned geometry
- * @return EINA_TRUE upon success, EINA_FALSE upon failure
+ * @param obj The anchorview object
+ * @return The object used as parent for the hover, NULL if none is set.
*/
- EAPI Eina_Bool elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_anchorview_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Sets the cursor position in the entry to the given value
+ * Set the style that the hover should use
*
- * The value in @p pos is the index of the character position within the
- * contents of the string as returned by elm_entry_cursor_pos_get().
+ * When creating the popup hover, anchorview will request that it's
+ * themed according to @p style.
*
- * @param obj The entry object
- * @param pos The position of the cursor
- */
- EAPI void elm_entry_cursor_pos_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1);
- /**
- * Retrieves the current position of the cursor in the entry
+ * @param obj The anchorview object
+ * @param style The style to use for the underlying hover
*
- * @param obj The entry object
- * @return The cursor position
+ * @see elm_object_style_set()
*/
- EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorview_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
/**
- * This executes a "cut" action on the selected text in the entry.
+ * Get the style that the hover should use
*
- * @param obj The entry object
- */
- EAPI void elm_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This executes a "copy" action on the selected text in the entry.
+ * Get the style the hover created by anchorview will use.
*
- * @param obj The entry object
- */
- EAPI void elm_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * This executes a "paste" action in the entry.
+ * @param obj The anchorview object
+ * @return The style to use by the hover. NULL means the default is used.
*
- * @param obj The entry object
+ * @see elm_object_style_set()
*/
- EAPI void elm_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_anchorview_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This clears and frees the items in a entry's contextual (longpress)
- * menu.
+ * Ends the hover popup in the anchorview
*
- * @param obj The entry object
+ * When an anchor is clicked, the anchorview widget will create a hover
+ * object to use as a popup with user provided content. This function
+ * terminates this popup, returning the anchorview to its normal state.
*
- * @see elm_entry_context_menu_item_add()
+ * @param obj The anchorview object
*/
- EAPI void elm_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorview_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This adds an item to the entry's contextual menu.
+ * Set bouncing behaviour when the scrolled content reaches an edge
*
- * A longpress on an entry will make the contextual menu show up, if this
- * hasn't been disabled with elm_entry_context_menu_disabled_set().
- * By default, this menu provides a few options like enabling selection mode,
- * which is useful on embedded devices that need to be explicit about it,
- * and when a selection exists it also shows the copy and cut actions.
+ * Tell the internal scroller object whether it should bounce or not
+ * when it reaches the respective edges for each axis.
*
- * With this function, developers can add other options to this menu to
- * perform any action they deem necessary.
+ * @param obj The anchorview object
+ * @param h_bounce Whether to bounce or not in the horizontal axis
+ * @param v_bounce Whether to bounce or not in the vertical axis
*
- * @param obj The entry object
- * @param label The item's text label
- * @param icon_file The item's icon file
- * @param icon_type The item's icon type
- * @param func The callback to execute when the item is clicked
- * @param data The data to associate with the item for related functions
+ * @see elm_scroller_bounce_set()
*/
- EAPI void elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
/**
- * This disables the entry's contextual (longpress) menu.
+ * Get the set bouncing behaviour of the internal scroller
*
- * @param obj The entry object
- * @param disabled If true, the menu is disabled
- */
- EAPI void elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1);
- /**
- * This returns whether the entry's contextual (longpress) menu is
- * disabled.
+ * Get whether the internal scroller should bounce when the edge of each
+ * axis is reached scrolling.
*
- * @param obj The entry object
- * @return If true, the menu is disabled
+ * @param obj The anchorview object
+ * @param h_bounce Pointer where to store the bounce state of the horizontal
+ * axis
+ * @param v_bounce Pointer where to store the bounce state of the vertical
+ * axis
+ *
+ * @see elm_scroller_bounce_get()
*/
- EAPI Eina_Bool elm_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorview_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
/**
- * This appends a custom item provider to the list for that entry
+ * Appends a custom item provider to the given anchorview
*
- * This appends the given callback. The list is walked from beginning to end
- * with each function called given the item href string in the text. If the
- * function returns an object handle other than NULL (it should create an
- * object to do this), then this object is used to replace that item. If
- * not the next provider is called until one provides an item object, or the
- * default provider in entry does.
+ * Appends the given function to the list of items providers. This list is
+ * called, one function at a time, with the given @p data pointer, the
+ * anchorview object and, in the @p item parameter, the item name as
+ * referenced in its href string. Following functions in the list will be
+ * called in order until one of them returns something different to NULL,
+ * which should be an Evas_Object which will be used in place of the item
+ * element.
*
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
+ * Items in the markup text take the form \<item relsize=16x16 vsize=full
+ * href=item/name\>\</item\>
+ *
+ * @param obj The anchorview object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
*
- * @see @ref entry-items
+ * @see elm_entry_item_provider_append()
*/
- EAPI void elm_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_anchorview_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * This prepends a custom item provider to the list for that entry
+ * Prepend a custom item provider to the given anchorview
*
- * This prepends the given callback. See elm_entry_item_provider_append() for
- * more information
+ * Like elm_anchorview_item_provider_append(), but it adds the function
+ * @p func to the beginning of the list, instead of the end.
*
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
+ * @param obj The anchorview object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
*/
- EAPI void elm_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_anchorview_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * This removes a custom item provider to the list for that entry
+ * Remove a custom item provider from the list of the given anchorview
*
- * This removes the given callback. See elm_entry_item_provider_append() for
- * more information
+ * Removes the function and data pairing that matches @p func and @p data.
+ * That is, unless the same function and same user data are given, the
+ * function will not be removed from the list. This allows us to add the
+ * same callback several times, with different @p data pointers and be
+ * able to remove them later without conflicts.
*
- * @param obj The entry object
- * @param func The function called to provide the item object
- * @param data The data passed to @p func
+ * @param obj The anchorview object
+ * @param func The function to remove from the list
+ * @param data The data matching the function to remove from the list
*/
- EAPI void elm_entry_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *entry, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_anchorview_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * Append a filter function for text inserted in the entry
+ * @}
+ */
+
+ /* anchorblock */
+ /**
+ * @defgroup Anchorblock Anchorblock
*
- * Append the given callback to the list. This functions will be called
- * whenever any text is inserted into the entry, with the text to be inserted
- * as a parameter. The callback function is free to alter the text in any way
- * it wants, but it must remember to free the given pointer and update it.
- * If the new text is to be discarded, the function can free it and set its
- * text parameter to NULL. This will also prevent any following filters from
- * being called.
+ * @image html img/widget/anchorblock/preview-00.png
+ * @image latex img/widget/anchorblock/preview-00.eps
*
- * @param obj The entry object
- * @param func The function to use as text filter
- * @param data User data to pass to @p func
+ * Anchorblock is for displaying text that contains markup with anchors
+ * like <c>\<a href=1234\>something\</\></c> in it.
+ *
+ * Besides being styled differently, the anchorblock widget provides the
+ * necessary functionality so that clicking on these anchors brings up a
+ * popup with user defined content such as "call", "add to contacts" or
+ * "open web page". This popup is provided using the @ref Hover widget.
+ *
+ * This widget emits the following signals:
+ * @li "anchor,clicked": will be called when an anchor is clicked. The
+ * @p event_info parameter on the callback will be a pointer of type
+ * ::Elm_Entry_Anchorblock_Info.
+ *
+ * @see Anchorview
+ * @see Entry
+ * @see Hover
+ *
+ * Since examples are usually better than plain words, we might as well
+ * try @ref tutorial_anchorblock_example "one".
*/
- EAPI void elm_entry_text_filter_append(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
/**
- * Prepend a filter function for text insdrted in the entry
- *
- * Prepend the given callback to the list. See elm_entry_text_filter_append()
- * for more information
+ * @addtogroup Anchorblock
+ * @{
+ */
+ /**
+ * @typedef Elm_Entry_Anchorblock_Info
*
- * @param obj The entry object
- * @param func The function to use as text filter
- * @param data User data to pass to @p func
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorblock widget.
*/
- EAPI void elm_entry_text_filter_prepend(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+ typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info;
/**
- * Remove a filter from the list
+ * @struct _Elm_Entry_Anchorblock_Info
*
- * Removes the given callback from the filter list. See
- * elm_entry_text_filter_append() for more information.
+ * The info sent in the callback for "anchor,clicked" signals emitted by
+ * the Anchorblock widget.
+ */
+ struct _Elm_Entry_Anchorblock_Info
+ {
+ const char *name; /**< Name of the anchor, as indicated in its href
+ attribute */
+ int button; /**< The mouse button used to click on it */
+ Evas_Object *hover; /**< The hover object to use for the popup */
+ struct {
+ Evas_Coord x, y, w, h;
+ } anchor, /**< Geometry selection of text used as anchor */
+ 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 */
+ };
+ /**
+ * Add a new Anchorblock object
*
- * @param obj The entry object
- * @param func The filter function to remove
- * @param data The user data passed when adding the function
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*/
- EAPI void elm_entry_text_filter_remove(Evas_Object *obj, Elm_Entry_Filter_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
+ EAPI Evas_Object *elm_anchorblock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * This converts a markup (HTML-like) string into UTF-8.
+ * Set the text to show in the anchorblock
*
- * The returned string is a malloc'ed buffer and it should be freed when
- * not needed anymore.
+ * Sets the text of the anchorblock to @p text. This text can include markup
+ * format tags, including <c>\<a href=anchorname\></a></c> to begin a segment
+ * of text that will be specially styled and react to click events, ended
+ * with either of \</a\> or \</\>. When clicked, the anchor will emit an
+ * "anchor,clicked" signal that you can attach a callback to with
+ * evas_object_smart_callback_add(). The name of the anchor given in the
+ * event info struct will be the one set in the href attribute, in this
+ * case, anchorname.
*
- * @param s The string (in markup) to be converted
- * @return The converted string (in UTF-8). It should be freed.
+ * Other markup can be used to style the text in different ways, but it's
+ * up to the style defined in the theme which tags do what.
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI char *elm_entry_markup_to_utf8(const char *s) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
+ EINA_DEPRECATED EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
/**
- * This converts a UTF-8 string into markup (HTML-like).
+ * Get the markup text set for the anchorblock
*
- * The returned string is a malloc'ed buffer and it should be freed when
- * not needed anymore.
+ * Retrieves the text set on the anchorblock, with markup tags included.
*
- * @param s The string (in UTF-8) to be converted
- * @return The converted string (in markup). It should be freed.
+ * @param obj The anchorblock object
+ * @return The markup text set or @c NULL if nothing was set or an error
+ * occurred
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI char *elm_entry_utf8_to_markup(const char *s) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
+ EINA_DEPRECATED EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This sets the file (and implicitly loads it) for the text to display and
- * then edit. All changes are written back to the file after a short delay if
- * the entry object is set to autosave (which is the default).
+ * Set the parent of the hover popup
*
- * If the entry had any other file set previously, any changes made to it
- * will be saved if the autosave feature is enabled, otherwise, the file
- * will be silently discarded and any non-saved changes will be lost.
+ * Sets the parent object to use by the hover created by the anchorblock
+ * when an anchor is clicked. See @ref Hover for more details on this.
*
- * @param obj The entry object
- * @param file The path to the file to load and save
- * @param format The file format
+ * @param obj The anchorblock object
+ * @param parent The object to use as parent for the hover
*/
- EAPI void elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Gets the file being edited by the entry.
+ * Get the parent of the hover popup
*
- * This function can be used to retrieve any file set on the entry for
- * edition, along with the format used to load and save it.
+ * Get the object used as parent for the hover created by the anchorblock
+ * widget. See @ref Hover for more details on this.
+ * If no parent is set, the same anchorblock object will be used.
*
- * @param obj The entry object
- * @param file The path to the file to load and save
- * @param format The file format
+ * @param obj The anchorblock object
+ * @return The object used as parent for the hover, NULL if none is set.
*/
- EAPI void elm_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This function writes any changes made to the file set with
- * elm_entry_file_set()
+ * Set the style that the hover should use
*
- * @param obj The entry object
+ * When creating the popup hover, anchorblock will request that it's
+ * themed according to @p style.
+ *
+ * @param obj The anchorblock object
+ * @param style The style to use for the underlying hover
+ *
+ * @see elm_object_style_set()
*/
- EAPI void elm_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
/**
- * This sets the entry object to 'autosave' the loaded text file or not.
+ * Get the style that the hover should use
*
- * @param obj The entry object
- * @param autosave Autosave the loaded file or not
+ * Get the style the hover created by anchorblock will use.
*
- * @see elm_entry_file_set()
+ * @param obj The anchorblock object
+ * @return The style to use by the hover. NULL means the default is used.
+ *
+ * @see elm_object_style_set()
*/
- EAPI void elm_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This gets the entry object's 'autosave' status.
+ * Ends the hover popup in the anchorblock
*
- * @param obj The entry object
- * @return Autosave the loaded file or not
+ * When an anchor is clicked, the anchorblock widget will create a hover
+ * object to use as a popup with user provided content. This function
+ * terminates this popup, returning the anchorblock to its normal state.
*
- * @see elm_entry_file_set()
+ * @param obj The anchorblock object
*/
- EAPI Eina_Bool elm_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Control pasting of text and images for the widget.
+ * Appends a custom item provider to the given anchorblock
*
- * Normally the entry allows both text and images to be pasted. By setting
- * textonly to be true, this prevents images from being pasted.
+ * Appends the given function to the list of items providers. This list is
+ * called, one function at a time, with the given @p data pointer, the
+ * anchorblock object and, in the @p item parameter, the item name as
+ * referenced in its href string. Following functions in the list will be
+ * called in order until one of them returns something different to NULL,
+ * which should be an Evas_Object which will be used in place of the item
+ * element.
*
- * Note this only changes the behaviour of text.
+ * Items in the markup text take the form \<item relsize=16x16 vsize=full
+ * href=item/name\>\</item\>
*
- * @param obj The entry object
- * @param textonly paste mode - EINA_TRUE is text only, EINA_FALSE is
- * text+image+other.
+ * @param obj The anchorblock object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
+ *
+ * @see elm_entry_item_provider_append()
*/
- EAPI void elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * Getting elm_entry text paste/drop mode.
+ * Prepend a custom item provider to the given anchorblock
*
- * In textonly mode, only text may be pasted or dropped into the widget.
+ * Like elm_anchorblock_item_provider_append(), but it adds the function
+ * @p func to the beginning of the list, instead of the end.
*
- * @param obj The entry object
- * @return If the widget only accepts text from pastes.
+ * @param obj The anchorblock object
+ * @param func The function to add to the list of providers
+ * @param data User data that will be passed to the callback function
*/
- EAPI Eina_Bool elm_entry_cnp_textonly_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_anchorblock_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * Enable or disable scrolling in entry
+ * Remove a custom item provider from the list of the given anchorblock
*
- * Normally the entry is not scrollable unless you enable it with this call.
+ * Removes the function and data pairing that matches @p func and @p data.
+ * That is, unless the same function and same user data are given, the
+ * function will not be removed from the list. This allows us to add the
+ * same callback several times, with different @p data pointers and be
+ * able to remove them later without conflicts.
*
- * @param obj The entry object
- * @param scroll EINA_TRUE if it is to be scrollable, EINA_FALSE otherwise
+ * @param obj The anchorblock object
+ * @param func The function to remove from the list
+ * @param data The data matching the function to remove from the list
*/
- EAPI void elm_entry_scrollable_set(Evas_Object *obj, Eina_Bool scroll);
+ EAPI void elm_anchorblock_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
/**
- * Get the scrollable state of the entry
- *
- * Normally the entry is not scrollable. This gets the scrollable state
- * of the entry. See elm_entry_scrollable_set() for more information.
- *
- * @param obj The entry object
- * @return The scrollable state
+ * @}
*/
- EAPI Eina_Bool elm_entry_scrollable_get(const Evas_Object *obj);
+
/**
- * This sets a widget to be displayed to the left of a scrolled entry.
+ * @defgroup Bubble Bubble
*
- * @param obj The scrolled entry object
- * @param icon The widget to display on the left side of the scrolled
- * entry.
+ * @image html img/widget/bubble/preview-00.png
+ * @image latex img/widget/bubble/preview-00.eps
+ * @image html img/widget/bubble/preview-01.png
+ * @image latex img/widget/bubble/preview-01.eps
+ * @image html img/widget/bubble/preview-02.png
+ * @image latex img/widget/bubble/preview-02.eps
*
- * @note A previously set widget will be destroyed.
- * @note If the object being set does not have minimum size hints set,
- * it won't get properly displayed.
+ * @brief The Bubble is a widget to show text similarly to how speech is
+ * represented in comics.
*
- * @see elm_entry_end_set()
- */
- EAPI void elm_entry_icon_set(Evas_Object *obj, Evas_Object *icon);
- /**
- * Gets the leftmost widget of the scrolled entry. This object is
- * owned by the scrolled entry and should not be modified.
+ * The bubble widget contains 5 important visual elements:
+ * @li The frame is a rectangle with rounded rectangles and an "arrow".
+ * @li The @p icon is an image to which the frame's arrow points to.
+ * @li The @p label is a text which appears to the right of the icon if the
+ * corner is "top_left" or "bottom_left" and is right aligned to the frame
+ * otherwise.
+ * @li The @p info is a text which appears to the right of the label. Info's
+ * font is of a ligther color than label.
+ * @li The @p content is an evas object that is shown inside the frame.
*
- * @param obj The scrolled entry object
- * @return the left widget inside the scroller
- */
- EAPI Evas_Object *elm_entry_icon_get(const Evas_Object *obj);
- /**
- * Unset the leftmost widget of the scrolled entry, unparenting and
- * returning it.
+ * The position of the arrow, icon, label and info depends on which corner is
+ * selected. The four available corners are:
+ * @li "top_left" - Default
+ * @li "top_right"
+ * @li "bottom_left"
+ * @li "bottom_right"
*
- * @param obj The scrolled entry object
- * @return the previously set icon sub-object of this entry, on
- * success.
+ * Signals that you can add callbacks for are:
+ * @li "clicked" - This is called when a user has clicked the bubble.
*
- * @see elm_entry_icon_set()
- */
- EAPI Evas_Object *elm_entry_icon_unset(Evas_Object *obj);
- /**
- * Sets the visibility of the left-side widget of the scrolled entry,
- * set by elm_entry_icon_set().
+ * For an example of using a buble see @ref bubble_01_example_page "this".
*
- * @param obj The scrolled entry object
- * @param setting EINA_TRUE if the object should be displayed,
- * EINA_FALSE if not.
+ * @{
*/
- EAPI void elm_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
/**
- * This sets a widget to be displayed to the end of a scrolled entry.
- *
- * @param obj The scrolled entry object
- * @param end The widget to display on the right side of the scrolled
- * entry.
+ * Add a new bubble to the parent
*
- * @note A previously set widget will be destroyed.
- * @note If the object being set does not have minimum size hints set,
- * it won't get properly displayed.
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * @see elm_entry_icon_set
+ * This function adds a text bubble to the given parent evas object.
*/
- EAPI void elm_entry_end_set(Evas_Object *obj, Evas_Object *end);
+ EAPI Evas_Object *elm_bubble_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * Gets the endmost widget of the scrolled entry. This object is owned
- * by the scrolled entry and should not be modified.
+ * Set the label of the bubble
*
- * @param obj The scrolled entry object
- * @return the right widget inside the scroller
+ * @param obj The bubble object
+ * @param label The string to set in the label
+ *
+ * This function sets the title of the bubble. Where this appears depends on
+ * the selected corner.
+ * @deprecated use elm_object_text_set() instead.
*/
- EAPI Evas_Object *elm_entry_end_get(const Evas_Object *obj);
+ EINA_DEPRECATED EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
/**
- * Unset the endmost widget of the scrolled entry, unparenting and
- * returning it.
+ * Get the label of the bubble
*
- * @param obj The scrolled entry object
- * @return the previously set icon sub-object of this entry, on
- * success.
+ * @param obj The bubble object
+ * @return The string of set in the label
*
- * @see elm_entry_icon_set()
+ * This function gets the title of the bubble.
+ * @deprecated use elm_object_text_get() instead.
*/
- EAPI Evas_Object *elm_entry_end_unset(Evas_Object *obj);
+ EINA_DEPRECATED EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Sets the visibility of the end widget of the scrolled entry, set by
- * elm_entry_end_set().
+ * Set the info of the bubble
*
- * @param obj The scrolled entry object
- * @param setting EINA_TRUE if the object should be displayed,
- * EINA_FALSE if not.
+ * @param obj The bubble object
+ * @param info The given info about the bubble
+ *
+ * This function sets the info of the bubble. Where this appears depends on
+ * the selected corner.
+ * @deprecated use elm_object_text_part_set() instead. (with "info" as the parameter).
*/
- EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
+ EINA_DEPRECATED EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1);
/**
- * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling
- * them).
+ * Get the info of the bubble
*
- * Setting an entry to single-line mode with elm_entry_single_line_set()
- * will automatically disable the display of scrollbars when the entry
- * moves inside its scroller.
+ * @param obj The bubble object
*
- * @param obj The scrolled entry object
- * @param h The horizontal scrollbar policy to apply
- * @param v The vertical scrollbar policy to apply
+ * @return The "info" string of the bubble
+ *
+ * This function gets the info text.
+ * @deprecated use elm_object_text_part_get() instead. (with "info" as the parameter).
*/
- EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
+ EINA_DEPRECATED EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * This enables/disables bouncing within the entry.
+ * Set the content to be shown in the bubble
*
- * This function sets whether the entry will bounce when scrolling reaches
- * the end of the contained entry.
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_bubble_content_unset() function.
*
- * @param obj The scrolled entry object
- * @param h The horizontal bounce state
- * @param v The vertical bounce state
- */
- EAPI void elm_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
- /**
- * Get the bounce mode
+ * @param obj The bubble object
+ * @param content The given content of the bubble
*
- * @param obj The Entry object
- * @param h_bounce Allow bounce horizontally
- * @param v_bounce Allow bounce vertically
+ * This function sets the content shown on the middle of the bubble.
*/
- EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
-
- /* pre-made filters for entries */
+ EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
/**
- * @typedef Elm_Entry_Filter_Limit_Size
+ * Get the content shown in the bubble
*
- * 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
+ * Return the content object which is set for this widget.
*
- * Data for the elm_entry_filter_limit_size() entry filter.
+ * @param obj The bubble object
+ * @return The content that is being used
*/
- 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*/
- };
+ EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Filter inserted text based on user defined character and byte limits
+ * Unset the content shown in the bubble
*
- * Add this filter to an entry to limit the characters that it will accept
- * based the the contents of the provided #Elm_Entry_Filter_Limit_Size.
- * The funtion works on the UTF-8 representation of the string, converting
- * it from the set markup, thus not accounting for any format in it.
+ * Unparent and return the content object which was set for this widget.
*
- * 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.
+ * @param obj The bubble object
+ * @return The content that was being used
+ */
+ EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * Set the icon of the bubble
*
- * 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.
+ * Once the icon object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_icon_content_unset() function.
*
- * This filter, like any others, does not apply when setting the entry text
- * directly with elm_object_text_set() (or the deprecated
- * elm_entry_entry_set()).
+ * @param obj The bubble object
+ * @param icon The given icon for the bubble
*/
- EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 2, 3);
+ EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
- * @typedef Elm_Entry_Filter_Accept_Set
+ * Get the icon of the bubble
*
- * Data for the elm_entry_filter_accept_set() entry filter.
+ * @param obj The bubble object
+ * @return The icon for the bubble
+ *
+ * This function gets the icon shown on the top left of bubble.
*/
- typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set;
+ EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * @struct _Elm_Entry_Filter_Accept_Set
+ * Unset the icon of the bubble
+ *
+ * Unparent and return the icon object which was set for this widget.
*
- * Data for the elm_entry_filter_accept_set() entry filter.
+ * @param obj The bubble object
+ * @return The icon that was being used
*/
- 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. */
- };
+ EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Filter inserted text based on accepted or rejected sets of characters
+ * Set the corner of the bubble
*
- * 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.
+ * @param obj The bubble object.
+ * @param corner The given corner for the bubble.
*
- * 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.
+ * This function sets the corner of the bubble. The corner will be used to
+ * determine where the arrow in the frame points to and where label, icon and
+ * info arre shown.
*
- * In both cases, the function filters by matching utf8 characters to the
- * raw markup text, so it can be used to remove formatting tags.
+ * Possible values for corner are:
+ * @li "top_left" - Default
+ * @li "top_right"
+ * @li "bottom_left"
+ * @li "bottom_right"
+ */
+ EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *corner) EINA_ARG_NONNULL(1, 2);
+ /**
+ * Get the corner of the bubble
*
- * This filter, like any others, does not apply when setting the entry text
- * directly with elm_object_text_set() (or the deprecated
- * elm_entry_entry_set()).
+ * @param obj The bubble object.
+ * @return The given corner for the bubble.
+ *
+ * This function gets the selected corner of the bubble.
*/
- EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 3);
+ EAPI const char *elm_bubble_corner_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @}
*/
- /* composite widgets - these basically put together basic widgets above
- * in convenient packages that do more than basic stuff */
-
- /* anchorview */
/**
- * @defgroup Anchorview Anchorview
- *
- * @image html img/widget/anchorview/preview-00.png
- * @image latex img/widget/anchorview/preview-00.eps
- *
- * Anchorview is for displaying text that contains markup with anchors
- * like <c>\<a href=1234\>something\</\></c> in it.
- *
- * Besides being styled differently, the anchorview widget provides the
- * necessary functionality so that clicking on these anchors brings up a
- * popup with user defined content such as "call", "add to contacts" or
- * "open web page". This popup is provided using the @ref Hover widget.
- *
- * This widget is very similar to @ref Anchorblock, so refer to that
- * widget for an example. The only difference Anchorview has is that the
- * widget is already provided with scrolling functionality, so if the
- * text set to it is too large to fit in the given space, it will scroll,
- * whereas the @ref Anchorblock widget will keep growing to ensure all the
- * text can be displayed.
+ * @defgroup Photo Photo
*
- * This widget emits the following signals:
- * @li "anchor,clicked": will be called when an anchor is clicked. The
- * @p event_info parameter on the callback will be a pointer of type
- * ::Elm_Entry_Anchorview_Info.
+ * For displaying the photo of a person (contact). Simple yet
+ * with a very specific purpose.
*
- * See @ref Anchorblock for an example on how to use both of them.
+ * Signals that you can add callbacks for are:
*
- * @see Anchorblock
- * @see Entry
- * @see Hover
+ * "clicked" - This is called when a user has clicked the photo
+ * "drag,start" - Someone started dragging the image out of the object
+ * "drag,end" - Dragged item was dropped (somewhere)
*
* @{
*/
+
/**
- * @typedef Elm_Entry_Anchorview_Info
+ * Add a new photo to the parent
*
- * The info sent in the callback for "anchor,clicked" signals emitted by
- * the Anchorview widget.
- */
- typedef struct _Elm_Entry_Anchorview_Info Elm_Entry_Anchorview_Info;
- /**
- * @struct _Elm_Entry_Anchorview_Info
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
*
- * The info sent in the callback for "anchor,clicked" signals emitted by
- * the Anchorview widget.
+ * @ingroup Photo
*/
- struct _Elm_Entry_Anchorview_Info
- {
- const char *name; /**< Name of the anchor, as indicated in its href
- attribute */
- int button; /**< The mouse button used to click on it */
- Evas_Object *hover; /**< The hover object to use for the popup */
- struct {
- Evas_Coord x, y, w, h;
- } anchor, /**< Geometry selection of text used as anchor */
- 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 */
- };
+ EAPI Evas_Object *elm_photo_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
/**
- * Add a new Anchorview object
+ * Set the file that will be used as photo
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The photo object
+ * @param file The path to file that will be used as photo
+ *
+ * @return (1 = success, 0 = error)
+ *
+ * @ingroup Photo
*/
- EAPI Evas_Object *elm_anchorview_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- /**
- * Set the text to show in the anchorview
+ EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the file that will be used as thumbnail in the photo.
*
- * Sets the text of the anchorview to @p text. This text can include markup
- * format tags, including <c>\<a href=anchorname\></c> to begin a segment of
- * text that will be specially styled and react to click events, ended with
- * either of \</a\> or \</\>. When clicked, the anchor will emit an
- * "anchor,clicked" signal that you can attach a callback to with
- * evas_object_smart_callback_add(). The name of the anchor given in the
- * event info struct will be the one set in the href attribute, in this
- * case, anchorname.
+ * @param obj The photo object.
+ * @param file The path to file that will be used as thumb.
+ * @param group The key used in case of an EET file.
*
- * Other markup can be used to style the text in different ways, but it's
- * up to the style defined in the theme which tags do what.
- * @deprecated use elm_object_text_set() instead.
+ * @ingroup Photo
*/
- EINA_DEPRECATED EAPI void elm_anchorview_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+ EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
+
/**
- * Get the markup text set for the anchorview
+ * Set the size that will be used on the photo
*
- * Retrieves the text set on the anchorview, with markup tags included.
+ * @param obj The photo object
+ * @param size The size that the photo will be
*
- * @param obj The anchorview object
- * @return The markup text set or @c NULL if nothing was set or an error
- * occurred
- * @deprecated use elm_object_text_set() instead.
+ * @ingroup Photo
*/
- EINA_DEPRECATED EAPI const char *elm_anchorview_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_photo_size_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
+
/**
- * Set the parent of the hover popup
+ * Set if the photo should be completely visible or not.
*
- * Sets the parent object to use by the hover created by the anchorview
- * when an anchor is clicked. See @ref Hover for more details on this.
- * If no parent is set, the same anchorview object will be used.
+ * @param obj The photo object
+ * @param fill if true the photo will be completely visible
*
- * @param obj The anchorview object
- * @param parent The object to use as parent for the hover
+ * @ingroup Photo
*/
- EAPI void elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) EINA_ARG_NONNULL(1);
+
/**
- * Get the parent of the hover popup
+ * Set editability of the photo.
*
- * Get the object used as parent for the hover created by the anchorview
- * widget. See @ref Hover for more details on this.
+ * An editable photo can be dragged to or from, and can be cut or
+ * pasted too. Note that pasting an image or dropping an item on
+ * the image will delete the existing content.
*
- * @param obj The anchorview object
- * @return The object used as parent for the hover, NULL if none is set.
+ * @param obj The photo object.
+ * @param set To set of clear editablity.
*/
- EAPI Evas_Object *elm_anchorview_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1);
+
/**
- * Set the style that the hover should use
+ * @}
+ */
+
+ /* gesture layer */
+ /**
+ * @defgroup Elm_Gesture_Layer Gesture Layer
+ * Gesture Layer Usage:
*
- * When creating the popup hover, anchorview will request that it's
- * themed according to @p style.
+ * Use Gesture Layer to detect gestures.
+ * The advantage is that you don't have to implement
+ * gesture detection, just set callbacks of gesture state.
+ * By using gesture layer we make standard interface.
*
- * @param obj The anchorview object
- * @param style The style to use for the underlying hover
+ * In order to use Gesture Layer you start with @ref elm_gesture_layer_add
+ * with a parent object parameter.
+ * Next 'activate' gesture layer with a @ref elm_gesture_layer_attach
+ * call. Usually with same object as target (2nd parameter).
*
- * @see elm_object_style_set()
+ * Now you need to tell gesture layer what gestures you follow.
+ * This is done with @ref elm_gesture_layer_cb_set call.
+ * By setting the callback you actually saying to gesture layer:
+ * I would like to know when the gesture @ref Elm_Gesture_Types
+ * switches to state @ref Elm_Gesture_State.
+ *
+ * Next, you need to implement the actual action that follows the input
+ * in your callback.
+ *
+ * Note that if you like to stop being reported about a gesture, just set
+ * all callbacks referring this gesture to NULL.
+ * (again with @ref elm_gesture_layer_cb_set)
+ *
+ * The information reported by gesture layer to your callback is depending
+ * on @ref Elm_Gesture_Types:
+ * @ref Elm_Gesture_Taps_Info is the info reported for tap gestures:
+ * @ref ELM_GESTURE_N_TAPS, @ref ELM_GESTURE_N_LONG_TAPS,
+ * @ref ELM_GESTURE_N_DOUBLE_TAPS, @ref ELM_GESTURE_N_TRIPLE_TAPS.
+ *
+ * @ref Elm_Gesture_Momentum_Info is info reported for momentum gestures:
+ * @ref ELM_GESTURE_MOMENTUM.
+ *
+ * @ref Elm_Gesture_Line_Info is the info reported for line gestures:
+ * (this also contains @ref Elm_Gesture_Momentum_Info internal structure)
+ * @ref ELM_GESTURE_N_LINES, @ref ELM_GESTURE_N_FLICKS.
+ * Note that we consider a flick as a line-gesture that should be completed
+ * in flick-time-limit as defined in @ref Config.
+ *
+ * @ref Elm_Gesture_Zoom_Info is the info reported for @ref ELM_GESTURE_ZOOM gesture.
+ *
+ * @ref Elm_Gesture_Rotate_Info is the info reported for @ref ELM_GESTURE_ROTATE gesture.
+ *
+ *
+ * Gesture Layer Tweaks:
+ *
+ * Note that line, flick, gestures can start without the need to remove fingers from surface.
+ * When user fingers rests on same-spot gesture is ended and starts again when fingers moved.
+ *
+ * Setting glayer_continues_enable to false in @ref Config will change this behavior
+ * so gesture starts when user touches (a *DOWN event) touch-surface
+ * and ends when no fingers touches surface (a *UP event).
*/
- EAPI void elm_anchorview_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
+
+ /**
+ * @enum _Elm_Gesture_Types
+ * Enum of supported gesture types.
+ * @ingroup Elm_Gesture_Layer
+ */
+ enum _Elm_Gesture_Types
+ {
+ 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 dircetion 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
+ };
+
/**
- * Get the style that the hover should use
- *
- * Get the style the hover created by anchorview will use.
- *
- * @param obj The anchorview object
- * @return The style to use by the hover. NULL means the default is used.
- *
- * @see elm_object_style_set()
+ * @typedef Elm_Gesture_Types
+ * gesture types enum
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI const char *elm_anchorview_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ typedef enum _Elm_Gesture_Types Elm_Gesture_Types;
+
/**
- * Ends the hover popup in the anchorview
- *
- * When an anchor is clicked, the anchorview widget will create a hover
- * object to use as a popup with user provided content. This function
- * terminates this popup, returning the anchorview to its normal state.
- *
- * @param obj The anchorview object
+ * @enum _Elm_Gesture_State
+ * Enum of gesture states.
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ 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 /**< Onging gesture was ABORTed */
+ };
+
/**
- * Set bouncing behaviour when the scrolled content reaches an edge
- *
- * Tell the internal scroller object whether it should bounce or not
- * when it reaches the respective edges for each axis.
- *
- * @param obj The anchorview object
- * @param h_bounce Whether to bounce or not in the horizontal axis
- * @param v_bounce Whether to bounce or not in the vertical axis
- *
- * @see elm_scroller_bounce_set()
+ * @typedef Elm_Gesture_State
+ * gesture states enum
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1);
+ typedef enum _Elm_Gesture_State Elm_Gesture_State;
+
/**
- * Get the set bouncing behaviour of the internal scroller
- *
- * Get whether the internal scroller should bounce when the edge of each
- * axis is reached scrolling.
- *
- * @param obj The anchorview object
- * @param h_bounce Pointer where to store the bounce state of the horizontal
- * axis
- * @param v_bounce Pointer where to store the bounce state of the vertical
- * axis
- *
- * @see elm_scroller_bounce_get()
+ * @struct _Elm_Gesture_Taps_Info
+ * Struct holds taps info for user
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1);
+ 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 */
+ };
+
/**
- * Appends a custom item provider to the given anchorview
- *
- * Appends the given function to the list of items providers. This list is
- * called, one function at a time, with the given @p data pointer, the
- * anchorview object and, in the @p item parameter, the item name as
- * referenced in its href string. Following functions in the list will be
- * called in order until one of them returns something different to NULL,
- * which should be an Evas_Object which will be used in place of the item
- * element.
- *
- * Items in the markup text take the form \<item relsize=16x16 vsize=full
- * href=item/name\>\</item\>
- *
- * @param obj The anchorview object
- * @param func The function to add to the list of providers
- * @param data User data that will be passed to the callback function
- *
- * @see elm_entry_item_provider_append()
+ * @typedef Elm_Gesture_Taps_Info
+ * holds taps info for user
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info;
+
/**
- * Prepend a custom item provider to the given anchorview
- *
- * Like elm_anchorview_item_provider_append(), but it adds the function
- * @p func to the beginning of the list, instead of the end.
- *
- * @param obj The anchorview object
- * @param func The function to add to the list of providers
- * @param data User data that will be passed to the callback function
+ * @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
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ 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 */
+ };
+
/**
- * Remove a custom item provider from the list of the given anchorview
- *
- * Removes the function and data pairing that matches @p func and @p data.
- * That is, unless the same function and same user data are given, the
- * function will not be removed from the list. This allows us to add the
- * same callback several times, with different @p data pointers and be
- * able to remove them later without conflicts.
- *
- * @param obj The anchorview object
- * @param func The function to remove from the list
- * @param data The data matching the function to remove from the list
+ * @typedef Elm_Gesture_Momentum_Info
+ * holds momentum info for user
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorview_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorview, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+ typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info;
+
/**
- * @}
+ * @struct _Elm_Gesture_Line_Info
+ * Struct holds line info for user
+ * @ingroup Elm_Gesture_Layer
*/
+ struct _Elm_Gesture_Line_Info
+ { /* Report line ends, timestamps, and momentum computed */
+ Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */
+ unsigned int n; /**< Number of fingers (lines) */
+ /* FIXME should be radians, bot degrees */
+ double angle; /**< Angle (direction) of lines */
+ };
- /* anchorblock */
/**
- * @defgroup Anchorblock Anchorblock
- *
- * @image html img/widget/anchorblock/preview-00.png
- * @image latex img/widget/anchorblock/preview-00.eps
- *
- * Anchorblock is for displaying text that contains markup with anchors
- * like <c>\<a href=1234\>something\</\></c> in it.
- *
- * Besides being styled differently, the anchorblock widget provides the
- * necessary functionality so that clicking on these anchors brings up a
- * popup with user defined content such as "call", "add to contacts" or
- * "open web page". This popup is provided using the @ref Hover widget.
- *
- * This widget emits the following signals:
- * @li "anchor,clicked": will be called when an anchor is clicked. The
- * @p event_info parameter on the callback will be a pointer of type
- * ::Elm_Entry_Anchorblock_Info.
- *
- * @see Anchorview
- * @see Entry
- * @see Hover
- *
- * Since examples are usually better than plain words, we might as well
- * try @ref tutorial_anchorblock_example "one".
+ * @typedef Elm_Gesture_Line_Info
+ * Holds line info for user
+ * @ingroup Elm_Gesture_Layer
*/
+ typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info;
+
/**
- * @addtogroup Anchorblock
- * @{
+ * @struct _Elm_Gesture_Zoom_Info
+ * Struct holds zoom info for user
+ * @ingroup Elm_Gesture_Layer
*/
+ 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_Entry_Anchorblock_Info
- *
- * The info sent in the callback for "anchor,clicked" signals emitted by
- * the Anchorblock widget.
+ * @typedef Elm_Gesture_Zoom_Info
+ * Holds zoom info for user
+ * @ingroup Elm_Gesture_Layer
*/
- typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info;
+ typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info;
+
/**
- * @struct _Elm_Entry_Anchorblock_Info
- *
- * The info sent in the callback for "anchor,clicked" signals emitted by
- * the Anchorblock widget.
+ * @struct _Elm_Gesture_Rotate_Info
+ * Struct holds rotation info for user
+ * @ingroup Elm_Gesture_Layer
*/
- struct _Elm_Entry_Anchorblock_Info
+ struct _Elm_Gesture_Rotate_Info
{
- const char *name; /**< Name of the anchor, as indicated in its href
- attribute */
- int button; /**< The mouse button used to click on it */
- Evas_Object *hover; /**< The hover object to use for the popup */
- struct {
- Evas_Coord x, y, w, h;
- } anchor, /**< Geometry selection of text used as anchor */
- 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 */
+ 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
+ * @ingroup Elm_Gesture_Layer
+ */
+ typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info;
+
/**
- * Add a new Anchorblock object
+ * @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.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI Evas_Object *elm_anchorblock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb) (void *data, void *event_info);
+
/**
- * Set the text to show in the anchorblock
+ * 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.
*
- * Sets the text of the anchorblock to @p text. This text can include markup
- * format tags, including <c>\<a href=anchorname\></a></c> to begin a segment
- * of text that will be specially styled and react to click events, ended
- * with either of \</a\> or \</\>. When clicked, the anchor will emit an
- * "anchor,clicked" signal that you can attach a callback to with
- * evas_object_smart_callback_add(). The name of the anchor given in the
- * event info struct will be the one set in the href attribute, in this
- * case, anchorname.
+ * 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.
*
- * Other markup can be used to style the text in different ways, but it's
- * up to the style defined in the theme which tags do what.
- * @deprecated use elm_object_text_set() instead.
+ * @param obj Pointer to 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)
+ *
+ * @ingroup Elm_Gesture_Layer
*/
- EINA_DEPRECATED EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+ EAPI void elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Types idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data) EINA_ARG_NONNULL(1);
+
/**
- * Get the markup text set for the anchorblock
+ * Call this function to get repeat-events settings.
*
- * Retrieves the text set on the anchorblock, with markup tags included.
+ * @param obj Pointer to gesture-layer.
*
- * @param obj The anchorblock object
- * @return The markup text set or @c NULL if nothing was set or an error
- * occurred
- * @deprecated use elm_object_text_set() instead.
+ * @return repeat events settings.
+ * @see elm_gesture_layer_hold_events_set()
+ * @ingroup Elm_Gesture_Layer
*/
- EINA_DEPRECATED EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_gesture_layer_hold_events_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
- * Set the parent of the hover popup
+ * This function called in order to make gesture-layer repeat events.
+ * Set this of you like to get the raw events only if gestures were not detected.
+ * Clear this if you like gesture layer to fwd events as testing gestures.
*
- * Sets the parent object to use by the hover created by the anchorblock
- * when an anchor is clicked. See @ref Hover for more details on this.
+ * @param obj Pointer to gesture-layer.
+ * @param r Repeat: TRUE/FALSE
*
- * @param obj The anchorblock object
- * @param parent The object to use as parent for the hover
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool r) EINA_ARG_NONNULL(1);
+
/**
- * Get the parent of the hover popup
+ * This function sets step-value for zoom action.
+ * Set step to any positive value.
+ * Cancel step setting by setting to 0.0
*
- * Get the object used as parent for the hover created by the anchorblock
- * widget. See @ref Hover for more details on this.
- * If no parent is set, the same anchorblock object will be used.
+ * @param obj Pointer to gesture-layer.
+ * @param s new zoom step value.
*
- * @param obj The anchorblock object
- * @return The object used as parent for the hover, NULL if none is set.
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1);
+
/**
- * Set the style that the hover should use
- *
- * When creating the popup hover, anchorblock will request that it's
- * themed according to @p style.
+ * This function sets step-value for rotate action.
+ * Set step to any positive value.
+ * Cancel step setting by setting to 0.0
*
- * @param obj The anchorblock object
- * @param style The style to use for the underlying hover
+ * @param obj Pointer to gesture-layer.
+ * @param s new roatate step value.
*
- * @see elm_object_style_set()
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
+ EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1);
+
/**
- * Get the style that the hover should use
- *
- * Get the style the hover created by anchorblock will use.
+ * This function called to attach gesture-layer to an Evas_Object.
+ * @param obj Pointer to gesture-layer.
+ * @param t Pointer to underlying object (AKA Target)
*
- * @param obj The anchorblock object
- * @return The style to use by the hover. NULL means the default is used.
+ * @return TRUE, FALSE on success, failure.
*
- * @see elm_object_style_set()
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *t) EINA_ARG_NONNULL(1, 2);
+
/**
- * Ends the hover popup in the anchorblock
+ * Call this function to construct 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.
*
- * When an anchor is clicked, the anchorblock widget will create a hover
- * object to use as a popup with user provided content. This function
- * terminates this popup, returning the anchorblock to its normal state.
+ * @param parent the parent object.
*
- * @param obj The anchorblock object
+ * @return Pointer to new gesture-layer object.
+ *
+ * @ingroup Elm_Gesture_Layer
*/
- EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+
/**
- * Appends a custom item provider to the given anchorblock
+ * @defgroup Thumb Thumb
*
- * Appends the given function to the list of items providers. This list is
- * called, one function at a time, with the given @p data pointer, the
- * anchorblock object and, in the @p item parameter, the item name as
- * referenced in its href string. Following functions in the list will be
- * called in order until one of them returns something different to NULL,
- * which should be an Evas_Object which will be used in place of the item
- * element.
+ * @image html img/widget/thumb/preview-00.png
+ * @image latex img/widget/thumb/preview-00.eps
*
- * Items in the markup text take the form \<item relsize=16x16 vsize=full
- * href=item/name\>\</item\>
+ * A thumb object is used for displaying the thumbnail of an image or video.
+ * You must have compiled Elementary with Ethumb_Client support and the DBus
+ * service must be present and auto-activated in order to have thumbnails to
+ * be generated.
*
- * @param obj The anchorblock object
- * @param func The function to add to the list of providers
- * @param data User data that will be passed to the callback function
+ * Once the thumbnail object becomes visible, it will check if there is a
+ * previously generated thumbnail image for the file set on it. If not, it
+ * will start generating this thumbnail.
*
- * @see elm_entry_item_provider_append()
- */
- EAPI void elm_anchorblock_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- /**
- * Prepend a custom item provider to the given anchorblock
+ * Different config settings will cause different thumbnails to be generated
+ * even on the same file.
*
- * Like elm_anchorblock_item_provider_append(), but it adds the function
- * @p func to the beginning of the list, instead of the end.
+ * Generated thumbnails are stored under @c $HOME/.thumbnails/. Check the
+ * Ethumb documentation to change this path, and to see other configuration
+ * options.
*
- * @param obj The anchorblock object
- * @param func The function to add to the list of providers
- * @param data User data that will be passed to the callback function
- */
- EAPI void elm_anchorblock_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
- /**
- * Remove a custom item provider from the list of the given anchorblock
+ * Signals that you can add callbacks for are:
*
- * Removes the function and data pairing that matches @p func and @p data.
- * That is, unless the same function and same user data are given, the
- * function will not be removed from the list. This allows us to add the
- * same callback several times, with different @p data pointers and be
- * able to remove them later without conflicts.
+ * - "clicked" - This is called when a user has clicked the thumb without dragging
+ * around.
+ * - "clicked,double" - This is called when a user has double-clicked the thumb.
+ * - "press" - This is called when a user has pressed down the thumb.
+ * - "generate,start" - The thumbnail generation started.
+ * - "generate,stop" - The generation process stopped.
+ * - "generate,error" - The generation failed.
+ * - "load,error" - The thumbnail image loading failed.
*
- * @param obj The anchorblock object
- * @param func The function to remove from the list
- * @param data The data matching the function to remove from the list
+ * available styles:
+ * - default
+ * - noframe
+ *
+ * An example of use of thumbnail:
+ *
+ * - @ref thumb_example_01
*/
- EAPI void elm_anchorblock_item_provider_remove(Evas_Object *obj, Evas_Object *(*func) (void *data, Evas_Object *anchorblock, const char *item), void *data) EINA_ARG_NONNULL(1, 2);
+
/**
- * @}
+ * @addtogroup Thumb
+ * @{
*/
/**
- * @defgroup Bubble Bubble
+ * @enum _Elm_Thumb_Animation_Setting
+ * @typedef Elm_Thumb_Animation_Setting
*
- * @image html img/widget/bubble/preview-00.png
- * @image latex img/widget/bubble/preview-00.eps
- * @image html img/widget/bubble/preview-01.png
- * @image latex img/widget/bubble/preview-01.eps
- * @image html img/widget/bubble/preview-02.png
- * @image latex img/widget/bubble/preview-02.eps
+ * Used to set if a video thumbnail is animating or not.
*
- * @brief The Bubble is a widget to show text similarly to how speech is
- * represented in comics.
+ * @ingroup Thumb
+ */
+ typedef enum _Elm_Thumb_Animation_Setting
+ {
+ ELM_THUMB_ANIMATION_START = 0, /**< Play animation once */
+ ELM_THUMB_ANIMATION_LOOP, /**< Keep playing animation until stop is requested */
+ ELM_THUMB_ANIMATION_STOP, /**< Stop playing the animation */
+ ELM_THUMB_ANIMATION_LAST
+ } Elm_Thumb_Animation_Setting;
+
+ /**
+ * Add a new thumb object to the parent.
*
- * The bubble widget contains 5 important visual elements:
- * @li The frame is a rectangle with rounded rectangles and an "arrow".
- * @li The @p icon is an image to which the frame's arrow points to.
- * @li The @p label is a text which appears to the right of the icon if the
- * corner is "top_left" or "bottom_left" and is right aligned to the frame
- * otherwise.
- * @li The @p info is a text which appears to the right of the label. Info's
- * font is of a ligther color than label.
- * @li The @p content is an evas object that is shown inside the frame.
+ * @param parent The parent object.
+ * @return The new object or NULL if it cannot be created.
*
- * The position of the arrow, icon, label and info depends on which corner is
- * selected. The four available corners are:
- * @li "top_left" - Default
- * @li "top_right"
- * @li "bottom_left"
- * @li "bottom_right"
+ * @see elm_thumb_file_set()
+ * @see elm_thumb_ethumb_client_get()
+ *
+ * @ingroup Thumb
+ */
+ EAPI Evas_Object *elm_thumb_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * Reload thumbnail if it was generated before.
+ *
+ * @param obj The thumb object to reload
+ *
+ * This is useful if the ethumb client configuration changed, like its
+ * size, aspect or any other property one set in the handle returned
+ * by elm_thumb_ethumb_client_get().
*
- * Signals that you can add callbacks for are:
- * @li "clicked" - This is called when a user has clicked the bubble.
+ * If the options didn't change, the thumbnail won't be generated again, but
+ * the old one will still be used.
*
- * For an example of using a buble see @ref bubble_01_example_page "this".
+ * @see elm_thumb_file_set()
*
- * @{
+ * @ingroup Thumb
*/
+ EAPI void elm_thumb_reload(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Add a new bubble to the parent
+ * Set the file that will be used as thumbnail.
*
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
+ * @param obj The thumb object.
+ * @param file The path to file that will be used as thumb.
+ * @param key The key used in case of an EET file.
*
- * This function adds a text bubble to the given parent evas object.
- */
- EAPI Evas_Object *elm_bubble_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- /**
- * Set the label of the bubble
+ * The file can be an image or a video (in that case, acceptable extensions are:
+ * avi, mp4, ogv, mov, mpg and wmv). To start the video animation, use the
+ * function elm_thumb_animate().
*
- * @param obj The bubble object
- * @param label The string to set in the label
+ * @see elm_thumb_file_get()
+ * @see elm_thumb_reload()
+ * @see elm_thumb_animate()
*
- * This function sets the title of the bubble. Where this appears depends on
- * the selected corner.
- * @deprecated use elm_object_text_set() instead.
+ * @ingroup Thumb
*/
- EINA_DEPRECATED EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
+ EAPI void elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
/**
- * Get the label of the bubble
+ * Get the image or video path and key used to generate the thumbnail.
*
- * @param obj The bubble object
- * @return The string of set in the label
+ * @param obj The thumb object.
+ * @param file Pointer to filename.
+ * @param key Pointer to key.
*
- * This function gets the title of the bubble.
- * @deprecated use elm_object_text_get() instead.
+ * @see elm_thumb_file_set()
+ * @see elm_thumb_path_get()
+ *
+ * @ingroup Thumb
*/
- EINA_DEPRECATED EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1);
/**
- * Set the info of the bubble
+ * Get the path and key to the image or video generated by ethumb.
*
- * @param obj The bubble object
- * @param info The given info about the bubble
+ * One just need to make sure that the thumbnail was generated before getting
+ * its path; otherwise, the path will be NULL. One way to do that is by asking
+ * for the path when/after the "generate,stop" smart callback is called.
*
- * This function sets the info of the bubble. Where this appears depends on
- * the selected corner.
- * @deprecated use elm_object_text_part_set() instead. (with "info" as the parameter).
+ * @param obj The thumb object.
+ * @param file Pointer to thumb path.
+ * @param key Pointer to thumb key.
+ *
+ * @see elm_thumb_file_get()
+ *
+ * @ingroup Thumb
*/
- EINA_DEPRECATED EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1);
+ EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1);
/**
- * Get the info of the bubble
+ * Set the animation state for the thumb object. If its content is an animated
+ * video, you may start/stop the animation or tell it to play continuously and
+ * looping.
*
- * @param obj The bubble object
+ * @param obj The thumb object.
+ * @param setting The animation setting.
*
- * @return The "info" string of the bubble
+ * @see elm_thumb_file_set()
*
- * This function gets the info text.
- * @deprecated use elm_object_text_part_get() instead. (with "info" as the parameter).
+ * @ingroup Thumb
*/
- EINA_DEPRECATED EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s) EINA_ARG_NONNULL(1);
/**
- * Set the content to be shown in the bubble
+ * Get the animation state for the thumb object.
*
- * Once the content object is set, a previously set one will be deleted.
- * If you want to keep the old content object, use the
- * elm_bubble_content_unset() function.
+ * @param obj The thumb object.
+ * @return getting The animation setting or @c ELM_THUMB_ANIMATION_LAST,
+ * on errors.
*
- * @param obj The bubble object
- * @param content The given content of the bubble
+ * @see elm_thumb_animate_set()
*
- * This function sets the content shown on the middle of the bubble.
+ * @ingroup Thumb
*/
- EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
+ EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * Get the content shown in the bubble
+ * Get the ethumb_client handle so custom configuration can be made.
*
- * Return the content object which is set for this widget.
+ * @return Ethumb_Client instance or NULL.
*
- * @param obj The bubble object
- * @return The content that is being used
- */
- EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Unset the content shown in the bubble
+ * This must be called before the objects are created to be sure no object is
+ * visible and no generation started.
*
- * Unparent and return the content object which was set for this widget.
+ * Example of usage:
*
- * @param obj The bubble object
- * @return The content that was being used
- */
- EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
- /**
- * Set the icon of the bubble
+ * @code
+ * #include <Elementary.h>
+ * #ifndef ELM_LIB_QUICKLAUNCH
+ * EAPI_MAIN int
+ * elm_main(int argc, char **argv)
+ * {
+ * Ethumb_Client *client;
*
- * Once the icon object is set, a previously set one will be deleted.
- * If you want to keep the old content object, use the
- * elm_icon_content_unset() function.
+ * elm_need_ethumb();
*
- * @param obj The bubble object
- * @param icon The given icon for the bubble
- */
- EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
- /**
- * Get the icon of the bubble
+ * // ... your code
*
- * @param obj The bubble object
- * @return The icon for the bubble
+ * client = elm_thumb_ethumb_client_get();
+ * if (!client)
+ * {
+ * ERR("could not get ethumb_client");
+ * return 1;
+ * }
+ * ethumb_client_size_set(client, 100, 100);
+ * ethumb_client_crop_align_set(client, 0.5, 0.5);
+ * // ... your code
*
- * This function gets the icon shown on the top left of bubble.
+ * // Create elm_thumb objects here
+ *
+ * elm_run();
+ * elm_shutdown();
+ * return 0;
+ * }
+ * #endif
+ * ELM_MAIN()
+ * @endcode
+ *
+ * @note There's only one client handle for Ethumb, so once a configuration
+ * change is done to it, any other request for thumbnails (for any thumbnail
+ * object) will use that configuration. Thus, this configuration is global.
+ *
+ * @ingroup Thumb
*/
- EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void *elm_thumb_ethumb_client_get(void);
/**
- * Unset the icon of the bubble
- *
- * Unparent and return the icon object which was set for this widget.
+ * Get the ethumb_client connection state.
*
- * @param obj The bubble object
- * @return The icon that was being used
+ * @return EINA_TRUE if the client is connected to the server or EINA_FALSE
+ * otherwise.
*/
- EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_thumb_ethumb_client_connected(void);
/**
- * Set the corner of the bubble
+ * Make the thumbnail 'editable'.
*
- * @param obj The bubble object.
- * @param corner The given corner for the bubble.
+ * @param obj Thumb object.
+ * @param set Turn on or off editability. Default is @c EINA_FALSE.
*
- * This function sets the corner of the bubble. The corner will be used to
- * determine where the arrow in the frame points to and where label, icon and
- * info arre shown.
+ * This means the thumbnail is a valid drag target for drag and drop, and can be
+ * cut or pasted too.
*
- * Possible values for corner are:
- * @li "top_left" - Default
- * @li "top_right"
- * @li "bottom_left"
- * @li "bottom_right"
+ * @see elm_thumb_editable_get()
+ *
+ * @ingroup Thumb
*/
- EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *corner) EINA_ARG_NONNULL(1, 2);
+ EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1);
/**
- * Get the corner of the bubble
+ * Make the thumbnail 'editable'.
*
- * @param obj The bubble object.
- * @return The given corner for the bubble.
+ * @param obj Thumb object.
+ * @return Editability.
*
- * This function gets the selected corner of the bubble.
+ * This means the thumbnail is a valid drag target for drag and drop, and can be
+ * cut or pasted too.
+ *
+ * @see elm_thumb_editable_set()
+ *
+ * @ingroup Thumb
*/
- EAPI const char *elm_bubble_corner_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
* @}
*/
- /* photo */
- EAPI Evas_Object *elm_photo_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1);
- EAPI void elm_photo_size_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
- EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) EINA_ARG_NONNULL(1);
- EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1);
- /* smart callbacks called:
- * "clicked" - the user clicked the icon
- * "drag,start" - Someone started dragging the image out of the object
- * "drag,end" - Dragged item was dropped (somewhere)
- */
-
- /* gesture layer */
/**
- * @defgroup Elm_Gesture_Layer Gesture Layer
- * Gesture Layer Usage:
- *
- * Use Gesture Layer to detect gestures.
- * The advantage is that you don't have to implement
- * gesture detection, just set callbacks of gesture state.
- * By using gesture layer we make standard interface.
- *
- * In order to use Gesture Layer you start with @ref elm_gesture_layer_add
- * with a parent object parameter.
- * Next 'activate' gesture layer with a @ref elm_gesture_layer_attach
- * call. Usually with same object as target (2nd parameter).
- *
- * Now you need to tell gesture layer what gestures you follow.
- * This is done with @ref elm_gesture_layer_cb_set call.
- * By setting the callback you actually saying to gesture layer:
- * I would like to know when the gesture @ref Elm_Gesture_Types
- * switches to state @ref Elm_Gesture_State.
- *
- * Next, you need to implement the actual action that follows the input
- * in your callback.
- *
- * Note that if you like to stop being reported about a gesture, just set
- * all callbacks referring this gesture to NULL.
- * (again with @ref elm_gesture_layer_cb_set)
- *
- * The information reported by gesture layer to your callback is depending
- * on @ref Elm_Gesture_Types:
- * @ref Elm_Gesture_Taps_Info is the info reported for tap gestures:
- * @ref ELM_GESTURE_N_TAPS, @ref ELM_GESTURE_N_LONG_TAPS,
- * @ref ELM_GESTURE_N_DOUBLE_TAPS, @ref ELM_GESTURE_N_TRIPLE_TAPS.
+ * @defgroup Web Web
*
- * @ref Elm_Gesture_Momentum_Info is info reported for momentum gestures:
- * @ref ELM_GESTURE_MOMENTUM.
+ * @image html img/widget/web/preview-00.png
+ * @image latex img/widget/web/preview-00.eps
*
- * @ref Elm_Gesture_Line_Info is the info reported for line gestures:
- * (this also contains @ref Elm_Gesture_Momentum_Info internal structure)
- * @ref ELM_GESTURE_N_LINES, @ref ELM_GESTURE_N_FLICKS.
- * Note that we consider a flick as a line-gesture that should be completed
- * in flick-time-limit as defined in @ref Config.
+ * A web object is used for displaying web pages (HTML/CSS/JS)
+ * using WebKit-EFL. You must have compiled Elementary with
+ * ewebkit support.
*
- * @ref Elm_Gesture_Zoom_Info is the info reported for @ref ELM_GESTURE_ZOOM gesture.
+ * Signals that you can add callbacks for are:
+ * @li "download,request": A file download has been requested. Event info is
+ * a pointer to a Elm_Web_Download
+ * @li "editorclient,contents,changed": Editor client's contents changed
+ * @li "editorclient,selection,changed": Editor client's selection changed
+ * @li "frame,created": A new frame was created. Event info is an
+ * Evas_Object which can be handled with WebKit's ewk_frame API
+ * @li "icon,received": An icon was received by the main frame
+ * @li "inputmethod,changed": Input method changed. Event info is an
+ * Eina_Bool indicating whether it's enabled or not
+ * @li "js,windowobject,clear": JS window object has been cleared
+ * @li "link,hover,in": Mouse cursor is hovering over a link. Event info
+ * is a char *link[2], where the first string contains the URL the link
+ * points to, and the second one the title of the link
+ * @li "link,hover,out": Mouse cursor left the link
+ * @li "load,document,finished": Loading of a document finished. Event info
+ * is the frame that finished loading
+ * @li "load,error": Load failed. Event info is a pointer to
+ * Elm_Web_Frame_Load_Error
+ * @li "load,finished": Load finished. Event info is NULL on success, on
+ * error it's a pointer to Elm_Web_Frame_Load_Error
+ * @li "load,newwindow,show": A new window was created and is ready to be
+ * shown
+ * @li "load,progress": Overall load progress. Event info is a pointer to
+ * a double containing a value between 0.0 and 1.0
+ * @li "load,provisional": Started provisional load
+ * @li "load,started": Loading of a document started
+ * @li "menubar,visible,get": Queries if the menubar is visible. Event info
+ * is a pointer to Eina_Bool where the callback should set EINA_TRUE if
+ * the menubar is visible, or EINA_FALSE in case it's not
+ * @li "menubar,visible,set": Informs menubar visibility. Event info is
+ * an Eina_Bool indicating the visibility
+ * @li "popup,created": A dropdown widget was activated, requesting its
+ * popup menu to be created. Event info is a pointer to Elm_Web_Menu
+ * @li "popup,willdelete": The web object is ready to destroy the popup
+ * object created. Event info is a pointer to Elm_Web_Menu
+ * @li "ready": Page is fully loaded
+ * @li "scrollbars,visible,get": Queries visibility of scrollbars. Event
+ * info is a pointer to Eina_Bool where the visibility state should be set
+ * @li "scrollbars,visible,set": Informs scrollbars visibility. Event info
+ * is an Eina_Bool with the visibility state set
+ * @li "statusbar,text,set": Text of the statusbar changed. Even info is
+ * a string with the new text
+ * @li "statusbar,visible,get": Queries visibility of the status bar.
+ * Event info is a pointer to Eina_Bool where the visibility state should be
+ * set.
+ * @li "statusbar,visible,set": Informs statusbar visibility. Event info is
+ * an Eina_Bool with the visibility value
+ * @li "title,changed": Title of the main frame changed. Event info is a
+ * string with the new title
+ * @li "toolbars,visible,get": Queries visibility of toolbars. Event info
+ * is a pointer to Eina_Bool where the visibility state should be set
+ * @li "toolbars,visible,set": Informs the visibility of toolbars. Event
+ * info is an Eina_Bool with the visibility state
+ * @li "tooltip,text,set": Show and set text of a tooltip. Event info is
+ * a string with the text to show
+ * @li "uri,changed": URI of the main frame changed. Event info is a string
+ * with the new URI
+ * @li "view,resized": The web object internal's view changed sized
+ * @li "windows,close,request": A JavaScript request to close the current
+ * window was requested
+ * @li "zoom,animated,end": Animated zoom finished
*
- * @ref Elm_Gesture_Rotate_Info is the info reported for @ref ELM_GESTURE_ROTATE gesture.
- * */
+ * available styles:
+ * - default
+ *
+ * An example of use of web:
+ *
+ * - @ref web_example_01 TBD
+ */
/**
- * @enum _Elm_Gesture_Types
- * Enum of supported gesture types.
- * @ingroup Elm_Gesture_Layer
+ * @addtogroup Web
+ * @{
*/
- enum _Elm_Gesture_Types
- {
- 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 dircetion 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
+ /**
+ * Structure used to report load errors.
+ *
+ * Load errors are reported as signal by elm_web. All the strings are
+ * temporary references and should @b not be used after the signal
+ * callback returns. If it's required, make copies with strdup() or
+ * eina_stringshare_add() (they are not even guaranteed to be
+ * stringshared, so must use eina_stringshare_add() and not
+ * eina_stringshare_ref()).
+ */
+ typedef struct _Elm_Web_Frame_Load_Error Elm_Web_Frame_Load_Error;
+ /**
+ * Structure used to report load errors.
+ *
+ * Load errors are reported as signal by elm_web. All the strings are
+ * temporary references and should @b not be used after the signal
+ * callback returns. If it's required, make copies with strdup() or
+ * eina_stringshare_add() (they are not even guaranteed to be
+ * stringshared, so must use eina_stringshare_add() and not
+ * eina_stringshare_ref()).
+ */
+ struct _Elm_Web_Frame_Load_Error
+ {
+ int code; /**< Numeric error code */
+ Eina_Bool is_cancellation; /**< Error produced by cancelling a request */
+ const char *domain; /**< Error domain name */
+ const char *description; /**< Error description (already localized) */
+ const char *failing_url; /**< The URL that failed to load */
+ Evas_Object *frame; /**< Frame object that produced the error */
};
/**
- * @typedef Elm_Gesture_Types
- * gesture types enum
- * @ingroup Elm_Gesture_Layer
+ * The possibles types that the items in a menu can be
*/
- typedef enum _Elm_Gesture_Types Elm_Gesture_Types;
-
+ typedef enum _Elm_Web_Menu_Item_Type Elm_Web_Menu_Item_Type;
/**
- * @enum _Elm_Gesture_State
- * Enum of gesture states.
- * @ingroup Elm_Gesture_Layer
+ * The possibles types that the items in a menu can be
*/
- enum _Elm_Gesture_State
+ enum _Elm_Web_Menu_Item_Type
{
- 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 /**< Onging gesture was ABORTed */
+ ELM_WEB_MENU_SEPARATOR,
+ ELM_WEB_MENU_GROUP,
+ ELM_WEB_MENU_OPTION
};
/**
- * @typedef Elm_Gesture_State
- * gesture states enum
- * @ingroup Elm_Gesture_Layer
+ * Structure describing the items in a menu
*/
- typedef enum _Elm_Gesture_State Elm_Gesture_State;
-
+ typedef struct _Elm_Web_Menu_Item Elm_Web_Menu_Item;
/**
- * @struct _Elm_Gesture_Taps_Info
- * Struct holds taps info for user
- * @ingroup Elm_Gesture_Layer
+ * Structure describing the items in a menu
*/
- struct _Elm_Gesture_Taps_Info
+ struct _Elm_Web_Menu_Item
{
- Evas_Coord x, y; /**< Holds center point between fingers */
- unsigned int n; /**< Number of fingers tapped */
- unsigned int timestamp; /**< event timestamp */
+ const char *text; /**< The text for the item */
+ Elm_Web_Menu_Item_Type type; /**< The type of the item */
};
/**
- * @typedef Elm_Gesture_Taps_Info
- * holds taps info for user
- * @ingroup Elm_Gesture_Layer
+ * Structure describing the menu of a popup
+ *
+ * This structure will be passed as the @c event_info for the "popup,create"
+ * signal, which is emitted when a dropdown menu is opened. Users wanting
+ * to handle these popups by themselves should listen to this signal and
+ * set the @c handled property of the struct to @c EINA_TRUE. Leaving this
+ * property as @c EINA_FALSE means that the user will not handle the popup
+ * and the default implementation will be used.
+ *
+ * When the popup is ready to be dismissed, a "popup,willdelete" signal
+ * will be emitted to notify the user that it can destroy any objects and
+ * free all data related to it.
+ *
+ * @see elm_web_popup_selected_set()
+ * @see elm_web_popup_destroy()
*/
- typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info;
-
+ typedef struct _Elm_Web_Menu Elm_Web_Menu;
/**
- * @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
- * @ingroup Elm_Gesture_Layer
+ * Structure describing the menu of a popup
+ *
+ * This structure will be passed as the @c event_info for the "popup,create"
+ * signal, which is emitted when a dropdown menu is opened. Users wanting
+ * to handle these popups by themselves should listen to this signal and
+ * set the @c handled property of the struct to @c EINA_TRUE. Leaving this
+ * property as @c EINA_FALSE means that the user will not handle the popup
+ * and the default implementation will be used.
+ *
+ * When the popup is ready to be dismissed, a "popup,willdelete" signal
+ * will be emitted to notify the user that it can destroy any objects and
+ * free all data related to it.
+ *
+ * @see elm_web_popup_selected_set()
+ * @see elm_web_popup_destroy()
*/
- 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 */
+ struct _Elm_Web_Menu
+ {
+ Eina_List *items; /**< List of #Elm_Web_Menu_Item */
+ int x; /**< The X position of the popup, relative to the elm_web object */
+ int y; /**< The Y position of the popup, relative to the elm_web object */
+ int width; /**< Width of the popup menu */
+ int height; /**< Height of the popup menu */
- unsigned int tx; /**< Timestamp of start of final x-swipe */
- unsigned int ty; /**< Timestamp of start of final y-swipe */
+ Eina_Bool handled : 1; /**< Set to @c EINA_TRUE by the user to indicate that the popup has been handled and the default implementation should be ignored. Leave as @c EINA_FALSE otherwise. */
+ };
- Evas_Coord mx; /**< Momentum on X */
- Evas_Coord my; /**< Momentum on Y */
+ typedef struct _Elm_Web_Download Elm_Web_Download;
+ struct _Elm_Web_Download
+ {
+ const char *url;
};
/**
- * @typedef Elm_Gesture_Momentum_Info
- * holds momentum info for user
- * @ingroup Elm_Gesture_Layer
+ * Opaque handler containing the features (such as statusbar, menubar, etc)
+ * that are to be set on a newly requested window.
*/
- typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info;
-
+ typedef struct _Elm_Web_Window_Features Elm_Web_Window_Features;
/**
- * @struct _Elm_Gesture_Line_Info
- * Struct holds line info for user
- * @ingroup Elm_Gesture_Layer
+ * Callback type for the create_window hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object requesting the new window
+ * @li @p js Set to @c EINA_TRUE if the request was originated from
+ * JavaScript. @c EINA_FALSE otherwise.
+ * @li @p window_features A pointer of #Elm_Web_Window_Features indicating
+ * the features requested for the new window.
+ *
+ * The returned value of the function should be the @c elm_web widget where
+ * the request will be loaded. That is, if a new window or tab is created,
+ * the elm_web widget in it should be returned, and @b NOT the window
+ * object.
+ * Returning @c NULL should cancel the request.
+ *
+ * @see elm_web_window_create_hook_set()
+ */
+ typedef Evas_Object *(*Elm_Web_Window_Open)(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *window_features);
+ /**
+ * Callback type for the JS alert hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object requesting the new window
+ * @li @p message The message to show in the alert dialog
+ *
+ * The function should return the object representing the alert dialog.
+ * Elm_Web will run a second main loop to handle the dialog and normal
+ * flow of the application will be restored when the object is deleted, so
+ * the user should handle the popup properly in order to delete the object
+ * when the action is finished.
+ * If the function returns @c NULL the popup will be ignored.
+ *
+ * @see elm_web_dialog_alert_hook_set()
*/
- struct _Elm_Gesture_Line_Info
- { /* Report line ends, timestamps, and momentum computed */
- Elm_Gesture_Momentum_Info momentum; /**< Line momentum info */
- unsigned int n; /**< Number of fingers (lines) */
- /* FIXME should be radians, bot degrees */
- double angle; /**< Angle (direction) of lines */
- };
-
+ typedef Evas_Object *(*Elm_Web_Dialog_Alert)(void *data, Evas_Object *obj, const char *message);
/**
- * @typedef Elm_Gesture_Line_Info
- * Holds line info for user
- * @ingroup Elm_Gesture_Layer
+ * Callback type for the JS confirm hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object requesting the new window
+ * @li @p message The message to show in the confirm dialog
+ * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
+ * the user selected @c Ok, @c EINA_FALSE otherwise.
+ *
+ * The function should return the object representing the confirm dialog.
+ * Elm_Web will run a second main loop to handle the dialog and normal
+ * flow of the application will be restored when the object is deleted, so
+ * the user should handle the popup properly in order to delete the object
+ * when the action is finished.
+ * If the function returns @c NULL the popup will be ignored.
+ *
+ * @see elm_web_dialog_confirm_hook_set()
*/
- typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info;
-
+ typedef Evas_Object *(*Elm_Web_Dialog_Confirm)(void *data, Evas_Object *obj, const char *message, Eina_Bool *ret);
/**
- * @struct _Elm_Gesture_Zoom_Info
- * Struct holds zoom info for user
- * @ingroup Elm_Gesture_Layer
+ * Callback type for the JS prompt hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object requesting the new window
+ * @li @p message The message to show in the prompt dialog
+ * @li @p def_value The default value to present the user in the entry
+ * @li @p value Pointer where to store the value given by the user. Must
+ * be a malloc'ed string or @c NULL if the user cancelled the popup.
+ * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
+ * the user selected @c Ok, @c EINA_FALSE otherwise.
+ *
+ * The function should return the object representing the prompt dialog.
+ * Elm_Web will run a second main loop to handle the dialog and normal
+ * flow of the application will be restored when the object is deleted, so
+ * the user should handle the popup properly in order to delete the object
+ * when the action is finished.
+ * If the function returns @c NULL the popup will be ignored.
+ *
+ * @see elm_web_dialog_prompt_hook_set()
*/
- 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 Evas_Object *(*Elm_Web_Dialog_Prompt)(void *data, Evas_Object *obj, const char *message, const char *def_value, char **value, Eina_Bool *ret);
/**
- * @typedef Elm_Gesture_Zoom_Info
- * Holds zoom info for user
- * @ingroup Elm_Gesture_Layer
+ * Callback type for the JS file selector hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object requesting the new window
+ * @li @p allows_multiple @c EINA_TRUE if multiple files can be selected.
+ * @li @p accept_types Mime types accepted
+ * @li @p selected Pointer where to store the list of malloc'ed strings
+ * containing the path to each file selected. Must be @c NULL if the file
+ * dialog is cancelled
+ * @li @p ret Pointer where to store the user selection. @c EINA_TRUE if
+ * the user selected @c Ok, @c EINA_FALSE otherwise.
+ *
+ * The function should return the object representing the file selector
+ * dialog.
+ * Elm_Web will run a second main loop to handle the dialog and normal
+ * flow of the application will be restored when the object is deleted, so
+ * the user should handle the popup properly in order to delete the object
+ * when the action is finished.
+ * If the function returns @c NULL the popup will be ignored.
+ *
+ * @see elm_web_dialog_file selector_hook_set()
*/
- typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info;
-
+ typedef Evas_Object *(*Elm_Web_Dialog_File_Selector)(void *data, Evas_Object *obj, Eina_Bool allows_multiple, const char *accept_types, Eina_List **selected, Eina_Bool *ret);
/**
- * @struct _Elm_Gesture_Rotate_Info
- * Struct holds rotation info for user
- * @ingroup Elm_Gesture_Layer
+ * Callback type for the JS console message hook.
+ *
+ * When a console message is added from JavaScript, any set function to the
+ * console message hook will be called for the user to handle. There is no
+ * default implementation of this hook.
+ *
+ * The function parameters are:
+ * @li @p data User data pointer set when setting the hook function
+ * @li @p obj The elm_web object that originated the message
+ * @li @p message The message sent
+ * @li @p line_number The line number
+ * @li @p source_id Source id
+ *
+ * @see elm_web_console_message_hook_set()
*/
- 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 void (*Elm_Web_Console_Message)(void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id);
/**
- * @typedef Elm_Gesture_Rotate_Info
- * Holds rotation info for user
- * @ingroup Elm_Gesture_Layer
+ * Add a new web object to the parent.
+ *
+ * @param parent The parent object.
+ * @return The new object or NULL if it cannot be created.
+ *
+ * @see elm_web_uri_set()
+ * @see elm_web_webkit_view_get()
*/
- typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info;
+ EAPI Evas_Object *elm_web_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
- * @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.
+ * Get internal ewk_view object from web object.
*
- * @ingroup Elm_Gesture_Layer
+ * Elementary may not provide some low level features of EWebKit,
+ * instead of cluttering the API with proxy methods we opted to
+ * return the internal reference. Be careful using it as it may
+ * interfere with elm_web behavior.
+ *
+ * @param obj The web object.
+ * @return The internal ewk_view object or NULL if it does not
+ * exist. (Failure to create or Elementary compiled without
+ * ewebkit)
+ *
+ * @see elm_web_add()
*/
- typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb) (void *data, void *event_info);
+ EAPI Evas_Object *elm_web_webkit_view_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
- * 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.
+ * Sets the function to call when a new window is requested
*
- * 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.
+ * This hook will be called when a request to create a new window is
+ * issued from the web page loaded.
+ * There is no default implementation for this feature, so leaving this
+ * unset or passing @c NULL in @p func will prevent new windows from
+ * opening.
*
- * @param obj Pointer to 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)
+ * @param obj The web object where to set the hook function
+ * @param func The hook function to be called when a window is requested
+ * @param data User data
+ */
+ EAPI void elm_web_window_create_hook_set(Evas_Object *obj, Elm_Web_Window_Open func, void *data);
+ /**
+ * Sets the function to call when an alert dialog
*
- * @ingroup Elm_Gesture_Layer
+ * This hook will be called when a JavaScript alert dialog is requested.
+ * If no function is set or @c NULL is passed in @p func, the default
+ * implementation will take place.
+ *
+ * @param obj The web object where to set the hook function
+ * @param func The callback function to be used
+ * @param data User data
+ *
+ * @see elm_web_inwin_mode_set()
*/
- EAPI void elm_gesture_layer_cb_set(Evas_Object *obj, Elm_Gesture_Types idx, Elm_Gesture_State cb_type, Elm_Gesture_Event_Cb cb, void *data) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_web_dialog_alert_hook_set(Evas_Object *obj, Elm_Web_Dialog_Alert func, void *data);
/**
- * Call this function to get repeat-events settings.
+ * Sets the function to call when an confirm dialog
*
- * @param obj Pointer to gesture-layer.
+ * This hook will be called when a JavaScript confirm dialog is requested.
+ * If no function is set or @c NULL is passed in @p func, the default
+ * implementation will take place.
*
- * @return repeat events settings.
- * @see elm_gesture_layer_hold_events_set()
- * @ingroup Elm_Gesture_Layer
+ * @param obj The web object where to set the hook function
+ * @param func The callback function to be used
+ * @param data User data
+ *
+ * @see elm_web_inwin_mode_set()
*/
- EAPI Eina_Bool elm_gesture_layer_hold_events_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_web_dialog_confirm_hook_set(Evas_Object *obj, Elm_Web_Dialog_Confirm func, void *data);
/**
- * This function called in order to make gesture-layer repeat events.
- * Set this of you like to get the raw events only if gestures were not detected.
- * Clear this if you like gesture layer to fwd events as testing gestures.
+ * Sets the function to call when an prompt dialog
*
- * @param obj Pointer to gesture-layer.
- * @param r Repeat: TRUE/FALSE
+ * This hook will be called when a JavaScript prompt dialog is requested.
+ * If no function is set or @c NULL is passed in @p func, the default
+ * implementation will take place.
*
- * @ingroup Elm_Gesture_Layer
+ * @param obj The web object where to set the hook function
+ * @param func The callback function to be used
+ * @param data User data
+ *
+ * @see elm_web_inwin_mode_set()
*/
- EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool r) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_web_dialog_prompt_hook_set(Evas_Object *obj, Elm_Web_Dialog_Prompt func, void *data);
/**
- * This function sets step-value for zoom action.
- * Set step to any positive value.
- * Cancel step setting by setting to 0.0
+ * Sets the function to call when an file selector dialog
*
- * @param obj Pointer to gesture-layer.
- * @param s new zoom step value.
+ * This hook will be called when a JavaScript file selector dialog is
+ * requested.
+ * If no function is set or @c NULL is passed in @p func, the default
+ * implementation will take place.
*
- * @ingroup Elm_Gesture_Layer
+ * @param obj The web object where to set the hook function
+ * @param func The callback function to be used
+ * @param data User data
+ *
+ * @see elm_web_inwin_mode_set()
*/
- EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_web_dialog_file_selector_hook_set(Evas_Object *obj, Elm_Web_Dialog_File_Selector func, void *data);
/**
- * This function sets step-value for rotate action.
- * Set step to any positive value.
- * Cancel step setting by setting to 0.0
+ * Sets the function to call when a console message is emitted from JS
*
- * @param obj Pointer to gesture-layer.
- * @param s new roatate step value.
+ * This hook will be called when a console message is emitted from
+ * JavaScript. There is no default implementation for this feature.
*
- * @ingroup Elm_Gesture_Layer
+ * @param obj The web object where to set the hook function
+ * @param func The callback function to be used
+ * @param data User data
*/
- EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1);
-
+ EAPI void elm_web_console_message_hook_set(Evas_Object *obj, Elm_Web_Console_Message func, void *data);
/**
- * This function called to attach gesture-layer to an Evas_Object.
- * @param obj Pointer to gesture-layer.
- * @param t Pointer to underlying object (AKA Target)
+ * Gets the status of the tab propagation
*
- * @return TRUE, FALSE on success, failure.
+ * @param obj The web object to query
+ * @return EINA_TRUE if tab propagation is enabled, EINA_FALSE otherwise
*
- * @ingroup Elm_Gesture_Layer
+ * @see elm_web_tab_propagate_set()
*/
- EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *t) EINA_ARG_NONNULL(1, 2);
-
+ EAPI Eina_Bool elm_web_tab_propagate_get(const Evas_Object *obj);
/**
- * Call this function to construct 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.
+ * Sets whether to use tab propagation
*
- * @param parent the parent object.
+ * If tab propagation is enabled, whenever the user presses the Tab key,
+ * Elementary will handle it and switch focus to the next widget.
+ * The default value is disabled, where WebKit will handle the Tab key to
+ * cycle focus though its internal objects, jumping to the next widget
+ * only when that cycle ends.
+ *
+ * @param obj The web object
+ * @param propagate Whether to propagate Tab keys to Elementary or not
+ */
+ EAPI void elm_web_tab_propagate_set(Evas_Object *obj, Eina_Bool propagate);
+ /**
+ * Sets the URI for the web object
*
- * @return Pointer to new gesture-layer object.
+ * It must be a full URI, with resource included, in the form
+ * http://www.enlightenment.org or file:///tmp/something.html
*
- * @ingroup Elm_Gesture_Layer
+ * @param obj The web object
+ * @param uri The URI to set
+ * @return EINA_TRUE if the URI could be, EINA_FALSE if an error occurred
*/
- EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
-
+ EAPI Eina_Bool elm_web_uri_set(Evas_Object *obj, const char *uri);
/**
- * @defgroup Thumb Thumb
+ * Gets the current URI for the object
*
- * @image html img/widget/thumb/preview-00.png
- * @image latex img/widget/thumb/preview-00.eps
+ * The returned string must not be freed and is guaranteed to be
+ * stringshared.
*
- * A thumb object is used for displaying the thumbnail of an image or video.
- * You must have compiled Elementary with Ethumb_Client support and the DBus
- * service must be present and auto-activated in order to have thumbnails to
- * be generated.
+ * @param obj The web object
+ * @return A stringshared internal string with the current URI, or NULL on
+ * failure
+ */
+ EAPI const char *elm_web_uri_get(const Evas_Object *obj);
+ /**
+ * Gets the current title
*
- * Once the thumbnail object becomes visible, it will check if there is a
- * previously generated thumbnail image for the file set on it. If not, it
- * will start generating this thumbnail.
+ * The returned string must not be freed and is guaranteed to be
+ * stringshared.
*
- * Different config settings will cause different thumbnails to be generated
- * even on the same file.
+ * @param obj The web object
+ * @return A stringshared internal string with the current title, or NULL on
+ * failure
+ */
+ EAPI const char *elm_web_title_get(const Evas_Object *obj);
+ /**
+ * Sets the background color to be used by the web object
*
- * Generated thumbnails are stored under @c $HOME/.thumbnails/. Check the
- * Ethumb documentation to change this path, and to see other configuration
- * options.
+ * This is the color that will be used by default when the loaded page
+ * does not set it's own. Color values are pre-multiplied.
*
- * Signals that you can add callbacks for are:
+ * @param obj The web object
+ * @param r Red component
+ * @param g Green component
+ * @param b Blue component
+ * @param a Alpha component
+ */
+ EAPI void elm_web_bg_color_set(Evas_Object *obj, int r, int g, int b, int a);
+ /**
+ * Gets the background color to be used by the web object
*
- * - "clicked" - This is called when a user has clicked the thumb without dragging
- * around.
- * - "clicked,double" - This is called when a user has double-clicked the thumb.
- * - "press" - This is called when a user has pressed down the thumb.
- * - "generate,start" - The thumbnail generation started.
- * - "generate,stop" - The generation process stopped.
- * - "generate,error" - The generation failed.
- * - "load,error" - The thumbnail image loading failed.
+ * This is the color that will be used by default when the loaded page
+ * does not set it's own. Color values are pre-multiplied.
*
- * available styles:
- * - default
- * - noframe
+ * @param obj The web object
+ * @param r Red component
+ * @param g Green component
+ * @param b Blue component
+ * @param a Alpha component
+ */
+ EAPI void elm_web_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
+ /**
+ * Gets a copy of the currently selected text
*
- * An example of use of thumbnail:
+ * The string returned must be freed by the user when it's done with it.
*
- * - @ref thumb_example_01
+ * @param obj The web object
+ * @return A newly allocated string, or NULL if nothing is selected or an
+ * error occurred
*/
-
+ EAPI char *elm_view_selection_get(const Evas_Object *obj);
/**
- * @addtogroup Thumb
- * @{
+ * Tells the web object which index in the currently open popup was selected
+ *
+ * When the user handles the popup creation from the "popup,created" signal,
+ * it needs to tell the web object which item was selected by calling this
+ * function with the index corresponding to the item.
+ *
+ * @param obj The web object
+ * @param index The index selected
+ *
+ * @see elm_web_popup_destroy()
*/
-
+ EAPI void elm_web_popup_selected_set(Evas_Object *obj, int index);
/**
- * @enum _Elm_Thumb_Animation_Setting
- * @typedef Elm_Thumb_Animation_Setting
+ * Dismisses an open dropdown popup
*
- * Used to set if a video thumbnail is animating or not.
+ * When the popup from a dropdown widget is to be dismissed, either after
+ * selecting an option or to cancel it, this function must be called, which
+ * will later emit an "popup,willdelete" signal to notify the user that
+ * any memory and objects related to this popup can be freed.
*
- * @ingroup Thumb
+ * @param obj The web object
+ * @return EINA_TRUE if the menu was successfully destroyed, or EINA_FALSE
+ * if there was no menu to destroy
*/
- typedef enum _Elm_Thumb_Animation_Setting
- {
- ELM_THUMB_ANIMATION_START = 0, /**< Play animation once */
- ELM_THUMB_ANIMATION_LOOP, /**< Keep playing animation until stop is requested */
- ELM_THUMB_ANIMATION_STOP, /**< Stop playing the animation */
- ELM_THUMB_ANIMATION_LAST
- } Elm_Thumb_Animation_Setting;
-
+ EAPI Eina_Bool elm_web_popup_destroy(Evas_Object *obj);
/**
- * Add a new thumb object to the parent.
+ * Searches the given string in a document.
*
- * @param parent The parent object.
- * @return The new object or NULL if it cannot be created.
+ * @param obj The web object where to search the text
+ * @param string String to search
+ * @param case_sensitive If search should be case sensitive or not
+ * @param forward If search is from cursor and on or backwards
+ * @param wrap If search should wrap at the end
*
- * @see elm_thumb_file_set()
- * @see elm_thumb_ethumb_client_get()
+ * @return @c EINA_TRUE if the given string was found, @c EINA_FALSE if not
+ * or failure
+ */
+ EAPI Eina_Bool elm_web_text_search(const Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
+ /**
+ * Marks matches of the given string in a document.
*
- * @ingroup Thumb
+ * @param obj The web object where to search text
+ * @param string String to match
+ * @param case_sensitive If match should be case sensitive or not
+ * @param highlight If matches should be highlighted
+ * @param limit Maximum amount of matches, or zero to unlimited
+ *
+ * @return number of matched @a string
*/
- EAPI Evas_Object *elm_thumb_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ EAPI unsigned int elm_web_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
/**
- * Reload thumbnail if it was generated before.
+ * Clears all marked matches in the document
*
- * @param obj The thumb object to reload
+ * @param obj The web object
*
- * This is useful if the ethumb client configuration changed, like its
- * size, aspect or any other property one set in the handle returned
- * by elm_thumb_ethumb_client_get().
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ */
+ EAPI Eina_Bool elm_web_text_matches_unmark_all(Evas_Object *obj);
+ /**
+ * Sets whether to highlight the matched marks
*
- * If the options didn't change, the thumbnail won't be generated again, but
- * the old one will still be used.
+ * If enabled, marks set with elm_web_text_matches_mark() will be
+ * highlighted.
*
- * @see elm_thumb_file_set()
+ * @param obj The web object
+ * @param highlight Whether to highlight the marks or not
*
- * @ingroup Thumb
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
*/
- EAPI void elm_thumb_reload(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight);
/**
- * Set the file that will be used as thumbnail.
+ * Gets whether highlighting marks is enabled
*
- * @param obj The thumb object.
- * @param file The path to file that will be used as thumb.
- * @param key The key used in case of an EET file.
+ * @param The web object
*
- * The file can be an image or a video (in that case, acceptable extensions are:
- * avi, mp4, ogv, mov, mpg and wmv). To start the video animation, use the
- * function elm_thumb_animate().
+ * @return EINA_TRUE is marks are set to be highlighted, EINA_FALSE
+ * otherwise
+ */
+ EAPI Eina_Bool elm_web_text_matches_highlight_get(const Evas_Object *obj);
+ /**
+ * Gets the overall loading progress of the page
*
- * @see elm_thumb_file_get()
- * @see elm_thumb_reload()
- * @see elm_thumb_animate()
+ * Returns the estimated loading progress of the page, with a value between
+ * 0.0 and 1.0. This is an estimated progress accounting for all the frames
+ * included in the page.
*
- * @ingroup Thumb
+ * @param The web object
+ *
+ * @return A value between 0.0 and 1.0 indicating the progress, or -1.0 on
+ * failure
*/
- EAPI void elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
+ EAPI double elm_web_load_progress_get(const Evas_Object *obj);
/**
- * Get the image or video path and key used to generate the thumbnail.
+ * Stops loading the current page
*
- * @param obj The thumb object.
- * @param file Pointer to filename.
- * @param key Pointer to key.
+ * Cancels the loading of the current page in the web object. This will
+ * cause a "load,error" signal to be emitted, with the is_cancellation
+ * flag set to EINA_TRUE.
*
- * @see elm_thumb_file_set()
- * @see elm_thumb_path_get()
+ * @param obj The web object
*
- * @ingroup Thumb
+ * @return EINA_TRUE if the cancel was successful, EINA_FALSE otherwise
*/
- EAPI void elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_stop(Evas_Object *obj);
/**
- * Get the path and key to the image or video generated by ethumb.
+ * Requests a reload of the current document in the object
*
- * One just need to make sure that the thumbnail was generated before getting
- * its path; otherwise, the path will be NULL. One way to do that is by asking
- * for the path when/after the "generate,stop" smart callback is called.
+ * @param obj The web object
*
- * @param obj The thumb object.
- * @param file Pointer to thumb path.
- * @param key Pointer to thumb key.
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ */
+ EAPI Eina_Bool elm_web_reload(Evas_Object *obj);
+ /**
+ * Requests a reload of the current document, avoiding any existing caches
*
- * @see elm_thumb_file_get()
+ * @param obj The web object
*
- * @ingroup Thumb
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
*/
- EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_reload_full(Evas_Object *obj);
/**
- * Set the animation state for the thumb object. If its content is an animated
- * video, you may start/stop the animation or tell it to play continuously and
- * looping.
+ * Goes back one step in the browsing history
*
- * @param obj The thumb object.
- * @param setting The animation setting.
+ * This is equivalent to calling elm_web_object_navigate(obj, -1);
*
- * @see elm_thumb_file_set()
+ * @param obj The web object
*
- * @ingroup Thumb
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @see elm_web_history_enable_set()
+ * @see elm_web_back_possible()
+ * @see elm_web_forward()
+ * @see elm_web_navigate()
*/
- EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_back(Evas_Object *obj);
/**
- * Get the animation state for the thumb object.
+ * Goes forward one step in the browsing history
*
- * @param obj The thumb object.
- * @return getting The animation setting or @c ELM_THUMB_ANIMATION_LAST,
- * on errors.
+ * This is equivalent to calling elm_web_object_navigate(obj, 1);
*
- * @see elm_thumb_animate_set()
+ * @param obj The web object
*
- * @ingroup Thumb
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @see elm_web_history_enable_set()
+ * @see elm_web_forward_possible()
+ * @see elm_web_back()
+ * @see elm_web_navigate()
*/
- EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_forward(Evas_Object *obj);
/**
- * Get the ethumb_client handle so custom configuration can be made.
+ * Jumps the given number of steps in the browsing history
*
- * @return Ethumb_Client instance or NULL.
+ * The @p steps value can be a negative integer to back in history, or a
+ * positive to move forward.
*
- * This must be called before the objects are created to be sure no object is
- * visible and no generation started.
+ * @param obj The web object
+ * @param steps The number of steps to jump
*
- * Example of usage:
+ * @return EINA_TRUE on success, EINA_FALSE on error or if not enough
+ * history exists to jump the given number of steps
*
- * @code
- * #include <Elementary.h>
- * #ifndef ELM_LIB_QUICKLAUNCH
- * EAPI int
- * elm_main(int argc, char **argv)
- * {
- * Ethumb_Client *client;
+ * @see elm_web_history_enable_set()
+ * @see elm_web_navigate_possible()
+ * @see elm_web_back()
+ * @see elm_web_forward()
+ */
+ EAPI Eina_Bool elm_web_navigate(Evas_Object *obj, int steps);
+ /**
+ * Queries whether it's possible to go back in history
*
- * elm_need_ethumb();
+ * @param obj The web object
*
- * // ... your code
+ * @return EINA_TRUE if it's possible to back in history, EINA_FALSE
+ * otherwise
+ */
+ EAPI Eina_Bool elm_web_back_possible(Evas_Object *obj);
+ /**
+ * Queries whether it's possible to go forward in history
*
- * client = elm_thumb_ethumb_client_get();
- * if (!client)
- * {
- * ERR("could not get ethumb_client");
- * return 1;
- * }
- * ethumb_client_size_set(client, 100, 100);
- * ethumb_client_crop_align_set(client, 0.5, 0.5);
- * // ... your code
+ * @param obj The web object
*
- * // Create elm_thumb objects here
+ * @return EINA_TRUE if it's possible to forward in history, EINA_FALSE
+ * otherwise
+ */
+ EAPI Eina_Bool elm_web_forward_possible(Evas_Object *obj);
+ /**
+ * Queries whether it's possible to jump the given number of steps
*
- * elm_run();
- * elm_shutdown();
- * return 0;
- * }
- * #endif
- * ELM_MAIN()
- * @endcode
+ * The @p steps value can be a negative integer to back in history, or a
+ * positive to move forward.
*
- * @note There's only one client handle for Ethumb, so once a configuration
- * change is done to it, any other request for thumbnails (for any thumbnail
- * object) will use that configuration. Thus, this configuration is global.
+ * @param obj The web object
+ * @param steps The number of steps to check for
*
- * @ingroup Thumb
+ * @return EINA_TRUE if enough history exists to perform the given jump,
+ * EINA_FALSE otherwise
*/
- EAPI void *elm_thumb_ethumb_client_get(void);
+ EAPI Eina_Bool elm_web_navigate_possible(Evas_Object *obj, int steps);
/**
- * Get the ethumb_client connection state.
+ * Gets whether browsing history is enabled for the given object
*
- * @return EINA_TRUE if the client is connected to the server or EINA_FALSE
- * otherwise.
+ * @param obj The web object
+ *
+ * @return EINA_TRUE if history is enabled, EINA_FALSE otherwise
*/
- EAPI Eina_Bool elm_thumb_ethumb_client_connected(void);
+ EAPI Eina_Bool elm_web_history_enable_get(const Evas_Object *obj);
/**
- * Make the thumbnail 'editable'.
+ * Enables or disables the browsing history
*
- * @param obj Thumb object.
- * @param set Turn on or off editability. Default is @c EINA_FALSE.
+ * @param obj The web object
+ * @param enable Whether to enable or disable the browsing history
+ */
+ EAPI void elm_web_history_enable_set(Evas_Object *obj, Eina_Bool enable);
+ /**
+ * Gets whether text-only zoom is set
*
- * This means the thumbnail is a valid drag target for drag and drop, and can be
- * cut or pasted too.
+ * @param obj The web object
*
- * @see elm_thumb_editable_get()
+ * @return EINA_TRUE if zoom is set to affect only text, EINA_FALSE
+ * otherwise
*
- * @ingroup Thumb
+ * @see elm_web_zoom_text_only_set()
*/
- EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_web_zoom_text_only_get(const Evas_Object *obj);
/**
- * Make the thumbnail 'editable'.
+ * Enables or disables zoom to affect only text
*
- * @param obj Thumb object.
- * @return Editability.
+ * If set, then the zoom level set to the page will only be applied on text,
+ * leaving other objects, such as images, at their original size.
*
- * This means the thumbnail is a valid drag target for drag and drop, and can be
- * cut or pasted too.
+ * @param obj The web object
+ * @param setting EINA_TRUE to use text-only zoom, EINA_FALSE to have zoom
+ * affect the entire page
+ */
+ EAPI void elm_web_zoom_text_only_set(Evas_Object *obj, Eina_Bool setting);
+ /**
+ * Sets the default dialogs to use an Inwin instead of a normal window
*
- * @see elm_thumb_editable_set()
+ * If set, then the default implementation for the JavaScript dialogs and
+ * file selector will be opened in an Inwin. Otherwise they will use a
+ * normal separated window.
*
- * @ingroup Thumb
+ * @param obj The web object
+ * @param value EINA_TRUE to use Inwin, EINA_FALSE to use a normal window
*/
- EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI void elm_web_inwin_mode_set(Evas_Object *obj, Eina_Bool value);
+ /**
+ * Gets whether Inwin mode is set for the current object
+ *
+ * @param obj The web object
+ *
+ * @return EINA_TRUE if Inwin mode is set, EINA_FALSE otherwise
+ */
+ EAPI Eina_Bool elm_web_inwin_mode_get(const Evas_Object *obj);
+
+ EAPI void elm_web_window_features_ref(Elm_Web_Window_Features *wf);
+ EAPI void elm_web_window_features_unref(Elm_Web_Window_Features *wf);
+ EAPI void elm_web_window_features_bool_property_get(const Elm_Web_Window_Features *wf, Eina_Bool *toolbar_visible, Eina_Bool *statusbar_visible, Eina_Bool *scrollbars_visible, Eina_Bool *menubar_visible, Eina_Bool *locationbar_visble, Eina_Bool *fullscreen);
+ EAPI void elm_web_window_features_int_property_get(const Elm_Web_Window_Features *wf, int *x, int *y, int *w, int *h);
/**
* @}
EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
+ * Set whether the toolbar should always have an item selected.
+ *
+ * @param obj The toolbar object.
+ * @param wrap @c EINA_TRUE to enable always-select mode or @c EINA_FALSE to
+ * disable it.
+ *
+ * This will cause the toolbar to always have an item selected, and clicking
+ * the selected item will not cause a selected event to be emitted. Enabling this mode
+ * will immediately select the first toolbar item.
+ *
+ * Always-selected is disabled by default.
+ *
+ * @see elm_toolbar_always_select_mode_get().
+ *
+ * @ingroup Toolbar
+ */
+ EAPI void elm_toolbar_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get whether the toolbar should always have an item selected.
+ *
+ * @param obj The toolbar object.
+ * @return @c EINA_TRUE means an item will always be selected, @c EINA_FALSE indicates
+ * that it is possible to have no items selected. If @p obj is @c NULL, @c EINA_FALSE is returned.
+ *
+ * @see elm_toolbar_always_select_mode_set() for details.
+ *
+ * @ingroup Toolbar
+ */
+ EAPI Eina_Bool elm_toolbar_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
* Set whether the toolbar items' should be selected by the user or not.
*
* @param obj The toolbar object.
* Get the string used to set the icon of @p item.
*
* @param item The toolbar item.
- * @return The string associated with the icon object.
+ * @return The string associated with the icon object.
+ *
+ * @see elm_toolbar_item_icon_set() for details.
+ *
+ * @ingroup Toolbar
+ */
+ EAPI const char *elm_toolbar_item_icon_get(const Elm_Toolbar_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the object of @p item.
+ *
+ * @param item The toolbar item.
+ * @return The object
+ *
+ * @ingroup Toolbar
+ */
+ EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Toolbar_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the icon object of @p item.
+ *
+ * @param item The toolbar item.
+ * @return The icon object
+ *
+ * @see elm_toolbar_item_icon_set() or elm_toolbar_item_icon_memfile_set() for details.
+ *
+ * @ingroup Toolbar
+ */
+ EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Toolbar_Item *item) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set the icon associated with @p item to an image in a binary buffer.
+ *
+ * @param item The toolbar item.
+ * @param img The binary data that will be used as an image
+ * @param size The size of binary data @p img
+ * @param format Optional format of @p img to pass to the image loader
+ * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
*
- * @see elm_toolbar_item_icon_set() for details.
+ * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
*
+ * @note The icon image set by this function can be changed by
+ * elm_toolbar_item_icon_set().
+ *
* @ingroup Toolbar
*/
- EAPI const char *elm_toolbar_item_icon_get(const Elm_Toolbar_Item *item) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Toolbar_Item *item, const void *img, size_t size, const char *format, const char *key) EINA_ARG_NONNULL(1);
/**
* Delete them item from the toolbar.
* @}
*/
- /* tooltip */
+ /**
+ * @defgroup Tooltips Tooltips
+ *
+ * The Tooltip is an (internal, for now) smart object used to show a
+ * content in a frame on mouse hover of objects(or widgets), with
+ * tips/information about them.
+ *
+ * @{
+ */
+
EAPI double elm_tooltip_delay_get(void);
EAPI Eina_Bool elm_tooltip_delay_set(double delay);
EAPI void elm_object_tooltip_show(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_object_tooltip_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_object_tooltip_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
EAPI const char *elm_object_tooltip_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_tooltip_size_restrict_disable(Evas_Object *obj, Eina_Bool disable); EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_tooltip_size_restrict_disabled_get(const Evas_Object *obj); EINA_ARG_NONNULL(1);
+
+ /**
+ * @}
+ */
+
+ /**
+ * @defgroup Cursors Cursors
+ *
+ * The Elementary cursor is an internal smart object used to
+ * customize the mouse cursor displayed over objects (or
+ * widgets). In the most common scenario, the cursor decoration
+ * comes from the graphical @b engine Elementary is running
+ * on. Those engines may provide different decorations for cursors,
+ * and Elementary provides functions to choose them (think of X11
+ * cursors, as an example).
+ *
+ * There's also the possibility of, besides using engine provided
+ * cursors, also use ones coming from Edje theming files. Both
+ * globally and per widget, Elementary makes it possible for one to
+ * make the cursors lookup to be held on engines only or on
+ * Elementary's theme file, too.
+ *
+ * @{
+ */
+
+ /**
+ * Set the cursor to be shown when mouse is over the object
+ *
+ * Set the cursor that will be displayed when mouse is over the
+ * object. The object can have only one cursor set to it, so if
+ * this function is called twice for an object, the previous set
+ * will be unset.
+ * If using X cursors, a definition of all the valid cursor names
+ * is listed on Elementary_Cursors.h. If an invalid name is set
+ * the default cursor will be used.
+ *
+ * @param obj the object being set a cursor.
+ * @param cursor the cursor name to be used.
+ *
+ * @ingroup Cursors
+ */
EAPI void elm_object_cursor_set(Evas_Object *obj, const char *cursor) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the cursor to be shown when mouse is over the object
+ *
+ * @param obj an object with cursor already set.
+ * @return the cursor name.
+ *
+ * @ingroup Cursors
+ */
EAPI const char *elm_object_cursor_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Unset cursor for object
+ *
+ * Unset cursor for object, and set the cursor to default if the mouse
+ * was over this object.
+ *
+ * @param obj Target object
+ * @see elm_object_cursor_set()
+ *
+ * @ingroup Cursors
+ */
EAPI void elm_object_cursor_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Sets a different style for this object cursor.
+ *
+ * @note before you set a style you should define a cursor with
+ * elm_object_cursor_set()
+ *
+ * @param obj an object with cursor already set.
+ * @param style the theme style to use (default, transparent, ...)
+ *
+ * @ingroup Cursors
+ */
EAPI void elm_object_cursor_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the style for this object cursor.
+ *
+ * @param obj an object with cursor already set.
+ * @return style the theme style in use, defaults to "default". If the
+ * object does not have a cursor set, then NULL is returned.
+ *
+ * @ingroup Cursors
+ */
EAPI const char *elm_object_cursor_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set if the cursor set should be searched on the theme or should use
+ * the provided by the engine, only.
+ *
+ * @note before you set if should look on theme you should define a cursor
+ * with elm_object_cursor_set(). By default it will only look for cursors
+ * provided by the engine.
+ *
+ * @param obj an object with cursor already set.
+ * @param engine_only boolean to define it cursors should be looked only
+ * between the provided by the engine or searched on widget's theme as well.
+ *
+ * @ingroup Cursors
+ */
EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the cursor engine only usage for this object cursor.
+ *
+ * @param obj an object with cursor already set.
+ * @return engine_only boolean to define it cursors should be
+ * looked only between the provided by the engine or searched on
+ * widget's theme as well. If the object does not have a cursor
+ * set, then EINA_FALSE is returned.
+ *
+ * @ingroup Cursors
+ */
EAPI Eina_Bool elm_object_cursor_engine_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_tooltip_size_restrict_disable(Evas_Object *obj, Eina_Bool disable); EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_tooltip_size_restrict_disabled_get(const Evas_Object *obj); EINA_ARG_NONNULL(1);
- /* cursors */
+ /**
+ * Get the configured cursor engine only usage
+ *
+ * This gets the globally configured exclusive usage of engine cursors.
+ *
+ * @return 1 if only engine cursors should be used
+ * @ingroup Cursors
+ */
EAPI int elm_cursor_engine_only_get(void);
+
+ /**
+ * Set the configured cursor engine only usage
+ *
+ * This sets the globally configured exclusive usage of engine cursors.
+ * It won't affect cursors set before changing this value.
+ *
+ * @param engine_only If 1 only engine cursors will be enabled, if 0 will
+ * look for them on theme before.
+ * @return EINA_TRUE if value is valid and setted (0 or 1)
+ * @ingroup Cursors
+ */
EAPI Eina_Bool elm_cursor_engine_only_set(int engine_only);
/**
+ * @}
+ */
+
+ /**
* @defgroup Menu Menu
*
* @image html img/widget/menu/preview-00.png
* @param policy_v Vertical scrollbar policy.
*
* This sets the scrollbar visibility policy for the given scroller.
- * #ELM_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
+ * #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it
* is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns
* it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off.
* This applies respectively for the horizontal and vertical scrollbars.
*
* @ingroup List
*/
- EAPI Evas_Object *elm_list_item_base_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_list_item_object_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Evas_Object *elm_list_item_base_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1);
/**
* Get the label of item.
*
* In general to indicate how the genlist should expand items horizontally to
* fill the list area, use elm_genlist_horizontal_set(). Valid modes are
- * ELM_LIST_LIMIT and ELM_LIST_SCROLL . The default is ELM_LIST_SCROLL. This
+ * ELM_LIST_LIMIT and ELM_LIST_SCROLL. The default is ELM_LIST_SCROLL. This
* mode means that if items are too wide to fit, the scroller will scroll
* horizontally. Otherwise items are expanded to fill the width of the
* viewport of the scroller. If it is ELM_LIST_LIMIT, items will be expanded
* - @c "drag" - This is called when the item in the list is being dragged.
* - @c "longpressed" - This is called when the item is pressed for a certain
* amount of time. By default it's 1 second.
+ * - @c "scroll,anim,start" - This is called when scrolling animation has
+ * started.
+ * - @c "scroll,anim,stop" - This is called when scrolling animation has
+ * stopped.
+ * - @c "scroll,drag,start" - This is called when dragging the content has
+ * started.
+ * - @c "scroll,drag,stop" - This is called when dragging the content has
+ * stopped.
* - @c "scroll,edge,top" - This is called when the genlist is scrolled until
* the top edge.
* - @c "scroll,edge,bottom" - This is called when the genlist is scrolled
* @ingroup Genlist
*/
EAPI const Elm_Genlist_Item *elm_genlist_mode_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+ /**
+ * Set reorder mode
+ *
+ * @param obj The genlist object
+ * @param reorder_mode The reorder mode
+ * (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @ingroup Genlist
+ */
EAPI void elm_genlist_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode) EINA_ARG_NONNULL(1);
+
+ /**
+ * Get the reorder mode
+ *
+ * @param obj The genlist object
+ * @return The reorder mode
+ * (EINA_TRUE = on, EINA_FALSE = off)
+ *
+ * @ingroup Genlist
+ */
EAPI Eina_Bool elm_genlist_reorder_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* @ingroup Flipselector
*/
EAPI double elm_flipselector_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @}
+ */
/**
* @addtogroup Calendar
EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) EINA_ARG_NONNULL(1);
/**
+ * 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) EINA_ARG_NONNULL(1);
+
+ /**
* Set bouncing behaviour when the scrolled content reaches an edge.
*
* Tell the internal scroller object whether it should bounce or not
* @param policy_v Vertical scrollbar policy.
*
* This sets the scrollbar visibility policy for the given scroller.
- * #ELM_SCROLLER_POLICY_AUTO means the scrollber is made visible if it
+ * #ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it
* is needed, and otherwise kept hidden. #ELM_SCROLLER_POLICY_ON turns
* it on all the time, and #ELM_SCROLLER_POLICY_OFF always keeps it off.
* This applies respectively for the horizontal and vertical scrollbars.
* @ref tutorial_ctxpopup shows the usage of a good deal of the API.
* @{
*/
- typedef struct _Elm_Ctxpopup_Item Elm_Ctxpopup_Item;
-
typedef enum _Elm_Ctxpopup_Direction
{
ELM_CTXPOPUP_DIRECTION_DOWN, /**< ctxpopup show appear below clicked
the clicked area */
ELM_CTXPOPUP_DIRECTION_UP, /**< ctxpopup show appear above the clicked
area */
+ ELM_CTXPOPUP_DIRECTION_UNKNOWN, /**< ctxpopup does not determine it's direction yet*/
} Elm_Ctxpopup_Direction;
/**
*
* @see elm_ctxpopup_content_set()
*/
- Elm_Ctxpopup_Item *elm_ctxpopup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
+ Elm_Object_Item *elm_ctxpopup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1);
/**
* @brief Delete the given item in a ctxpopup object.
*
- * @param item Ctxpopup item to be deleted
+ * @param it Ctxpopup item to be deleted
*
* @see elm_ctxpopup_item_append()
*/
- EAPI void elm_ctxpopup_item_del(Elm_Ctxpopup_Item *it) EINA_ARG_NONNULL(1);
+ EAPI void elm_ctxpopup_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1);
/**
* @brief Set the ctxpopup item's state as disabled or enabled.
*
- * @param item Ctxpopup item to be enabled/disabled
+ * @param it Ctxpopup item to be enabled/disabled
* @param disabled @c EINA_TRUE to disable it, @c EINA_FALSE to enable it
*
* When disabled the item is greyed out to indicate it's state.
*/
- EAPI void elm_ctxpopup_item_disabled_set(Elm_Ctxpopup_Item *item, Eina_Bool disabled) EINA_ARG_NONNULL(1);
+ EAPI void elm_ctxpopup_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1);
/**
* @brief Get the ctxpopup item's disabled/enabled state.
*
- * @param item Ctxpopup item to be enabled/disabled
+ * @param it Ctxpopup item to be enabled/disabled
* @return disabled @c EINA_TRUE, if disabled, @c EINA_FALSE otherwise
*
* @see elm_ctxpopup_item_disabled_set()
*/
- EAPI Eina_Bool elm_ctxpopup_item_disabled_get(const Elm_Ctxpopup_Item *item) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_ctxpopup_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
/**
* @brief Get the icon object for the given ctxpopup item.
*
- * @param item Ctxpopup item
+ * @param it Ctxpopup item
* @return icon object or @c NULL, if the item does not have icon or an error
* occurred
*
* @see elm_ctxpopup_item_append()
* @see elm_ctxpopup_item_icon_set()
*/
- EAPI Evas_Object *elm_ctxpopup_item_icon_get(const Elm_Ctxpopup_Item *item) EINA_ARG_NONNULL(1);
+ EAPI Evas_Object *elm_ctxpopup_item_icon_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
/**
* @brief Sets the side icon associated with the ctxpopup item
*
- * @param item Ctxpopup item
+ * @param it Ctxpopup item
* @param icon Icon object to be set
*
* Once the icon object is set, a previously set one will be deleted.
*
* @see elm_ctxpopup_item_append()
*/
- EAPI void elm_ctxpopup_item_icon_set(Elm_Ctxpopup_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1);
+ EAPI void elm_ctxpopup_item_icon_set(Elm_Object_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1);
/**
* @brief Get the label for the given ctxpopup item.
*
- * @param item Ctxpopup item
+ * @param it Ctxpopup item
* @return label string or @c NULL, if the item does not have label or an
* error occured
*
* @see elm_ctxpopup_item_append()
* @see elm_ctxpopup_item_label_set()
*/
- EAPI const char *elm_ctxpopup_item_label_get(const Elm_Ctxpopup_Item *item) EINA_ARG_NONNULL(1);
+ EAPI const char *elm_ctxpopup_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
/**
* @brief (Re)set the label on the given ctxpopup item.
*
- * @param item Ctxpopup item
+ * @param it Ctxpopup item
* @param label String to set as label
*/
- EAPI void elm_ctxpopup_item_label_set(Elm_Ctxpopup_Item *item, const char *label) EINA_ARG_NONNULL(1);
+ EAPI void elm_ctxpopup_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1);
/**
* @brief Set an elm widget as the content of the ctxpopup.
*
* @see elm_ctxpopup_direction_priority_set() for more information.
*/
EAPI void elm_ctxpopup_direction_priority_get(Evas_Object *obj, Elm_Ctxpopup_Direction *first, Elm_Ctxpopup_Direction *second, Elm_Ctxpopup_Direction *third, Elm_Ctxpopup_Direction *fourth) EINA_ARG_NONNULL(1);
+
+ /**
+ * @brief Get the current direction of a ctxpopup.
+ *
+ * @param obj Ctxpopup object
+ * @return current direction of a ctxpopup
+ *
+ * @warning Once the ctxpopup showed up, the direction would be determined
+ */
+ EAPI Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
/**
* @}
*/
* positioned at left.
*
* @see elm_segment_control_item_add()
- * @see elm_segment_control_count_get()
+ * @see elm_segment_control_item_count_get()
* @see elm_segment_control_item_del()
*
* @ingroup SegmentControl
* @}
*/
+ /**
+ * @defgroup Grid Grid
+ *
+ * The grid is a grid layout widget that lays out a series of children as a
+ * fixed "grid" of widgets using a given percentage of the grid width and
+ * height each using the child object.
+ *
+ * The Grid uses a "Virtual resolution" that is stretched to fill the grid
+ * widgets size itself. The default is 100 x 100, so that means the
+ * position and sizes of children will effectively be percentages (0 to 100)
+ * of the width or height of the grid widget
+ *
+ * @{
+ */
+ /**
+ * Add a new grid to the parent
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * @ingroup Grid
+ */
EAPI Evas_Object *elm_grid_add(Evas_Object *parent);
+
+ /**
+ * Set the virtual size of the grid
+ *
+ * @param obj The grid object
+ * @param w The virtual width of the grid
+ * @param h The virtual height of the grid
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_size_set(Evas_Object *obj, int w, int h);
+
+ /**
+ * Get the virtual size of the grid
+ *
+ * @param obj The grid object
+ * @param w Pointer to integer to store the virtual width of the grid
+ * @param h Pointer to integer to store the virtual height of the grid
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_size_get(Evas_Object *obj, int *w, int *h);
+
+ /**
+ * Pack child at given position and size
+ *
+ * @param obj The grid object
+ * @param subobj The child to pack
+ * @param x The virtual x coord at which to pack it
+ * @param y The virtual y coord at which to pack it
+ * @param w The virtual width at which to pack it
+ * @param h The virtual height at which to pack it
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
+
+ /**
+ * Unpack a child from a grid object
+ *
+ * @param obj The grid object
+ * @param subobj The child to unpack
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_unpack(Evas_Object *obj, Evas_Object *subobj);
+
+ /**
+ * Faster way to remove all child objects from a grid object.
+ *
+ * @param obj The grid object
+ * @param clear If true, it will delete just removed children
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_clear(Evas_Object *obj, Eina_Bool clear);
+
+ /**
+ * Set packing of an existing child at to position and size
+ *
+ * @param subobj The child to set packing of
+ * @param x The virtual x coord at which to pack it
+ * @param y The virtual y coord at which to pack it
+ * @param w The virtual width at which to pack it
+ * @param h The virtual height at which to pack it
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
+
+ /**
+ * get packing of a child
+ *
+ * @param subobj The child to query
+ * @param x Pointer to integer to store the virtual x coord
+ * @param y Pointer to integer to store the virtual y coord
+ * @param w Pointer to integer to store the virtual width
+ * @param h Pointer to integer to store the virtual height
+ *
+ * @ingroup Grid
+ */
EAPI void elm_grid_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);
+ /**
+ * @}
+ */
EAPI Evas_Object *elm_factory_add(Evas_Object *parent);
EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
-
+ EAPI void elm_factory_maxmin_mode_set(Evas_Object *obj, Eina_Bool enabled);
+ EAPI Eina_Bool elm_factory_maxmin_mode_get(const Evas_Object *obj);
+ EAPI void elm_factory_maxmin_reset_set(Evas_Object *obj);
+
+ /**
+ * @defgroup Video Video
+ *
+ * This object display an player that let you control an Elm_Video
+ * object. It take care of updating it's content according to what is
+ * going on inside the Emotion object. It does activate the remember
+ * function on the linked Elm_Video object.
+ *
+ * Signals that you can add callback for are :
+ *
+ * "forward,clicked" - the user clicked the forward button.
+ * "info,clicked" - the user clicked the info button.
+ * "next,clicked" - the user clicked the next button.
+ * "pause,clicked" - the user clicked the pause button.
+ * "play,clicked" - the user clicked the play button.
+ * "prev,clicked" - the user clicked the prev button.
+ * "rewind,clicked" - the user clicked the rewind button.
+ * "stop,clicked" - the user clicked the stop button.
+ */
EAPI Evas_Object *elm_video_add(Evas_Object *parent);
EAPI void elm_video_file_set(Evas_Object *video, const char *filename);
EAPI void elm_video_uri_set(Evas_Object *video, const char *uri);
EAPI Evas_Object *elm_player_add(Evas_Object *parent);
EAPI void elm_player_video_set(Evas_Object *player, Evas_Object *video);
- /* naviframe */
+ /**
+ * @defgroup Naviframe Naviframe
+ *
+ * @brief Naviframe is a kind of view manager for the applications.
+ *
+ * Naviframe provides functions to switch different pages with stack
+ * mechanism. It means if one page(item) needs to be changed to the new one,
+ * then naviframe would push the new page to it's internal stack. Of course,
+ * it can be back to the previous page by popping the top page. Naviframe
+ * provides some transition effect while the pages are switching (same as
+ * pager).
+ *
+ * Since each item could keep the different styles, users could keep the
+ * same look & feel for the pages or different styles for the items in it's
+ * application.
+ *
+ * Signals that you can add callback for are:
+ *
+ * @li "transition,finished" - When the transition is finished in changing
+ * the item
+ * @li "title,clicked" - User clicked title area
+ *
+ * Default contents parts for the naviframe items that you can use for are:
+ *
+ * @li "elm.swallow.content" - The main content of the page
+ * @li "elm.swallow.prev_btn" - The button to go to the previous page
+ * @li "elm.swallow.next_btn" - The button to go to the next page
+ *
+ * Default text parts of naviframe items that you can be used are:
+ *
+ * @li "elm.text.title" - The title label in the title area
+ *
+ * @ref tutorial_naviframe gives a good overview of the usage of the API.
+ * @{
+ */
+ /**
+ * @brief Add a new Naviframe object to the parent.
+ *
+ * @param parent Parent object
+ * @return New object or @c NULL, if it cannot be created
+ */
EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Push a new item to the top of the naviframe stack (and show it).
+ *
+ * @param obj The naviframe object
+ * @param title_label The label in the title area. The name of the title
+ * label part is "elm.text.title"
+ * @param prev_btn The button to go to the previous item. If it is NULL,
+ * then naviframe will create a back button automatically. The name of
+ * the prev_btn part is "elm.swallow.prev_btn"
+ * @param next_btn The button to go to the next item. Or It could be just an
+ * extra function button. The name of the next_btn part is
+ * "elm.swallow.next_btn"
+ * @param content The main content object. The name of content part is
+ * "elm.swallow.content"
+ * @param item_style The current item style name. @c NULL would be default.
+ * @return The created item or @c NULL upon failure.
+ *
+ * The item pushed becomes one page of the naviframe, this item will be
+ * deleted when it is popped.
+ *
+ * @see also elm_naviframe_item_style_set()
+ *
+ * The following styles are available for this item:
+ * @li @c "default"
+ */
EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style) EINA_ARG_NONNULL(1, 5);
+ /**
+ * @brief Pop an item that is on top of the stack
+ *
+ * @param obj The naviframe object
+ * @return @c NULL or the content object(if the
+ * elm_naviframe_content_preserve_on_pop_get is true).
+ *
+ * This pops an item that is on the top(visible) of the naviframe, makes it
+ * disappear, then deletes the item. The item that was underneath it on the
+ * stack will become visible.
+ *
+ * @see also elm_naviframe_content_preserve_on_pop_get()
+ */
EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Pop the items between the top and the above one on the given item.
+ *
+ * @param it The naviframe item
+ */
+ EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
+ * @brief preserve the content objects when items are popped.
+ *
+ * @param obj The naviframe object
+ * @param preserve Enable the preserve mode if EINA_TRUE, disable otherwise
+ *
+ * @see also elm_naviframe_content_preserve_on_pop_get()
+ */
EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get a value whether preserve mode is enabled or not.
+ *
+ * @param obj The naviframe object
+ * @return If @c EINA_TRUE, preserve mode is enabled
+ *
+ * @see also elm_naviframe_content_preserve_on_pop_set()
+ */
EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
- EAPI void elm_naviframe_item_title_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_naviframe_item_title_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
- EAPI void elm_naviframe_item_subtitle_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1);
- EAPI const char *elm_naviframe_item_subtitle_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get a top item on the naviframe stack
+ *
+ * @param obj The naviframe object
+ * @return The top item on the naviframe stack or @c NULL, if the stack is
+ * empty
+ */
EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get a bottom item on the naviframe stack
+ *
+ * @param obj The naviframe object
+ * @return The bottom item on the naviframe stack or @c NULL, if the stack is
+ * empty
+ */
EAPI Elm_Object_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set an item style
+ *
+ * @param obj The naviframe item
+ * @param item_style The current item style name. @c NULL would be default
+ *
+ * The following styles are available for this item:
+ * @li @c "default"
+ *
+ * @see also elm_naviframe_item_style_get()
+ */
EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get an item style
+ *
+ * @param obj The naviframe item
+ * @return The current item style name
+ *
+ * @see also elm_naviframe_item_style_set()
+ */
EAPI const char *elm_naviframe_item_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Show/Hide the title area
+ *
+ * @param it The naviframe item
+ * @param visible If @c EINA_TRUE, title area will be visible, hidden
+ * otherwise
+ *
+ * When the title area is invisible, then the controls would be hidden so as * to expand the content area to full-size.
+ *
+ * @see also elm_naviframe_item_title_visible_get()
+ */
EAPI void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get a value whether title area is visible or not.
+ *
+ * @param it The naviframe item
+ * @return If @c EINA_TRUE, title area is visible
+ *
+ * @see also elm_naviframe_item_title_visible_set()
+ */
EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
+ * @}
+ */
+
#ifdef __cplusplus
}
#endif