diff --git a/legacy/elementary/doc/examples.dox b/legacy/elementary/doc/examples.dox index 155cd2410c..cbe77d922f 100644 --- a/legacy/elementary/doc/examples.dox +++ b/legacy/elementary/doc/examples.dox @@ -2600,7 +2600,7 @@ * @skipline elm_toolbar_add * @until Update * - * The only difference here is that we set shrink mode to #ELM_SHRINK_MODE_HIDE, + * The only difference here is that we set shrink mode to #ELM_TOOLBAR_SHRINK_HIDE, * that won't display items that doesn't fit to the window. * * Now, let's add an item with states. First, add the item just as any other. diff --git a/legacy/elementary/src/lib/Elementary.h b/legacy/elementary/src/lib/Elementary.h index 9238c5a8d9..3b110aeed8 100644 --- a/legacy/elementary/src/lib/Elementary.h +++ b/legacy/elementary/src/lib/Elementary.h @@ -1,304 +1,10 @@ -/* - * - * vim:ts=8:sw=3:sts=3:expandtab:cino=>5n-3f0^-2{2(0W1st0 - */ - -/** -@file Elementary.h.in -@brief Elementary Widget Library -*/ - -/** -@mainpage Elementary -@image html elementary.png -@version 0.8.0 -@date 2008-2011 - -@section intro What is Elementary? - -This is a VERY SIMPLE toolkit. It is not meant for writing extensive desktop -applications (yet). Small simple ones with simple needs. - -It is meant to make the programmers work almost brainless but give them lots -of flexibility. - -@li @ref Start - Go here to quickly get started with writing Apps - -@section organization Organization - -One can divide Elemementary into three main groups: -@li @ref infralist - These are modules that deal with Elementary as a whole. -@li @ref widgetslist - These are the widgets you'll compose your UI out of. -@li @ref containerslist - These are the containers which hold the widgets. - -@section license License - -LGPL v2 (see COPYING in the base of Elementary's source). This applies to -all files in the source tree. - -@section ack Acknowledgements -There is a lot that goes into making a widget set, and they don't happen out of -nothing. It's like trying to make everyone everywhere happy, regardless of age, -gender, race or nationality - and that is really tough. So thanks to people and -organisations behind this, as listed in the @ref authors page. -*/ - - -/** - * @defgroup Start Getting Started - * - * To write an Elementary app, you can get started with the following: - * -@code -#include -EAPI_MAIN int -elm_main(int argc, char **argv) -{ - // create window(s) here and do any application init - elm_run(); // run main loop - elm_shutdown(); // after mainloop finishes running, shutdown - return 0; // exit 0 for exit code -} -ELM_MAIN() -@endcode - * - * 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 build it is there) you will need a - * configure.ac, Makefile.am and autogen.sh file. - * - * configure.ac: - * -@verbatim -AC_INIT(myapp, 0.0.0, myname@mydomain.com) -AC_PREREQ(2.52) -AC_CONFIG_SRCDIR(configure.ac) -AM_CONFIG_HEADER(config.h) -AC_PROG_CC -AM_INIT_AUTOMAKE(1.6 dist-bzip2) -PKG_CHECK_MODULES([ELEMENTARY], elementary) -AC_OUTPUT(Makefile) -@endverbatim - * - * Makefile.am: - * -@verbatim -AUTOMAKE_OPTIONS = 1.4 foreign -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in configure depcomp install-sh missing - -INCLUDES = -I$(top_srcdir) - -bin_PROGRAMS = myapp - -myapp_SOURCES = main.c -myapp_LDADD = -pthread -L/usr/local/lib -leina -leet -levas -lecore -lecore_evas -lecore_file -ledje -myapp_CFLAGS = -I/usr/local/include/eina-1 -I/usr/local/include/eina-1/eina -I/usr/local/include/eet-1 -I/usr/local/include/evas-1 -I/usr/local/include/ecore-1 -I/usr/local/include/edje-1 -I/usr/local/include -I/usr/local/include/embryo-1 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/valgrind -I/usr/include/fribidi -I/usr/include/alsa -I/usr/include/lua5.1 -@endverbatim - * - * autogen.sh: - * -@verbatim -#!/bin/sh -echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 -echo "Running autoheader..." ; autoheader || exit 1 -echo "Running autoconf..." ; autoconf || exit 1 -echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 -./configure "$@" -@endverbatim - * - * To generate all the things needed to bootstrap just run: - * -@verbatim -./autogen.sh -@endverbatim - * - * This will generate Makefile.in's, the confgure script and everything else. - * After this it works like all normal autotools projects: -@verbatim -./configure -make -sudo make install -@endverbatim - * - * Note sudo was assumed to get root permissions, as this would install in - * /usr/local which is system-owned. Use any way you like to gain root, or - * specify a different prefix with configure: - * -@verbatim -./confiugre --prefix=$HOME/mysoftware -@endverbatim - * - * Also remember that autotools buys you some useful commands like: -@verbatim -make uninstall -@endverbatim - * - * This uninstalls the software after it was installed with "make install". - * It is very useful to clear up what you built if you wish to clean the - * system. - * -@verbatim -make distcheck -@endverbatim - * - * This firstly checks if your build tree is "clean" and ready for - * distribution. It also builds a tarball (myapp-0.0.0.tar.gz) that is - * ready to upload and distribute to the world, that contains the generated - * Makefile.in's and configure script. The users do not need to run - * autogen.sh - just configure and on. They don't need autotools installed. - * This tarball also builds cleanly, has all the sources it needs to build - * included (that is sources for your application, not libraries it depends - * on like Elementary). It builds cleanly in a buildroot and does not - * contain any files that are temporarily generated like binaries and other - * build-generated files, so the tarball is clean, and no need to worry - * about cleaning up your tree before packaging. - * -@verbatim -make clean -@endverbatim - * - * This cleans up all build files (binaries, objects etc.) from the tree. - * -@verbatim -make distclean -@endverbatim - * - * This cleans out all files from the build and from configure's output too. - * -@verbatim -make maintainer-clean -@endverbatim - * - * This deletes all the files autogen.sh will produce so the tree is clean - * to be put into a revision-control system (like CVS, SVN or GIT for example). - * - * 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: - * -@code -#include - -static void -on_done(void *data, Evas_Object *obj, void *event_info) -{ - // quit the mainloop (elm_run function will return) - elm_exit(); -} - -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 (hello) and title (Hello) - win = elm_win_util_standard_add("hello", "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 box object - default is vertical. a box holds children in a row, - // either horizontally or vertically. nothing more. - box = elm_box_add(win); - // make the box hotizontal - elm_box_horizontal_set(box, EINA_TRUE); - // 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, 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 - elm_object_text_set(lab, "Hello out there world!"); - // 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" - elm_object_text_set(btn, "OK"); - // pack the button at the end of the box - elm_box_pack_end(box, btn); - 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(); - elm_shutdown(); - return 0; -} -ELM_MAIN() -@endcode - * - */ - -/** -@page authors Authors -@author Carsten Haitzler -@author Gustavo Sverzut Barbieri -@author Cedric Bail -@author Vincent Torri -@author Daniel Kolesa -@author Jaime Thomas -@author Swisscom - http://www.swisscom.ch/ -@author Christopher Michael -@author Marco Trevisan (Treviño) -@author Michael Bouchaud -@author Jonathan Atton (Watchwolf) -@author Brian Wang -@author Mike Blumenkrantz (discomfitor/zmike) -@author Samsung Electronics -@author Samsung SAIT -@author Brett Nash -@author Bruno Dilly -@author Rafael Fonseca -@author Chuneon Park -@author Woohyun Jung -@author Jaehwan Kim -@author Wonguk Jeong -@author Leandro A. F. Pereira -@author Helen Fornazier -@author Gustavo Lima Chaves -@author Fabiano Fidêncio -@author Tiago Falcão -@author Otavio Pontes -@author Viktor Kojouharov -@author Daniel Juyung Seo (SeoZ) -@author Sangho Park -@author Rajeev Ranjan (Rajeev) -@author Seunggyun Kim -@author Sohyun Kim -@author Jihoon Kim -@author Jeonghyun Yun (arosis) -@author Tom Hacohen -@author Aharon Hillel -@author Jonathan Atton (Watchwolf) -@author Shinwoo Kim -@author Govindaraju SM -@author Prince Kumar Dubey -@author Sung W. Park -@author Thierry el Borgi -@author Shilpa Singh -@author Chanwook Jung -@author Hyoyoung Chang -@author Guillaume "Kuri" Friloux -@author Kim Yunhan -@author Bluezery -@author Nicolas Aguirre -@author Sanjeev BA - -Please contact to get in -contact with the developers and maintainers. +/** + * @file Elementary.h + * @brief Elementary Widget Library */ +#include +#include +#include #ifndef ELEMENTARY_H #define ELEMENTARY_H @@ -338,32 +44,31 @@ contact with the developers and maintainers. #include #include #ifdef ELM_DIRENT_H -# include +#include #endif #include #include #ifdef ELM_UNIX -# include -# ifdef ELM_LIBINTL_H -# include -# endif -# include -# include -# include +#include +#ifdef ELM_LIBINTL_H +#include +#endif +#include +#include +#include #endif #ifdef ELM_ALLOCA_H -# include +#include #endif #if defined (ELM_WIN32) || defined (ELM_WINCE) -# include -# ifndef alloca -# define alloca _alloca -# endif +#include +#ifndef alloca +#define alloca _alloca +#endif #endif - /* EFL headers */ #include @@ -378,84 +83,85 @@ contact with the developers and maintainers. #include #ifdef ELM_EDBUS -# include +#include #endif #ifdef ELM_EFREET -# include -# include -# include +#include +#include +#include #endif #ifdef ELM_ETHUMB -# include +#include #endif #ifdef ELM_EMAP -# include +#include #endif #ifdef EAPI -# undef EAPI +#undef EAPI #endif #ifdef _WIN32 -# ifdef ELEMENTARY_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif /* ! DLL_EXPORT */ -# else -# define EAPI __declspec(dllimport) -# endif /* ! EFL_EVAS_BUILD */ +#ifdef ELEMENTARY_BUILD +#ifdef DLL_EXPORT +#define EAPI __declspec(dllexport) #else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif +#define EAPI +#endif /* ! DLL_EXPORT */ +#else +#define EAPI __declspec(dllimport) +#endif /* ! EFL_EVAS_BUILD */ +#else +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define EAPI __attribute__ ((visibility("default"))) +#else +#define EAPI +#endif +#else +#define EAPI +#endif #endif /* ! _WIN32 */ #ifdef _WIN32 -# define EAPI_MAIN +#define EAPI_MAIN #else -# define EAPI_MAIN EAPI +#define EAPI_MAIN EAPI #endif /* allow usage from c++ */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif #define ELM_VERSION_MAJOR 0 #define ELM_VERSION_MINOR 8 - typedef struct _Elm_Version - { - int major; - int minor; - int micro; - int revision; - } Elm_Version; +typedef struct _Elm_Version +{ + int major; + int minor; + int micro; + int revision; +} Elm_Version; - EAPI extern Elm_Version *elm_version; +EAPI extern Elm_Version * elm_version; /* include these first for general used definitions */ #include #include #include - -/* special widgets - types used elsewhere */ + +/* special widgets - types used elsewhere */ #include #include #include #include - + /* other includes */ #include #include @@ -535,7 +241,7 @@ extern "C" { #include #include #include - + #ifdef __cplusplus } #endif diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in index 49aaa9ce29..a9957e65d2 100644 --- a/legacy/elementary/src/lib/Elementary.h.in +++ b/legacy/elementary/src/lib/Elementary.h.in @@ -1,314 +1,9 @@ -/* - * - * vim:ts=8:sw=3:sts=3:expandtab:cino=>5n-3f0^-2{2(0W1st0 - */ - -/** -@file Elementary.h.in -@brief Elementary Widget Library -*/ - -/** -@mainpage Elementary -@image html elementary.png -@version 0.8.0 -@date 2008-2011 - -@section intro What is Elementary? - -This is a VERY SIMPLE toolkit. It is not meant for writing extensive desktop -applications (yet). Small simple ones with simple needs. - -It is meant to make the programmers work almost brainless but give them lots -of flexibility. - -@li @ref Start - Go here to quickly get started with writing Apps - -@section organization Organization - -One can divide Elemementary into three main groups: -@li @ref infralist - These are modules that deal with Elementary as a whole. -@li @ref widgetslist - These are the widgets you'll compose your UI out of. -@li @ref containerslist - These are the containers which hold the widgets. - -@section license License - -LGPL v2 (see COPYING in the base of Elementary's source). This applies to -all files in the source tree. - -@section ack Acknowledgements -There is a lot that goes into making a widget set, and they don't happen out of -nothing. It's like trying to make everyone everywhere happy, regardless of age, -gender, race or nationality - and that is really tough. So thanks to people and -organisations behind this, as listed in the @ref authors page. -*/ - - -/** - * @defgroup Start Getting Started - * - * To write an Elementary app, you can get started with the following: - * -@code -#include -EAPI_MAIN int -elm_main(int argc, char **argv) -{ - // create window(s) here and do any application init - elm_run(); // run main loop - elm_shutdown(); // after mainloop finishes running, shutdown - return 0; // exit 0 for exit code -} -ELM_MAIN() -@endcode - * - * 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 build it is there) you will need a - * configure.ac, Makefile.am and autogen.sh file. - * - * configure.ac: - * -@verbatim -AC_INIT(myapp, 0.0.0, myname@mydomain.com) -AC_PREREQ(2.52) -AC_CONFIG_SRCDIR(configure.ac) -AM_CONFIG_HEADER(config.h) -AC_PROG_CC -AM_INIT_AUTOMAKE(1.6 dist-bzip2) -PKG_CHECK_MODULES([ELEMENTARY], elementary) -AC_OUTPUT(Makefile) -@endverbatim - * - * Makefile.am: - * -@verbatim -AUTOMAKE_OPTIONS = 1.4 foreign -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in configure depcomp install-sh missing - -INCLUDES = -I$(top_srcdir) - -bin_PROGRAMS = myapp - -myapp_SOURCES = main.c -myapp_LDADD = @ELEMENTARY_LIBS@ -myapp_CFLAGS = @ELEMENTARY_CFLAGS@ -@endverbatim - * - * autogen.sh: - * -@verbatim -#!/bin/sh -echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 -echo "Running autoheader..." ; autoheader || exit 1 -echo "Running autoconf..." ; autoconf || exit 1 -echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 -./configure "$@" -@endverbatim - * - * To generate all the things needed to bootstrap just run: - * -@verbatim -./autogen.sh -@endverbatim - * - * This will generate Makefile.in's, the confgure script and everything else. - * After this it works like all normal autotools projects: -@verbatim -./configure -make -sudo make install -@endverbatim - * - * Note sudo was assumed to get root permissions, as this would install in - * /usr/local which is system-owned. Use any way you like to gain root, or - * specify a different prefix with configure: - * -@verbatim -./confiugre --prefix=$HOME/mysoftware -@endverbatim - * - * Also remember that autotools buys you some useful commands like: -@verbatim -make uninstall -@endverbatim - * - * This uninstalls the software after it was installed with "make install". - * It is very useful to clear up what you built if you wish to clean the - * system. - * -@verbatim -make distcheck -@endverbatim - * - * This firstly checks if your build tree is "clean" and ready for - * distribution. It also builds a tarball (myapp-0.0.0.tar.gz) that is - * ready to upload and distribute to the world, that contains the generated - * Makefile.in's and configure script. The users do not need to run - * autogen.sh - just configure and on. They don't need autotools installed. - * This tarball also builds cleanly, has all the sources it needs to build - * included (that is sources for your application, not libraries it depends - * on like Elementary). It builds cleanly in a buildroot and does not - * contain any files that are temporarily generated like binaries and other - * build-generated files, so the tarball is clean, and no need to worry - * about cleaning up your tree before packaging. - * -@verbatim -make clean -@endverbatim - * - * This cleans up all build files (binaries, objects etc.) from the tree. - * -@verbatim -make distclean -@endverbatim - * - * This cleans out all files from the build and from configure's output too. - * -@verbatim -make maintainer-clean -@endverbatim - * - * This deletes all the files autogen.sh will produce so the tree is clean - * to be put into a revision-control system (like CVS, SVN or GIT for example). - * - * 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: - * -@code -#include - -static void -on_done(void *data, Evas_Object *obj, void *event_info) -{ - // quit the mainloop (elm_run function will return) - elm_exit(); -} - -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 (hello) and title (Hello) - win = elm_win_util_standard_add("hello", "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 box object - default is vertical. a box holds children in a row, - // either horizontally or vertically. nothing more. - box = elm_box_add(win); - // make the box hotizontal - elm_box_horizontal_set(box, EINA_TRUE); - // 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, 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 - elm_object_text_set(lab, "Hello out there world!"); - // 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" - elm_object_text_set(btn, "OK"); - // pack the button at the end of the box - elm_box_pack_end(box, btn); - 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(); - elm_shutdown(); - return 0; -} -ELM_MAIN() -@endcode - * - */ - -/** -@page authors Authors -@author Carsten Haitzler -@author Gustavo Sverzut Barbieri -@author Cedric Bail -@author Vincent Torri -@author Daniel Kolesa -@author Jaime Thomas -@author Swisscom - http://www.swisscom.ch/ -@author Christopher Michael -@author Marco Trevisan (Treviño) -@author Michael Bouchaud -@author Jonathan Atton (Watchwolf) -@author Brian Wang -@author Mike Blumenkrantz (discomfitor/zmike) -@author Samsung Electronics -@author Samsung SAIT -@author Brett Nash -@author Bruno Dilly -@author Rafael Fonseca -@author Chuneon Park -@author Woohyun Jung -@author Jaehwan Kim -@author Wonguk Jeong -@author Leandro A. F. Pereira -@author Helen Fornazier -@author Gustavo Lima Chaves -@author Fabiano Fidêncio -@author Tiago Falcão -@author Otavio Pontes -@author Viktor Kojouharov -@author Daniel Juyung Seo (SeoZ) -@author Sangho Park -@author Rajeev Ranjan (Rajeev) -@author Seunggyun Kim -@author Sohyun Kim -@author Jihoon Kim -@author Jeonghyun Yun (arosis) -@author Tom Hacohen -@author Aharon Hillel -@author Jonathan Atton (Watchwolf) -@author Shinwoo Kim -@author Govindaraju SM -@author Prince Kumar Dubey -@author Sung W. Park -@author Thierry el Borgi -@author Shilpa Singh -@author Chanwook Jung -@author Hyoyoung Chang -@author Guillaume "Kuri" Friloux -@author Kim Yunhan -@author Bluezery -@author Nicolas Aguirre -@author Sanjeev BA - -Please contact to get in -contact with the developers and maintainers. - */ - -#ifndef ELEMENTARY_H -#define ELEMENTARY_H - /** * @file Elementary.h - * @brief Elementary's API - * - * Elementary API. + * @brief Elementary Widget Library */ +#ifndef ELEMENTARY_H +#define ELEMENTARY_H @ELM_UNIX_DEF@ ELM_UNIX @ELM_WIN32_DEF@ ELM_WIN32 @@ -338,32 +33,31 @@ contact with the developers and maintainers. #include #include #ifdef ELM_DIRENT_H -# include +#include #endif #include #include #ifdef ELM_UNIX -# include -# ifdef ELM_LIBINTL_H -# include -# endif -# include -# include -# include +#include +#ifdef ELM_LIBINTL_H +#include +#endif +#include +#include +#include #endif #ifdef ELM_ALLOCA_H -# include +#include #endif #if defined (ELM_WIN32) || defined (ELM_WINCE) -# include -# ifndef alloca -# define alloca _alloca -# endif +#include +#ifndef alloca +#define alloca _alloca +#endif #endif - /* EFL headers */ #include @@ -378,84 +72,90 @@ contact with the developers and maintainers. #include #ifdef ELM_EDBUS -# include +#include #endif #ifdef ELM_EFREET -# include -# include -# include +#include +#include +#include #endif #ifdef ELM_ETHUMB -# include +#include #endif #ifdef ELM_EMAP -# include +#include #endif #ifdef EAPI -# undef EAPI +#undef EAPI #endif #ifdef _WIN32 -# ifdef ELEMENTARY_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif /* ! DLL_EXPORT */ -# else -# define EAPI __declspec(dllimport) -# endif /* ! EFL_EVAS_BUILD */ +#ifdef ELEMENTARY_BUILD +#ifdef DLL_EXPORT +#define EAPI __declspec(dllexport) #else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI -# endif -# else -# define EAPI -# endif +#define EAPI +#endif /* ! DLL_EXPORT */ +#else +#define EAPI __declspec(dllimport) +#endif /* ! EFL_EVAS_BUILD */ +#else +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define EAPI __attribute__ ((visibility("default"))) +#else +#define EAPI +#endif +#else +#define EAPI +#endif #endif /* ! _WIN32 */ #ifdef _WIN32 -# define EAPI_MAIN +#define EAPI_MAIN #else -# define EAPI_MAIN EAPI +#define EAPI_MAIN EAPI #endif /* allow usage from c++ */ #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif +/* docs */ +#include +#include +#include + #define ELM_VERSION_MAJOR @VMAJ@ #define ELM_VERSION_MINOR @VMIN@ - typedef struct _Elm_Version - { - int major; - int minor; - int micro; - int revision; - } Elm_Version; +typedef struct _Elm_Version +{ + int major; + int minor; + int micro; + int revision; +} Elm_Version; - EAPI extern Elm_Version *elm_version; +EAPI extern Elm_Version * elm_version; /* include these first for general used definitions */ #include #include #include - -/* special widgets - types used elsewhere */ + +/* special widgets - types used elsewhere */ #include #include #include #include - + /* other includes */ #include #include @@ -535,7 +235,7 @@ extern "C" { #include #include #include - + #ifdef __cplusplus } #endif diff --git a/legacy/elementary/src/lib/Elementary_Cursor.h b/legacy/elementary/src/lib/Elementary_Cursor.h index 78a7c40a5a..f77154b887 100644 --- a/legacy/elementary/src/lib/Elementary_Cursor.h +++ b/legacy/elementary/src/lib/Elementary_Cursor.h @@ -85,4 +85,3 @@ #define ELM_CURSOR_XTERM "xterm" #endif // ifndef _ELM_CURSOR_H - diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index e1acd9dcad..6b3b5b04c1 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -56,6 +56,7 @@ elc_multibuttonentry.h \ elc_naviframe.h \ elm_actionslider.h \ elm_app.h \ +elm_authors.h \ elm_bg.h \ elm_box.h \ elm_bubble.h \ @@ -85,12 +86,14 @@ elm_general.h \ elm_gengrid.h \ elm_genlist.h \ elm_gesture_layer.h \ +elm_getting_started.h \ elm_glview.h \ elm_grid.h \ elm_hover.h \ elm_icon.h \ elm_image.h \ elm_index.h \ +elm_intro.h \ elm_label.h \ elm_layout.h \ elm_list.h \ diff --git a/legacy/elementary/src/lib/elc_anchorblock.h b/legacy/elementary/src/lib/elc_anchorblock.h index 4cf067676f..713e6e4434 100644 --- a/legacy/elementary/src/lib/elc_anchorblock.h +++ b/legacy/elementary/src/lib/elc_anchorblock.h @@ -1,227 +1,229 @@ - /** - * @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 \something\ 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". - */ +/** + * @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 \something\ 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". + */ - /** - * @addtogroup Anchorblock - * @{ - */ +/** + * @addtogroup Anchorblock + * @{ + */ - /** - * @typedef Elm_Entry_Anchorblock_Info - * - * The info sent in the callback for "anchor,clicked" signals emitted by - * the Anchorblock widget. - */ - typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info; +/** + * @typedef Elm_Entry_Anchorblock_Info + * + * The info sent in the callback for "anchor,clicked" signals emitted by + * the Anchorblock widget. + */ +typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info; - /** - * @struct _Elm_Entry_Anchorblock_Info - * - * 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 */ - }; +/** + * @struct _Elm_Entry_Anchorblock_Info + * + * 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 parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_anchorblock_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new Anchorblock object + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_anchorblock_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the text to show in the anchorblock - * - * Sets the text of the anchorblock to @p text. This text can include markup - * format tags, including \ to begin a segment - * of text that will be specially styled and react to click events, ended - * with either of \ 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. - * - * 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. - */ - EINA_DEPRECATED EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the text to show in the anchorblock + * + * Sets the text of the anchorblock to @p text. This text can include markup + * format tags, including \ to begin a segment + * of text that will be specially styled and react to click events, ended + * with either of \ 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. + * + * 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. + */ +EINA_DEPRECATED EAPI void elm_anchorblock_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); - /** - * Get the markup text set for the anchorblock - * - * Retrieves the text set on the anchorblock, with markup tags included. - * - * @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. - */ - EINA_DEPRECATED EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the markup text set for the anchorblock + * + * Retrieves the text set on the anchorblock, with markup tags included. + * + * @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. + */ +EINA_DEPRECATED EAPI const char *elm_anchorblock_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the parent of the hover popup - * - * 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 anchorblock object - * @param parent The object to use as parent for the hover - */ - EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Set the parent of the hover popup + * + * 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 anchorblock object + * @param parent The object to use as parent for the hover + */ +EAPI void elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * Get the parent of the hover popup - * - * 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 anchorblock object - * @return The object used as parent for the hover, NULL if none is set. - */ - EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the parent of the hover popup + * + * 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 anchorblock object + * @return The object used as parent for the hover, NULL if none is set. + */ +EAPI Evas_Object *elm_anchorblock_hover_parent_get(const Evas_Object *obj) 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. - * - * @param obj The anchorblock object - * @param style The style to use for the underlying hover - * - * @see elm_object_style_set() - */ - EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) 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. + * + * @param obj The anchorblock object + * @param style The style to use for the underlying hover + * + * @see elm_object_style_set() + */ +EAPI void elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); - /** - * Get the style that the hover should use - * - * Get the style, the hover created by anchorblock will use. - * - * @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 const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the style that the hover should use + * + * Get the style, the hover created by anchorblock will use. + * + * @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 const char *elm_anchorblock_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Ends the hover popup in the anchorblock - * - * 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 obj The anchorblock object - */ - EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Ends the hover popup in the anchorblock + * + * 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 obj The anchorblock object + */ +EAPI void elm_anchorblock_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Appends a custom item provider to the given anchorblock - * - * 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. - * - * Items in the markup text take the form \\ - * - * @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_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); +/** + * Appends a custom item provider to the given anchorblock + * + * 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. + * + * Items in the markup text take the form \\ + * + * @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_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 - * - * 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 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); +/** + * Prepend a custom item provider to the given anchorblock + * + * 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 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 - * - * 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 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_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); - - /** - * @} - */ +/** + * Remove a custom item provider from the list of the given anchorblock + * + * 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 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_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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_anchorview.h b/legacy/elementary/src/lib/elc_anchorview.h index b5fb610b82..8abb7da4a6 100644 --- a/legacy/elementary/src/lib/elc_anchorview.h +++ b/legacy/elementary/src/lib/elc_anchorview.h @@ -1,260 +1,262 @@ - /** - * @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 \something\ 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. - * - * 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. - * - * See @ref Anchorblock for an example on how to use both of them. - * - * @see Anchorblock - * @see Entry - * @see Hover - * - * @{ - */ +/** + * @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 \something\ 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. + * + * 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. + * + * See @ref Anchorblock for an example on how to use both of them. + * + * @see Anchorblock + * @see Entry + * @see Hover + * + * @{ + */ - /** - * @typedef Elm_Entry_Anchorview_Info - * - * 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; +/** + * @typedef Elm_Entry_Anchorview_Info + * + * 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 - * - * The info sent in the callback for "anchor,clicked" signals emitted by - * the Anchorview widget. - */ - 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 */ - }; +/** + * @struct _Elm_Entry_Anchorview_Info + * + * The info sent in the callback for "anchor,clicked" signals emitted by + * the Anchorview widget. + */ +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 */ +}; - /** - * Add a new Anchorview object - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_anchorview_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new Anchorview object + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_anchorview_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the text to show in the anchorview - * - * Sets the text of the anchorview to @p text. This text can include markup - * format tags, including \ to begin a segment of - * text that will be specially styled and react to click events, ended with - * either of \ 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. - * - * 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. - */ - EINA_DEPRECATED EAPI void elm_anchorview_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the text to show in the anchorview + * + * Sets the text of the anchorview to @p text. This text can include markup + * format tags, including \ to begin a segment of + * text that will be specially styled and react to click events, ended with + * either of \ 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. + * + * 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. + */ +EINA_DEPRECATED EAPI void elm_anchorview_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); - /** - * Get the markup text set for the anchorview - * - * Retrieves the text set on the anchorview, with markup tags included. - * - * @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. - */ - EINA_DEPRECATED EAPI const char *elm_anchorview_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the markup text set for the anchorview + * + * Retrieves the text set on the anchorview, with markup tags included. + * + * @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. + */ +EINA_DEPRECATED EAPI const char *elm_anchorview_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the parent of the hover popup - * - * 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 anchorview object - * @param parent The object to use as parent for the hover - */ - EAPI void elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Set the parent of the hover popup + * + * 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 anchorview object + * @param parent The object to use as parent for the hover + */ +EAPI void elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * Get the parent of the hover popup - * - * 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 anchorview object - * @return The object used as parent for the hover, NULL if none is set. - */ - EAPI Evas_Object *elm_anchorview_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the parent of the hover popup + * + * 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 anchorview object + * @return The object used as parent for the hover, NULL if none is set. + */ +EAPI Evas_Object *elm_anchorview_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the style that the hover should use - * - * When creating the popup hover, anchorview will request that it's - * themed according to @p style. - * - * @param obj The anchorview object - * @param style The style to use for the underlying hover - * - * @see elm_object_style_set() - */ - EAPI void elm_anchorview_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); +/** + * Set the style that the hover should use + * + * When creating the popup hover, anchorview will request that it's + * themed according to @p style. + * + * @param obj The anchorview object + * @param style The style to use for the underlying hover + * + * @see elm_object_style_set() + */ +EAPI void elm_anchorview_hover_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); - /** - * 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() - */ - EAPI const char *elm_anchorview_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * 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() + */ +EAPI const char *elm_anchorview_hover_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * 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 - */ - EAPI void elm_anchorview_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * 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 + */ +EAPI void elm_anchorview_hover_end(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 - * 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() - */ - EAPI void elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 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 + * 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() + */ +EAPI void elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - /** - * 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() - */ - EAPI void elm_anchorview_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); +/** + * 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() + */ +EAPI void elm_anchorview_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - /** - * 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 \\ - * - * @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() - */ - 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); +/** + * 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 \\ + * + * @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() + */ +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); - /** - * 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 - */ - 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); +/** + * 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 + */ +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); - /** - * 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 - */ - 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); - - /** - * @} - */ +/** + * 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 + */ +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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_ctxpopup.h b/legacy/elementary/src/lib/elc_ctxpopup.h index ba6cc82f27..1235a4e41b 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.h +++ b/legacy/elementary/src/lib/elc_ctxpopup.h @@ -1,327 +1,323 @@ - /** - * @defgroup Ctxpopup Ctxpopup - * - * @image html img/widget/ctxpopup/preview-00.png - * @image latex img/widget/ctxpopup/preview-00.eps - * - * @brief Context popup widet. - * - * A ctxpopup is a widget that, when shown, pops up a list of items. - * It automatically chooses an area inside its parent object's view - * (set via elm_ctxpopup_add() and elm_ctxpopup_hover_parent_set()) to - * optimally fit into it. In the default theme, it will also point an - * arrow to it's top left position at the time one shows it. Ctxpopup - * items have a label and/or an icon. It is intended for a small - * number of items (hence the use of list, not genlist). - * - * @note Ctxpopup is a especialization of @ref Hover. - * - * Signals that you can add callbacks for are: - * "dismissed" - the ctxpopup was dismissed - * - * Default contents parts of the ctxpopup widget that you can use for are: - * @li "default" - A content of the ctxpopup - * - * Default contents parts of the ctxpopup items that you can use for are: - * @li "icon" - An icon in the title area - * - * Default text parts of the ctxpopup items that you can use for are: - * @li "default" - Title label in the title area - * - * @ref tutorial_ctxpopup shows the usage of a good deal of the API. - * @{ - */ +/** + * @defgroup Ctxpopup Ctxpopup + * + * @image html img/widget/ctxpopup/preview-00.png + * @image latex img/widget/ctxpopup/preview-00.eps + * + * @brief Context popup widet. + * + * A ctxpopup is a widget that, when shown, pops up a list of items. + * It automatically chooses an area inside its parent object's view + * (set via elm_ctxpopup_add() and elm_ctxpopup_hover_parent_set()) to + * optimally fit into it. In the default theme, it will also point an + * arrow to it's top left position at the time one shows it. Ctxpopup + * items have a label and/or an icon. It is intended for a small + * number of items (hence the use of list, not genlist). + * + * @note Ctxpopup is a especialization of @ref Hover. + * + * Signals that you can add callbacks for are: + * "dismissed" - the ctxpopup was dismissed + * + * Default contents parts of the ctxpopup widget that you can use for are: + * @li "default" - A content of the ctxpopup + * + * Default contents parts of the ctxpopup items that you can use for are: + * @li "icon" - An icon in the title area + * + * Default text parts of the ctxpopup items that you can use for are: + * @li "default" - Title label in the title area + * + * @ref tutorial_ctxpopup shows the usage of a good deal of the API. + * @{ + */ - /** - * @addtogroup Ctxpopup - * @{ - */ +typedef enum _Elm_Ctxpopup_Direction +{ + ELM_CTXPOPUP_DIRECTION_DOWN, /**< ctxpopup show appear below clicked + area */ + ELM_CTXPOPUP_DIRECTION_RIGHT, /**< ctxpopup show appear to the right of + the clicked area */ + ELM_CTXPOPUP_DIRECTION_LEFT, /**< ctxpopup show appear to the left of + 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; /**< Direction in which to show the popup */ - typedef enum _Elm_Ctxpopup_Direction - { - ELM_CTXPOPUP_DIRECTION_DOWN, /**< ctxpopup show appear below clicked - area */ - ELM_CTXPOPUP_DIRECTION_RIGHT, /**< ctxpopup show appear to the right of - the clicked area */ - ELM_CTXPOPUP_DIRECTION_LEFT, /**< ctxpopup show appear to the left of - 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; +/** + * @brief Add a new Ctxpopup object to the parent. + * + * @param parent Parent object + * @return New object or @c NULL, if it cannot be created + * + * @ingroup Ctxpopup + */ +EAPI Evas_Object * + elm_ctxpopup_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Add a new Ctxpopup object to the parent. - * - * @param parent Parent object - * @return New object or @c NULL, if it cannot be created - * - * @ingroup Ctxpopup - */ - EAPI Evas_Object *elm_ctxpopup_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Set the Ctxpopup's parent + * + * @param obj The ctxpopup object + * @param area The parent to use + * + * Set the parent object. + * + * @note elm_ctxpopup_add() will automatically call this function + * with its @c parent argument. + * + * @see elm_ctxpopup_add() + * @see elm_hover_parent_set() + * + * @ingroup Ctxpopup + */ +EAPI void elm_ctxpopup_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1, 2); - /** - * @brief Set the Ctxpopup's parent - * - * @param obj The ctxpopup object - * @param area The parent to use - * - * Set the parent object. - * - * @note elm_ctxpopup_add() will automatically call this function - * with its @c parent argument. - * - * @see elm_ctxpopup_add() - * @see elm_hover_parent_set() - * - * @ingroup Ctxpopup - */ - EAPI void elm_ctxpopup_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1, 2); +/** + * @brief Get the Ctxpopup's parent + * + * @param obj The ctxpopup object + * + * @see elm_ctxpopup_hover_parent_set() for more information + * + * @ingroup Ctxpopup + */ +EAPI Evas_Object *elm_ctxpopup_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the Ctxpopup's parent - * - * @param obj The ctxpopup object - * - * @see elm_ctxpopup_hover_parent_set() for more information - * - * @ingroup Ctxpopup - */ - EAPI Evas_Object *elm_ctxpopup_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Clear all items in the given ctxpopup object. + * + * @param obj Ctxpopup object + * + * @ingroup Ctxpopup + */ +EAPI void elm_ctxpopup_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Clear all items in the given ctxpopup object. - * - * @param obj Ctxpopup object - * - * @ingroup Ctxpopup - */ - EAPI void elm_ctxpopup_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Change the ctxpopup's orientation to horizontal or vertical. + * + * @param obj Ctxpopup object + * @param horizontal @c EINA_TRUE for horizontal mode, @c EINA_FALSE for vertical + * + * @ingroup Ctxpopup + */ +EAPI void elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * @brief Change the ctxpopup's orientation to horizontal or vertical. - * - * @param obj Ctxpopup object - * @param horizontal @c EINA_TRUE for horizontal mode, @c EINA_FALSE for vertical - * - * @ingroup Ctxpopup - */ - EAPI void elm_ctxpopup_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * @brief Get the value of current ctxpopup object's orientation. + * + * @param obj Ctxpopup object + * @return @c EINA_TRUE for horizontal mode, @c EINA_FALSE for vertical mode (or errors) + * + * @see elm_ctxpopup_horizontal_set() + * + * @ingroup Ctxpopup + */ +EAPI Eina_Bool elm_ctxpopup_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the value of current ctxpopup object's orientation. - * - * @param obj Ctxpopup object - * @return @c EINA_TRUE for horizontal mode, @c EINA_FALSE for vertical mode (or errors) - * - * @see elm_ctxpopup_horizontal_set() - * - * @ingroup Ctxpopup - */ - EAPI Eina_Bool elm_ctxpopup_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Add a new item to a ctxpopup object. + * + * @param obj Ctxpopup object + * @param icon Icon to be set on new item + * @param label The Label of the new item + * @param func Convenience function called when item selected + * @param data Data passed to @p func + * @return A handle to the item added or @c NULL, on errors + * + * @warning Ctxpopup can't hold both an item list and a content at the same + * time. When an item is added, any previous content will be removed. + * + * @see elm_ctxpopup_content_set() + * + * @ingroup Ctxpopup + */ +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 Add a new item to a ctxpopup object. - * - * @param obj Ctxpopup object - * @param icon Icon to be set on new item - * @param label The Label of the new item - * @param func Convenience function called when item selected - * @param data Data passed to @p func - * @return A handle to the item added or @c NULL, on errors - * - * @warning Ctxpopup can't hold both an item list and a content at the same - * time. When an item is added, any previous content will be removed. - * - * @see elm_ctxpopup_content_set() - * - * @ingroup Ctxpopup - */ - 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 it Ctxpopup item to be deleted + * + * @see elm_ctxpopup_item_append() + * + * @ingroup Ctxpopup + */ +EAPI void elm_ctxpopup_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Delete the given item in a ctxpopup object. - * - * @param it Ctxpopup item to be deleted - * - * @see elm_ctxpopup_item_append() - * - * @ingroup Ctxpopup - */ - 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 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. + * @deprecated use elm_object_item_disabled_set() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI void elm_ctxpopup_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); - /** - * @brief Set the ctxpopup item's state as disabled or enabled. - * - * @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. - * @deprecated use elm_object_item_disabled_set() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED 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 it Ctxpopup item to be enabled/disabled + * @return disabled @c EINA_TRUE, if disabled, @c EINA_FALSE otherwise + * + * @see elm_ctxpopup_item_disabled_set() + * @deprecated use elm_object_item_disabled_get() instead + * + * @ingroup Ctxpopup + */ +EAPI Eina_Bool elm_ctxpopup_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Get the ctxpopup item's disabled/enabled state. - * - * @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() - * @deprecated use elm_object_item_disabled_get() instead - * - * @ingroup Ctxpopup - */ - 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 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() + * + * @deprecated use elm_object_item_part_content_get() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI Evas_Object *elm_ctxpopup_item_icon_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon object for the given 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() - * - * @deprecated use elm_object_item_part_content_get() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED 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 it Ctxpopup item + * @param icon Icon object to be set + * + * Once the icon object is set, a previously set one will be deleted. + * @warning Setting the same icon for two items will cause the icon to + * dissapear from the first item. + * + * @see elm_ctxpopup_item_append() + * + * @deprecated use elm_object_item_part_content_set() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI void elm_ctxpopup_item_icon_set(Elm_Object_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * @brief Sets the side icon associated with the 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. - * @warning Setting the same icon for two items will cause the icon to - * dissapear from the first item. - * - * @see elm_ctxpopup_item_append() - * - * @deprecated use elm_object_item_part_content_set() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED 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 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() + * + * @deprecated use elm_object_item_text_get() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI const char *elm_ctxpopup_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Get the label for the given 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() - * - * @deprecated use elm_object_item_text_get() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED 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 it Ctxpopup item + * @param label String to set as label + * + * @deprecated use elm_object_item_text_set() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI void elm_ctxpopup_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief (Re)set the label on the given ctxpopup item. - * - * @param it Ctxpopup item - * @param label String to set as label - * - * @deprecated use elm_object_item_text_set() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED 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. + * + * @param obj Ctxpopup object + * @param content Content to be swallowed + * + * If the content object is already set, a previous one will bedeleted. If + * you want to keep that old content object, use the + * elm_ctxpopup_content_unset() function. + * + * @warning Ctxpopup can't hold both a item list and a content at the same + * time. When a content is set, any previous items will be removed. + * + * @deprecated use elm_object_content_set() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI void elm_ctxpopup_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1, 2); - /** - * @brief Set an elm widget as the content of the ctxpopup. - * - * @param obj Ctxpopup object - * @param content Content to be swallowed - * - * If the content object is already set, a previous one will bedeleted. If - * you want to keep that old content object, use the - * elm_ctxpopup_content_unset() function. - * - * @warning Ctxpopup can't hold both a item list and a content at the same - * time. When a content is set, any previous items will be removed. - * - * @deprecated use elm_object_content_set() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED EAPI void elm_ctxpopup_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1, 2); +/** + * @brief Unset the ctxpopup content + * + * @param obj Ctxpopup object + * @return The content that was being used + * + * Unparent and return the content object which was set for this widget. + * + * @deprecated use elm_object_content_unset() + * + * @see elm_ctxpopup_content_set() + * + * @deprecated use elm_object_content_unset() instead + * + * @ingroup Ctxpopup + */ +EINA_DEPRECATED EAPI Evas_Object *elm_ctxpopup_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the ctxpopup content - * - * @param obj Ctxpopup object - * @return The content that was being used - * - * Unparent and return the content object which was set for this widget. - * - * @deprecated use elm_object_content_unset() - * - * @see elm_ctxpopup_content_set() - * - * @deprecated use elm_object_content_unset() instead - * - * @ingroup Ctxpopup - */ - EINA_DEPRECATED EAPI Evas_Object *elm_ctxpopup_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Set the direction priority of a ctxpopup. + * + * @param obj Ctxpopup object + * @param first 1st priority of direction + * @param second 2nd priority of direction + * @param third 3th priority of direction + * @param fourth 4th priority of direction + * + * This functions gives a chance to user to set the priority of ctxpopup + * showing direction. This doesn't guarantee the ctxpopup will appear in the + * requested direction. + * + * @see Elm_Ctxpopup_Direction + * + * @ingroup Ctxpopup + */ +EAPI void elm_ctxpopup_direction_priority_set(Evas_Object *obj, Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second, Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth) EINA_ARG_NONNULL(1); - /** - * @brief Set the direction priority of a ctxpopup. - * - * @param obj Ctxpopup object - * @param first 1st priority of direction - * @param second 2nd priority of direction - * @param third 3th priority of direction - * @param fourth 4th priority of direction - * - * This functions gives a chance to user to set the priority of ctxpopup - * showing direction. This doesn't guarantee the ctxpopup will appear in the - * requested direction. - * - * @see Elm_Ctxpopup_Direction - * - * @ingroup Ctxpopup - */ - EAPI void elm_ctxpopup_direction_priority_set(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 direction priority of a ctxpopup. + * + * @param obj Ctxpopup object + * @param first 1st priority of direction to be returned + * @param second 2nd priority of direction to be returned + * @param third 3th priority of direction to be returned + * @param fourth 4th priority of direction to be returned + * + * @see elm_ctxpopup_direction_priority_set() for more information. + * + * @ingroup Ctxpopup + */ +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 direction priority of a ctxpopup. - * - * @param obj Ctxpopup object - * @param first 1st priority of direction to be returned - * @param second 2nd priority of direction to be returned - * @param third 3th priority of direction to be returned - * @param fourth 4th priority of direction to be returned - * - * @see elm_ctxpopup_direction_priority_set() for more information. - * - * @ingroup Ctxpopup - */ - 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 - * - * @ingroup Ctxpopup - */ - EAPI Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(const Evas_Object *obj) 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 + * + * @ingroup Ctxpopup + */ +EAPI Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_fileselector.h b/legacy/elementary/src/lib/elc_fileselector.h index 24048b6195..eafcbea8d4 100644 --- a/legacy/elementary/src/lib/elc_fileselector.h +++ b/legacy/elementary/src/lib/elc_fileselector.h @@ -1,313 +1,314 @@ - /** - * @defgroup Fileselector File Selector - * - * @image html img/widget/fileselector/preview-00.png - * @image latex img/widget/fileselector/preview-00.eps - * - * A file selector is a widget that allows a user to navigate - * through a file system, reporting file selections back via its - * API. - * - * It contains shortcut buttons for home directory (@c ~) and to - * jump one directory upwards (..), as well as cancel/ok buttons to - * confirm/cancel a given selection. After either one of those two - * former actions, the file selector will issue its @c "done" smart - * callback. - * - * There's a text entry on it, too, showing the name of the current - * selection. There's the possibility of making it editable, so it - * is useful on file saving dialogs on applications, where one - * gives a file name to save contents to, in a given directory in - * the system. This custom file name will be reported on the @c - * "done" smart callback (explained in sequence). - * - * Finally, it has a view to display file system items into in two - * possible forms: - * - list - * - grid - * - * If Elementary is built with support of the Ethumb thumbnailing - * library, the second form of view will display preview thumbnails - * of files which it supports. - * - * Smart callbacks one can register to: - * - * - @c "selected" - the user has clicked on a file (when not in - * folders-only mode) or directory (when in folders-only mode) - * - @c "directory,open" - the list has been populated with new - * content (@c event_info is a pointer to the directory's - * path, a @b stringshared string) - * - @c "done" - the user has clicked on the "ok" or "cancel" - * buttons (@c event_info is a pointer to the selection's - * path, a @b stringshared string) - * - * Here is an example on its usage: - * @li @ref fileselector_example - */ +/** + * @defgroup Fileselector File Selector + * + * @image html img/widget/fileselector/preview-00.png + * @image latex img/widget/fileselector/preview-00.eps + * + * A file selector is a widget that allows a user to navigate + * through a file system, reporting file selections back via its + * API. + * + * It contains shortcut buttons for home directory (@c ~) and to + * jump one directory upwards (..), as well as cancel/ok buttons to + * confirm/cancel a given selection. After either one of those two + * former actions, the file selector will issue its @c "done" smart + * callback. + * + * There's a text entry on it, too, showing the name of the current + * selection. There's the possibility of making it editable, so it + * is useful on file saving dialogs on applications, where one + * gives a file name to save contents to, in a given directory in + * the system. This custom file name will be reported on the @c + * "done" smart callback (explained in sequence). + * + * Finally, it has a view to display file system items into in two + * possible forms: + * - list + * - grid + * + * If Elementary is built with support of the Ethumb thumbnailing + * library, the second form of view will display preview thumbnails + * of files which it supports. + * + * Smart callbacks one can register to: + * + * - @c "selected" - the user has clicked on a file (when not in + * folders-only mode) or directory (when in folders-only mode) + * - @c "directory,open" - the list has been populated with new + * content (@c event_info is a pointer to the directory's + * path, a @b stringshared string) + * - @c "done" - the user has clicked on the "ok" or "cancel" + * buttons (@c event_info is a pointer to the selection's + * path, a @b stringshared string) + * + * Here is an example on its usage: + * @li @ref fileselector_example + */ - /** - * @addtogroup Fileselector - * @{ - */ +/** + * @addtogroup Fileselector + * @{ + */ - /** - * Defines how a file selector widget is to layout its contents - * (file system entries). - */ - typedef enum _Elm_Fileselector_Mode - { - ELM_FILESELECTOR_LIST = 0, /**< layout as a list */ - ELM_FILESELECTOR_GRID, /**< layout as a grid */ - ELM_FILESELECTOR_LAST /**< sentinel (helper) value, not used */ - } Elm_Fileselector_Mode; +/** + * Defines how a file selector widget is to layout its contents + * (file system entries). + */ +typedef enum _Elm_Fileselector_Mode +{ + ELM_FILESELECTOR_LIST = 0, /**< layout as a list */ + ELM_FILESELECTOR_GRID, /**< layout as a grid */ + ELM_FILESELECTOR_LAST /**< sentinel (helper) value, not used */ +} Elm_Fileselector_Mode; - /** - * Add a new file selector widget to the given parent Elementary - * (container) object - * - * @param parent The parent object - * @return a new file selector widget handle or @c NULL, on errors - * - * This function inserts a new file selector widget on the canvas. - * - * @ingroup Fileselector - */ - EAPI Evas_Object *elm_fileselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new file selector widget to the given parent Elementary + * (container) object + * + * @param parent The parent object + * @return a new file selector widget handle or @c NULL, on errors + * + * This function inserts a new file selector widget on the canvas. + * + * @ingroup Fileselector + */ +EAPI Evas_Object * + elm_fileselector_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 widget - * - * @param obj The file selector object - * @param is_save @c EINA_TRUE to make the file selector a "saving - * dialog", @c EINA_FALSE otherwise - * - * Having the entry editable is useful on file saving dialogs on - * applications, where one gives a file name to save contents to, - * in a given directory in the system. This custom file name will - * be reported on the @c "done" smart callback. - * - * @see elm_fileselector_is_save_get() - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save) 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 widget + * + * @param obj The file selector object + * @param is_save @c EINA_TRUE to make the file selector a "saving + * dialog", @c EINA_FALSE otherwise + * + * Having the entry editable is useful on file saving dialogs on + * applications, where one gives a file name to save contents to, + * in a given directory in the system. This custom file name will + * be reported on the @c "done" smart callback. + * + * @see elm_fileselector_is_save_get() + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save) EINA_ARG_NONNULL(1); - /** - * Get whether the given file selector is in "saving dialog" mode - * - * @param obj The file selector object - * @return @c EINA_TRUE, if the file selector is in "saving dialog" - * mode, @c EINA_FALSE otherwise (and on errors) - * - * @see elm_fileselector_is_save_set() for more details - * - * @ingroup Fileselector - */ - EAPI Eina_Bool elm_fileselector_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether the given file selector is in "saving dialog" mode + * + * @param obj The file selector object + * @return @c EINA_TRUE, if the file selector is in "saving dialog" + * mode, @c EINA_FALSE otherwise (and on errors) + * + * @see elm_fileselector_is_save_set() for more details + * + * @ingroup Fileselector + */ +EAPI Eina_Bool elm_fileselector_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable/disable folder-only view for a given file selector widget - * - * @param obj The file selector object - * @param only @c EINA_TRUE to make @p obj only display - * directories, @c EINA_FALSE to make files to be displayed in it - * too - * - * If enabled, the widget's view will only display folder items, - * naturally. - * - * @see elm_fileselector_folder_only_get() - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only) EINA_ARG_NONNULL(1); +/** + * Enable/disable folder-only view for a given file selector widget + * + * @param obj The file selector object + * @param only @c EINA_TRUE to make @p obj only display + * directories, @c EINA_FALSE to make files to be displayed in it + * too + * + * If enabled, the widget's view will only display folder items, + * naturally. + * + * @see elm_fileselector_folder_only_get() + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only) EINA_ARG_NONNULL(1); - /** - * Get whether folder-only view is set for a given file selector - * widget - * - * @param obj The file selector object - * @return only @c EINA_TRUE if @p obj is only displaying - * directories, @c EINA_FALSE if files are being displayed in it - * too (and on errors) - * - * @see elm_fileselector_folder_only_get() - * - * @ingroup Fileselector - */ - EAPI Eina_Bool elm_fileselector_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether folder-only view is set for a given file selector + * widget + * + * @param obj The file selector object + * @return only @c EINA_TRUE if @p obj is only displaying + * directories, @c EINA_FALSE if files are being displayed in it + * too (and on errors) + * + * @see elm_fileselector_folder_only_get() + * + * @ingroup Fileselector + */ +EAPI Eina_Bool elm_fileselector_folder_only_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable/disable the "ok" and "cancel" buttons on a given file - * selector widget - * - * @param obj The file selector object - * @param only @c EINA_TRUE to show them, @c EINA_FALSE to hide. - * - * @note A file selector without those buttons will never emit the - * @c "done" smart event, and is only usable if one is just hooking - * to the other two events. - * - * @see elm_fileselector_buttons_ok_cancel_get() - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool buttons) EINA_ARG_NONNULL(1); +/** + * Enable/disable the "ok" and "cancel" buttons on a given file + * selector widget + * + * @param obj The file selector object + * @param buttons @c EINA_TRUE to show buttons, @c EINA_FALSE to hide. + * + * @note A file selector without those buttons will never emit the + * @c "done" smart event, and is only usable if one is just hooking + * to the other two events. + * + * @see elm_fileselector_buttons_ok_cancel_get() + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool buttons) EINA_ARG_NONNULL(1); - /** - * Get whether the "ok" and "cancel" buttons on a given file - * selector widget are being shown. - * - * @param obj The file selector object - * @return @c EINA_TRUE if they are being shown, @c EINA_FALSE - * otherwise (and on errors) - * - * @see elm_fileselector_buttons_ok_cancel_set() for more details - * - * @ingroup Fileselector - */ - EAPI Eina_Bool elm_fileselector_buttons_ok_cancel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether the "ok" and "cancel" buttons on a given file + * selector widget are being shown. + * + * @param obj The file selector object + * @return @c EINA_TRUE if they are being shown, @c EINA_FALSE + * otherwise (and on errors) + * + * @see elm_fileselector_buttons_ok_cancel_set() for more details + * + * @ingroup Fileselector + */ +EAPI Eina_Bool elm_fileselector_buttons_ok_cancel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable/disable a tree view in the given file selector widget, - * if it's in @c #ELM_FILESELECTOR_LIST mode - * - * @param obj The file selector object - * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to - * disable - * - * In a tree view, arrows are created on the sides of directories, - * allowing them to expand in place. - * - * @note If it's in other mode, the changes made by this function - * will only be visible when one switches back to "list" mode. - * - * @see elm_fileselector_expandable_get() - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand) EINA_ARG_NONNULL(1); +/** + * Enable/disable a tree view in the given file selector widget, + * if it's in @c #ELM_FILESELECTOR_LIST mode + * + * @param obj The file selector object + * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to + * disable + * + * In a tree view, arrows are created on the sides of directories, + * allowing them to expand in place. + * + * @note If it's in other mode, the changes made by this function + * will only be visible when one switches back to "list" mode. + * + * @see elm_fileselector_expandable_get() + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand) EINA_ARG_NONNULL(1); - /** - * Get whether tree view is enabled for the given file selector - * widget - * - * @param obj The file selector object - * @return @c EINA_TRUE if @p obj is in tree view, @c EINA_FALSE - * otherwise (and or errors) - * - * @see elm_fileselector_expandable_set() for more details - * - * @ingroup Fileselector - */ - EAPI Eina_Bool elm_fileselector_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether tree view is enabled for the given file selector + * widget + * + * @param obj The file selector object + * @return @c EINA_TRUE if @p obj is in tree view, @c EINA_FALSE + * otherwise (and or errors) + * + * @see elm_fileselector_expandable_set() for more details + * + * @ingroup Fileselector + */ +EAPI Eina_Bool elm_fileselector_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set, programmatically, the @b directory that a given file - * selector widget will display contents from - * - * @param obj The file selector object - * @param path The path to display in @p obj - * - * This will change the @b directory that @p obj is displaying. It - * will also clear the text entry area on the @p obj object, which - * displays select files' names. - * - * @see elm_fileselector_path_get() - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); +/** + * Set, programmatically, the @b directory that a given file + * selector widget will display contents from + * + * @param obj The file selector object + * @param path The path to display in @p obj + * + * This will change the @b directory that @p obj is displaying. It + * will also clear the text entry area on the @p obj object, which + * displays select files' names. + * + * @see elm_fileselector_path_get() + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); - /** - * Get the parent directory's path that a given file selector - * widget is displaying - * - * @param obj The file selector object - * @return The (full) path of the directory the file selector is - * displaying, a @b stringshared string - * - * @see elm_fileselector_path_set() - * - * @ingroup Fileselector - */ - EAPI const char *elm_fileselector_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the parent directory's path that a given file selector + * widget is displaying + * + * @param obj The file selector object + * @return The (full) path of the directory the file selector is + * displaying, a @b stringshared string + * + * @see elm_fileselector_path_set() + * + * @ingroup Fileselector + */ +EAPI const char *elm_fileselector_path_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set, programmatically, the currently selected file/directory in - * the given file selector widget - * - * @param obj The file selector object - * @param path The (full) path to a file or directory - * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. The - * latter case occurs if the directory or file pointed to do not - * exist. - * - * @see elm_fileselector_selected_get() - * - * @ingroup Fileselector - */ - EAPI Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); +/** + * Set, programmatically, the currently selected file/directory in + * the given file selector widget + * + * @param obj The file selector object + * @param path The (full) path to a file or directory + * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. The + * latter case occurs if the directory or file pointed to do not + * exist. + * + * @see elm_fileselector_selected_get() + * + * @ingroup Fileselector + */ +EAPI Eina_Bool elm_fileselector_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); - /** - * Get the currently selected item's (full) path, in the given file - * selector widget - * - * @param obj The file selector object - * @return The absolute path of the selected item, a @b - * stringshared string - * - * @note Custom editions on @p obj object's text entry, if made, - * will appear on the return string of this function, naturally. - * - * @see elm_fileselector_selected_set() for more details - * - * @ingroup Fileselector - */ - EAPI const char *elm_fileselector_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the currently selected item's (full) path, in the given file + * selector widget + * + * @param obj The file selector object + * @return The absolute path of the selected item, a @b + * stringshared string + * + * @note Custom editions on @p obj object's text entry, if made, + * will appear on the return string of this function, naturally. + * + * @see elm_fileselector_selected_set() for more details + * + * @ingroup Fileselector + */ +EAPI const char *elm_fileselector_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the mode in which a given file selector widget will display - * (layout) file system entries in its view - * - * @param obj The file selector object - * @param mode The mode of the fileselector, being it one of - * #ELM_FILESELECTOR_LIST (default) or #ELM_FILESELECTOR_GRID. The - * first one, naturally, will display the files in a list. The - * latter will make the widget to display its entries in a grid - * form. - * - * @note By using elm_fileselector_expandable_set(), the user may - * trigger a tree view for that list. - * - * @note If Elementary is built with support of the Ethumb - * thumbnailing library, the second form of view will display - * preview thumbnails of files which it supports. You must have - * elm_need_ethumb() called in your Elementary for thumbnailing to - * work, though. - * - * @see elm_fileselector_expandable_set(). - * @see elm_fileselector_mode_get(). - * - * @ingroup Fileselector - */ - EAPI void elm_fileselector_mode_set(Evas_Object *obj, Elm_Fileselector_Mode mode) EINA_ARG_NONNULL(1); +/** + * Set the mode in which a given file selector widget will display + * (layout) file system entries in its view + * + * @param obj The file selector object + * @param mode The mode of the fileselector, being it one of + * #ELM_FILESELECTOR_LIST (default) or #ELM_FILESELECTOR_GRID. The + * first one, naturally, will display the files in a list. The + * latter will make the widget to display its entries in a grid + * form. + * + * @note By using elm_fileselector_expandable_set(), the user may + * trigger a tree view for that list. + * + * @note If Elementary is built with support of the Ethumb + * thumbnailing library, the second form of view will display + * preview thumbnails of files which it supports. You must have + * elm_need_ethumb() called in your Elementary for thumbnailing to + * work, though. + * + * @see elm_fileselector_expandable_set(). + * @see elm_fileselector_mode_get(). + * + * @ingroup Fileselector + */ +EAPI void elm_fileselector_mode_set(Evas_Object *obj, Elm_Fileselector_Mode mode) EINA_ARG_NONNULL(1); - /** - * Get the mode in which a given file selector widget is displaying - * (layouting) file system entries in its view - * - * @param obj The fileselector object - * @return The mode in which the fileselector is at - * - * @see elm_fileselector_mode_set() for more details - * - * @ingroup Fileselector - */ - EAPI Elm_Fileselector_Mode elm_fileselector_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the mode in which a given file selector widget is displaying + * (layouting) file system entries in its view + * + * @param obj The fileselector object + * @return The mode in which the fileselector is at + * + * @see elm_fileselector_mode_set() for more details + * + * @ingroup Fileselector + */ +EAPI Elm_Fileselector_Mode elm_fileselector_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_fileselector_button.h b/legacy/elementary/src/lib/elc_fileselector_button.h index 381354978e..d0e78b33e2 100644 --- a/legacy/elementary/src/lib/elc_fileselector_button.h +++ b/legacy/elementary/src/lib/elc_fileselector_button.h @@ -1,318 +1,319 @@ - /** - * @defgroup File_Selector_Button File Selector Button - * - * @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 - * - * This is a button that, when clicked, creates an Elementary - * window (or inner window) with a @ref Fileselector "file - * selector widget" within. 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. - * - * 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. - * - * The following styles are available for this button: - * @li @c "default" - * @li @c "anchor" - * @li @c "hoversel_vertical" - * @li @c "hoversel_vertical_entry" - * - * 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. - * @{ - */ +/** + * @defgroup File_Selector_Button File Selector Button + * + * @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 + * + * This is a button that, when clicked, creates an Elementary + * window (or inner window) with a @ref Fileselector "file + * selector widget" within. 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. + * + * 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. + * + * The following styles are available for this button: + * @li @c "default" + * @li @c "anchor" + * @li @c "hoversel_vertical" + * @li @c "hoversel_vertical_entry" + * + * 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. + * @{ + */ - /** - * Add a new file selector button widget to the given parent - * Elementary (container) object - * - * @param parent The parent object - * @return a new file selector button widget handle or @c NULL, on - * errors - */ - EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new file selector button widget to the given parent + * Elementary (container) object + * + * @param parent The parent object + * @return a new file selector button widget handle or @c NULL, on + * errors + */ +EAPI Evas_Object * + elm_fileselector_button_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the label for a given file selector button widget - * - * @param obj The file selector button widget - * @param label The text label to be displayed on @p obj - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_fileselector_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label for a given file selector button widget + * + * @param obj The file selector button widget + * @param label The text label to be displayed on @p obj + * + * @deprecated use elm_object_text_set() instead. + */ +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); +/** + * 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); - /** - * Set the icon on a given file selector button widget - * - * @param obj The file selector button widget - * @param icon The icon object for the button - * - * 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_fileselector_button_icon_get() - */ - EAPI void elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon on a given file selector button widget + * + * @param obj The file selector button widget + * @param icon The icon object for the button + * + * 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_fileselector_button_icon_get() + */ +EAPI void elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Get the icon set for a given file selector button widget - * - * @param obj The file selector button widget - * @return The icon object currently set on @p obj or @c NULL, if - * none is - * - * @see elm_fileselector_button_icon_set() - */ - EAPI Evas_Object *elm_fileselector_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the icon set for a given file selector button widget + * + * @param obj The file selector button widget + * @return The icon object currently set on @p obj or @c NULL, if + * none is + * + * @see elm_fileselector_button_icon_set() + */ +EAPI Evas_Object *elm_fileselector_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the icon used in a given file selector button widget - * - * @param obj The file selector button widget - * @return The icon object that was being used on @p obj or @c - * NULL, on errors - * - * Unparent and return the icon object which was set for this - * widget. - * - * @see elm_fileselector_button_icon_set() - */ - EAPI Evas_Object *elm_fileselector_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the icon used in a given file selector button widget + * + * @param obj The file selector button widget + * @return The icon object that was being used on @p obj or @c + * NULL, on errors + * + * Unparent and return the icon object which was set for this + * widget. + * + * @see elm_fileselector_button_icon_set() + */ +EAPI Evas_Object *elm_fileselector_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the title for a given file selector button widget's window - * - * @param obj The file selector button widget - * @param title The title string - * - * 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() - */ - EAPI void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1); +/** + * Set the title for a given file selector button widget's window + * + * @param obj The file selector button widget + * @param title The title string + * + * 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() + */ +EAPI void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1); - /** - * Get the title set for a given file selector button widget's - * window - * - * @param obj The file selector button widget - * @return Title of the file selector button's window - * - * @see elm_fileselector_button_window_title_get() for more details - */ - EAPI const char *elm_fileselector_button_window_title_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the title set for a given file selector button widget's + * window + * + * @param obj The file selector button widget + * @return Title of the file selector button's window + * + * @see elm_fileselector_button_window_title_get() for more details + */ +EAPI const char *elm_fileselector_button_window_title_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. - * - * @param obj The file selector button widget - * @param width The window's width - * @param height The window's 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. - * - * @see elm_fileselector_button_window_size_get() - */ - EAPI void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1); +/** + * Set the size of a given file selector button widget's window, + * holding the file selector itself. + * + * @param obj The file selector button widget + * @param width The window's width + * @param height The window's 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. + * + * @see elm_fileselector_button_window_size_get() + */ +EAPI void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1); - /** - * Get the size of a given file selector button widget's window, - * holding the file selector itself. - * - * @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 - * - * @note Use @c NULL pointers on the size values you're not - * interested in: they'll be ignored by the function. - * - * @see elm_fileselector_button_window_size_set(), for more details - */ - EAPI void elm_fileselector_button_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1); +/** + * Get the size of a given file selector button widget's window, + * holding the file selector itself. + * + * @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 + * + * @note Use @c NULL pointers on the size values you're not + * interested in: they'll be ignored by the function. + * + * @see elm_fileselector_button_window_size_set(), for more details + */ +EAPI void elm_fileselector_button_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1); - /** - * Set the initial file system path for a given file selector - * button widget - * - * @param obj The file selector button widget - * @param path The path string - * - * It must be a directory 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. - * - * @see elm_fileselector_button_path_get() - */ - EAPI void elm_fileselector_button_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); +/** + * Set the initial file system path for a given file selector + * button widget + * + * @param obj The file selector button widget + * @param path The path string + * + * It must be a directory 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. + * + * @see elm_fileselector_button_path_get() + */ +EAPI void elm_fileselector_button_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); - /** - * Get the initial file system path set for a given file selector - * button widget - * - * @param obj The file selector button widget - * @return path The path string - * - * @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); +/** + * Get the initial file system path set for a given file selector + * button widget + * + * @param obj The file selector button widget + * @return path The path string + * + * @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); - /** - * Enable/disable a tree view in the given file selector button - * widget's internal file selector - * - * @param obj The file selector button widget - * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to - * disable - * - * This has the same effect as elm_fileselector_expandable_set(), - * but now applied to a file selector button's internal file - * selector. - * - * @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); +/** + * Enable/disable a tree view in the given file selector button + * widget's internal file selector + * + * @param obj The file selector button widget + * @param value @c EINA_TRUE to enable tree view, @c EINA_FALSE to + * disable + * + * This has the same effect as elm_fileselector_expandable_set(), + * but now applied to a file selector button's internal file + * selector. + * + * @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); - /** - * Get whether tree view is enabled for the given file selector - * button widget's internal file selector - * - * @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 Eina_Bool elm_fileselector_button_expandable_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 + * + * @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 Eina_Bool elm_fileselector_button_expandable_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. - * - * @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 - * - * 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() - */ - EAPI void elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value) 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. + * + * @param obj The file selector button widget + * @param value @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 button's internal file + * selector. + * + * @see elm_fileselector_folder_only_get() + */ +EAPI void elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value) 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. - * - * @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) - * - * @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); +/** + * 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 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) + * + * @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. - * - * @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() - */ - EAPI void elm_fileselector_button_is_save_set(Evas_Object *obj, Eina_Bool value) 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. + * + * @param obj The file selector button widget + * @param value @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() + */ +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 - * - * @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) - * - * @see elm_fileselector_button_is_save_set() for more details - */ - EAPI Eina_Bool elm_fileselector_button_is_save_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether the given file selector button widget's internal + * file selector is in "saving dialog" mode + * + * @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) + * + * @see elm_fileselector_button_is_save_set() for more details + */ +EAPI Eina_Bool elm_fileselector_button_is_save_get(const Evas_Object *obj) 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. - * - * @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 - * - * @see elm_win_inwin_add() for more information on inner windows - * @see elm_fileselector_button_inwin_mode_get() - */ - EAPI void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value) 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. + * + * @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 + * + * @see elm_win_inwin_add() for more information on inner windows + * @see elm_fileselector_button_inwin_mode_get() + */ +EAPI void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value) 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. - * - * @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 - * - * @see elm_fileselector_button_inwin_mode_set() for more details - */ - EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Evas_Object *obj) 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. + * + * @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 + * + * @see elm_fileselector_button_inwin_mode_set() for more details + */ +EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_fileselector_entry.h b/legacy/elementary/src/lib/elc_fileselector_entry.h index dffe5f81fa..d584b7fc3c 100644 --- a/legacy/elementary/src/lib/elc_fileselector_entry.h +++ b/legacy/elementary/src/lib/elc_fileselector_entry.h @@ -1,360 +1,361 @@ - /** - * @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 file - * system path string. 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. - * @{ - */ +/** + * @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 file + * system path string. 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. + * @{ + */ - /** - * Add a new file selector entry widget to the given parent - * Elementary (container) 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); +/** + * Add a new file selector entry widget to the given parent + * Elementary (container) 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 file selector entry widget - * @param label The text label to be displayed on @p obj widget's - * button - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label for a given file selector entry widget's button + * + * @param obj The file selector entry widget + * @param label The text label to be displayed on @p obj widget's + * button + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label set for a given file selector entry widget's button - * - * @param obj The file selector entry widget - * @return The widget button's label - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI const char *elm_fileselector_entry_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label set for a given file selector entry widget's button + * + * @param obj The file selector entry widget + * @return The widget button's label + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI const char *elm_fileselector_entry_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the icon on a given file selector entry widget's button - * - * @param obj The file selector entry widget - * @param icon The icon object for the entry's button - * - * 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. - * - * @see elm_fileselector_entry_button_icon_get() - */ - EAPI void elm_fileselector_entry_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon on a given file selector entry widget's button + * + * @param obj The file selector entry widget + * @param icon The icon object for the entry's button + * + * 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. + * + * @see elm_fileselector_entry_button_icon_get() + */ +EAPI void elm_fileselector_entry_button_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Get the icon set for a given file selector entry widget's button - * - * @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 - * - * @see elm_fileselector_entry_button_icon_set() - */ - EAPI Evas_Object *elm_fileselector_entry_button_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the icon set for a given file selector entry widget's button + * + * @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 + * + * @see elm_fileselector_entry_button_icon_set() + */ +EAPI Evas_Object *elm_fileselector_entry_button_icon_get(const Evas_Object *obj) 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 - * - * Unparent and return the icon object which was set for this - * widget's button. - * - * @see elm_fileselector_entry_button_icon_set() - */ - EAPI Evas_Object *elm_fileselector_entry_button_icon_unset(Evas_Object *obj) 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 + * + * Unparent and return the icon object which was set for this + * widget's button. + * + * @see elm_fileselector_entry_button_icon_set() + */ +EAPI Evas_Object *elm_fileselector_entry_button_icon_unset(Evas_Object *obj) 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 - * - * 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_fileselector_entry_window_title_set(Evas_Object *obj, const char *title) 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 + * + * 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_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); +/** + * 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); - /** - * 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); +/** + * 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); - /** - * Get 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 Pointer into which to store the width value - * @param height Pointer into which to store the height value - * - * @note Use @c NULL pointers on the size values you're not - * interested in: they'll be ignored by the function. - * - * @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); +/** + * Get 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 Pointer into which to store the width value + * @param height Pointer into which to store the height value + * + * @note Use @c NULL pointers on the size values you're not + * interested in: they'll be ignored by the function. + * + * @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 - * - * @param obj The file selector entry widget - * @param path The path string - * - * It must be a directory 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. - * - * @see elm_fileselector_entry_path_get() - */ - EAPI void elm_fileselector_entry_path_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); +/** + * Set the initial file system path and the entry's path string for + * a given file selector entry widget + * + * @param obj The file selector entry widget + * @param path The path string + * + * It must be a directory 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. + * + * @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 - * - * @param obj The file selector entry widget - * @return path The path string - * - * @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); +/** + * Get the entry's path string for a given file selector entry + * widget + * + * @param obj The file selector entry widget + * @return path The path string + * + * @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 - * - * @param obj The file selector entry widget - * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to - * disable - * - * This has the same effect as elm_fileselector_expandable_set(), - * but now applied to a file selector entry's internal file - * selector. - * - * @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. - * - * @see elm_fileselector_expandable_get() - */ - EAPI void elm_fileselector_entry_expandable_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); +/** + * Enable/disable a tree view in the given file selector entry + * widget's internal file selector + * + * @param obj The file selector entry widget + * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to + * disable + * + * This has the same effect as elm_fileselector_expandable_set(), + * but now applied to a file selector entry's internal file + * selector. + * + * @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. + * + * @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 - * - * @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) - * - * @see elm_fileselector_expandable_set() for more details - */ - EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether tree view is enabled for the given file selector + * entry widget's internal file selector + * + * @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) + * + * @see elm_fileselector_expandable_set() for more details + */ +EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * 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() - */ - EAPI void elm_fileselector_entry_folder_only_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); +/** + * 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() + */ +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) - * - * @see elm_fileselector_entry_folder_only_set() for more details - */ - EAPI Eina_Bool elm_fileselector_entry_folder_only_get(const Evas_Object *obj) 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) + * + * @see elm_fileselector_entry_folder_only_set() for more details + */ +EAPI Eina_Bool elm_fileselector_entry_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 entry widget's - * internal file selector. - * - * @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 - * - * This has the same effect as elm_fileselector_is_save_set(), - * but now applied to a file selector entry's internal file - * selector. - * - * @see elm_fileselector_is_save_get() - */ - EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value) 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. + * + * @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 + * + * This has the same effect as elm_fileselector_is_save_set(), + * but now applied to a file selector entry's internal file + * selector. + * + * @see elm_fileselector_is_save_get() + */ +EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value) 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) - * - * @see elm_fileselector_entry_is_save_set() for more details - */ - EAPI Eina_Bool elm_fileselector_entry_is_save_get(const Evas_Object *obj) 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) + * + * @see elm_fileselector_entry_is_save_set() for more details + */ +EAPI Eina_Bool elm_fileselector_entry_is_save_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. - * - * @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 - * - * @see elm_win_inwin_add() for more information on inner windows - * @see elm_fileselector_entry_inwin_mode_get() - */ - EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value) 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. + * + * @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 + * + * @see elm_win_inwin_add() for more information on inner windows + * @see elm_fileselector_entry_inwin_mode_get() + */ +EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value) 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 - * - * @see elm_fileselector_entry_inwin_mode_set() for more details - */ - EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj) 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 + * + * @see elm_fileselector_entry_inwin_mode_set() for more details + */ +EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the initial file system path for a given file selector entry - * widget - * - * @param obj The file selector entry widget - * @param path The path string - * - * It must be a directory 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. - * - * @see elm_fileselector_entry_path_get() - */ - EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); +/** + * Set the initial file system path for a given file selector entry + * widget + * + * @param obj The file selector entry widget + * @param path The path string + * + * It must be a directory 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. + * + * @see elm_fileselector_entry_path_get() + */ +EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path) EINA_ARG_NONNULL(1); - /** - * Get the parent directory's path to the latest file selection on - * a given filer selector entry widget - * - * @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 - * - * @see elm_fileselector_entry_path_set() - */ - EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the parent directory's path to the latest file selection on + * a given filer selector entry widget + * + * @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 + * + * @see elm_fileselector_entry_path_set() + */ +EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_hoversel.h b/legacy/elementary/src/lib/elc_hoversel.h index 51fa631428..f68bbd8519 100644 --- a/legacy/elementary/src/lib/elc_hoversel.h +++ b/legacy/elementary/src/lib/elc_hoversel.h @@ -1,322 +1,323 @@ - /** - * @defgroup Hoversel Hoversel - * - * @image html img/widget/hoversel/preview-00.png - * @image latex img/widget/hoversel/preview-00.eps - * - * A hoversel is a button that pops up a list of items (automatically - * choosing the direction to display) that have a label and, optionally, an - * icon to select from. It is a convenience widget to avoid the need to do - * all the piecing together yourself. It is intended for a small number of - * items in the hoversel menu (no more than 8), though is capable of many - * more. - * - * Signals that you can add callbacks for are: - * "clicked" - the user clicked the hoversel button and popped up the sel - * "selected" - an item in the hoversel list is selected. event_info is the item - * "dismissed" - the hover is dismissed - * - * Default contents parts of the hoversel widget that you can use for are: - * @li "icon" - An icon of the hoversel - * - * Default text parts of the hoversel widget that you can use for are: - * @li "default" - Label of the hoversel - * - * Supported elm_object common APIs. - * @li elm_object_disabled_set - * @li elm_object_text_set - * @li elm_object_part_text_set - * @li elm_object_text_get - * @li elm_object_part_text_get - * @li elm_object_content_set - * @li elm_object_part_content_set - * @li elm_object_content_unset - * @li elm_object_part_content_unset - * - * Supported elm_object_item common APIs. - * @li elm_object_item_text_get - * @li elm_object_item_part_text_get - * - * See @ref tutorial_hoversel for an example. - * @{ - */ +/** + * @defgroup Hoversel Hoversel + * + * @image html img/widget/hoversel/preview-00.png + * @image latex img/widget/hoversel/preview-00.eps + * + * A hoversel is a button that pops up a list of items (automatically + * choosing the direction to display) that have a label and, optionally, an + * icon to select from. It is a convenience widget to avoid the need to do + * all the piecing together yourself. It is intended for a small number of + * items in the hoversel menu (no more than 8), though is capable of many + * more. + * + * Signals that you can add callbacks for are: + * "clicked" - the user clicked the hoversel button and popped up the sel + * "selected" - an item in the hoversel list is selected. event_info is the item + * "dismissed" - the hover is dismissed + * + * Default contents parts of the hoversel widget that you can use for are: + * @li "icon" - An icon of the hoversel + * + * Default text parts of the hoversel widget that you can use for are: + * @li "default" - Label of the hoversel + * + * Supported elm_object common APIs. + * @li elm_object_disabled_set + * @li elm_object_text_set + * @li elm_object_part_text_set + * @li elm_object_text_get + * @li elm_object_part_text_get + * @li elm_object_content_set + * @li elm_object_part_content_set + * @li elm_object_content_unset + * @li elm_object_part_content_unset + * + * Supported elm_object_item common APIs. + * @li elm_object_item_text_get + * @li elm_object_item_part_text_get + * + * See @ref tutorial_hoversel for an example. + * @{ + */ - /** - * @brief Add a new Hoversel object - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new Hoversel object + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_hoversel_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief This sets the hoversel to expand horizontally. - * - * @param obj The hoversel object - * @param horizontal If true, the hover will expand horizontally to the - * right. - * - * @note The initial button will display horizontally regardless of this - * setting. - */ - EAPI void elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * @brief This sets the hoversel to expand horizontally. + * + * @param obj The hoversel object + * @param horizontal If true, the hover will expand horizontally to the + * right. + * + * @note The initial button will display horizontally regardless of this + * setting. + */ +EAPI void elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * @brief This returns whether the hoversel is set to expand horizontally. - * - * @param obj The hoversel object - * @return If true, the hover will expand horizontally to the right. - * - * @see elm_hoversel_horizontal_set() - */ - EAPI Eina_Bool elm_hoversel_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief This returns whether the hoversel is set to expand horizontally. + * + * @param obj The hoversel object + * @return If true, the hover will expand horizontally to the right. + * + * @see elm_hoversel_horizontal_set() + */ +EAPI Eina_Bool elm_hoversel_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the Hover parent - * - * @param obj The hoversel object - * @param parent The parent to use - * - * Sets the hover parent object, the area that will be darkened when the - * hoversel is clicked. Should probably be the window that the hoversel is - * in. See @ref Hover objects for more information. - */ - EAPI void elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * @brief Get the Hover parent - * - * @param obj The hoversel object - * @return The used parent - * - * Gets the hover parent object. - * - * @see elm_hoversel_hover_parent_set() - */ - EAPI Evas_Object *elm_hoversel_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Set the Hover parent + * + * @param obj The hoversel object + * @param parent The parent to use + * + * Sets the hover parent object, the area that will be darkened when the + * hoversel is clicked. Should probably be the window that the hoversel is + * in. See @ref Hover objects for more information. + */ +EAPI void elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Get the Hover parent + * + * @param obj The hoversel object + * @return The used parent + * + * Gets the hover parent object. + * + * @see elm_hoversel_hover_parent_set() + */ +EAPI Evas_Object *elm_hoversel_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the hoversel button label - * - * @param obj The hoversel object - * @param label The label text. - * - * This sets the label of the button that is always visible (before it is - * clicked and expanded). - * - * @deprecated elm_object_text_set() - */ - EINA_DEPRECATED EAPI void elm_hoversel_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Set the hoversel button label + * + * @param obj The hoversel object + * @param label The label text. + * + * This sets the label of the button that is always visible (before it is + * clicked and expanded). + * + * @deprecated elm_object_text_set() + */ +EINA_DEPRECATED EAPI void elm_hoversel_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Get the hoversel button label - * - * @param obj The hoversel object - * @return The label text. - * - * @deprecated elm_object_text_get() - */ - EINA_DEPRECATED EAPI const char *elm_hoversel_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the hoversel button label + * + * @param obj The hoversel object + * @return The label text. + * + * @deprecated elm_object_text_get() + */ +EINA_DEPRECATED EAPI const char *elm_hoversel_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the icon of the hoversel button - * - * @param obj The hoversel object - * @param icon The icon object - * - * Sets the icon of the button that is always visible (before it is clicked - * and expanded). 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_hoversel_icon_unset() function. - * - * @see elm_object_content_set() for the button widget - * @deprecated Use elm_object_item_part_content_set() instead - */ - EINA_DEPRECATED EAPI void elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * @brief Set the icon of the hoversel button + * + * @param obj The hoversel object + * @param icon The icon object + * + * Sets the icon of the button that is always visible (before it is clicked + * and expanded). 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_hoversel_icon_unset() function. + * + * @see elm_object_content_set() for the button widget + * @deprecated Use elm_object_item_part_content_set() instead + */ +EINA_DEPRECATED EAPI void elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon of the hoversel button - * - * @param obj The hoversel object - * @return The icon object - * - * Get the icon of the button that is always visible (before it is clicked - * and expanded). Also see elm_object_content_get() for the button widget. - * - * @see elm_hoversel_icon_set() - * @deprecated Use elm_object_item_part_content_get() instead - */ - EINA_DEPRECATED EAPI Evas_Object *elm_hoversel_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the icon of the hoversel button + * + * @param obj The hoversel object + * @return The icon object + * + * Get the icon of the button that is always visible (before it is clicked + * and expanded). Also see elm_object_content_get() for the button widget. + * + * @see elm_hoversel_icon_set() + * @deprecated Use elm_object_item_part_content_get() instead + */ +EINA_DEPRECATED EAPI Evas_Object *elm_hoversel_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get and unparent the icon of the hoversel button - * - * @param obj The hoversel object - * @return The icon object that was being used - * - * Unparent and return the icon of the button that is always visible - * (before it is clicked and expanded). - * - * @see elm_hoversel_icon_set() - * @see elm_object_content_unset() for the button widget - * @deprecated Use elm_object_item_part_content_unset() instead - */ - EINA_DEPRECATED EAPI Evas_Object *elm_hoversel_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get and unparent the icon of the hoversel button + * + * @param obj The hoversel object + * @return The icon object that was being used + * + * Unparent and return the icon of the button that is always visible + * (before it is clicked and expanded). + * + * @see elm_hoversel_icon_set() + * @see elm_object_content_unset() for the button widget + * @deprecated Use elm_object_item_part_content_unset() instead + */ +EINA_DEPRECATED EAPI Evas_Object *elm_hoversel_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief This triggers the hoversel popup from code, the same as if the user - * had clicked the button. - * - * @param obj The hoversel object - */ - EAPI void elm_hoversel_hover_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief This triggers the hoversel popup from code, the same as if the user + * had clicked the button. + * + * @param obj The hoversel object + */ +EAPI void elm_hoversel_hover_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief This dismisses the hoversel popup as if the user had clicked - * outside the hover. - * - * @param obj The hoversel object - */ - EAPI void elm_hoversel_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief This dismisses the hoversel popup as if the user had clicked + * outside the hover. + * + * @param obj The hoversel object + */ +EAPI void elm_hoversel_hover_end(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Returns whether the hoversel is expanded. - * - * @param obj The hoversel object - * @return This will return EINA_TRUE if the hoversel is expanded or - * EINA_FALSE if it is not expanded. - */ - EAPI Eina_Bool elm_hoversel_expanded_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Returns whether the hoversel is expanded. + * + * @param obj The hoversel object + * @return This will return EINA_TRUE if the hoversel is expanded or + * EINA_FALSE if it is not expanded. + */ +EAPI Eina_Bool elm_hoversel_expanded_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief This will remove all the children items from the hoversel. - * - * @param obj The hoversel object - * - * @warning Should @b not be called while the hoversel is active; use - * elm_hoversel_expanded_get() to check first. - * - * @see elm_hoversel_item_del_cb_set() - * @see elm_hoversel_item_del() - */ - EAPI void elm_hoversel_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief This will remove all the children items from the hoversel. + * + * @param obj The hoversel object + * + * @warning Should @b not be called while the hoversel is active; use + * elm_hoversel_expanded_get() to check first. + * + * @see elm_hoversel_item_del_cb_set() + * @see elm_hoversel_item_del() + */ +EAPI void elm_hoversel_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the list of items within the given hoversel. - * - * @param obj The hoversel object - * @return Returns a list of Elm_Object_Item* - * - * @see elm_hoversel_item_add() - */ - EAPI const Eina_List *elm_hoversel_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the list of items within the given hoversel. + * + * @param obj The hoversel object + * @return Returns a list of Elm_Object_Item* + * + * @see elm_hoversel_item_add() + */ +EAPI const Eina_List *elm_hoversel_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Add an item to the hoversel button - * - * @param obj The hoversel object - * @param label The text label to use for the item (NULL if not desired) - * @param icon_file An image file path on disk to use for the icon or standard - * icon name (NULL if not desired) - * @param icon_type The icon type if relevant - * @param func Convenience function to call when this item is selected - * @param data Data to pass to item-related functions - * @return A handle to the item added. - * - * This adds an item to the hoversel to show when it is clicked. Note: if you - * need to use an icon from an edje file then use - * elm_hoversel_item_icon_set() right after the this function, and set - * icon_file to NULL here. - * - * For more information on what @p icon_file and @p icon_type are see the - * @ref Icon "icon documentation". - */ - EAPI Elm_Object_Item *elm_hoversel_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); +/** + * @brief Add an item to the hoversel button + * + * @param obj The hoversel object + * @param label The text label to use for the item (NULL if not desired) + * @param icon_file An image file path on disk to use for the icon or standard + * icon name (NULL if not desired) + * @param icon_type The icon type if relevant + * @param func Convenience function to call when this item is selected + * @param data Data to pass to item-related functions + * @return A handle to the item added. + * + * This adds an item to the hoversel to show when it is clicked. Note: if you + * need to use an icon from an edje file then use + * elm_hoversel_item_icon_set() right after the this function, and set + * icon_file to NULL here. + * + * For more information on what @p icon_file and @p icon_type are see the + * @ref Icon "icon documentation". + */ +EAPI Elm_Object_Item *elm_hoversel_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); - /** - * @brief Delete an item from the hoversel - * - * @param it The item to delete - * - * This deletes the item from the hoversel (should not be called while the - * hoversel is active; use elm_hoversel_expanded_get() to check first). - * - * @see elm_hoversel_item_add() - * @see elm_hoversel_item_del_cb_set() - */ - EAPI void elm_hoversel_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Delete an item from the hoversel + * + * @param it The item to delete + * + * This deletes the item from the hoversel (should not be called while the + * hoversel is active; use elm_hoversel_expanded_get() to check first). + * + * @see elm_hoversel_item_add() + * @see elm_hoversel_item_del_cb_set() + */ +EAPI void elm_hoversel_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the function to be called when an item from the hoversel is - * freed. - * - * @param item The item to set the callback on - * @param func The function called - * - * That function will receive these parameters: - * @li void * item data - * @li Evas_Object * hoversel object - * @li Elm_Object_Item * hoversel item - * - * @see elm_hoversel_item_add() - */ - EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +/** + * @brief Set the function to be called when an item from the hoversel is + * freed. + * + * @param item The item to set the callback on + * @param func The function called + * + * That function will receive these parameters: + * @li void * item data + * @li Evas_Object * hoversel object + * @li Elm_Object_Item * hoversel item + * + * @see elm_hoversel_item_add() + */ +EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - /** - * @brief This returns the data pointer supplied with elm_hoversel_item_add() - * that will be passed to associated function callbacks. - * - * @param it The item to get the data from - * @return The data pointer set with elm_hoversel_item_add() - * - * @see elm_hoversel_item_add() - * @deprecated Use elm_object_item_data_get() instead - */ - EINA_DEPRECATED EAPI void *elm_hoversel_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief This returns the data pointer supplied with elm_hoversel_item_add() + * that will be passed to associated function callbacks. + * + * @param it The item to get the data from + * @return The data pointer set with elm_hoversel_item_add() + * + * @see elm_hoversel_item_add() + * @deprecated Use elm_object_item_data_get() instead + */ +EINA_DEPRECATED EAPI void *elm_hoversel_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief This returns the label text of the given hoversel item. - * - * @param it The item to get the label - * @return The label text of the hoversel item - * - * @see elm_hoversel_item_add() - * @deprecated Use elm_object_item_text_get() instead - */ - EINA_DEPRECATED EAPI const char *elm_hoversel_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief This returns the label text of the given hoversel item. + * + * @param it The item to get the label + * @return The label text of the hoversel item + * + * @see elm_hoversel_item_add() + * @deprecated Use elm_object_item_text_get() instead + */ +EINA_DEPRECATED EAPI const char *elm_hoversel_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief This sets the icon for the given hoversel item. - * - * @param item The item to set the icon - * @param icon_file An image file path on disk to use for the icon or standard - * icon name - * @param icon_group The edje group to use if @p icon_file is an edje file. Set this - * to NULL if the icon is not an edje file - * @param icon_type The icon type - * - * The icon can be loaded from the standard set, from an image file, or from - * an edje file. - * - * @see elm_hoversel_item_add() - */ - EAPI void elm_hoversel_item_icon_set(Elm_Object_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type) EINA_ARG_NONNULL(1); +/** + * @brief This sets the icon for the given hoversel item. + * + * @param item The item to set the icon + * @param icon_file An image file path on disk to use for the icon or standard + * icon name + * @param icon_group The edje group to use if @p icon_file is an edje file. Set this + * to NULL if the icon is not an edje file + * @param icon_type The icon type + * + * The icon can be loaded from the standard set, from an image file, or from + * an edje file. + * + * @see elm_hoversel_item_add() + */ +EAPI void elm_hoversel_item_icon_set(Elm_Object_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon object of the hoversel item - * - * @param item The item to get the icon from - * @param icon_file The image file path on disk used for the icon or standard - * icon name - * @param icon_group The edje group used if @p icon_file is an edje file. NULL - * if the icon is not an edje file - * @param icon_type The icon type - * - * @see elm_hoversel_item_icon_set() - * @see elm_hoversel_item_add() - */ - EAPI void elm_hoversel_item_icon_get(const Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the icon object of the hoversel item + * + * @param item The item to get the icon from + * @param icon_file The image file path on disk used for the icon or standard + * icon name + * @param icon_group The edje group used if @p icon_file is an edje file. NULL + * if the icon is not an edje file + * @param icon_type The icon type + * + * @see elm_hoversel_item_icon_set() + * @see elm_hoversel_item_add() + */ +EAPI void elm_hoversel_item_icon_get(const Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_multibuttonentry.h b/legacy/elementary/src/lib/elc_multibuttonentry.h index b08ef68595..7eab7b5df6 100644 --- a/legacy/elementary/src/lib/elc_multibuttonentry.h +++ b/legacy/elementary/src/lib/elc_multibuttonentry.h @@ -1,305 +1,306 @@ - /** - * @defgroup Multibuttonentry Multibuttonentry - * - * A Multibuttonentry is a widget to allow a user enter text and manage it as a number of buttons - * Each text button is inserted by pressing the "return" key. If there is no space in the current row, - * a new button is added to the next row. When a text button is pressed, it will become focused. - * Backspace removes the focus. - * When the Multibuttonentry loses focus items longer than 1 lines are shrunk to one line. - * - * Smart callbacks one can register: - * - @c "item,selected" - when item is selected. May be called on backspace key. - * - @c "item,added" - when a new multibuttonentry item is added. - * - @c "item,deleted" - when a multibuttonentry item is deleted. - * - @c "item,clicked" - selected item of multibuttonentry is clicked. - * - @c "clicked" - when multibuttonentry is clicked. - * - @c "focused" - when multibuttonentry is focused. - * - @c "unfocused" - when multibuttonentry is unfocused. - * - @c "expanded" - when multibuttonentry is expanded. - * - @c "shrank" - when multibuttonentry is shrank. - * - @c "shrank,state,changed" - when shrink mode state of multibuttonentry is changed. - * - * Here is an example on its usage: - * @li @ref multibuttonentry_example - */ +/** + * @defgroup Multibuttonentry Multibuttonentry + * + * A Multibuttonentry is a widget to allow a user enter text and manage it as a number of buttons + * Each text button is inserted by pressing the "return" key. If there is no space in the current row, + * a new button is added to the next row. When a text button is pressed, it will become focused. + * Backspace removes the focus. + * When the Multibuttonentry loses focus items longer than 1 lines are shrunk to one line. + * + * Smart callbacks one can register: + * - @c "item,selected" - when item is selected. May be called on backspace key. + * - @c "item,added" - when a new multibuttonentry item is added. + * - @c "item,deleted" - when a multibuttonentry item is deleted. + * - @c "item,clicked" - selected item of multibuttonentry is clicked. + * - @c "clicked" - when multibuttonentry is clicked. + * - @c "focused" - when multibuttonentry is focused. + * - @c "unfocused" - when multibuttonentry is unfocused. + * - @c "expanded" - when multibuttonentry is expanded. + * - @c "shrank" - when multibuttonentry is shrank. + * - @c "shrank,state,changed" - when shrink mode state of multibuttonentry is changed. + * + * Here is an example on its usage: + * @li @ref multibuttonentry_example + */ - /** - * @addtogroup Multibuttonentry - * @{ - */ +/** + * @addtogroup Multibuttonentry + * @{ + */ - typedef struct _Multibuttonentry_Item Elm_Multibuttonentry_Item; - typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_callback) (Evas_Object *obj, const char *item_label, void *item_data, void *data); +typedef struct _Multibuttonentry_Item Elm_Multibuttonentry_Item; +typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_callback)(Evas_Object *obj, const char *item_label, void *item_data, void *data); - /** - * @brief Add a new multibuttonentry to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - */ - EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new multibuttonentry to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + */ +EAPI Evas_Object * + elm_multibuttonentry_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Get the label - * - * @param obj The multibuttonentry object - * @return The label, or NULL if none - * - */ - EAPI const char *elm_multibuttonentry_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label + * + * @param obj The multibuttonentry object + * @return The label, or NULL if none + * + */ +EAPI const char *elm_multibuttonentry_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the label - * - * @param obj The multibuttonentry object - * @param label The text label string - * - */ - EAPI void elm_multibuttonentry_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label + * + * @param obj The multibuttonentry object + * @param label The text label string + * + */ +EAPI void elm_multibuttonentry_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the entry of the multibuttonentry object - * - * @param obj The multibuttonentry object - * @return The entry object, or NULL if none - * - */ - EAPI Evas_Object *elm_multibuttonentry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the entry of the multibuttonentry object + * + * @param obj The multibuttonentry object + * @return The entry object, or NULL if none + * + */ +EAPI Evas_Object *elm_multibuttonentry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the guide text - * - * @param obj The multibuttonentry object - * @return The guide text, or NULL if none - * - */ - EAPI const char * elm_multibuttonentry_guide_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the guide text + * + * @param obj The multibuttonentry object + * @return The guide text, or NULL if none + * + */ +EAPI const char *elm_multibuttonentry_guide_text_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the guide text - * - * @param obj The multibuttonentry object - * @param label The guide text string - * - */ - EAPI void elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext) EINA_ARG_NONNULL(1); +/** + * Set the guide text + * + * @param obj The multibuttonentry object + * @param label The guide text string + * + */ +EAPI void elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext) EINA_ARG_NONNULL(1); - /** - * Get the value of shrink_mode state. - * - * @param obj The multibuttonentry object - * @param the value of shrink mode state. - * - */ - EAPI int elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the value of shrink_mode state. + * + * @param obj The multibuttonentry object + * @param the value of shrink mode state. + * + */ +EAPI int elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set/Unset the multibuttonentry to shrink mode state of single line - * - * @param obj The multibuttonentry object - * @param the value of shrink_mode state. set this to 1 to set the multibuttonentry to shrink state of single line. set this to 0 to unset the contracted state. - * - */ - EAPI void elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink) EINA_ARG_NONNULL(1); +/** + * Set/Unset the multibuttonentry to shrink mode state of single line + * + * @param obj The multibuttonentry object + * @param the value of shrink_mode state. set this to 1 to set the multibuttonentry to shrink state of single line. set this to 0 to unset the contracted state. + * + */ +EAPI void elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink) EINA_ARG_NONNULL(1); - /** - * Prepend a new item to the multibuttonentry - * - * @param obj The multibuttonentry object - * @param label The label of new item - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, void *data) EINA_ARG_NONNULL(1); +/** + * Prepend a new item to the multibuttonentry + * + * @param obj The multibuttonentry object + * @param label The label of new item + * @param data The ponter to the data to be attached + * @return A handle to the item added or NULL if not possible + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, void *data) EINA_ARG_NONNULL(1); - /** - * Append a new item to the multibuttonentry - * - * @param obj The multibuttonentry object - * @param label The label of new item - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, void *data) EINA_ARG_NONNULL(1); +/** + * Append a new item to the multibuttonentry + * + * @param obj The multibuttonentry object + * @param label The label of new item + * @param data The ponter to the data to be attached + * @return A handle to the item added or NULL if not possible + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, void *data) EINA_ARG_NONNULL(1); - /** - * Add a new item to the multibuttonentry before the indicated object - * - * reference. - * @param obj The multibuttonentry object - * @param before The item before which to add it - * @param label The label of new item - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Multibuttonentry_Item *before, const char *label, void *data) EINA_ARG_NONNULL(1); +/** + * Add a new item to the multibuttonentry before the indicated object + * + * reference. + * @param obj The multibuttonentry object + * @param before The item before which to add it + * @param label The label of new item + * @param data The ponter to the data to be attached + * @return A handle to the item added or NULL if not possible + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Multibuttonentry_Item *before, const char *label, void *data) EINA_ARG_NONNULL(1); - /** - * Add a new item to the multibuttonentry after the indicated object - * - * @param obj The multibuttonentry object - * @param after The item after which to add it - * @param label The label of new item - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Multibuttonentry_Item *after, const char *label, void *data) EINA_ARG_NONNULL(1); +/** + * Add a new item to the multibuttonentry after the indicated object + * + * @param obj The multibuttonentry object + * @param after The item after which to add it + * @param label The label of new item + * @param data The ponter to the data to be attached + * @return A handle to the item added or NULL if not possible + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Multibuttonentry_Item *after, const char *label, void *data) EINA_ARG_NONNULL(1); - /** - * Get a list of items in the multibuttonentry - * - * @param obj The multibuttonentry object - * @return The list of items, or NULL if none - * - */ - EAPI const Eina_List *elm_multibuttonentry_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a list of items in the multibuttonentry + * + * @param obj The multibuttonentry object + * @return The list of items, or NULL if none + * + */ +EAPI const Eina_List *elm_multibuttonentry_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the first item in the multibuttonentry - * - * @param obj The multibuttonentry object - * @return The first item, or NULL if none - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the first item in the multibuttonentry + * + * @param obj The multibuttonentry object + * @return The first item, or NULL if none + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the last item in the multibuttonentry - * - * @param obj The multibuttonentry object - * @return The last item, or NULL if none - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the last item in the multibuttonentry + * + * @param obj The multibuttonentry object + * @return The last item, or NULL if none + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the selected item in the multibuttonentry - * - * @param obj The multibuttonentry object - * @return The selected item, or NULL if none - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the selected item in the multibuttonentry + * + * @param obj The multibuttonentry object + * @return The selected item, or NULL if none + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the selected state of an item - * - * @param item The item - * @param selected if it's EINA_TRUE, select the item otherwise, unselect the item - * - */ - EAPI void elm_multibuttonentry_item_select(Elm_Multibuttonentry_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); +/** + * Set the selected state of an item + * + * @param item The item + * @param selected if it's EINA_TRUE, select the item otherwise, unselect the item + * + */ +EAPI void elm_multibuttonentry_item_select(Elm_Multibuttonentry_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); - /** - * unselect all items. - * - * @param obj The multibuttonentry object - * - */ - EAPI void elm_multibuttonentry_item_unselect_all(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * unselect all items. + * + * @param obj The multibuttonentry object + * + */ +EAPI void elm_multibuttonentry_item_unselect_all(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Delete a given item - * - * @param item The item - * - */ - EAPI void elm_multibuttonentry_item_del(Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); +/** + * Delete a given item + * + * @param item The item + * + */ +EAPI void elm_multibuttonentry_item_del(Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); - /** - * Remove all items in the multibuttonentry. - * - * @param obj The multibuttonentry object - * - */ - EAPI void elm_multibuttonentry_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove all items in the multibuttonentry. + * + * @param obj The multibuttonentry object + * + */ +EAPI void elm_multibuttonentry_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the label of a given item - * - * @param item The item - * @return The label of a given item, or NULL if none - * - */ - EAPI const char *elm_multibuttonentry_item_label_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the label of a given item + * + * @param item The item + * @return The label of a given item, or NULL if none + * + */ +EAPI const char *elm_multibuttonentry_item_label_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the label of a given item - * - * @param item The item - * @param label The text label string - * - */ - EAPI void elm_multibuttonentry_item_label_set(Elm_Multibuttonentry_Item *item, const char *str) EINA_ARG_NONNULL(1); +/** + * Set the label of a given item + * + * @param item The item + * @param label The text label string + * + */ +EAPI void elm_multibuttonentry_item_label_set(Elm_Multibuttonentry_Item *item, const char *str) EINA_ARG_NONNULL(1); - /** - * Get the previous item in the multibuttonentry - * - * @param item The item - * @return The item before the item @p item - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_prev_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the previous item in the multibuttonentry + * + * @param item The item + * @return The item before the item @p item + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_prev_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the next item in the multibuttonentry - * - * @param item The item - * @return The item after the item @p item - * - */ - EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_next_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the next item in the multibuttonentry + * + * @param item The item + * @return The item after the item @p item + * + */ +EAPI Elm_Multibuttonentry_Item *elm_multibuttonentry_item_next_get(const Elm_Multibuttonentry_Item *item) EINA_ARG_NONNULL(1); - /** - * Append a item filter function for text inserted in the Multibuttonentry - * - * Append the given callback to the list. This functions will be called - * whenever any text is inserted into the Multibuttonentry, 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 it text - * parameter to NULL. This will also prevent any following filters from being - * called. - * - * @param obj The multibuttonentryentry object - * @param func The function to use as item filter - * @param data User data to pass to @p func - * - */ - EAPI void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); +/** + * Append a item filter function for text inserted in the Multibuttonentry + * + * Append the given callback to the list. This functions will be called + * whenever any text is inserted into the Multibuttonentry, 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 it text + * parameter to NULL. This will also prevent any following filters from being + * called. + * + * @param obj The multibuttonentryentry object + * @param func The function to use as item filter + * @param data User data to pass to @p func + * + */ +EAPI void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); - /** - * Prepend a filter function for text inserted in the Multibuttentry - * - * Prepend the given callback to the list. See elm_multibuttonentry_item_filter_append() - * for more information - * - * @param obj The multibuttonentry object - * @param func The function to use as text filter - * @param data User data to pass to @p func - * - */ - EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); +/** + * Prepend a filter function for text inserted in the Multibuttentry + * + * Prepend the given callback to the list. See elm_multibuttonentry_item_filter_append() + * for more information + * + * @param obj The multibuttonentry object + * @param func The function to use as text filter + * @param data User data to pass to @p func + * + */ +EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); - /** - * Remove a filter from the list - * - * Removes the given callback from the filter list. See elm_multibuttonentry_item_filter_append() - * for more information. - * - * @param obj The multibuttonentry object - * @param func The filter function to remove - * @param data The user data passed when adding the function - * - */ - EAPI void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Remove a filter from the list + * + * Removes the given callback from the filter list. See elm_multibuttonentry_item_filter_append() + * for more information. + * + * @param obj The multibuttonentry object + * @param func The filter function to remove + * @param data The user data passed when adding the function + * + */ +EAPI void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_naviframe.h b/legacy/elementary/src/lib/elc_naviframe.h index c60384ee6c..e81a742a29 100644 --- a/legacy/elementary/src/lib/elc_naviframe.h +++ b/legacy/elementary/src/lib/elc_naviframe.h @@ -1,386 +1,387 @@ - /** - * @defgroup Naviframe Naviframe - * @ingroup Elementary - * - * @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 of the naviframe items that you can use for are: - * @li "default" - A main content of the page - * @li "icon" - An icon in the title area - * @li "prev_btn" - A button to go to the previous page - * @li "next_btn" - A button to go to the next page - * - * Default text parts of the naviframe items that you can use for are: - * @li "default" - Title label in the title area - * @li "subtitle" - Sub-title label in the title area - * - * Supported elm_object common APIs. - * @li elm_object_signal_emit - * - * Supported elm_object_item common APIs. - * @li elm_object_item_text_set - * @li elm_object_item_part_text_set - * @li elm_object_item_text_get - * @li elm_object_item_part_text_get - * @li elm_object_item_content_set - * @li elm_object_item_part_content_set - * @li elm_object_item_content_get - * @li elm_object_item_part_content_get - * @li elm_object_item_content_unset - * @li elm_object_item_part_content_unset - * @li elm_object_item_signal_emit - * - * @ref tutorial_naviframe gives a good overview of the usage of the API. - */ +/** + * @defgroup Naviframe Naviframe + * @ingroup Elementary + * + * @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 of the naviframe items that you can use for are: + * @li "default" - A main content of the page + * @li "icon" - An icon in the title area + * @li "prev_btn" - A button to go to the previous page + * @li "next_btn" - A button to go to the next page + * + * Default text parts of the naviframe items that you can use for are: + * @li "default" - Title label in the title area + * @li "subtitle" - Sub-title label in the title area + * + * Supported elm_object common APIs. + * @li elm_object_signal_emit + * + * Supported elm_object_item common APIs. + * @li elm_object_item_text_set + * @li elm_object_item_part_text_set + * @li elm_object_item_text_get + * @li elm_object_item_part_text_get + * @li elm_object_item_content_set + * @li elm_object_item_part_content_set + * @li elm_object_item_content_get + * @li elm_object_item_part_content_get + * @li elm_object_item_content_unset + * @li elm_object_item_part_content_unset + * @li elm_object_item_signal_emit + * + * @ref tutorial_naviframe gives a good overview of the usage of the API. + */ - /** - * @addtogroup Naviframe - * @{ - */ +/** + * @addtogroup Naviframe + * @{ + */ - /** - * @brief Add a new Naviframe object to the parent. - * - * @param parent Parent object - * @return New object or @c NULL, if it cannot be created - * - * @ingroup Naviframe - */ - EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new Naviframe object to the parent. + * + * @param parent Parent object + * @return New object or @c NULL, if it cannot be created + * + * @ingroup Naviframe + */ +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() - * @see also elm_naviframe_item_insert_before() - * @see also elm_naviframe_item_insert_after() - * - * The following styles are available for this item: - * @li @c "default" - * - * @ingroup Naviframe - */ - 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 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() + * @see also elm_naviframe_item_insert_before() + * @see also elm_naviframe_item_insert_after() + * + * The following styles are available for this item: + * @li @c "default" + * + * @ingroup Naviframe + */ +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 Insert a new item into the naviframe before item @p before. - * - * @param before The naviframe item to insert before. - * @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 is inserted into the naviframe straight away without any - * transition operations. This item will be deleted when it is popped. - * - * @see also elm_naviframe_item_style_set() - * @see also elm_naviframe_item_push() - * @see also elm_naviframe_item_insert_after() - * - * The following styles are available for this item: - * @li @c "default" - * - * @ingroup Naviframe - */ - EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Elm_Object_Item *before, 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 Insert a new item into the naviframe before item @p before. + * + * @param before The naviframe item to insert before. + * @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 is inserted into the naviframe straight away without any + * transition operations. This item will be deleted when it is popped. + * + * @see also elm_naviframe_item_style_set() + * @see also elm_naviframe_item_push() + * @see also elm_naviframe_item_insert_after() + * + * The following styles are available for this item: + * @li @c "default" + * + * @ingroup Naviframe + */ +EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Elm_Object_Item *before, 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 Insert a new item into the naviframe after item @p after. - * - * @param after The naviframe item to insert after. - * @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 is inserted into the naviframe straight away without any - * transition operations. This item will be deleted when it is popped. - * - * @see also elm_naviframe_item_style_set() - * @see also elm_naviframe_item_push() - * @see also elm_naviframe_item_insert_before() - * - * The following styles are available for this item: - * @li @c "default" - * - * @ingroup Naviframe - */ - EAPI Elm_Object_Item *elm_naviframe_item_insert_after(Elm_Object_Item *after, 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 Insert a new item into the naviframe after item @p after. + * + * @param after The naviframe item to insert after. + * @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 is inserted into the naviframe straight away without any + * transition operations. This item will be deleted when it is popped. + * + * @see also elm_naviframe_item_style_set() + * @see also elm_naviframe_item_push() + * @see also elm_naviframe_item_insert_before() + * + * The following styles are available for this item: + * @li @c "default" + * + * @ingroup Naviframe + */ +EAPI Elm_Object_Item *elm_naviframe_item_insert_after(Elm_Object_Item *after, 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() - * - * @ingroup Naviframe - */ - EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @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() + * + * @ingroup Naviframe + */ +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 - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Pop the items between the top and the above one on the given item. + * + * @param it The naviframe item + * + * @ingroup Naviframe + */ +EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Promote an item already in the naviframe stack to the top of the stack - * - * @param it The naviframe item - * - * This will take the indicated item and promote it to the top of the stack - * as if it had been pushed there. The item must already be inside the - * naviframe stack to work. - * - */ - EAPI void elm_naviframe_item_promote(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Promote an item already in the naviframe stack to the top of the stack + * + * @param it The naviframe item + * + * This will take the indicated item and promote it to the top of the stack + * as if it had been pushed there. The item must already be inside the + * naviframe stack to work. + * + */ +EAPI void elm_naviframe_item_promote(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Delete the given item instantly. - * - * @param it The naviframe item - * - * This just deletes the given item from the naviframe item list instantly. - * So this would not emit any signals for view transitions but just change - * the current view if the given item is a top one. - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Delete the given item instantly. + * + * @param it The naviframe item + * + * This just deletes the given item from the naviframe item list instantly. + * So this would not emit any signals for view transitions but just change + * the current view if the given item is a top one. + * + * @ingroup Naviframe + */ +EAPI void elm_naviframe_item_del(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() - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve) 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() + * + * @ingroup Naviframe + */ +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() - * - * @ingroup Naviframe - */ - EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj) 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() + * + * @ingroup Naviframe + */ +EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj) 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 - * - * @ingroup Naviframe - */ - EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj) 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 + * + * @ingroup Naviframe + */ +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 - * - * @ingroup Naviframe - */ - EAPI Elm_Object_Item *elm_naviframe_bottom_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 + * + * @ingroup Naviframe + */ +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() - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style) 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() + * + * @ingroup Naviframe + */ +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() - * - * @ingroup Naviframe - */ - EAPI const char *elm_naviframe_item_style_get(const Elm_Object_Item *it) 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() + * + * @ingroup Naviframe + */ +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() - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible) 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() + * + * @ingroup Naviframe + */ +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() - * - * @ingroup Naviframe - */ - EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it) 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() + * + * @ingroup Naviframe + */ +EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set creating prev button automatically or not - * - * @param obj The naviframe object - * @param auto_pushed If @c EINA_TRUE, the previous button(back button) will - * be created internally when you pass the @c NULL to the prev_btn - * parameter in elm_naviframe_item_push - * - * @see also elm_naviframe_item_push() - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed) EINA_ARG_NONNULL(1); +/** + * @brief Set creating prev button automatically or not + * + * @param obj The naviframe object + * @param auto_pushed If @c EINA_TRUE, the previous button(back button) will + * be created internally when you pass the @c NULL to the prev_btn + * parameter in elm_naviframe_item_push + * + * @see also elm_naviframe_item_push() + * + * @ingroup Naviframe + */ +EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed) EINA_ARG_NONNULL(1); - /** - * @brief Get a value whether prev button(back button) will be auto pushed or - * not. - * - * @param obj The naviframe object - * @return If @c EINA_TRUE, prev button will be auto pushed. - * - * @see also elm_naviframe_item_push() - * elm_naviframe_prev_btn_auto_pushed_set() - * - * @ingroup Naviframe - */ - EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get a value whether prev button(back button) will be auto pushed or + * not. + * + * @param obj The naviframe object + * @return If @c EINA_TRUE, prev button will be auto pushed. + * + * @see also elm_naviframe_item_push() + * elm_naviframe_prev_btn_auto_pushed_set() + * + * @ingroup Naviframe + */ +EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get a list of all the naviframe items. - * - * @param obj The naviframe object - * @return An Eina_Inlist* of naviframe items, #Elm_Object_Item, - * or @c NULL on failure. - * - * @ingroup Naviframe - */ - EAPI Eina_Inlist *elm_naviframe_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get a list of all the naviframe items. + * + * @param obj The naviframe object + * @return An Eina_Inlist* of naviframe items, #Elm_Object_Item, + * or @c NULL on failure. + * + * @ingroup Naviframe + */ +EAPI Eina_Inlist *elm_naviframe_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the event enabled when pushing/popping items - * - * If @c enabled is EINA_TRUE, the contents of the naviframe item will - * receives events from mouse and keyboard during view changing such as - * item push/pop. - * - * @param obj The naviframe object - * @param enabled Events are received when enabled is @c EINA_TRUE, and - * ignored otherwise. - * - * @warning Events will be blocked by calling evas_object_freeze_events_set() - * internally. So don't call the API whiling pushing/popping items. - * - * @see elm_naviframe_event_enabled_get() - * @see evas_object_freeze_events_set() - * - * @ingroup Naviframe - */ - EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); +/** + * @brief Set the event enabled when pushing/popping items + * + * If @c enabled is EINA_TRUE, the contents of the naviframe item will + * receives events from mouse and keyboard during view changing such as + * item push/pop. + * + * @param obj The naviframe object + * @param enabled Events are received when enabled is @c EINA_TRUE, and + * ignored otherwise. + * + * @warning Events will be blocked by calling evas_object_freeze_events_set() + * internally. So don't call the API whiling pushing/popping items. + * + * @see elm_naviframe_event_enabled_get() + * @see evas_object_freeze_events_set() + * + * @ingroup Naviframe + */ +EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); - /** - * @brief Get the value of event enabled status. - * - * @param obj The naviframe object - * @return EINA_TRUE, when event is enabled - * - * @see elm_naviframe_event_enabled_set() - * - * @ingroup Naviframe - */ - EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the value of event enabled status. + * + * @param obj The naviframe object + * @return EINA_TRUE, when event is enabled + * + * @see elm_naviframe_event_enabled_set() + * + * @ingroup Naviframe + */ +EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_actionslider.h b/legacy/elementary/src/lib/elm_actionslider.h index 51b39eef4a..e1db17f7c4 100644 --- a/legacy/elementary/src/lib/elm_actionslider.h +++ b/legacy/elementary/src/lib/elm_actionslider.h @@ -1,154 +1,155 @@ - /** - * @addtogroup Actionslider Actionslider - * - * @image html img/widget/actionslider/preview-00.png - * @image latex img/widget/actionslider/preview-00.eps - * - * An actionslider is a switcher for 2 or 3 labels with customizable magnet - * properties. The user drags and releases the indicator, to choose a label. - * - * Labels occupy the following positions. - * a. Left - * b. Right - * c. Center - * - * Positions can be enabled or disabled. - * - * Magnets can be set on the above positions. - * - * When the indicator is released, it will move to its nearest "enabled and magnetized" position. - * - * @note By default all positions are set as enabled. - * - * Signals that you can add callbacks for are: - * - * "selected" - when user selects an enabled position (the label is passed - * as event info)". - * @n - * "pos_changed" - when the indicator reaches any of the positions("left", - * "right" or "center"). - * - * See an example of actionslider usage @ref actionslider_example_page "here" - * @{ - */ - typedef enum _Elm_Actionslider_Pos - { - ELM_ACTIONSLIDER_NONE = 0, - ELM_ACTIONSLIDER_LEFT = 1 << 0, - ELM_ACTIONSLIDER_CENTER = 1 << 1, - ELM_ACTIONSLIDER_RIGHT = 1 << 2, - ELM_ACTIONSLIDER_ALL = (1 << 3) -1 - } Elm_Actionslider_Pos; +/** + * @addtogroup Actionslider Actionslider + * + * @image html img/widget/actionslider/preview-00.png + * @image latex img/widget/actionslider/preview-00.eps + * + * An actionslider is a switcher for 2 or 3 labels with customizable magnet + * properties. The user drags and releases the indicator, to choose a label. + * + * Labels occupy the following positions. + * a. Left + * b. Right + * c. Center + * + * Positions can be enabled or disabled. + * + * Magnets can be set on the above positions. + * + * When the indicator is released, it will move to its nearest "enabled and magnetized" position. + * + * @note By default all positions are set as enabled. + * + * Signals that you can add callbacks for are: + * + * "selected" - when user selects an enabled position (the label is passed + * as event info)". + * @n + * "pos_changed" - when the indicator reaches any of the positions("left", + * "right" or "center"). + * + * See an example of actionslider usage @ref actionslider_example_page "here" + * @{ + */ +typedef enum _Elm_Actionslider_Pos +{ + ELM_ACTIONSLIDER_NONE = 0, + ELM_ACTIONSLIDER_LEFT = 1 << 0, + ELM_ACTIONSLIDER_CENTER = 1 << 1, + ELM_ACTIONSLIDER_RIGHT = 1 << 2, + ELM_ACTIONSLIDER_ALL = (1 << 3) - 1 +} Elm_Actionslider_Pos; - /** - * Add a new actionslider to the parent. - * - * @param parent The parent object - * @return The new actionslider object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_actionslider_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new actionslider to the parent. + * + * @param parent The parent object + * @return The new actionslider object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_actionslider_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set actionslider labels. - * - * @param obj The actionslider object - * @param left_label The label to be set on the left. - * @param center_label The label to be set on the center. - * @param right_label The label to be set on the right. - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_actionslider_labels_set(Evas_Object *obj, const char *left_label, const char *center_label, const char *right_label) EINA_ARG_NONNULL(1); +/** + * Set actionslider labels. + * + * @param obj The actionslider object + * @param left_label The label to be set on the left. + * @param center_label The label to be set on the center. + * @param right_label The label to be set on the right. + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_actionslider_labels_set(Evas_Object *obj, const char *left_label, const char *center_label, const char *right_label) EINA_ARG_NONNULL(1); - /** - * Get actionslider labels. - * - * @param obj The actionslider object - * @param left_label A char** to place the left_label of @p obj into. - * @param center_label A char** to place the center_label of @p obj into. - * @param right_label A char** to place the right_label of @p obj into. - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1); +/** + * Get actionslider labels. + * + * @param obj The actionslider object + * @param left_label A char** to place the left_label of @p obj into. + * @param center_label A char** to place the center_label of @p obj into. + * @param right_label A char** to place the right_label of @p obj into. + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_actionslider_labels_get(const Evas_Object *obj, const char **left_label, const char **center_label, const char **right_label) EINA_ARG_NONNULL(1); - /** - * Get actionslider selected label. - * - * @param obj The actionslider object - * @return The selected label - */ - EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get actionslider selected label. + * + * @param obj The actionslider object + * @return The selected label + */ +EAPI const char *elm_actionslider_selected_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set actionslider indicator position. - * - * @param obj The actionslider object. - * @param pos The position of the indicator. - */ - EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); +/** + * Set actionslider indicator position. + * + * @param obj The actionslider object. + * @param pos The position of the indicator. + */ +EAPI void elm_actionslider_indicator_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); - /** - * Get actionslider indicator position. - * - * @param obj The actionslider object. - * @return The position of the indicator. - */ - EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get actionslider indicator position. + * + * @param obj The actionslider object. + * @return The position of the indicator. + */ +EAPI Elm_Actionslider_Pos elm_actionslider_indicator_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set actionslider magnet position. To make multiple positions magnets @c or - * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT) - * - * @param obj The actionslider object. - * @param pos Bit mask indicating the magnet positions. - */ - EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); +/** + * Set actionslider magnet position. To make multiple positions magnets @c or + * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT) + * + * @param obj The actionslider object. + * @param pos Bit mask indicating the magnet positions. + */ +EAPI void elm_actionslider_magnet_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); - /** - * Get actionslider magnet position. - * - * @param obj The actionslider object. - * @return The positions with magnet property. - */ - EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get actionslider magnet position. + * + * @param obj The actionslider object. + * @return The positions with magnet property. + */ +EAPI Elm_Actionslider_Pos elm_actionslider_magnet_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set actionslider enabled position. To set multiple positions as enabled @c or - * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT). - * - * @note All the positions are enabled by default. - * - * @param obj The actionslider object. - * @param pos Bit mask indicating the enabled positions. - */ - EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); +/** + * Set actionslider enabled position. To set multiple positions as enabled @c or + * them together(e.g.: ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT). + * + * @note All the positions are enabled by default. + * + * @param obj The actionslider object. + * @param pos Bit mask indicating the enabled positions. + */ +EAPI void elm_actionslider_enabled_pos_set(Evas_Object *obj, Elm_Actionslider_Pos pos) EINA_ARG_NONNULL(1); - /** - * Get actionslider enabled position. - * - * @param obj The actionslider object. - * @return The enabled positions. - */ - EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get actionslider enabled position. + * + * @param obj The actionslider object. + * @return The enabled positions. + */ +EAPI Elm_Actionslider_Pos elm_actionslider_enabled_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the label used on the indicator. - * - * @param obj The actionslider object - * @param label The label to be set on the indicator. - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label used on the indicator. + * + * @param obj The actionslider object + * @param label The label to be set on the indicator. + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_actionslider_indicator_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label used on the indicator object. - * - * @param obj The actionslider object - * @return The indicator label - * @deprecated use elm_object_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the label used on the indicator object. + * + * @param obj The actionslider object + * @return The indicator label + * @deprecated use elm_object_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_actionslider_indicator_label_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_app.h b/legacy/elementary/src/lib/elm_app.h index e3b1c58990..1e5158c182 100644 --- a/legacy/elementary/src/lib/elm_app.h +++ b/legacy/elementary/src/lib/elm_app.h @@ -1,194 +1,193 @@ - /** - * Provide information in order to make Elementary determine the @b - * run time location of the software in question, so other data files - * such as images, sound files, executable utilities, libraries, - * modules and locale files can be found. - * - * @param mainfunc This is your application's main function name, - * whose binary's location is to be found. Providing @c NULL - * will make Elementary not to use it - * @param dom This will be used as the application's "domain", in the - * form of a prefix to any environment variables that may - * override prefix detection and the directory name, inside the - * standard share or data directories, where the software's - * data files will be looked for. - * @param checkfile This is an (optional) magic file's path to check - * for existence (and it must be located in the data directory, - * under the share directory provided above). Its presence will - * help determine the prefix found was correct. Pass @c NULL if - * the check is not to be done. - * - * This function allows one to re-locate the application somewhere - * else after compilation, if the developer wishes for easier - * distribution of pre-compiled binaries. - * - * The prefix system is designed to locate where the given software is - * installed (under a common path prefix) at run time and then report - * specific locations of this prefix and common directories inside - * this prefix like the binary, library, data and locale directories, - * through the @c elm_app_*_get() family of functions. - * - * Call elm_app_info_set() early on before you change working - * directory or anything about @c argv[0], so it gets accurate - * information. - * - * It will then try and trace back which file @p mainfunc comes from, - * if provided, to determine the application's prefix directory. - * - * The @p dom parameter provides a string prefix to prepend before - * environment variables, allowing a fallback to @b specific - * environment variables to locate the software. You would most - * probably provide a lowercase string there, because it will also - * serve as directory domain, explained next. For environment - * variables purposes, this string is made uppercase. For example if - * @c "myapp" is provided as the prefix, then the program would expect - * @c "MYAPP_PREFIX" as a master environment variable to specify the - * exact install prefix for the software, or more specific environment - * variables like @c "MYAPP_BIN_DIR", @c "MYAPP_LIB_DIR", @c - * "MYAPP_DATA_DIR" and @c "MYAPP_LOCALE_DIR", which could be set by - * the user or scripts before launching. If not provided (@c NULL), - * environment variables will not be used to override compiled-in - * defaults or auto detections. - * - * The @p dom string also provides a subdirectory inside the system - * shared data directory for data files. For example, if the system - * directory is @c /usr/local/share, then this directory name is - * appended, creating @c /usr/local/share/myapp, if it @p was @c - * "myapp". It is expected that the application installs data files in - * this directory. - * - * The @p checkfile is a file name or path of something inside the - * share or data directory to be used to test that the prefix - * detection worked. For example, your app will install a wallpaper - * image as @c /usr/local/share/myapp/images/wallpaper.jpg and so to - * check that this worked, provide @c "images/wallpaper.jpg" as the @p - * checkfile string. - * - * @see elm_app_compile_bin_dir_set() - * @see elm_app_compile_lib_dir_set() - * @see elm_app_compile_data_dir_set() - * @see elm_app_compile_locale_set() - * @see elm_app_prefix_dir_get() - * @see elm_app_bin_dir_get() - * @see elm_app_lib_dir_get() - * @see elm_app_data_dir_get() - * @see elm_app_locale_dir_get() - */ - EAPI void elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile); +/** + * Provide information in order to make Elementary determine the @b + * run time location of the software in question, so other data files + * such as images, sound files, executable utilities, libraries, + * modules and locale files can be found. + * + * @param mainfunc This is your application's main function name, + * whose binary's location is to be found. Providing @c NULL + * will make Elementary not to use it + * @param dom This will be used as the application's "domain", in the + * form of a prefix to any environment variables that may + * override prefix detection and the directory name, inside the + * standard share or data directories, where the software's + * data files will be looked for. + * @param checkfile This is an (optional) magic file's path to check + * for existence (and it must be located in the data directory, + * under the share directory provided above). Its presence will + * help determine the prefix found was correct. Pass @c NULL if + * the check is not to be done. + * + * This function allows one to re-locate the application somewhere + * else after compilation, if the developer wishes for easier + * distribution of pre-compiled binaries. + * + * The prefix system is designed to locate where the given software is + * installed (under a common path prefix) at run time and then report + * specific locations of this prefix and common directories inside + * this prefix like the binary, library, data and locale directories, + * through the @c elm_app_*_get() family of functions. + * + * Call elm_app_info_set() early on before you change working + * directory or anything about @c argv[0], so it gets accurate + * information. + * + * It will then try and trace back which file @p mainfunc comes from, + * if provided, to determine the application's prefix directory. + * + * The @p dom parameter provides a string prefix to prepend before + * environment variables, allowing a fallback to @b specific + * environment variables to locate the software. You would most + * probably provide a lowercase string there, because it will also + * serve as directory domain, explained next. For environment + * variables purposes, this string is made uppercase. For example if + * @c "myapp" is provided as the prefix, then the program would expect + * @c "MYAPP_PREFIX" as a master environment variable to specify the + * exact install prefix for the software, or more specific environment + * variables like @c "MYAPP_BIN_DIR", @c "MYAPP_LIB_DIR", @c + * "MYAPP_DATA_DIR" and @c "MYAPP_LOCALE_DIR", which could be set by + * the user or scripts before launching. If not provided (@c NULL), + * environment variables will not be used to override compiled-in + * defaults or auto detections. + * + * The @p dom string also provides a subdirectory inside the system + * shared data directory for data files. For example, if the system + * directory is @c /usr/local/share, then this directory name is + * appended, creating @c /usr/local/share/myapp, if it @p was @c + * "myapp". It is expected that the application installs data files in + * this directory. + * + * The @p checkfile is a file name or path of something inside the + * share or data directory to be used to test that the prefix + * detection worked. For example, your app will install a wallpaper + * image as @c /usr/local/share/myapp/images/wallpaper.jpg and so to + * check that this worked, provide @c "images/wallpaper.jpg" as the @p + * checkfile string. + * + * @see elm_app_compile_bin_dir_set() + * @see elm_app_compile_lib_dir_set() + * @see elm_app_compile_data_dir_set() + * @see elm_app_compile_locale_set() + * @see elm_app_prefix_dir_get() + * @see elm_app_bin_dir_get() + * @see elm_app_lib_dir_get() + * @see elm_app_data_dir_get() + * @see elm_app_locale_dir_get() + */ +EAPI void elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile); - /** - * Provide information on the @b fallback application's binaries - * directory, in scenarios where they get overriden by - * elm_app_info_set(). - * - * @param dir The path to the default binaries directory (compile time - * one) - * - * @note Elementary will as well use this path to determine actual - * names of binaries' directory paths, maybe changing it to be @c - * something/local/bin instead of @c something/bin, only, for - * example. - * - * @warning You should call this function @b before - * elm_app_info_set(). - */ - EAPI void elm_app_compile_bin_dir_set(const char *dir); +/** + * Provide information on the @b fallback application's binaries + * directory, in scenarios where they get overriden by + * elm_app_info_set(). + * + * @param dir The path to the default binaries directory (compile time + * one) + * + * @note Elementary will as well use this path to determine actual + * names of binaries' directory paths, maybe changing it to be @c + * something/local/bin instead of @c something/bin, only, for + * example. + * + * @warning You should call this function @b before + * elm_app_info_set(). + */ +EAPI void elm_app_compile_bin_dir_set(const char *dir); - /** - * Provide information on the @b fallback application's libraries - * directory, on scenarios where they get overriden by - * elm_app_info_set(). - * - * @param dir The path to the default libraries directory (compile - * time one) - * - * @note Elementary will as well use this path to determine actual - * names of libraries' directory paths, maybe changing it to be @c - * something/lib32 or @c something/lib64 instead of @c something/lib, - * only, for example. - * - * @warning You should call this function @b before - * elm_app_info_set(). - */ - EAPI void elm_app_compile_lib_dir_set(const char *dir); +/** + * Provide information on the @b fallback application's libraries + * directory, on scenarios where they get overriden by + * elm_app_info_set(). + * + * @param dir The path to the default libraries directory (compile + * time one) + * + * @note Elementary will as well use this path to determine actual + * names of libraries' directory paths, maybe changing it to be @c + * something/lib32 or @c something/lib64 instead of @c something/lib, + * only, for example. + * + * @warning You should call this function @b before + * elm_app_info_set(). + */ +EAPI void elm_app_compile_lib_dir_set(const char *dir); - /** - * Provide information on the @b fallback application's data - * directory, on scenarios where they get overriden by - * elm_app_info_set(). - * - * @param dir The path to the default data directory (compile time - * one) - * - * @note Elementary will as well use this path to determine actual - * names of data directory paths, maybe changing it to be @c - * something/local/share instead of @c something/share, only, for - * example. - * - * @warning You should call this function @b before - * elm_app_info_set(). - */ - EAPI void elm_app_compile_data_dir_set(const char *dir); +/** + * Provide information on the @b fallback application's data + * directory, on scenarios where they get overriden by + * elm_app_info_set(). + * + * @param dir The path to the default data directory (compile time + * one) + * + * @note Elementary will as well use this path to determine actual + * names of data directory paths, maybe changing it to be @c + * something/local/share instead of @c something/share, only, for + * example. + * + * @warning You should call this function @b before + * elm_app_info_set(). + */ +EAPI void elm_app_compile_data_dir_set(const char *dir); - /** - * Provide information on the @b fallback application's locale - * directory, on scenarios where they get overriden by - * elm_app_info_set(). - * - * @param dir The path to the default locale directory (compile time - * one) - * - * @warning You should call this function @b before - * elm_app_info_set(). - */ - EAPI void elm_app_compile_locale_set(const char *dir); +/** + * Provide information on the @b fallback application's locale + * directory, on scenarios where they get overriden by + * elm_app_info_set(). + * + * @param dir The path to the default locale directory (compile time + * one) + * + * @warning You should call this function @b before + * elm_app_info_set(). + */ +EAPI void elm_app_compile_locale_set(const char *dir); - /** - * Retrieve the application's run time prefix directory, as set by - * elm_app_info_set() and the way (environment) the application was - * run from. - * - * @return The directory prefix the application is actually using. - */ - EAPI const char *elm_app_prefix_dir_get(void); +/** + * Retrieve the application's run time prefix directory, as set by + * elm_app_info_set() and the way (environment) the application was + * run from. + * + * @return The directory prefix the application is actually using. + */ +EAPI const char *elm_app_prefix_dir_get(void); - /** - * Retrieve the application's run time binaries prefix directory, as - * set by elm_app_info_set() and the way (environment) the application - * was run from. - * - * @return The binaries directory prefix the application is actually - * using. - */ - EAPI const char *elm_app_bin_dir_get(void); +/** + * Retrieve the application's run time binaries prefix directory, as + * set by elm_app_info_set() and the way (environment) the application + * was run from. + * + * @return The binaries directory prefix the application is actually + * using. + */ +EAPI const char *elm_app_bin_dir_get(void); - /** - * Retrieve the application's run time libraries prefix directory, as - * set by elm_app_info_set() and the way (environment) the application - * was run from. - * - * @return The libraries directory prefix the application is actually - * using. - */ - EAPI const char *elm_app_lib_dir_get(void); +/** + * Retrieve the application's run time libraries prefix directory, as + * set by elm_app_info_set() and the way (environment) the application + * was run from. + * + * @return The libraries directory prefix the application is actually + * using. + */ +EAPI const char *elm_app_lib_dir_get(void); - /** - * Retrieve the application's run time data prefix directory, as - * set by elm_app_info_set() and the way (environment) the application - * was run from. - * - * @return The data directory prefix the application is actually - * using. - */ - EAPI const char *elm_app_data_dir_get(void); - - /** - * Retrieve the application's run time locale prefix directory, as - * set by elm_app_info_set() and the way (environment) the application - * was run from. - * - * @return The locale directory prefix the application is actually - * using. - */ - EAPI const char *elm_app_locale_dir_get(void); +/** + * Retrieve the application's run time data prefix directory, as + * set by elm_app_info_set() and the way (environment) the application + * was run from. + * + * @return The data directory prefix the application is actually + * using. + */ +EAPI const char *elm_app_data_dir_get(void); +/** + * Retrieve the application's run time locale prefix directory, as + * set by elm_app_info_set() and the way (environment) the application + * was run from. + * + * @return The locale directory prefix the application is actually + * using. + */ +EAPI const char *elm_app_locale_dir_get(void); diff --git a/legacy/elementary/src/lib/elm_authors.h b/legacy/elementary/src/lib/elm_authors.h new file mode 100644 index 0000000000..c07cd4055c --- /dev/null +++ b/legacy/elementary/src/lib/elm_authors.h @@ -0,0 +1,61 @@ +/** + * @page authors Authors + * @author Carsten Haitzler + * @author Gustavo Sverzut Barbieri + * @author Cedric Bail + * @author Vincent Torri + * @author Daniel Kolesa + * @author Jaime Thomas + * @author Swisscom - http://www.swisscom.ch/ + * @author Christopher Michael + * @author Marco Trevisan (Treviño) + * @author Michael Bouchaud + * @author Jonathan Atton (Watchwolf) + * @author Brian Wang + * @author Mike Blumenkrantz (discomfitor/zmike) + * @author Samsung Electronics tbd + * @author Samsung SAIT tbd + * @author Brett Nash + * @author Bruno Dilly + * @author Rafael Fonseca + * @author Chuneon Park + * @author Woohyun Jung + * @author Jaehwan Kim + * @author Wonguk Jeong + * @author Leandro A. F. Pereira + * @author Helen Fornazier + * @author Gustavo Lima Chaves + * @author Fabiano Fidêncio + * @author Tiago Falcão + * @author Otavio Pontes + * @author Viktor Kojouharov + * @author Daniel Juyung Seo (SeoZ) + * @author Sangho Park + * @author Rajeev Ranjan (Rajeev) + * @author Seunggyun Kim + * @author Sohyun Kim + * @author Jihoon Kim + * @author Jeonghyun Yun (arosis) + * @author Tom Hacohen + * @author Aharon Hillel + * @author Jonathan Atton (Watchwolf) + * @author Shinwoo Kim + * @author Govindaraju SM + * @author Prince Kumar Dubey + * @author Sung W. Park + * @author Thierry el Borgi + * @author Shilpa Singh + * @author Chanwook Jung + * @author Hyoyoung Chang + * @author Guillaume "Kuri" Friloux + * @author Kim Yunhan + * @author Bluezery + * @author Nicolas Aguirre + * @author Sanjeev BA + * @author Hyunsil Park + * @author Goun Lee + * @author Mikael Sans + * + * Please contact to get in + * contact with the developers and maintainers. + */ diff --git a/legacy/elementary/src/lib/elm_bg.h b/legacy/elementary/src/lib/elm_bg.h index 4e446a9ab8..cfdebaa3cb 100644 --- a/legacy/elementary/src/lib/elm_bg.h +++ b/legacy/elementary/src/lib/elm_bg.h @@ -1,190 +1,191 @@ - /** - * @defgroup Bg Bg - * - * @image html img/widget/bg/preview-00.png - * @image latex img/widget/bg/preview-00.eps - * - * @brief Background object, used for setting a solid color, image or Edje - * group as background to a window or any container object. - * - * 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. - * - * Default contents parts of the bg widget that you can use for are: - * @li "overlay" - overlay of the bg - * - * 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 - */ +/** + * @defgroup Bg Bg + * + * @image html img/widget/bg/preview-00.png + * @image latex img/widget/bg/preview-00.eps + * + * @brief Background object, used for setting a solid color, image or Edje + * group as background to a window or any container object. + * + * 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. + * + * Default contents parts of the bg widget that you can use for are: + * @li "overlay" - overlay of the bg + * + * 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 + */ - /* 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; +/* 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; - /** - * Add a new background to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Bg - */ - EAPI Evas_Object *elm_bg_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new background to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Bg + */ +EAPI Evas_Object * + elm_bg_add(Evas_Object *parent) +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 - * - * 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. - * - * @note Once the image of @p obj is set, a previously set one will be deleted, - * even if @p file is NULL. - * - * @ingroup Bg - */ - EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) 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 + * + * 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. + * + * @note Once the image of @p obj is set, a previously set one will be deleted, + * even if @p file is NULL. + * + * @ingroup Bg + */ +EAPI void elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1); - /** - * Get 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 - * - * @ingroup Bg - */ - EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1); +/** + * Get 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 + * + * @ingroup Bg + */ +EAPI void elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1); - /** - * Set the option used for the background image - * - * @param obj The bg object - * @param option The desired background option (TILE, SCALE) - * - * This sets the option used for manipulating the display of the background - * image. The image can be tiled or scaled. - * - * @ingroup Bg - */ - EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) EINA_ARG_NONNULL(1); +/** + * Set the option used for the background image + * + * @param obj The bg object + * @param option The desired background option (TILE, SCALE) + * + * This sets the option used for manipulating the display of the background + * image. The image can be tiled or scaled. + * + * @ingroup Bg + */ +EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option) EINA_ARG_NONNULL(1); - /** - * Get the option used for the background image - * - * @param obj The bg object - * @return The desired background option (CENTER, SCALE, STRETCH or TILE) - * - * @ingroup Bg - */ - EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the option used for the background color - * - * @param obj The bg object - * @param r - * @param g - * @param b - * - * This sets the color used for the background rectangle. Its range goes - * from 0 to 255. - * - * @ingroup Bg - */ - EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b) EINA_ARG_NONNULL(1); - /** - * Get the option used for the background color - * - * @param obj The bg object - * @param r - * @param g - * @param b - * - * @ingroup Bg - */ - EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b) EINA_ARG_NONNULL(1); +/** + * Get the option used for the background image + * + * @param obj The bg object + * @return The desired background option (CENTER, SCALE, STRETCH or TILE) + * + * @ingroup Bg + */ +EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Set the option used for the background color + * + * @param obj The bg object + * @param r + * @param g + * @param b + * + * This sets the color used for the background rectangle. Its range goes + * from 0 to 255. + * + * @ingroup Bg + */ +EAPI void elm_bg_color_set(Evas_Object *obj, int r, int g, int b) EINA_ARG_NONNULL(1); +/** + * Get the option used for the background color + * + * @param obj The bg object + * @param r + * @param g + * @param b + * + * @ingroup Bg + */ +EAPI void elm_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b) EINA_ARG_NONNULL(1); - /** - * Set the overlay object used for the background object. - * - * @param obj The bg object - * @param overlay The overlay object - * - * 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. - * - * @deprecated use elm_object_part_content_set() instead - * - * @ingroup Bg - */ +/** + * Set the overlay object used for the background object. + * + * @param obj The bg object + * @param overlay The overlay object + * + * 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. + * + * @deprecated use elm_object_part_content_set() instead + * + * @ingroup Bg + */ - EINA_DEPRECATED EAPI void elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_bg_overlay_set(Evas_Object *obj, Evas_Object *overlay) 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 - * - * @deprecated use elm_object_part_content_get() instead - * - * @ingroup Bg - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bg_overlay_get(const Evas_Object *obj) 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 + * + * @deprecated use elm_object_part_content_get() instead + * + * @ingroup Bg + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bg_overlay_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the overlay object used for the background object. - * - * @param obj The bg object - * @return The content that was being used - * - * Unparent and return the overlay object which was set for this widget - * - * @deprecated use elm_object_part_content_unset() instead - * - * @ingroup Bg - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bg_overlay_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the overlay object used for the background object. + * + * @param obj The bg object + * @return The content that was being used + * + * Unparent and return the overlay object which was set for this widget + * + * @deprecated use elm_object_part_content_unset() instead + * + * @ingroup Bg + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bg_overlay_unset(Evas_Object *obj) 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. - * - * 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 void elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) 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. + * + * 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 void elm_bg_load_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_box.h b/legacy/elementary/src/lib/elm_box.h index d3e4513c11..2e0517a881 100644 --- a/legacy/elementary/src/lib/elm_box.h +++ b/legacy/elementary/src/lib/elm_box.h @@ -1,453 +1,454 @@ - /** - * @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. - * - * 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. - * - * 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. - * - * 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. - * - * 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. - * - * 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 Objects should not be added to box objects using _add() calls. - * - * Some examples on how to use boxes follow: - * @li @ref box_example_01 - * @li @ref box_example_02 - * - * @{ - */ - /** - * @typedef Elm_Box_Transition - * - * Opaque handler containing the parameters to perform an animated - * transition of the layout the box uses. - * - * @see elm_box_transition_new() - * @see elm_box_layout_set() - * @see elm_box_layout_transition() - */ - typedef struct _Elm_Box_Transition Elm_Box_Transition; +/** + * @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. + * + * 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. + * + * 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. + * + * 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. + * + * 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. + * + * 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 Objects should not be added to box objects using _add() calls. + * + * Some examples on how to use boxes follow: + * @li @ref box_example_01 + * @li @ref box_example_02 + * + * @{ + */ +/** + * @typedef Elm_Box_Transition + * + * Opaque handler containing the parameters to perform an animated + * transition of the layout the box uses. + * + * @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 - * - * By default, the box will be in vertical mode and non-homogeneous. - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_box_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new box to the parent + * + * By default, the box will be in vertical mode and non-homogeneous. + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_box_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * 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. - * - * @note This flag is ignored if a custom layout function is set. - * - * @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); +/** + * 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. + * + * @note This flag is ignored if a custom layout function is set. + * + * @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 - * - * @param obj The box object - * @return EINA_TRUE if the box is set to horizontal mode, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the horizontal orientation + * + * @param obj The box object + * @return EINA_TRUE if the box is set to horizontal mode, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the box to arrange its children homogeneously - * - * If enabled, homogeneous layout makes all items the same size, according - * to the size of the largest of its children. - * - * @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_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); +/** + * Set the box to arrange its children homogeneously + * + * If enabled, homogeneous layout makes all items the same size, according + * to the size of the largest of its children. + * + * @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_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); - /** - * Get whether the box is using homogeneous mode or not - * - * @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); +/** + * Get whether the box is using homogeneous mode or not + * + * @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); - /** - * Add an object to the beginning of the pack list - * - * 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. - * - * @param obj The box object - * @param subobj The object to add to the box - * - * @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_box_pack_start(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); +/** + * Add an object to the beginning of the pack list + * + * 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. + * + * @param obj The box object + * @param subobj The object to add to the box + * + * @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_box_pack_start(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); - /** - * Add an object at the end of the pack list - * - * 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 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); +/** + * Add an object at the end of the pack list + * + * 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 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); - /** - * Adds an object to the box before the indicated 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 box object - * @param subobj The object to add to the box - * @param before The object before which to add it - * - * @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); +/** + * Adds an object to the box before the indicated 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 box object + * @param subobj The object to add to the box + * @param before The object before which to add it + * + * @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); - /** - * Adds an object to the box after the indicated 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 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 void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1); +/** + * Adds an object to the box after the indicated 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 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 void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) EINA_ARG_NONNULL(1); - /** - * Clear the box of all children - * - * Remove all the elements contained by the box, deleting the respective - * objects. - * - * @param obj The box object - * - * @see elm_box_unpack() - * @see elm_box_unpack_all() - */ - EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Clear the box of all children + * + * Remove all the elements contained by the box, deleting the respective + * objects. + * + * @param obj The box object + * + * @see elm_box_unpack() + * @see elm_box_unpack_all() + */ +EAPI void elm_box_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unpack a box item - * - * Remove the object given by @p subobj from the box @p obj without - * deleting it. - * - * @param obj The box object - * - * @see elm_box_unpack_all() - * @see elm_box_clear() - */ - EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); +/** + * Unpack a box item + * + * Remove the object given by @p subobj from the box @p obj without + * deleting it. + * + * @param obj The box object + * + * @see elm_box_unpack_all() + * @see elm_box_clear() + */ +EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); - /** - * Remove all items from the box, without deleting them - * - * 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 box object - * - * @see elm_box_clear() - * @see elm_box_unpack() - */ - EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove all items from the box, without deleting them + * + * 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 box object + * + * @see elm_box_clear() + * @see elm_box_unpack() + */ +EAPI void elm_box_unpack_all(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Retrieve a list of the objects packed into the box - * - * 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. - * - * You must free this list with eina_list_free() once you are done with it. - * - * @param obj The box object - */ - EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve a list of the objects packed into the box + * + * 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. + * + * You must free this list with eina_list_free() once you are done with it. + * + * @param obj The box object + */ +EAPI const Eina_List *elm_box_children_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the space (padding) between the box's elements. - * - * 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 box object - * @param horizontal The horizontal space between elements - * @param vertical The vertical space between elements - */ - EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); +/** + * Set the space (padding) between the box's elements. + * + * 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 box object + * @param horizontal The horizontal space between elements + * @param vertical The vertical space between elements + */ +EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); - /** - * Get the space (padding) between the box's elements. - * - * @param obj The box object - * @param horizontal The horizontal space between elements - * @param vertical The vertical space between elements - * - * @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); +/** + * Get the space (padding) between the box's elements. + * + * @param obj The box object + * @param horizontal The horizontal space between elements + * @param vertical The vertical space between elements + * + * @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. - * - * 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. - * - * @param obj The box object - * @param horizontal The horizontal alignment of elements - * @param vertical The vertical alignment of elements - */ - EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical) EINA_ARG_NONNULL(1); +/** + * Set the alignment of the whole bouding box of contents. + * + * 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. + * + * @param obj The box object + * @param horizontal The horizontal alignment of elements + * @param vertical The vertical alignment of elements + */ +EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical) EINA_ARG_NONNULL(1); - /** - * Get the alignment of the whole bouding box of contents. - * - * @param obj The box object - * @param horizontal The horizontal alignment of elements - * @param vertical The vertical alignment of elements - * - * @see elm_box_align_set() - */ - EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); +/** + * Get the alignment of the whole bouding box of contents. + * + * @param obj The box object + * @param horizontal The horizontal alignment of elements + * @param vertical The vertical alignment of elements + * + * @see elm_box_align_set() + */ +EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); - /** - * Force the box to recalculate its children packing. - * - * 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. - * - * @param obj The box object. - */ - EAPI void elm_box_recalculate(Evas_Object *obj); +/** + * Force the box to recalculate its children packing. + * + * 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. + * + * @param obj The box object. + */ +EAPI void elm_box_recalculate(Evas_Object *obj); - /** - * Set the layout defining function to be used by the box - * - * 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. - * - * 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(). - * - * 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. - * - * Setting @p cb to NULL will revert back to the default layout function. - * - * @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_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1); +/** + * Set the layout defining function to be used by the box + * + * 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. + * + * 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(). + * + * 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. + * + * Setting @p cb to NULL will revert back to the default layout function. + * + * @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_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) 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. - * - * 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_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data); +/** + * 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. + * + * 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_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data); - /** - * 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(). - * - * 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 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 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); +/** + * 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(). + * + * 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 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 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); - /** - * Free a Elm_Box_Transition instance created with elm_box_transition_new(). - * - * This function is mostly useful as the @c free_data parameter in - * elm_box_layout_set() when elm_box_layout_transition(). - * - * @param data The Elm_Box_Transition instance to be freed. - * - * @see elm_box_transition_new - * @see elm_box_layout_transition - */ - EAPI void elm_box_transition_free(void *data); - - /** - * @} - */ +/** + * Free a Elm_Box_Transition instance created with elm_box_transition_new(). + * + * This function is mostly useful as the @c free_data parameter in + * elm_box_layout_set() when elm_box_layout_transition(). + * + * @param data The Elm_Box_Transition instance to be freed. + * + * @see elm_box_transition_new + * @see elm_box_layout_transition + */ +EAPI void elm_box_transition_free(void *data); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_bubble.h b/legacy/elementary/src/lib/elm_bubble.h index 1140185d0e..25385f2b92 100644 --- a/legacy/elementary/src/lib/elm_bubble.h +++ b/legacy/elementary/src/lib/elm_bubble.h @@ -1,218 +1,219 @@ - /** - * @defgroup Bubble Bubble - * - * @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 - * - * @brief The Bubble is a widget to show text similar to how speech is - * represented in comics. - * - * The bubble widget contains 5 important visual elements: - * @li The frame is a rectangle with rounded edjes 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. - * - * 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" - * - * Signals that you can add callbacks for are: - * @li "clicked" - This is called when a user has clicked the bubble. - * - * Default contents parts of the bubble that you can use for are: - * @li "default" - A content of the bubble - * @li "icon" - An icon of the bubble - * - * Default text parts of the button widget that you can use for are: - * @li NULL - Label of the bubble - * - * For an example of using a buble see @ref bubble_01_example_page "this". - * - * @{ - */ +/** + * @defgroup Bubble Bubble + * + * @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 + * + * @brief The Bubble is a widget to show text similar to how speech is + * represented in comics. + * + * The bubble widget contains 5 important visual elements: + * @li The frame is a rectangle with rounded edjes 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. + * + * 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" + * + * Signals that you can add callbacks for are: + * @li "clicked" - This is called when a user has clicked the bubble. + * + * Default contents parts of the bubble that you can use for are: + * @li "default" - A content of the bubble + * @li "icon" - An icon of the bubble + * + * Default text parts of the button widget that you can use for are: + * @li NULL - Label of the bubble + * + * For an example of using a buble see @ref bubble_01_example_page "this". + * + * @{ + */ - /** - * Add a new bubble to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * 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); +/** + * Add a new bubble to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * 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 - * - * @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. - */ - EINA_DEPRECATED EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label of the bubble + * + * @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. + */ +EINA_DEPRECATED EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label of the bubble - * - * @param obj The bubble object - * @return The string of set in the label - * - * This function gets the title of the bubble. - * @deprecated use elm_object_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label of the bubble + * + * @param obj The bubble object + * @return The string of set in the label + * + * This function gets the title of the bubble. + * @deprecated use elm_object_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_bubble_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the info of the bubble - * - * @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_part_text_set() instead. (with "info" as the parameter). - */ - EINA_DEPRECATED EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1); +/** + * Set the info of the bubble + * + * @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_part_text_set() instead. (with "info" as the parameter). + */ +EINA_DEPRECATED EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info) EINA_ARG_NONNULL(1); - /** - * Get the info of the bubble - * - * @param obj The bubble object - * - * @return The "info" string of the bubble - * - * This function gets the info text. - * @deprecated use elm_object_part_text_get() instead. (with "info" as the parameter). - */ - EINA_DEPRECATED EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the info of the bubble + * + * @param obj The bubble object + * + * @return The "info" string of the bubble + * + * This function gets the info text. + * @deprecated use elm_object_part_text_get() instead. (with "info" as the parameter). + */ +EINA_DEPRECATED EAPI const char *elm_bubble_info_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the content to be shown in the bubble - * - * 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 bubble object - * @param content The given content of the bubble - * - * This function sets the content shown on the middle of the bubble. - * - * @deprecated use elm_object_content_set() instead - * - */ - EINA_DEPRECATED EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the content to be shown in the bubble + * + * 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 bubble object + * @param content The given content of the bubble + * + * This function sets the content shown on the middle of the bubble. + * + * @deprecated use elm_object_content_set() instead + * + */ +EINA_DEPRECATED EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Get the content shown in the bubble - * - * Return the content object which is set for this widget. - * - * @param obj The bubble object - * @return The content that is being used - * - * @deprecated use elm_object_content_get() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the content shown in the bubble + * + * Return the content object which is set for this widget. + * + * @param obj The bubble object + * @return The content that is being used + * + * @deprecated use elm_object_content_get() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bubble_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the content shown in the bubble - * - * Unparent and return the content object which was set for this widget. - * - * @param obj The bubble object - * @return The content that was being used - * - * @deprecated use elm_object_content_unset() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the content shown in the bubble + * + * Unparent and return the content object which was set for this widget. + * + * @param obj The bubble object + * @return The content that was being used + * + * @deprecated use elm_object_content_unset() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the icon of the bubble - * - * 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. - * - * @param obj The bubble object - * @param icon The given icon for the bubble - * - * @deprecated use elm_object_part_content_set() instead - * - */ - EINA_DEPRECATED EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon of the bubble + * + * 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. + * + * @param obj The bubble object + * @param icon The given icon for the bubble + * + * @deprecated use elm_object_part_content_set() instead + * + */ +EINA_DEPRECATED EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Get the icon of the bubble - * - * @param obj The bubble object - * @return The icon for the bubble - * - * This function gets the icon shown on the top left of bubble. - * - * @deprecated use elm_object_part_content_get() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the icon of the bubble + * + * @param obj The bubble object + * @return The icon for the bubble + * + * This function gets the icon shown on the top left of bubble. + * + * @deprecated use elm_object_part_content_get() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the icon of the bubble - * - * Unparent and return the icon object which was set for this widget. - * - * @param obj The bubble object - * @return The icon that was being used - * - * @deprecated use elm_object_part_content_unset() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the icon of the bubble + * + * Unparent and return the icon object which was set for this widget. + * + * @param obj The bubble object + * @return The icon that was being used + * + * @deprecated use elm_object_part_content_unset() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_bubble_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the corner of the bubble - * - * @param obj The bubble object. - * @param corner The given corner for the bubble. - * - * 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 are shown. - * - * 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); +/** + * Set the corner of the bubble + * + * @param obj The bubble object. + * @param corner The given corner for the bubble. + * + * 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 are shown. + * + * 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 - * - * @param obj The bubble object. - * @return The given corner for the bubble. - * - * This function gets the selected corner of the bubble. - */ - EAPI const char *elm_bubble_corner_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the corner of the bubble + * + * @param obj The bubble object. + * @return The given corner for the bubble. + * + * This function gets the selected corner of the bubble. + */ +EAPI const char *elm_bubble_corner_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_button.h b/legacy/elementary/src/lib/elm_button.h index b0794b1ace..d0c4f5e991 100644 --- a/legacy/elementary/src/lib/elm_button.h +++ b/legacy/elementary/src/lib/elm_button.h @@ -1,194 +1,195 @@ - /** - * @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 - * - * 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. - * - * 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. - * - * 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. - * - * Default contents parts of the button widget that you can use for are: - * @li "icon" - An icon of the button - * - * Default text parts of the button widget that you can use for are: - * @li "default" - Label of the button - * - * Follow through a complete example @ref button_example_01 "here". - * @{ - */ +/** + * @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 + * + * 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. + * + * 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. + * + * 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. + * + * Default contents parts of the button widget that you can use for are: + * @li "icon" - An icon of the button + * + * Default text parts of the button widget that you can use for are: + * @li "default" - Label of the button + * + * Follow through a complete example @ref button_example_01 "here". + * @{ + */ - /** - * 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_button_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * 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_button_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the label used in the button - * - * 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 button object - * @param label The text will be written on the button - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label used in the button + * + * 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 button object + * @param label The text will be written on the button + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_button_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label set for the button - * - * 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 button object - * @return The text set to the label, or NULL if nothing is set - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI const char *elm_button_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label set for the button + * + * 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 button object + * @return The text set to the label, or NULL if nothing is set + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI const char *elm_button_label_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 - * @deprecated use elm_object_part_content_set() instead. - */ - EINA_DEPRECATED EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) 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 + * @deprecated use elm_object_part_content_set() instead. + */ +EINA_DEPRECATED 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. - * - * @param obj The button object - * @return The icon object that is being used - * - * @deprecated use elm_object_part_content_get() instead - */ - EINA_DEPRECATED EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj) 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. + * + * @param obj The button object + * @return The icon object that is being used + * + * @deprecated use elm_object_part_content_get() instead + */ +EINA_DEPRECATED 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 - * - * 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. - * - * @param obj The button object - * @return The icon object that was being used - * @deprecated use elm_object_part_content_unset() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove the icon set without deleting it and return the object + * + * 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. + * + * @param obj The button object + * @return The icon object that was being used + * @deprecated use elm_object_part_content_unset() instead. + */ +EINA_DEPRECATED 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 - * - * When off, no autorepeat is performed and buttons emit a normal @c clicked - * signal when they are clicked. - * - * 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(). - * - * @param obj The button object - * @param on A bool to turn on/off the event - */ - EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on) EINA_ARG_NONNULL(1); +/** + * Turn on/off the autorepeat event generated when the button is kept pressed + * + * When off, no autorepeat is performed and buttons emit a normal @c clicked + * signal when they are clicked. + * + * 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(). + * + * @param obj The button object + * @param on A bool to turn on/off the event + */ +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() - */ - EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj) 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() + */ +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 - * - * 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. - * - * @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_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1); +/** + * Set the initial timeout before the autorepeat event is generated + * + * 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. + * + * @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_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1); - /** - * Get the initial timeout before the autorepeat event is generated - * - * @param obj The button object - * @return Timeout in seconds - * - * @see elm_button_autorepeat_initial_timeout_set() - */ - EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the initial timeout before the autorepeat event is generated + * + * @param obj The button object + * @return Timeout in seconds + * + * @see elm_button_autorepeat_initial_timeout_set() + */ +EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the interval between each generated autorepeat event - * - * 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 button object - * @param t Interval in seconds - * - * @see elm_button_autorepeat_initial_timeout_set() - */ - EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t) EINA_ARG_NONNULL(1); +/** + * Set the interval between each generated autorepeat event + * + * 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 button object + * @param t Interval in seconds + * + * @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 - * - * @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); - - /** - * @} - */ +/** + * Get the interval between each generated autorepeat event + * + * @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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_cache.h b/legacy/elementary/src/lib/elm_cache.h index d94b0b7644..f6e6e4e0c1 100644 --- a/legacy/elementary/src/lib/elm_cache.h +++ b/legacy/elementary/src/lib/elm_cache.h @@ -1,249 +1,248 @@ - /** - * @defgroup Caches Caches - * - * These are functions which let one fine-tune some cache values for - * Elementary applications, thus allowing for performance adjustments. - * - * @{ - */ +/** + * @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 - */ - // XXX: rename: elm_cache_all_flush() - EAPI void elm_all_flush(void); +/** + * @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 + */ +// XXX: rename: elm_cache_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_cache_flush_interval_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_cache_flush_enabled_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_font_cache_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_image_cache_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_edje_file_cache_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_edje_collection_cache_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_edje_collection_cache_all_set(int size); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_calendar.h b/legacy/elementary/src/lib/elm_calendar.h index 2e083b45a7..52c259e0fc 100644 --- a/legacy/elementary/src/lib/elm_calendar.h +++ b/legacy/elementary/src/lib/elm_calendar.h @@ -1,474 +1,474 @@ - /** - * @addtogroup Calendar - * @{ - */ +/** + * @addtogroup Calendar + * @{ + */ - /** - * @enum _Elm_Calendar_Mark_Repeat - * @typedef Elm_Calendar_Mark_Repeat - * - * Event periodicity, used to define if a mark should be repeated - * @b beyond event's day. It's set when a mark is added. - * - * So, for a mark added to 13th May with periodicity set to WEEKLY, - * there will be marks every week after this date. Marks will be displayed - * at 13th, 20th, 27th, 3rd June ... - * - * Values don't work as bitmask, only one can be choosen. - * - * @see elm_calendar_mark_add() - * - * @ingroup Calendar - */ - typedef enum _Elm_Calendar_Mark_Repeat - { - ELM_CALENDAR_UNIQUE, /**< Default value. Marks will be displayed only on event day. */ - ELM_CALENDAR_DAILY, /**< Marks will be displayed everyday after event day (inclusive). */ - ELM_CALENDAR_WEEKLY, /**< Marks will be displayed every week after event day (inclusive) - i.e. each seven days. */ - ELM_CALENDAR_MONTHLY, /**< Marks will be displayed every month day that coincides to event day. E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb, but will be displayed on 30th Mar*/ - ELM_CALENDAR_ANNUALLY /**< Marks will be displayed every year that coincides to event day (and month). E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 2013. */ - } Elm_Calendar_Mark_Repeat; +/** + * @enum _Elm_Calendar_Mark_Repeat + * @typedef Elm_Calendar_Mark_Repeat + * + * Event periodicity, used to define if a mark should be repeated + * @b beyond event's day. It's set when a mark is added. + * + * So, for a mark added to 13th May with periodicity set to WEEKLY, + * there will be marks every week after this date. Marks will be displayed + * at 13th, 20th, 27th, 3rd June ... + * + * Values don't work as bitmask, only one can be choosen. + * + * @see elm_calendar_mark_add() + * + * @ingroup Calendar + */ +typedef enum _Elm_Calendar_Mark_Repeat +{ + ELM_CALENDAR_UNIQUE, /**< Default value. Marks will be displayed only on event day. */ + ELM_CALENDAR_DAILY, /**< Marks will be displayed everyday after event day (inclusive). */ + ELM_CALENDAR_WEEKLY, /**< Marks will be displayed every week after event day (inclusive) - i.e. each seven days. */ + ELM_CALENDAR_MONTHLY, /**< Marks will be displayed every month day that coincides to event day. E.g.: if an event is set to 30th Jan, no marks will be displayed on Feb, but will be displayed on 30th Mar*/ + ELM_CALENDAR_ANNUALLY /**< Marks will be displayed every year that coincides to event day (and month). E.g. an event added to 30th Jan 2012 will be repeated on 30th Jan 2013. */ +} Elm_Calendar_Mark_Repeat; - typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark; /**< Item handle for a calendar mark. Created with elm_calendar_mark_add() and deleted with elm_calendar_mark_del(). */ +typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark; /**< Item handle for a calendar mark. Created with elm_calendar_mark_add() and deleted with elm_calendar_mark_del(). */ - /** - * Add a new calendar widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new calendar widget handle or @c NULL, on errors. - * - * This function inserts a new calendar widget on the canvas. - * - * @ref calendar_example_01 - * - * @ingroup Calendar - */ - EAPI Evas_Object *elm_calendar_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new calendar widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new calendar widget handle or @c NULL, on errors. + * + * This function inserts a new calendar widget on the canvas. + * + * @ref calendar_example_01 + * + * @ingroup Calendar + */ +EAPI Evas_Object * + elm_calendar_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Get weekdays names displayed by the calendar. - * - * @param obj The calendar object. - * @return Array of seven strings to be used as weekday names. - * - * By default, weekdays abbreviations get from system are displayed: - * E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat" - * The first string is related to Sunday, the second to Monday... - * - * @see elm_calendar_weekdays_name_set() - * - * @ref calendar_example_05 - * - * @ingroup Calendar - */ - EAPI const char **elm_calendar_weekdays_names_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get weekdays names displayed by the calendar. + * + * @param obj The calendar object. + * @return Array of seven strings to be used as weekday names. + * + * By default, weekdays abbreviations get from system are displayed: + * E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat" + * The first string is related to Sunday, the second to Monday... + * + * @see elm_calendar_weekdays_name_set() + * + * @ref calendar_example_05 + * + * @ingroup Calendar + */ +EAPI const char **elm_calendar_weekdays_names_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set weekdays names to be displayed by the calendar. - * - * @param obj The calendar object. - * @param weekdays Array of seven strings to be used as weekday names. - * @warning It must have 7 elements, or it will access invalid memory. - * @warning The strings must be NULL terminated ('@\0'). - * - * By default, weekdays abbreviations get from system are displayed: - * E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat" - * - * The first string should be related to Sunday, the second to Monday... - * - * The usage should be like this: - * @code - * const char *weekdays[] = - * { - * "Sunday", "Monday", "Tuesday", "Wednesday", - * "Thursday", "Friday", "Saturday" - * }; - * elm_calendar_weekdays_names_set(calendar, weekdays); - * @endcode - * - * @see elm_calendar_weekdays_name_get() - * - * @ref calendar_example_02 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_weekdays_names_set(Evas_Object *obj, const char *weekdays[]) EINA_ARG_NONNULL(1, 2); +/** + * Set weekdays names to be displayed by the calendar. + * + * @param obj The calendar object. + * @param weekdays Array of seven strings to be used as weekday names. + * @warning It must have 7 elements, or it will access invalid memory. + * @warning The strings must be NULL terminated ('@\0'). + * + * By default, weekdays abbreviations get from system are displayed: + * E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat" + * + * The first string should be related to Sunday, the second to Monday... + * + * The usage should be like this: + * @code + * const char *weekdays[] = + * { + * "Sunday", "Monday", "Tuesday", "Wednesday", + * "Thursday", "Friday", "Saturday" + * }; + * elm_calendar_weekdays_names_set(calendar, weekdays); + * @endcode + * + * @see elm_calendar_weekdays_name_get() + * + * @ref calendar_example_02 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_weekdays_names_set(Evas_Object *obj, const char *weekdays[]) EINA_ARG_NONNULL(1, 2); - /** - * Set the minimum and maximum values for the year - * - * @param obj The calendar object - * @param min The minimum year, greater than 1901; - * @param max The maximum year; - * - * Maximum must be greater than minimum, except if you don't wan't to set - * maximum year. - * Default values are 1902 and -1. - * - * If the maximum year is a negative value, it will be limited depending - * on the platform architecture (year 2037 for 32 bits); - * - * @see elm_calendar_min_max_year_get() - * - * @ref calendar_example_03 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max) EINA_ARG_NONNULL(1); +/** + * Set the minimum and maximum values for the year + * + * @param obj The calendar object + * @param min The minimum year, greater than 1901; + * @param max The maximum year; + * + * Maximum must be greater than minimum, except if you don't wan't to set + * maximum year. + * Default values are 1902 and -1. + * + * If the maximum year is a negative value, it will be limited depending + * on the platform architecture (year 2037 for 32 bits); + * + * @see elm_calendar_min_max_year_get() + * + * @ref calendar_example_03 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max) EINA_ARG_NONNULL(1); - /** - * Get the minimum and maximum values for the year - * - * @param obj The calendar object. - * @param min The minimum year. - * @param max The maximum year. - * - * Default values are 1902 and -1. - * - * @see elm_calendar_min_max_year_get() for more details. - * - * @ref calendar_example_05 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj, int *min, int *max) EINA_ARG_NONNULL(1); +/** + * Get the minimum and maximum values for the year + * + * @param obj The calendar object. + * @param min The minimum year. + * @param max The maximum year. + * + * Default values are 1902 and -1. + * + * @see elm_calendar_min_max_year_get() for more details. + * + * @ref calendar_example_05 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj, int *min, int *max) EINA_ARG_NONNULL(1); - /** - * Enable or disable day selection - * - * @param obj The calendar object. - * @param enabled @c EINA_TRUE to enable selection or @c EINA_FALSE to - * disable it. - * - * Enabled by default. If disabled, the user still can select months, - * but not days. Selected days are highlighted on calendar. - * It should be used if you won't need such selection for the widget usage. - * - * When a day is selected, or month is changed, smart callbacks for - * signal "changed" will be called. - * - * @see elm_calendar_day_selection_enable_get() - * - * @ref calendar_example_04 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); +/** + * Enable or disable day selection + * + * @param obj The calendar object. + * @param enabled @c EINA_TRUE to enable selection or @c EINA_FALSE to + * disable it. + * + * Enabled by default. If disabled, the user still can select months, + * but not days. Selected days are highlighted on calendar. + * It should be used if you won't need such selection for the widget usage. + * + * When a day is selected, or month is changed, smart callbacks for + * signal "changed" will be called. + * + * @see elm_calendar_day_selection_enable_get() + * + * @ref calendar_example_04 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); - /** - * Get a value whether day selection is enabled or not. - * - * @see elm_calendar_day_selection_enable_set() for details. - * - * @param obj The calendar object. - * @return EINA_TRUE means day selection is enabled. EINA_FALSE indicates - * it's disabled. If @p obj is NULL, EINA_FALSE is returned. - * - * @ref calendar_example_05 - * - * @ingroup Calendar - */ - EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether day selection is enabled or not. + * + * @see elm_calendar_day_selection_enable_set() for details. + * + * @param obj The calendar object. + * @return EINA_TRUE means day selection is enabled. EINA_FALSE indicates + * it's disabled. If @p obj is NULL, EINA_FALSE is returned. + * + * @ref calendar_example_05 + * + * @ingroup Calendar + */ +EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Set selected date to be highlighted on calendar. + * + * @param obj The calendar object. + * @param selected_time A @b tm struct to represent the selected date. + * + * Set the selected date, changing the displayed month if needed. + * Selected date changes when the user goes to next/previous month or + * select a day pressing over it on calendar. + * + * @see elm_calendar_selected_time_get() + * + * @ref calendar_example_04 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_selected_time_set(Evas_Object *obj, struct tm *selected_time) EINA_ARG_NONNULL(1); - /** - * Set selected date to be highlighted on calendar. - * - * @param obj The calendar object. - * @param selected_time A @b tm struct to represent the selected date. - * - * Set the selected date, changing the displayed month if needed. - * Selected date changes when the user goes to next/previous month or - * select a day pressing over it on calendar. - * - * @see elm_calendar_selected_time_get() - * - * @ref calendar_example_04 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_selected_time_set(Evas_Object *obj, struct tm *selected_time) EINA_ARG_NONNULL(1); +/** + * Get selected date. + * + * @param obj The calendar object + * @param selected_time A @b tm struct to point to selected date + * @return EINA_FALSE means an error ocurred and returned time shouldn't + * be considered. + * + * Get date selected by the user or set by function + * elm_calendar_selected_time_set(). + * Selected date changes when the user goes to next/previous month or + * select a day pressing over it on calendar. + * + * @see elm_calendar_selected_time_get() + * + * @ref calendar_example_05 + * + * @ingroup Calendar + */ +EAPI Eina_Bool elm_calendar_selected_time_get(const Evas_Object *obj, struct tm *selected_time) EINA_ARG_NONNULL(1, 2); - /** - * Get selected date. - * - * @param obj The calendar object - * @param selected_time A @b tm struct to point to selected date - * @return EINA_FALSE means an error ocurred and returned time shouldn't - * be considered. - * - * Get date selected by the user or set by function - * elm_calendar_selected_time_set(). - * Selected date changes when the user goes to next/previous month or - * select a day pressing over it on calendar. - * - * @see elm_calendar_selected_time_get() - * - * @ref calendar_example_05 - * - * @ingroup Calendar - */ - EAPI Eina_Bool elm_calendar_selected_time_get(const Evas_Object *obj, struct tm *selected_time) EINA_ARG_NONNULL(1, 2); +/** + * Set a function to format the string that will be used to display + * month and year; + * + * @param obj The calendar object + * @param format_function Function to set the month-year string given + * the selected date + * + * By default it uses strftime with "%B %Y" format string. + * It should allocate the memory that will be used by the string, + * that will be freed by the widget after usage. + * A pointer to the string and a pointer to the time struct will be provided. + * + * Example: + * @code + * static char * + * _format_month_year(struct tm *selected_time) + * { + * char buf[32]; + * if (!strftime(buf, sizeof(buf), "%B %Y", selected_time)) return NULL; + * return strdup(buf); + * } + * + * elm_calendar_format_function_set(calendar, _format_month_year); + * @endcode + * + * @ref calendar_example_02 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_format_function_set(Evas_Object *obj, char *(*format_function)(struct tm *stime)) EINA_ARG_NONNULL(1); - /** - * Set a function to format the string that will be used to display - * month and year; - * - * @param obj The calendar object - * @param format_function Function to set the month-year string given - * the selected date - * - * By default it uses strftime with "%B %Y" format string. - * It should allocate the memory that will be used by the string, - * that will be freed by the widget after usage. - * A pointer to the string and a pointer to the time struct will be provided. - * - * Example: - * @code - * static char * - * _format_month_year(struct tm *selected_time) - * { - * char buf[32]; - * if (!strftime(buf, sizeof(buf), "%B %Y", selected_time)) return NULL; - * return strdup(buf); - * } - * - * elm_calendar_format_function_set(calendar, _format_month_year); - * @endcode - * - * @ref calendar_example_02 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_format_function_set(Evas_Object *obj, char * (*format_function) (struct tm *stime)) EINA_ARG_NONNULL(1); +/** + * Add a new mark to the calendar + * + * @param obj The calendar object + * @param mark_type A string used to define the type of mark. It will be + * emitted to the theme, that should display a related modification on these + * days representation. + * @param mark_time A time struct to represent the date of inclusion of the + * mark. For marks that repeats it will just be displayed after the inclusion + * date in the calendar. + * @param repeat Repeat the event following this periodicity. Can be a unique + * mark (that don't repeat), daily, weekly, monthly or annually. + * @return The created mark or @p NULL upon failure. + * + * Add a mark that will be drawn in the calendar respecting the insertion + * time and periodicity. It will emit the type as signal to the widget theme. + * Default theme supports "holiday" and "checked", but it can be extended. + * + * It won't immediately update the calendar, drawing the marks. + * For this, call elm_calendar_marks_draw(). However, when user selects + * next or previous month calendar forces marks drawn. + * + * Marks created with this method can be deleted with + * elm_calendar_mark_del(). + * + * Example + * @code + * struct tm selected_time; + * time_t current_time; + * + * current_time = time(NULL) + 5 * 84600; + * localtime_r(¤t_time, &selected_time); + * elm_calendar_mark_add(cal, "holiday", selected_time, + * ELM_CALENDAR_ANNUALLY); + * + * current_time = time(NULL) + 1 * 84600; + * localtime_r(¤t_time, &selected_time); + * elm_calendar_mark_add(cal, "checked", selected_time, ELM_CALENDAR_UNIQUE); + * + * elm_calendar_marks_draw(cal); + * @endcode + * + * @see elm_calendar_marks_draw() + * @see elm_calendar_mark_del() + * + * @ref calendar_example_06 + * + * @ingroup Calendar + */ +EAPI Elm_Calendar_Mark *elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat) EINA_ARG_NONNULL(1); - /** - * Add a new mark to the calendar - * - * @param obj The calendar object - * @param mark_type A string used to define the type of mark. It will be - * emitted to the theme, that should display a related modification on these - * days representation. - * @param mark_time A time struct to represent the date of inclusion of the - * mark. For marks that repeats it will just be displayed after the inclusion - * date in the calendar. - * @param repeat Repeat the event following this periodicity. Can be a unique - * mark (that don't repeat), daily, weekly, monthly or annually. - * @return The created mark or @p NULL upon failure. - * - * Add a mark that will be drawn in the calendar respecting the insertion - * time and periodicity. It will emit the type as signal to the widget theme. - * Default theme supports "holiday" and "checked", but it can be extended. - * - * It won't immediately update the calendar, drawing the marks. - * For this, call elm_calendar_marks_draw(). However, when user selects - * next or previous month calendar forces marks drawn. - * - * Marks created with this method can be deleted with - * elm_calendar_mark_del(). - * - * Example - * @code - * struct tm selected_time; - * time_t current_time; - * - * current_time = time(NULL) + 5 * 84600; - * localtime_r(¤t_time, &selected_time); - * elm_calendar_mark_add(cal, "holiday", selected_time, - * ELM_CALENDAR_ANNUALLY); - * - * current_time = time(NULL) + 1 * 84600; - * localtime_r(¤t_time, &selected_time); - * elm_calendar_mark_add(cal, "checked", selected_time, ELM_CALENDAR_UNIQUE); - * - * elm_calendar_marks_draw(cal); - * @endcode - * - * @see elm_calendar_marks_draw() - * @see elm_calendar_mark_del() - * - * @ref calendar_example_06 - * - * @ingroup Calendar - */ - EAPI Elm_Calendar_Mark *elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat) EINA_ARG_NONNULL(1); +/** + * Delete mark from the calendar. + * + * @param mark The mark to be deleted. + * + * If deleting all calendar marks is required, elm_calendar_marks_clear() + * should be used instead of getting marks list and deleting each one. + * + * @see elm_calendar_mark_add() + * + * @ref calendar_example_06 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_mark_del(Elm_Calendar_Mark *mark) EINA_ARG_NONNULL(1); - /** - * Delete mark from the calendar. - * - * @param mark The mark to be deleted. - * - * If deleting all calendar marks is required, elm_calendar_marks_clear() - * should be used instead of getting marks list and deleting each one. - * - * @see elm_calendar_mark_add() - * - * @ref calendar_example_06 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_mark_del(Elm_Calendar_Mark *mark) EINA_ARG_NONNULL(1); +/** + * Remove all calendar's marks + * + * @param obj The calendar object. + * + * @see elm_calendar_mark_add() + * @see elm_calendar_mark_del() + * + * @ingroup Calendar + */ +EAPI void elm_calendar_marks_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Remove all calendar's marks - * - * @param obj The calendar object. - * - * @see elm_calendar_mark_add() - * @see elm_calendar_mark_del() - * - * @ingroup Calendar - */ - EAPI void elm_calendar_marks_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a list of all the calendar marks. + * + * @param obj The calendar object. + * @return An @c Eina_List of calendar marks objects, or @c NULL on failure. + * + * @see elm_calendar_mark_add() + * @see elm_calendar_mark_del() + * @see elm_calendar_marks_clear() + * + * @ingroup Calendar + */ +EAPI const Eina_List *elm_calendar_marks_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get a list of all the calendar marks. - * - * @param obj The calendar object. - * @return An @c Eina_List of calendar marks objects, or @c NULL on failure. - * - * @see elm_calendar_mark_add() - * @see elm_calendar_mark_del() - * @see elm_calendar_marks_clear() - * - * @ingroup Calendar - */ - EAPI const Eina_List *elm_calendar_marks_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Draw calendar marks. + * + * @param obj The calendar object. + * + * Should be used after adding, removing or clearing marks. + * It will go through the entire marks list updating the calendar. + * If lots of marks will be added, add all the marks and then call + * this function. + * + * When the month is changed, i.e. user selects next or previous month, + * marks will be drawed. + * + * @see elm_calendar_mark_add() + * @see elm_calendar_mark_del() + * @see elm_calendar_marks_clear() + * + * @ref calendar_example_06 + * + * @ingroup Calendar + */ +EAPI void elm_calendar_marks_draw(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Draw calendar marks. - * - * @param obj The calendar object. - * - * Should be used after adding, removing or clearing marks. - * It will go through the entire marks list updating the calendar. - * If lots of marks will be added, add all the marks and then call - * this function. - * - * When the month is changed, i.e. user selects next or previous month, - * marks will be drawed. - * - * @see elm_calendar_mark_add() - * @see elm_calendar_mark_del() - * @see elm_calendar_marks_clear() - * - * @ref calendar_example_06 - * - * @ingroup Calendar - */ - EAPI void elm_calendar_marks_draw(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Set a day text color to the same that represents Saturdays. + * + * @param obj The calendar object. + * @param pos The text position. Position is the cell counter, from left + * to right, up to down. It starts on 0 and ends on 41. + * + * @deprecated use elm_calendar_mark_add() instead like: + * + * @code + * struct tm t = { 0, 0, 12, 6, 0, 0, 6, 6, -1 }; + * elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY); + * @endcode + * + * @see elm_calendar_mark_add() + * + * @ingroup Calendar + */ +EINA_DEPRECATED EAPI void elm_calendar_text_saturday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); - /** - * Set a day text color to the same that represents Saturdays. - * - * @param obj The calendar object. - * @param pos The text position. Position is the cell counter, from left - * to right, up to down. It starts on 0 and ends on 41. - * - * @deprecated use elm_calendar_mark_add() instead like: - * - * @code - * struct tm t = { 0, 0, 12, 6, 0, 0, 6, 6, -1 }; - * elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY); - * @endcode - * - * @see elm_calendar_mark_add() - * - * @ingroup Calendar - */ - EINA_DEPRECATED EAPI void elm_calendar_text_saturday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); +/** + * Set a day text color to the same that represents Sundays. + * + * @param obj The calendar object. + * @param pos The text position. Position is the cell counter, from left + * to right, up to down. It starts on 0 and ends on 41. - /** - * Set a day text color to the same that represents Sundays. - * - * @param obj The calendar object. - * @param pos The text position. Position is the cell counter, from left - * to right, up to down. It starts on 0 and ends on 41. + * @deprecated use elm_calendar_mark_add() instead like: + * + * @code + * struct tm t = { 0, 0, 12, 7, 0, 0, 0, 0, -1 }; + * elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY); + * @endcode + * + * @see elm_calendar_mark_add() + * + * @ingroup Calendar + */ +EINA_DEPRECATED EAPI void elm_calendar_text_sunday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); - * @deprecated use elm_calendar_mark_add() instead like: - * - * @code - * struct tm t = { 0, 0, 12, 7, 0, 0, 0, 0, -1 }; - * elm_calendar_mark_add(obj, "sat", &t, ELM_CALENDAR_WEEKLY); - * @endcode - * - * @see elm_calendar_mark_add() - * - * @ingroup Calendar - */ - EINA_DEPRECATED EAPI void elm_calendar_text_sunday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); +/** + * Set a day text color to the same that represents Weekdays. + * + * @param obj The calendar object + * @param pos The text position. Position is the cell counter, from left + * to right, up to down. It starts on 0 and ends on 41. + * + * @deprecated use elm_calendar_mark_add() instead like: + * + * @code + * struct tm t = { 0, 0, 12, 1, 0, 0, 0, 0, -1 }; + * + * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // monday + * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; + * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // tuesday + * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; + * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // wednesday + * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; + * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // thursday + * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; + * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // friday + * @endcode + * + * @see elm_calendar_mark_add() + * + * @ingroup Calendar + */ +EINA_DEPRECATED EAPI void elm_calendar_text_weekday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); - /** - * Set a day text color to the same that represents Weekdays. - * - * @param obj The calendar object - * @param pos The text position. Position is the cell counter, from left - * to right, up to down. It starts on 0 and ends on 41. - * - * @deprecated use elm_calendar_mark_add() instead like: - * - * @code - * struct tm t = { 0, 0, 12, 1, 0, 0, 0, 0, -1 }; - * - * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // monday - * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; - * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // tuesday - * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; - * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // wednesday - * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; - * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // thursday - * t.tm_tm_mday++; t.tm_wday++; t.tm_yday++; - * elm_calendar_mark_add(obj, "week", &t, ELM_CALENDAR_WEEKLY); // friday - * @endcode - * - * @see elm_calendar_mark_add() - * - * @ingroup Calendar - */ - EINA_DEPRECATED EAPI void elm_calendar_text_weekday_color_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); +/** + * Set the interval on time updates for an user mouse button hold + * on calendar widgets' month selection. + * + * @param obj The calendar object + * @param interval The (first) interval value in seconds + * + * This interval value is @b decreased while the user holds the + * mouse pointer either selecting next or previous month. + * + * This helps the user to get to a given month distant from the + * current one easier/faster, as it will start to change quicker and + * quicker on mouse button holds. + * + * The calculation for the next change 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 changes is + * @b 0.85 seconds. + * + * @see elm_calendar_interval_get() + * + * @ingroup Calendar + */ +EAPI void elm_calendar_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); - /** - * Set the interval on time updates for an user mouse button hold - * on calendar widgets' month selection. - * - * @param obj The calendar object - * @param interval The (first) interval value in seconds - * - * This interval value is @b decreased while the user holds the - * mouse pointer either selecting next or previous month. - * - * This helps the user to get to a given month distant from the - * current one easier/faster, as it will start to change quicker and - * quicker on mouse button holds. - * - * The calculation for the next change 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 changes is - * @b 0.85 seconds. - * - * @see elm_calendar_interval_get() - * - * @ingroup Calendar - */ - EAPI void elm_calendar_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); - - /** - * Get the interval on time updates for an user mouse button hold - * on calendar widgets' month selection. - * - * @param obj The calendar object - * @return The (first) interval value, in seconds, set on it - * - * @see elm_calendar_interval_set() for more details - * - * @ingroup Calendar - */ - EAPI double elm_calendar_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the interval on time updates for an user mouse button hold + * on calendar widgets' month selection. + * + * @param obj The calendar object + * @return The (first) interval value, in seconds, set on it + * + * @see elm_calendar_interval_set() for more details + * + * @ingroup Calendar + */ +EAPI double elm_calendar_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_check.h b/legacy/elementary/src/lib/elm_check.h index f0358b76dd..9f51a56550 100644 --- a/legacy/elementary/src/lib/elm_check.h +++ b/legacy/elementary/src/lib/elm_check.h @@ -1,143 +1,144 @@ - /** - * @defgroup Check Check - * - * @image html img/widget/check/preview-00.png - * @image latex img/widget/check/preview-00.eps - * @image html img/widget/check/preview-01.png - * @image latex img/widget/check/preview-01.eps - * @image html img/widget/check/preview-02.png - * @image latex img/widget/check/preview-02.eps - * - * @brief The check widget allows for toggling a value between true and - * false. - * - * Check objects are a lot like radio objects in layout and functionality - * except they do not work as a group, but independently and only toggle the - * value of a boolean from false to true (0 or 1). elm_check_state_set() sets - * the boolean state (1 for true, 0 for false), and elm_check_state_get() - * returns the current state. For convenience, like the radio objects, you - * can set a pointer to a boolean directly with elm_check_state_pointer_set() - * for it to modify. - * - * Signals that you can add callbacks for are: - * "changed" - This is called whenever the user changes the state of one of - * the check object(event_info is NULL). - * - * Default contents parts of the check widget that you can use for are: - * @li "icon" - An icon of the check - * - * Default text parts of the check widget that you can use for are: - * @li "elm.text" - Label of the check - * - * @ref tutorial_check should give you a firm grasp of how to use this widget - * . - * @{ - */ - /** - * @brief Add a new Check object - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_check_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @defgroup Check Check + * + * @image html img/widget/check/preview-00.png + * @image latex img/widget/check/preview-00.eps + * @image html img/widget/check/preview-01.png + * @image latex img/widget/check/preview-01.eps + * @image html img/widget/check/preview-02.png + * @image latex img/widget/check/preview-02.eps + * + * @brief The check widget allows for toggling a value between true and + * false. + * + * Check objects are a lot like radio objects in layout and functionality + * except they do not work as a group, but independently and only toggle the + * value of a boolean from false to true (0 or 1). elm_check_state_set() sets + * the boolean state (1 for true, 0 for false), and elm_check_state_get() + * returns the current state. For convenience, like the radio objects, you + * can set a pointer to a boolean directly with elm_check_state_pointer_set() + * for it to modify. + * + * Signals that you can add callbacks for are: + * "changed" - This is called whenever the user changes the state of one of + * the check object(event_info is NULL). + * + * Default contents parts of the check widget that you can use for are: + * @li "icon" - An icon of the check + * + * Default text parts of the check widget that you can use for are: + * @li "elm.text" - Label of the check + * + * @ref tutorial_check should give you a firm grasp of how to use this widget + * . + * @{ + */ +/** + * @brief Add a new Check object + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_check_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Set the text label of the check object - * - * @param obj The check object - * @param label The text label string in UTF-8 - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_check_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Set the text label of the check object + * + * @param obj The check object + * @param label The text label string in UTF-8 + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_check_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Get the text label of the check object - * - * @param obj The check object - * @return The text label string in UTF-8 - * - * @deprecated use elm_object_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_check_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the text label of the check object + * + * @param obj The check object + * @return The text label string in UTF-8 + * + * @deprecated use elm_object_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_check_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the icon object of the check object - * - * @param obj The check object - * @param icon The icon object - * - * 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_object_content_unset() function. - * - * @deprecated use elm_object_part_content_set() instead. - * - */ - EINA_DEPRECATED EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * @brief Set the icon object of the check object + * + * @param obj The check object + * @param icon The icon object + * + * 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_object_content_unset() function. + * + * @deprecated use elm_object_part_content_set() instead. + * + */ +EINA_DEPRECATED EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon object of the check object - * - * @param obj The check object - * @return The icon object - * - * @deprecated use elm_object_part_content_get() instead. - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the icon object of the check object + * + * @param obj The check object + * @return The icon object + * + * @deprecated use elm_object_part_content_get() instead. + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the icon used for the check object - * - * @param obj The check object - * @return The icon object that was being used - * - * Unparent and return the icon object which was set for this widget. - * - * @deprecated use elm_object_part_content_unset() instead. - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the icon used for the check object + * + * @param obj The check object + * @return The icon object that was being used + * + * Unparent and return the icon object which was set for this widget. + * + * @deprecated use elm_object_part_content_unset() instead. + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_check_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the on/off state of the check object - * - * @param obj The check object - * @param state The state to use (1 == on, 0 == off) - * - * This sets the state of the check. If set - * with elm_check_state_pointer_set() the state of that variable is also - * changed. Calling this @b doesn't cause the "changed" signal to be emited. - */ - EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); +/** + * @brief Set the on/off state of the check object + * + * @param obj The check object + * @param state The state to use (1 == on, 0 == off) + * + * This sets the state of the check. If set + * with elm_check_state_pointer_set() the state of that variable is also + * changed. Calling this @b doesn't cause the "changed" signal to be emited. + */ +EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); - /** - * @brief Get the state of the check object - * - * @param obj The check object - * @return The boolean state - */ - EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the state of the check object + * + * @param obj The check object + * @return The boolean state + */ +EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set a convenience pointer to a boolean to change - * - * @param obj The check object - * @param statep Pointer to the boolean to modify - * - * This sets a pointer to a boolean, that, in addition to the check objects - * state will also be modified directly. To stop setting the object pointed - * to simply use NULL as the @p statep parameter. If @p statep is not NULL, - * then when this is called, the check objects state will also be modified to - * reflect the value of the boolean @p statep points to, just like calling - * elm_check_state_set(). - */ - EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_check_states_labels_set(Evas_Object *obj, const char *ontext, const char *offtext) EINA_ARG_NONNULL(1,2,3); - EINA_DEPRECATED EAPI void elm_check_states_labels_get(const Evas_Object *obj, const char **ontext, const char **offtext) EINA_ARG_NONNULL(1,2,3); - - /** - * @} - */ +/** + * @brief Set a convenience pointer to a boolean to change + * + * @param obj The check object + * @param statep Pointer to the boolean to modify + * + * This sets a pointer to a boolean, that, in addition to the check objects + * state will also be modified directly. To stop setting the object pointed + * to simply use NULL as the @p statep parameter. If @p statep is not NULL, + * then when this is called, the check objects state will also be modified to + * reflect the value of the boolean @p statep points to, just like calling + * elm_check_state_set(). + */ +EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_check_states_labels_set(Evas_Object *obj, const char *ontext, const char *offtext) EINA_ARG_NONNULL(1, 2, 3); +EINA_DEPRECATED EAPI void elm_check_states_labels_get(const Evas_Object *obj, const char **ontext, const char **offtext) EINA_ARG_NONNULL(1, 2, 3); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_clock.h b/legacy/elementary/src/lib/elm_clock.h index 81e59aa8c5..057b505ecf 100644 --- a/legacy/elementary/src/lib/elm_clock.h +++ b/legacy/elementary/src/lib/elm_clock.h @@ -1,304 +1,305 @@ - /** - * @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 - */ +/** + * @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 - * @{ - */ +/** + * @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; +/** + * 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); +/** + * 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 - * undefined. - * - * @ingroup Clock - */ - EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) 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 + * undefined. + * + * @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); +/** + * 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 edition mode 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 by - * user interaction. 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); +/** + * Set whether a given clock widget is under edition mode 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 by + * user interaction. 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 edition - * mode 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); +/** + * Retrieve whether a given clock widget is under edition + * mode 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_cnp.h b/legacy/elementary/src/lib/elm_cnp.h index 2612608eef..9b88c9bb56 100644 --- a/legacy/elementary/src/lib/elm_cnp.h +++ b/legacy/elementary/src/lib/elm_cnp.h @@ -1,106 +1,105 @@ - /** - * @addtogroup CopyPaste - * @{ - */ +/** + * @addtogroup CopyPaste + * @{ + */ - typedef struct _Elm_Selection_Data Elm_Selection_Data; - typedef Eina_Bool (*Elm_Drop_Cb) (void *d, Evas_Object *o, Elm_Selection_Data *data); +typedef struct _Elm_Selection_Data Elm_Selection_Data; +typedef Eina_Bool (*Elm_Drop_Cb)(void *d, Evas_Object *o, Elm_Selection_Data *data); - typedef enum _Elm_Sel_Type - { - ELM_SEL_TYPE_PRIMARY, - ELM_SEL_TYPE_SECONDARY, - ELM_SEL_TYPE_CLIPBOARD, - ELM_SEL_TYPE_XDND, +typedef enum _Elm_Sel_Type +{ + ELM_SEL_TYPE_PRIMARY, + ELM_SEL_TYPE_SECONDARY, + ELM_SEL_TYPE_CLIPBOARD, + ELM_SEL_TYPE_XDND, - ELM_SEL_TYPE_MAX, - } Elm_Sel_Type; + ELM_SEL_TYPE_MAX, +} Elm_Sel_Type; - typedef enum _Elm_Sel_Format - { - /** Targets: for matching every atom requesting */ - ELM_SEL_FORMAT_TARGETS = -1, - /** they come from outside of elm */ - ELM_SEL_FORMAT_NONE = 0x0, - /** Plain unformated text: Used for things that don't want rich markup */ - ELM_SEL_FORMAT_TEXT = 0x01, - /** Edje textblock markup, including inline images */ - ELM_SEL_FORMAT_MARKUP = 0x02, - /** Images */ - ELM_SEL_FORMAT_IMAGE = 0x04, - /** Vcards */ - ELM_SEL_FORMAT_VCARD = 0x08, - /** Raw HTMLish things for widgets that want that stuff (hello webkit!) */ - ELM_SEL_FORMAT_HTML = 0x10, +typedef enum _Elm_Sel_Format +{ + /** Targets: for matching every atom requesting */ + ELM_SEL_FORMAT_TARGETS = -1, + /** they come from outside of elm */ + ELM_SEL_FORMAT_NONE = 0x0, + /** Plain unformated text: Used for things that don't want rich markup */ + ELM_SEL_FORMAT_TEXT = 0x01, + /** Edje textblock markup, including inline images */ + ELM_SEL_FORMAT_MARKUP = 0x02, + /** Images */ + ELM_SEL_FORMAT_IMAGE = 0x04, + /** Vcards */ + ELM_SEL_FORMAT_VCARD = 0x08, + /** Raw HTMLish things for widgets that want that stuff (hello webkit!) */ + ELM_SEL_FORMAT_HTML = 0x10, - ELM_SEL_FORMAT_MAX - } Elm_Sel_Format; + ELM_SEL_FORMAT_MAX +} Elm_Sel_Format; - struct _Elm_Selection_Data - { - int x, y; - Elm_Sel_Format format; - void *data; - size_t len; - }; +struct _Elm_Selection_Data +{ + int x, y; + Elm_Sel_Format format; + void *data; + size_t len; +}; - /** - * @brief Set a data of a widget to copy and paste. - * - * Append the given callback to the list. This functions will be called - * called. - * - * @param selection selection type for copying and pasting - * @param widget The source widget pointer - * @param format Type of selection format - * @param buf The pointer of data source - * @return If EINA_TRUE, setting data is success. - * - * @ingroup CopyPaste - * - */ +/** + * @brief Set a data of a widget to copy and paste. + * + * Append the given callback to the list. This functions will be called + * called. + * + * @param selection selection type for copying and pasting + * @param widget The source widget pointer + * @param format Type of selection format + * @param buf The pointer of data source + * @return If EINA_TRUE, setting data is success. + * + * @ingroup CopyPaste + * + */ - EAPI Eina_Bool elm_cnp_selection_set(Elm_Sel_Type selection, Evas_Object *widget, Elm_Sel_Format format, const void *buf, size_t buflen); +EAPI Eina_Bool elm_cnp_selection_set(Elm_Sel_Type selection, Evas_Object *widget, Elm_Sel_Format format, const void *buf, size_t buflen); - /** - * @brief Retrive the data from the widget which is set for copying and pasting. - * - * Getting the data from the widget which is set for copying and pasting. - * Mainly the widget is elm_entry. If then @p datacb and @p udata are - * can be NULL. If not, @p datacb and @p udata are used for retriving data. - * - * @see also elm_cnp_selection_set() - * - * @param selection selection type for copying and pasting - * @param widget The source widget pointer - * @param datacb The user data callback if the target widget isn't elm_entry - * @param udata The user data pointer for @p datacb - * @return If EINA_TRUE, getting data is success. - * - * @ingroup CopyPaste - * - */ +/** + * @brief Retrive the data from the widget which is set for copying and pasting. + * + * Getting the data from the widget which is set for copying and pasting. + * Mainly the widget is elm_entry. If then @p datacb and @p udata are + * can be NULL. If not, @p datacb and @p udata are used for retriving data. + * + * @see also elm_cnp_selection_set() + * + * @param selection selection type for copying and pasting + * @param widget The source widget pointer + * @param datacb The user data callback if the target widget isn't elm_entry + * @param udata The user data pointer for @p datacb + * @return If EINA_TRUE, getting data is success. + * + * @ingroup CopyPaste + * + */ - EAPI Eina_Bool elm_cnp_selection_get(Elm_Sel_Type selection, Elm_Sel_Format format, Evas_Object *widget, Elm_Drop_Cb datacb, void *udata); +EAPI Eina_Bool elm_cnp_selection_get(Elm_Sel_Type selection, Elm_Sel_Format format, Evas_Object *widget, Elm_Drop_Cb datacb, void *udata); - /** - * @brief Clear the data in the widget which is set for copying and pasting. - * - * Clear the data in the widget. Normally this function isn't need to call. - * - * @see also elm_cnp_selection_set() - * - * @param selection selection type for copying and pasting - * @param widget The source widget pointer - * @return If EINA_TRUE, clearing data is success. - * - * @ingroup CopyPaste - * - */ +/** + * @brief Clear the data in the widget which is set for copying and pasting. + * + * Clear the data in the widget. Normally this function isn't need to call. + * + * @see also elm_cnp_selection_set() + * + * @param selection selection type for copying and pasting + * @param widget The source widget pointer + * @return If EINA_TRUE, clearing data is success. + * + * @ingroup CopyPaste + * + */ - EAPI Eina_Bool elm_cnp_selection_clear(Elm_Sel_Type selection, Evas_Object *widget); - - /** - * @} - */ +EAPI Eina_Bool elm_cnp_selection_clear(Elm_Sel_Type selection, Evas_Object *widget); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_colorselector.h b/legacy/elementary/src/lib/elm_colorselector.h index 1e8076d75e..6e93fc4a9c 100644 --- a/legacy/elementary/src/lib/elm_colorselector.h +++ b/legacy/elementary/src/lib/elm_colorselector.h @@ -1,52 +1,53 @@ - /** - * @defgroup Colorselector Colorselector - * - * @{ - * - * @image html img/widget/colorselector/preview-00.png - * @image latex img/widget/colorselector/preview-00.eps - * - * @brief Widget for user to select a color. - * - * Signals that you can add callbacks for are: - * "changed" - When the color value changes(event_info is NULL). - * - * See @ref tutorial_colorselector. - */ - /** - * @brief Add a new colorselector to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Colorselector - */ - EAPI Evas_Object *elm_colorselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * Set a color for the colorselector - * - * @param obj Colorselector object - * @param r r-value of color - * @param g g-value of color - * @param b b-value of color - * @param a a-value of color - * - * @ingroup Colorselector - */ - EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g , int b, int a) EINA_ARG_NONNULL(1); - /** - * Get a color from the colorselector - * - * @param obj Colorselector object - * @param r integer pointer for r-value of color - * @param g integer pointer for g-value of color - * @param b integer pointer for b-value of color - * @param a integer pointer for a-value of color - * - * @ingroup Colorselector - */ - EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g , int *b, int *a) EINA_ARG_NONNULL(1); - /** - * @} - */ - +/** + * @defgroup Colorselector Colorselector + * + * @{ + * + * @image html img/widget/colorselector/preview-00.png + * @image latex img/widget/colorselector/preview-00.eps + * + * @brief Widget for user to select a color. + * + * Signals that you can add callbacks for are: + * "changed" - When the color value changes(event_info is NULL). + * + * See @ref tutorial_colorselector. + */ +/** + * @brief Add a new colorselector to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Colorselector + */ +EAPI Evas_Object * + elm_colorselector_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); +/** + * Set a color for the colorselector + * + * @param obj Colorselector object + * @param r r-value of color + * @param g g-value of color + * @param b b-value of color + * @param a a-value of color + * + * @ingroup Colorselector + */ +EAPI void elm_colorselector_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); +/** + * Get a color from the colorselector + * + * @param obj Colorselector object + * @param r integer pointer for r-value of color + * @param g integer pointer for g-value of color + * @param b integer pointer for b-value of color + * @param a integer pointer for a-value of color + * + * @ingroup Colorselector + */ +EAPI void elm_colorselector_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_config.h b/legacy/elementary/src/lib/elm_config.h index bc316fd296..22a4bcab2c 100644 --- a/legacy/elementary/src/lib/elm_config.h +++ b/legacy/elementary/src/lib/elm_config.h @@ -1,569 +1,568 @@ - /** - * @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. - * - * @{ - */ +/** + * @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); +/** + * 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 instead. - * - */ - EAPI void elm_config_reload(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 instead. + * + */ +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. - * - * @{ - */ +/** + * @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 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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 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); +/** + * 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 Scrolling Scrolling - * - * These are functions setting how scrollable views in Elementary - * widgets should behave on user interaction. - * - * @{ - */ +/** + * @defgroup Scrolling Scrolling + * + * These are functions setting how scrollable views in Elementary + * widgets should behave on user interaction. + * + * @{ + */ - /** - * Get whether scrollers should bounce when they reach their - * viewport's edge during a scroll. - * - * @return the thumb scroll bouncing state - * - * This is the default behavior for touch screens, in general. - * @ingroup Scrolling - */ - EAPI Eina_Bool elm_scroll_bounce_enabled_get(void); +/** + * Get whether scrollers should bounce when they reach their + * viewport's edge during a scroll. + * + * @return the thumb scroll bouncing state + * + * This is the default behavior for touch screens, in general. + * @ingroup Scrolling + */ +EAPI Eina_Bool elm_scroll_bounce_enabled_get(void); - /** - * Set whether scrollers should bounce when they reach their - * viewport's edge during a scroll. - * - * @param enabled the thumb scroll bouncing state - * - * @see elm_thumbscroll_bounce_enabled_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled); +/** + * Set whether scrollers should bounce when they reach their + * viewport's edge during a scroll. + * + * @param enabled the thumb scroll bouncing state + * + * @see elm_thumbscroll_bounce_enabled_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled); - /** - * Set whether scrollers should bounce when they reach their - * viewport's edge during a scroll, for all Elementary application - * windows. - * - * @param enabled the thumb scroll bouncing state - * - * @see elm_thumbscroll_bounce_enabled_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_bounce_enabled_all_set(Eina_Bool enabled); +/** + * Set whether scrollers should bounce when they reach their + * viewport's edge during a scroll, for all Elementary application + * windows. + * + * @param enabled the thumb scroll bouncing state + * + * @see elm_thumbscroll_bounce_enabled_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_bounce_enabled_all_set(Eina_Bool enabled); - /** - * Get the amount of inertia a scroller will impose at bounce - * animations. - * - * @return the thumb scroll bounce friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_bounce_friction_get(void); +/** + * Get the amount of inertia a scroller will impose at bounce + * animations. + * + * @return the thumb scroll bounce friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_bounce_friction_get(void); - /** - * Set the amount of inertia a scroller will impose at bounce - * animations. - * - * @param friction the thumb scroll bounce friction - * - * @see elm_thumbscroll_bounce_friction_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_bounce_friction_set(double friction); +/** + * Set the amount of inertia a scroller will impose at bounce + * animations. + * + * @param friction the thumb scroll bounce friction + * + * @see elm_thumbscroll_bounce_friction_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_bounce_friction_set(double friction); - /** - * Set the amount of inertia a scroller will impose at bounce - * animations, for all Elementary application windows. - * - * @param friction the thumb scroll bounce friction - * - * @see elm_thumbscroll_bounce_friction_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_bounce_friction_all_set(double friction); +/** + * Set the amount of inertia a scroller will impose at bounce + * animations, for all Elementary application windows. + * + * @param friction the thumb scroll bounce friction + * + * @see elm_thumbscroll_bounce_friction_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_bounce_friction_all_set(double friction); - /** - * Get the amount of inertia a paged scroller will impose at - * page fitting animations. - * - * @return the page scroll friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_page_scroll_friction_get(void); +/** + * Get the amount of inertia a paged scroller will impose at + * page fitting animations. + * + * @return the page scroll friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_page_scroll_friction_get(void); - /** - * Set the amount of inertia a paged scroller will impose at - * page fitting animations. - * - * @param friction the page scroll friction - * - * @see elm_thumbscroll_page_scroll_friction_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_page_scroll_friction_set(double friction); +/** + * Set the amount of inertia a paged scroller will impose at + * page fitting animations. + * + * @param friction the page scroll friction + * + * @see elm_thumbscroll_page_scroll_friction_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_page_scroll_friction_set(double friction); - /** - * Set the amount of inertia a paged scroller will impose at - * page fitting animations, for all Elementary application windows. - * - * @param friction the page scroll friction - * - * @see elm_thumbscroll_page_scroll_friction_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_page_scroll_friction_all_set(double friction); +/** + * Set the amount of inertia a paged scroller will impose at + * page fitting animations, for all Elementary application windows. + * + * @param friction the page scroll friction + * + * @see elm_thumbscroll_page_scroll_friction_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_page_scroll_friction_all_set(double friction); - /** - * Get the amount of inertia a scroller will impose at region bring - * animations. - * - * @return the bring in scroll friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_bring_in_scroll_friction_get(void); +/** + * Get the amount of inertia a scroller will impose at region bring + * animations. + * + * @return the bring in scroll friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_bring_in_scroll_friction_get(void); - /** - * Set the amount of inertia a scroller will impose at region bring - * animations. - * - * @param friction the bring in scroll friction - * - * @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. + * + * @param friction the bring in scroll friction + * + * @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. - * - * @param friction the bring in scroll friction - * - * @see elm_thumbscroll_bring_in_scroll_friction_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_bring_in_scroll_friction_all_set(double friction); +/** + * Set the amount of inertia a scroller will impose at region bring + * animations, for all Elementary application windows. + * + * @param friction the bring in scroll friction + * + * @see elm_thumbscroll_bring_in_scroll_friction_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +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. - * - * @return the zoom friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_zoom_friction_get(void); +/** + * Get the amount of inertia scrollers will impose at animations + * triggered by Elementary widgets' zooming API. + * + * @return the zoom friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_zoom_friction_get(void); - /** - * Set the amount of inertia scrollers will impose at animations - * triggered by Elementary widgets' zooming API. - * - * @param friction the zoom friction - * - * @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. + * + * @param friction the zoom friction + * + * @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. - * - * @param friction the zoom friction - * - * @see elm_thumbscroll_zoom_friction_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_zoom_friction_all_set(double friction); +/** + * Set the amount of inertia scrollers will impose at animations + * triggered by Elementary widgets' zooming API, for all Elementary + * application windows. + * + * @param friction the zoom friction + * + * @see elm_thumbscroll_zoom_friction_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_zoom_friction_all_set(double friction); - /** - * Get whether scrollers should be draggable from any point in their - * views. - * - * @return the thumb scroll state - * - * @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. - * - * @ingroup Scrolling - */ - EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void); +/** + * Get whether scrollers should be draggable from any point in their + * views. + * + * @return the thumb scroll state + * + * @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. + * + * @ingroup Scrolling + */ +EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void); - /** - * Set whether scrollers should be draggable from any point in their - * views. - * - * @param enabled the thumb scroll state - * - * @see elm_thumbscroll_enabled_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled); +/** + * Set whether scrollers should be draggable from any point in their + * views. + * + * @param enabled the thumb scroll state + * + * @see elm_thumbscroll_enabled_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled); - /** - * Set whether scrollers should be draggable from any point in their - * views, for all Elementary application windows. - * - * @param enabled the thumb scroll state - * - * @see elm_thumbscroll_enabled_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled); +/** + * Set whether scrollers should be draggable from any point in their + * views, for all Elementary application windows. + * + * @param enabled the thumb scroll state + * + * @see elm_thumbscroll_enabled_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled); - /** - * Get the number of pixels one should travel while dragging a - * scroller's view to actually trigger scrolling. - * - * @return the thumb scroll threshould - * - * One would use higher values for touch screens, in general, because - * of their inherent imprecision. - * @ingroup Scrolling - */ - EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void); +/** + * Get the number of pixels one should travel while dragging a + * scroller's view to actually trigger scrolling. + * + * @return the thumb scroll threshould + * + * One would use higher values for touch screens, in general, because + * of their inherent imprecision. + * @ingroup Scrolling + */ +EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void); - /** - * Set the number of pixels one should travel while dragging a - * scroller's view to actually trigger scrolling. - * - * @param threshold the thumb scroll threshould - * - * @see elm_thumbscroll_threshould_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold); +/** + * Set the number of pixels one should travel while dragging a + * scroller's view to actually trigger scrolling. + * + * @param threshold the thumb scroll threshould + * + * @see elm_thumbscroll_threshould_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold); - /** - * Set the number of pixels one should travel while dragging a - * scroller's view to actually trigger scrolling, for all Elementary - * application windows. - * - * @param threshold the thumb scroll threshould - * - * @see elm_thumbscroll_threshould_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold); +/** + * Set the number of pixels one should travel while dragging a + * scroller's view to actually trigger scrolling, for all Elementary + * application windows. + * + * @param threshold the thumb scroll threshould + * + * @see elm_thumbscroll_threshould_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold); - /** - * Get the minimum speed of mouse cursor movement which will trigger - * list self scrolling animation after a mouse up event - * (pixels/second). - * - * @return the thumb scroll momentum threshould - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void); +/** + * Get the minimum speed of mouse cursor movement which will trigger + * list self scrolling animation after a mouse up event + * (pixels/second). + * + * @return the thumb scroll momentum threshould + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void); - /** - * Set the minimum speed of mouse cursor movement which will trigger - * list self scrolling animation after a mouse up event - * (pixels/second). - * - * @param threshold the thumb scroll momentum threshould - * - * @see elm_thumbscroll_momentum_threshould_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold); +/** + * Set the minimum speed of mouse cursor movement which will trigger + * list self scrolling animation after a mouse up event + * (pixels/second). + * + * @param threshold the thumb scroll momentum threshould + * + * @see elm_thumbscroll_momentum_threshould_get() + * @ingroup Scrolling + */ +EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold); - /** - * 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 threshold the thumb scroll momentum threshould - * - * @see elm_thumbscroll_momentum_threshould_get() - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold); +/** + * 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 threshold the thumb scroll momentum threshould + * + * @see elm_thumbscroll_momentum_threshould_get() + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold); - /** - * Get the amount of inertia a scroller will impose at self scrolling - * animations. - * - * @return the thumb scroll friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_thumbscroll_friction_get(void); +/** + * Get the amount of inertia a scroller will impose at self scrolling + * animations. + * + * @return the thumb scroll friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_thumbscroll_friction_get(void); - /** - * Set the amount of inertia a scroller will impose at self scrolling - * animations. - * - * @param friction the thumb scroll friction - * - * @see elm_thumbscroll_friction_get() - * @ingroup Scrolling - */ - EAPI void elm_scroll_thumbscroll_friction_set(double friction); +/** + * Set the amount of inertia a scroller will impose at self scrolling + * animations. + * + * @param friction the thumb scroll friction + * + * @see elm_thumbscroll_friction_get() + * @ingroup Scrolling + */ +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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_friction_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_friction_all_set(double friction); - /** - * 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. - * - * @return the thumb scroll border friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_thumbscroll_border_friction_get(void); +/** + * 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. + * + * @return the thumb scroll border friction + * + * @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. - * - * @param friction the thumb scroll border friction. @c 0.0 for - * perfect synchrony between two movements, @c 1.0 for maximum - * lag. - * - * @see elm_thumbscroll_border_friction_get() - * @note parameter value will get bound to 0.0 - 1.0 interval, always - * - * @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. + * + * @param friction the thumb scroll border friction. @c 0.0 for + * perfect synchrony between two movements, @c 1.0 for maximum + * lag. + * + * @see elm_thumbscroll_border_friction_get() + * @note parameter value will get bound to 0.0 - 1.0 interval, always + * + * @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. - * - * @param friction the thumb scroll border friction. @c 0.0 for - * perfect synchrony between two movements, @c 1.0 for maximum - * lag. - * - * @see elm_thumbscroll_border_friction_get() - * @note parameter value will get bound to 0.0 - 1.0 interval, always - * - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_border_friction_all_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. + * + * @param friction the thumb scroll border friction. @c 0.0 for + * perfect synchrony between two movements, @c 1.0 for maximum + * lag. + * + * @see elm_thumbscroll_border_friction_get() + * @note parameter value will get bound to 0.0 - 1.0 interval, always + * + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_border_friction_all_set(double friction); - /** - * Get the sensitivity amount which is be multiplied by the length of - * mouse dragging. - * - * @return the thumb scroll sensitivity friction - * - * @ingroup Scrolling - */ - EAPI double elm_scroll_thumbscroll_sensitivity_friction_get(void); +/** + * Get the sensitivity amount which is be multiplied by the length of + * mouse dragging. + * + * @return the thumb scroll sensitivity friction + * + * @ingroup Scrolling + */ +EAPI double elm_scroll_thumbscroll_sensitivity_friction_get(void); - /** - * Set the sensitivity amount which is be multiplied by the length of - * mouse dragging. - * - * @param friction the thumb scroll sensitivity friction. @c 0.1 for - * minimun sensitivity, @c 1.0 for maximum sensitivity. 0.25 - * is proper. - * - * @see elm_thumbscroll_sensitivity_friction_get() - * @note parameter value will get bound to 0.1 - 1.0 interval, always - * - * @ingroup Scrolling - */ - EAPI void elm_scroll_thumbscroll_sensitivity_friction_set(double friction); +/** + * Set the sensitivity amount which is be multiplied by the length of + * mouse dragging. + * + * @param friction the thumb scroll sensitivity friction. @c 0.1 for + * minimun sensitivity, @c 1.0 for maximum sensitivity. 0.25 + * is proper. + * + * @see elm_thumbscroll_sensitivity_friction_get() + * @note parameter value will get bound to 0.1 - 1.0 interval, always + * + * @ingroup Scrolling + */ +EAPI void elm_scroll_thumbscroll_sensitivity_friction_set(double friction); - /** - * Set the sensitivity amount which is be multiplied by the length of - * mouse dragging, for all Elementary application windows. - * - * @param friction the thumb scroll sensitivity friction. @c 0.1 for - * minimun sensitivity, @c 1.0 for maximum sensitivity. 0.25 - * is proper. - * - * @see elm_thumbscroll_sensitivity_friction_get() - * @note parameter value will get bound to 0.1 - 1.0 interval, always - * - * @ingroup Scrolling - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scroll_thumbscroll_sensitivity_friction_all_set(double friction); +/** + * Set the sensitivity amount which is be multiplied by the length of + * mouse dragging, for all Elementary application windows. + * + * @param friction the thumb scroll sensitivity friction. @c 0.1 for + * minimun sensitivity, @c 1.0 for maximum sensitivity. 0.25 + * is proper. + * + * @see elm_thumbscroll_sensitivity_friction_get() + * @note parameter value will get bound to 0.1 - 1.0 interval, always + * + * @ingroup Scrolling + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scroll_thumbscroll_sensitivity_friction_all_set(double friction); - /** - * @} - */ +/** + * @} + */ - /** - * Get the duration for occuring long press event. - * - * @return Timeout for long press event - * @ingroup Longpress - */ - EAPI double elm_longpress_timeout_get(void); - - /** - * Set the duration for occuring long press event. - * - * @param lonpress_timeout Timeout for long press event - * @ingroup Longpress - */ - EAPI void elm_longpress_timeout_set(double longpress_timeout); +/** + * Get the duration for occuring long press event. + * + * @return Timeout for long press event + * @ingroup Longpress + */ +EAPI double elm_longpress_timeout_get(void); +/** + * Set the duration for occuring long press event. + * + * @param lonpress_timeout Timeout for long press event + * @ingroup Longpress + */ +EAPI void elm_longpress_timeout_set(double longpress_timeout); diff --git a/legacy/elementary/src/lib/elm_conform.h b/legacy/elementary/src/lib/elm_conform.h index c193bd9843..cffbf53ade 100644 --- a/legacy/elementary/src/lib/elm_conform.h +++ b/legacy/elementary/src/lib/elm_conform.h @@ -1,119 +1,120 @@ - /** - * @defgroup Conformant Conformant - * @ingroup Elementary - * - * @image html img/widget/conformant/preview-00.png - * @image latex img/widget/conformant/preview-00.eps width=\textwidth - * - * @image html img/conformant.png - * @image latex img/conformant.eps width=\textwidth - * - * The aim is to provide a widget that can be used in elementary apps to - * account for space taken up by the indicator, virtual keypad & softkey - * windows when running the illume2 module of E17. - * - * So conformant content will be sized and positioned considering the - * space required for such stuff, and when they popup, as a keyboard - * shows when an entry is selected, conformant content won't change. - * - * Available styles for it: - * - @c "default" - * - * Default contents parts of the conformant widget that you can use for are: - * @li "default" - A content of the conformant - * - * See how to use this widget in this example: - * @ref conformant_example - */ +/** + * @defgroup Conformant Conformant + * @ingroup Elementary + * + * @image html img/widget/conformant/preview-00.png + * @image latex img/widget/conformant/preview-00.eps width=\textwidth + * + * @image html img/conformant.png + * @image latex img/conformant.eps width=\textwidth + * + * The aim is to provide a widget that can be used in elementary apps to + * account for space taken up by the indicator, virtual keypad & softkey + * windows when running the illume2 module of E17. + * + * So conformant content will be sized and positioned considering the + * space required for such stuff, and when they popup, as a keyboard + * shows when an entry is selected, conformant content won't change. + * + * Available styles for it: + * - @c "default" + * + * Default contents parts of the conformant widget that you can use for are: + * @li "default" - A content of the conformant + * + * See how to use this widget in this example: + * @ref conformant_example + */ - /** - * @addtogroup Conformant - * @{ - */ +/** + * @addtogroup Conformant + * @{ + */ - /** - * Add a new conformant widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return A new conformant widget handle or @c NULL, on errors. - * - * This function inserts a new conformant widget on the canvas. - * - * @ingroup Conformant - */ - EAPI Evas_Object *elm_conformant_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new conformant widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return A new conformant widget handle or @c NULL, on errors. + * + * This function inserts a new conformant widget on the canvas. + * + * @ingroup Conformant + */ +EAPI Evas_Object * + elm_conformant_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the content of the conformant widget. - * - * @param obj The conformant object. - * @param content The content to be displayed by the conformant. - * - * Content will be sized and positioned considering the space required - * to display a virtual keyboard. So it won't fill all the conformant - * size. This way is possible to be sure that content won't resize - * or be re-positioned after the keyboard is displayed. - * - * Once the content object is set, a previously set one will be deleted. - * If you want to keep that old content object, use the - * elm_object_content_unset() function. - * - * @see elm_object_content_unset() - * @see elm_object_content_get() - * - * @deprecated use elm_object_content_set() instead - * - * @ingroup Conformant - */ - EINA_DEPRECATED EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the content of the conformant widget. + * + * @param obj The conformant object. + * @param content The content to be displayed by the conformant. + * + * Content will be sized and positioned considering the space required + * to display a virtual keyboard. So it won't fill all the conformant + * size. This way is possible to be sure that content won't resize + * or be re-positioned after the keyboard is displayed. + * + * Once the content object is set, a previously set one will be deleted. + * If you want to keep that old content object, use the + * elm_object_content_unset() function. + * + * @see elm_object_content_unset() + * @see elm_object_content_get() + * + * @deprecated use elm_object_content_set() instead + * + * @ingroup Conformant + */ +EINA_DEPRECATED EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Get the content of the conformant widget. - * - * @param obj The conformant object. - * @return The content that is being used. - * - * Return the content object which is set for this widget. - * It won't be unparent from conformant. For that, use - * elm_object_content_unset(). - * - * @see elm_object_content_set(). - * @see elm_object_content_unset() - * - * @deprecated use elm_object_content_get() instead - * - * @ingroup Conformant - */ - EINA_DEPRECATED EAPI Evas_Object *elm_conformant_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the content of the conformant widget. + * + * @param obj The conformant object. + * @return The content that is being used. + * + * Return the content object which is set for this widget. + * It won't be unparent from conformant. For that, use + * elm_object_content_unset(). + * + * @see elm_object_content_set(). + * @see elm_object_content_unset() + * + * @deprecated use elm_object_content_get() instead + * + * @ingroup Conformant + */ +EINA_DEPRECATED EAPI Evas_Object *elm_conformant_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the content of the conformant widget. - * - * @param obj The conformant object. - * @return The content that was being used. - * - * Unparent and return the content object which was set for this widget. - * - * @see elm_object_content_set(). - * - * @deprecated use elm_object_content_unset() instead - * - * @ingroup Conformant - */ - EINA_DEPRECATED EAPI Evas_Object *elm_conformant_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the content of the conformant widget. + * + * @param obj The conformant object. + * @return The content that was being used. + * + * Unparent and return the content object which was set for this widget. + * + * @see elm_object_content_set(). + * + * @deprecated use elm_object_content_unset() instead + * + * @ingroup Conformant + */ +EINA_DEPRECATED EAPI Evas_Object *elm_conformant_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Returns the Evas_Object that represents the content area. - * - * @param obj The conformant object. - * @return The content area of the widget. - * - * @ingroup Conformant - */ - EAPI Evas_Object *elm_conformant_content_area_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Returns the Evas_Object that represents the content area. + * + * @param obj The conformant object. + * @return The content area of the widget. + * + * @ingroup Conformant + */ +EAPI Evas_Object *elm_conformant_content_area_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_cursor.h b/legacy/elementary/src/lib/elm_cursor.h index 89a419db12..8010401ab6 100644 --- a/legacy/elementary/src/lib/elm_cursor.h +++ b/legacy/elementary/src/lib/elm_cursor.h @@ -1,144 +1,145 @@ - /** - * @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. To set cursor's hot spot, - * two data items should be added to cursor's theme: "hot_x" and - * "hot_y", that are the offset from upper-left corner of the cursor - * (coordinates 0,0). - * - * @{ - */ +/** + * @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. To set cursor's hot spot, + * two data items should be added to cursor's theme: "hot_x" and + * "hot_y", that are the offset from upper-left corner of the cursor + * (coordinates 0,0). + * + * @{ + */ - /** - * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); - /** - * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_debug.h b/legacy/elementary/src/lib/elm_debug.h index f5a07fb20e..3d4efbf97c 100644 --- a/legacy/elementary/src/lib/elm_debug.h +++ b/legacy/elementary/src/lib/elm_debug.h @@ -1,28 +1,27 @@ - /** - * @defgroup Debug Debug - * don't use it unless you are sure - * - * @{ - */ +/** + * @defgroup Debug Debug + * don't use it unless you are sure + * + * @{ + */ - /** - * Print Tree object hierarchy in stdout - * - * @param obj The root object - * @ingroup Debug - */ - EAPI void elm_object_tree_dump(const Evas_Object *top); +/** + * Print Tree object hierarchy in stdout + * + * @param obj The root object + * @ingroup Debug + */ +EAPI void elm_object_tree_dump(const Evas_Object *top); - /** - * Print Elm Objects tree hierarchy in file as dot(graphviz) syntax. - * - * @param obj The root object - * @param file The path of output file - * @ingroup Debug - */ - EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file); - - /** - * @} - */ +/** + * Print Elm Objects tree hierarchy in file as dot(graphviz) syntax. + * + * @param obj The root object + * @param file The path of output file + * @ingroup Debug + */ +EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_deprecated.h b/legacy/elementary/src/lib/elm_deprecated.h index 833f6c10e6..d2cce5a619 100644 --- a/legacy/elementary/src/lib/elm_deprecated.h +++ b/legacy/elementary/src/lib/elm_deprecated.h @@ -1,270 +1,271 @@ - /* TEMPORARY: DOCS WILL BE FILLED IN WITH CNP/SED */ - // XXX: elm_gen -> kill. - typedef struct Elm_Gen_Item Elm_Gen_Item; - typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class; - typedef struct _Elm_Gen_Item_Class_Func Elm_Gen_Item_Class_Func; /**< Class functions for gen item classes. */ - typedef char *(*Elm_Gen_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */ - typedef Evas_Object *(*Elm_Gen_Item_Content_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< Content(swallowed object) fetching class function for gen item classes. */ - typedef Eina_Bool (*Elm_Gen_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gen item classes. */ - typedef void (*Elm_Gen_Item_Del_Cb) (void *data, Evas_Object *obj); /**< Deletion class function for gen item classes. */ - struct _Elm_Gen_Item_Class - { - const char *item_style; - struct _Elm_Gen_Item_Class_Func - { - Elm_Gen_Item_Text_Get_Cb text_get; - Elm_Gen_Item_Content_Get_Cb content_get; - Elm_Gen_Item_State_Get_Cb state_get; - Elm_Gen_Item_Del_Cb del; - } func; - }; - EINA_DEPRECATED EAPI void elm_gen_clear(Evas_Object *obj); - EINA_DEPRECATED EAPI void elm_gen_item_selected_set(Elm_Gen_Item *it, Eina_Bool selected); - EINA_DEPRECATED EAPI Eina_Bool elm_gen_item_selected_get(const Elm_Gen_Item *it); - EINA_DEPRECATED EAPI void elm_gen_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select); - EINA_DEPRECATED EAPI Eina_Bool elm_gen_always_select_mode_get(const Evas_Object *obj); - EINA_DEPRECATED EAPI void elm_gen_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select); - EINA_DEPRECATED EAPI Eina_Bool elm_gen_no_select_mode_get(const Evas_Object *obj); - EINA_DEPRECATED EAPI void elm_gen_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); - EINA_DEPRECATED EAPI void elm_gen_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); - EINA_DEPRECATED EAPI void elm_gen_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); - EINA_DEPRECATED EAPI void elm_gen_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel); +/* TEMPORARY: DOCS WILL BE FILLED IN WITH CNP/SED */ +// XXX: elm_gen -> kill. +typedef struct Elm_Gen_Item Elm_Gen_Item; +typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class; +typedef struct _Elm_Gen_Item_Class_Func Elm_Gen_Item_Class_Func; /**< Class functions for gen item classes. */ +typedef char *(*Elm_Gen_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< Label fetching class function for gen item classes. */ +typedef Evas_Object *(*Elm_Gen_Item_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< Content(swallowed object) fetching class function for gen item classes. */ +typedef Eina_Bool (*Elm_Gen_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part); /**< State fetching class function for gen item classes. */ +typedef void (*Elm_Gen_Item_Del_Cb)(void *data, Evas_Object *obj); /**< Deletion class function for gen item classes. */ +struct _Elm_Gen_Item_Class +{ + const char *item_style; + struct _Elm_Gen_Item_Class_Func + { + Elm_Gen_Item_Text_Get_Cb text_get; + Elm_Gen_Item_Content_Get_Cb content_get; + Elm_Gen_Item_State_Get_Cb state_get; + Elm_Gen_Item_Del_Cb del; + } func; +}; +EINA_DEPRECATED EAPI void elm_gen_clear(Evas_Object *obj); +EINA_DEPRECATED EAPI void elm_gen_item_selected_set(Elm_Gen_Item *it, Eina_Bool selected); +EINA_DEPRECATED EAPI Eina_Bool elm_gen_item_selected_get(const Elm_Gen_Item *it); +EINA_DEPRECATED EAPI void elm_gen_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select); +EINA_DEPRECATED EAPI Eina_Bool elm_gen_always_select_mode_get(const Evas_Object *obj); +EINA_DEPRECATED EAPI void elm_gen_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select); +EINA_DEPRECATED EAPI Eina_Bool elm_gen_no_select_mode_get(const Evas_Object *obj); +EINA_DEPRECATED EAPI void elm_gen_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); +EINA_DEPRECATED EAPI void elm_gen_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); +EINA_DEPRECATED EAPI void elm_gen_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); +EINA_DEPRECATED EAPI void elm_gen_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel); - EINA_DEPRECATED EAPI void elm_gen_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); - EINA_DEPRECATED EAPI void elm_gen_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); - EINA_DEPRECATED EAPI void elm_gen_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); - EINA_DEPRECATED EAPI void elm_gen_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); - EINA_DEPRECATED EAPI void elm_gen_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); - EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_first_item_get(const Evas_Object *obj); - EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_last_item_get(const Evas_Object *obj); - EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_item_next_get(const Elm_Gen_Item *it); - EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_item_prev_get(const Elm_Gen_Item *it); - EINA_DEPRECATED EAPI Evas_Object *elm_gen_item_widget_get(const Elm_Gen_Item *it); +EINA_DEPRECATED EAPI void elm_gen_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); +EINA_DEPRECATED EAPI void elm_gen_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); +EINA_DEPRECATED EAPI void elm_gen_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); +EINA_DEPRECATED EAPI void elm_gen_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); +EINA_DEPRECATED EAPI void elm_gen_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); +EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_first_item_get(const Evas_Object *obj); +EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_last_item_get(const Evas_Object *obj); +EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_item_next_get(const Elm_Gen_Item *it); +EINA_DEPRECATED EAPI Elm_Gen_Item *elm_gen_item_prev_get(const Elm_Gen_Item *it); +EINA_DEPRECATED EAPI Evas_Object *elm_gen_item_widget_get(const Elm_Gen_Item *it); - /** - * @defgroup Toggle Toggle - * - * @image html img/widget/toggle/preview-00.png - * @image latex img/widget/toggle/preview-00.eps - * - * @brief A toggle is a slider which can be used to toggle between - * two values. It has two states: on and off. - * - * This widget is deprecated. Please use elm_check_add() instead using the - * toggle style like: - * - * @code - * obj = elm_check_add(parent); - * elm_object_style_set(obj, "toggle"); - * elm_object_part_text_set(obj, "on", "ON"); - * elm_object_part_text_set(obj, "off", "OFF"); - * @endcode - * - * 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). - * - * Default contents parts of the toggle widget that you can use for are: - * @li "icon" - An icon of the toggle - * - * Default text parts of the toggle widget that you can use for are: - * @li "elm.text" - Label of the toggle - * - * @ref tutorial_toggle show how to use a toggle. - * @{ - */ +/** + * @defgroup Toggle Toggle + * + * @image html img/widget/toggle/preview-00.png + * @image latex img/widget/toggle/preview-00.eps + * + * @brief A toggle is a slider which can be used to toggle between + * two values. It has two states: on and off. + * + * This widget is deprecated. Please use elm_check_add() instead using the + * toggle style like: + * + * @code + * obj = elm_check_add(parent); + * elm_object_style_set(obj, "toggle"); + * elm_object_part_text_set(obj, "on", "ON"); + * elm_object_part_text_set(obj, "off", "OFF"); + * @endcode + * + * 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). + * + * Default contents parts of the toggle widget that you can use for are: + * @li "icon" - An icon of the toggle + * + * Default text parts of the toggle widget that you can use for are: + * @li "elm.text" - Label of the toggle + * + * @ref tutorial_toggle show how to use a toggle. + * @{ + */ - /** - * @brief Add a toggle to @p parent. - * - * @param parent The parent object - * - * @return The toggle object - */ - EINA_DEPRECATED EAPI Evas_Object *elm_toggle_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a toggle to @p parent. + * + * @param parent The parent object + * + * @return The toggle object + */ +EINA_DEPRECATED EAPI Evas_Object * + elm_toggle_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Sets the label to be displayed with the toggle. - * - * @param obj The toggle object - * @param label The label to be displayed - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Sets the label to be displayed with the toggle. + * + * @param obj The toggle object + * @param label The label to be displayed + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Gets the label of the toggle - * - * @param obj toggle object - * @return The label of the toggle - * - * @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 Gets the label of the toggle + * + * @param obj toggle object + * @return The label of the toggle + * + * @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 - * - * @param obj The toggle object - * @param icon The icon object for the button - * - * 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. - * - * @deprecated use elm_object_part_content_set() instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * @brief Set the icon used for the toggle + * + * @param obj The toggle object + * @param icon The icon object for the button + * + * 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. + * + * @deprecated use elm_object_part_content_set() instead. + */ +EINA_DEPRECATED EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon used for the toggle - * - * @param obj The toggle object - * @return The icon object that is being used - * - * Return the icon object which is set for this widget. - * - * @see elm_toggle_icon_set() - * - * @deprecated use elm_object_part_content_get() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the icon used for the toggle + * + * @param obj The toggle object + * @return The icon object that is being used + * + * Return the icon object which is set for this widget. + * + * @see elm_toggle_icon_set() + * + * @deprecated use elm_object_part_content_get() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the icon used for the toggle - * - * @param obj The toggle object - * @return The icon object that was being used - * - * Unparent and return the icon object which was set for this widget. - * - * @see elm_toggle_icon_set() - * - * @deprecated use elm_object_part_content_unset() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the icon used for the toggle + * + * @param obj The toggle object + * @return The icon object that was being used + * + * Unparent and return the icon object which was set for this widget. + * + * @see elm_toggle_icon_set() + * + * @deprecated use elm_object_part_content_unset() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_toggle_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Sets the labels to be associated with the on and off states of the toggle. - * - * @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 - * - * @deprecated use elm_object_part_text_set() for "on" and "off" parts - * instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) EINA_ARG_NONNULL(1); +/** + * @brief Sets the labels to be associated with the on and off states of the toggle. + * + * @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 + * + * @deprecated use elm_object_part_text_set() for "on" and "off" parts + * instead. + */ +EINA_DEPRECATED 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 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 - * - * @deprecated use elm_object_part_text_get() for "on" and "off" parts - * instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_states_labels_get(const 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 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 + * + * @deprecated use elm_object_part_text_get() for "on" and "off" parts + * instead. + */ +EINA_DEPRECATED 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. - * - * @param obj The toggle object - * @param state The state of @p obj - * - * @deprecated use elm_check_state_set() instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); +/** + * @brief Sets the state of the toggle to @p state. + * + * @param obj The toggle object + * @param state The state of @p obj + * + * @deprecated use elm_check_state_set() instead. + */ +EINA_DEPRECATED EAPI void elm_toggle_state_set(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); - /** - * @brief Gets the state of the toggle to @p state. - * - * @param obj The toggle object - * @return The state of @p obj - * - * @deprecated use elm_check_state_get() instead. - */ - EINA_DEPRECATED EAPI Eina_Bool elm_toggle_state_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Gets the state of the toggle to @p state. + * + * @param obj The toggle object + * @return The state of @p obj + * + * @deprecated use elm_check_state_get() instead. + */ +EINA_DEPRECATED 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 toggle object - * @param statep The state pointer of @p obj - * - * @deprecated use elm_check_state_pointer_set() instead. - */ - EINA_DEPRECATED EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1); +/** + * @brief Sets the state pointer of the toggle to @p statep. + * + * @param obj The toggle object + * @param statep The state pointer of @p obj + * + * @deprecated use elm_check_state_pointer_set() instead. + */ +EINA_DEPRECATED EAPI void elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) EINA_ARG_NONNULL(1); - /** - * @} - */ - - EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI const char *elm_scrolled_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI const char *elm_scrolled_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI const char *elm_scrolled_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_pos_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI int elm_scrolled_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_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); - EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1, 2); - EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1, 2); - EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_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); - EINA_DEPRECATED EAPI void elm_scrolled_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); - EINA_DEPRECATED EAPI void elm_scrolled_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); - EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); - EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); - EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func) (void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); - EINA_DEPRECATED EAPI void elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ +EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI const char *elm_scrolled_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_is_empty(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI const char *elm_scrolled_entry_selection_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_select_all(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_next(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_prev(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_up(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_down(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_selection_end(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI const char *elm_scrolled_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cursor_pos_set(Evas_Object *obj, int pos) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI int elm_scrolled_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_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); +EINA_DEPRECATED EAPI void elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_context_menu_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1, 2); +EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1, 2); +EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Evas_Object *elm_scrolled_entry_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_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); +EINA_DEPRECATED EAPI void elm_scrolled_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); +EINA_DEPRECATED EAPI void elm_scrolled_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); +EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_append(Evas_Object *obj, void (*func)(void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); +EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_prepend(Evas_Object *obj, void (*func)(void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); +EINA_DEPRECATED EAPI void elm_scrolled_entry_text_filter_remove(Evas_Object *obj, void (*func)(void *data, Evas_Object *entry, char **text), void *data) EINA_ARG_NONNULL(1, 2); +EINA_DEPRECATED EAPI void elm_scrolled_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_file_get(const Evas_Object *obj, const char **file, Elm_Text_Format *format) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_file_save(Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_autosave_set(Evas_Object *obj, Eina_Bool autosave) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_autosave_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_diskselector.h b/legacy/elementary/src/lib/elm_diskselector.h index 866362b88d..8444490b4a 100644 --- a/legacy/elementary/src/lib/elm_diskselector.h +++ b/legacy/elementary/src/lib/elm_diskselector.h @@ -1,786 +1,785 @@ - /** - * @defgroup Diskselector Diskselector - * @ingroup Elementary - * - * @image html img/widget/diskselector/preview-00.png - * @image latex img/widget/diskselector/preview-00.eps - * - * A diskselector is a kind of list widget. It scrolls horizontally, - * and can contain label and icon objects. Three items are displayed - * with the selected one in the middle. - * - * It can act like a circular list with round mode and labels can be - * reduced for a defined length for side items. - * - * Smart callbacks one can listen to: - * - "selected" - when item is selected, i.e. scroller stops. - * - * Available styles for it: - * - @c "default" - * - * List of examples: - * @li @ref diskselector_example_01 - * @li @ref diskselector_example_02 - */ +/** + * @defgroup Diskselector Diskselector + * @ingroup Elementary + * + * @image html img/widget/diskselector/preview-00.png + * @image latex img/widget/diskselector/preview-00.eps + * + * A diskselector is a kind of list widget. It scrolls horizontally, + * and can contain label and icon objects. Three items are displayed + * with the selected one in the middle. + * + * It can act like a circular list with round mode and labels can be + * reduced for a defined length for side items. + * + * Smart callbacks one can listen to: + * - "selected" - when item is selected, i.e. scroller stops. + * + * Available styles for it: + * - @c "default" + * + * List of examples: + * @li @ref diskselector_example_01 + * @li @ref diskselector_example_02 + */ - /** - * @addtogroup Diskselector - * @{ - */ +/** + * @addtogroup Diskselector + * @{ + */ - typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; /**< Item handle for a diskselector item. Created with elm_diskselector_item_append() and deleted with elm_diskselector_item_del(). */ +typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; /**< Item handle for a diskselector item. Created with elm_diskselector_item_append() and deleted with elm_diskselector_item_del(). */ - /** - * Add a new diskselector widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new diskselector widget handle or @c NULL, on errors. - * - * This function inserts a new diskselector widget on the canvas. - * - * @ingroup Diskselector - */ - EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new diskselector widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new diskselector widget handle or @c NULL, on errors. + * + * This function inserts a new diskselector widget on the canvas. + * + * @ingroup Diskselector + */ +EAPI Evas_Object * + elm_diskselector_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Enable or disable round mode. - * - * @param obj The diskselector object. - * @param round @c EINA_TRUE to enable round mode or @c EINA_FALSE to - * disable it. - * - * Disabled by default. If round mode is enabled the items list will - * work like a circle list, so when the user reaches the last item, - * the first one will popup. - * - * @see elm_diskselector_round_get() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round) EINA_ARG_NONNULL(1); +/** + * Enable or disable round mode. + * + * @param obj The diskselector object. + * @param round @c EINA_TRUE to enable round mode or @c EINA_FALSE to + * disable it. + * + * Disabled by default. If round mode is enabled the items list will + * work like a circle list, so when the user reaches the last item, + * the first one will popup. + * + * @see elm_diskselector_round_get() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round) EINA_ARG_NONNULL(1); - /** - * Get a value whether round mode is enabled or not. - * - * @see elm_diskselector_round_set() for details. - * - * @param obj The diskselector object. - * @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates - * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @ingroup Diskselector - */ - EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether round mode is enabled or not. + * + * @see elm_diskselector_round_set() for details. + * + * @param obj The diskselector object. + * @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates + * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @ingroup Diskselector + */ +EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the side labels max length. - * - * @deprecated use elm_diskselector_side_label_length_get() instead: - * - * @param obj The diskselector object. - * @return The max length defined for side labels, or 0 if not a valid - * diskselector. - * - * @ingroup Diskselector - */ - EINA_DEPRECATED EAPI int elm_diskselector_side_label_lenght_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the side labels max length. + * + * @deprecated use elm_diskselector_side_label_length_get() instead: + * + * @param obj The diskselector object. + * @return The max length defined for side labels, or 0 if not a valid + * diskselector. + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI int elm_diskselector_side_label_lenght_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the side labels max length. - * - * @deprecated use elm_diskselector_side_label_length_set() instead: - * - * @param obj The diskselector object. - * @param len The max length defined for side labels. - * - * @ingroup Diskselector - */ - EINA_DEPRECATED EAPI void elm_diskselector_side_label_lenght_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1); +/** + * Set the side labels max length. + * + * @deprecated use elm_diskselector_side_label_length_set() instead: + * + * @param obj The diskselector object. + * @param len The max length defined for side labels. + * + * @ingroup Diskselector + */ +EINA_DEPRECATED EAPI void elm_diskselector_side_label_lenght_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1); - /** - * Get the side labels max length. - * - * @see elm_diskselector_side_label_length_set() for details. - * - * @param obj The diskselector object. - * @return The max length defined for side labels, or 0 if not a valid - * diskselector. - * - * @ingroup Diskselector - */ - EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the side labels max length. + * + * @see elm_diskselector_side_label_length_set() for details. + * + * @param obj The diskselector object. + * @return The max length defined for side labels, or 0 if not a valid + * diskselector. + * + * @ingroup Diskselector + */ +EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the side labels max length. - * - * @param obj The diskselector object. - * @param len The max length defined for side labels. - * - * Length is the number of characters of items' label that will be - * visible when it's set on side positions. It will just crop - * the string after defined size. E.g.: - * - * An item with label "January" would be displayed on side position as - * "Jan" if max length is set to 3, or "Janu", if this property - * is set to 4. - * - * When it's selected, the entire label will be displayed, except for - * width restrictions. In this case label will be cropped and "..." - * will be concatenated. - * - * Default side label max length is 3. - * - * This property will be applyed over all items, included before or - * later this function call. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1); +/** + * Set the side labels max length. + * + * @param obj The diskselector object. + * @param len The max length defined for side labels. + * + * Length is the number of characters of items' label that will be + * visible when it's set on side positions. It will just crop + * the string after defined size. E.g.: + * + * An item with label "January" would be displayed on side position as + * "Jan" if max length is set to 3, or "Janu", if this property + * is set to 4. + * + * When it's selected, the entire label will be displayed, except for + * width restrictions. In this case label will be cropped and "..." + * will be concatenated. + * + * Default side label max length is 3. + * + * This property will be applyed over all items, included before or + * later this function call. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len) EINA_ARG_NONNULL(1); - /** - * Set the number of items to be displayed. - * - * @param obj The diskselector object. - * @param num The number of items the diskselector will display. - * - * Default value is 3, and also it's the minimun. If @p num is less - * than 3, it will be set to 3. - * - * Also, it can be set on theme, using data item @c display_item_num - * on group "elm/diskselector/item/X", where X is style set. - * E.g.: - * - * group { name: "elm/diskselector/item/X"; - * data { - * item: "display_item_num" "5"; - * } - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) EINA_ARG_NONNULL(1); +/** + * Set the number of items to be displayed. + * + * @param obj The diskselector object. + * @param num The number of items the diskselector will display. + * + * Default value is 3, and also it's the minimun. If @p num is less + * than 3, it will be set to 3. + * + * Also, it can be set on theme, using data item @c display_item_num + * on group "elm/diskselector/item/X", where X is style set. + * E.g.: + * + * group { name: "elm/diskselector/item/X"; + * data { + * item: "display_item_num" "5"; + * } + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num) 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); +/** + * 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 - * when it reaches the respective edges for each axis. - * - * @param obj The diskselector 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() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 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 + * when it reaches the respective edges for each axis. + * + * @param obj The diskselector 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() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - /** - * Get the 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 diskselector 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() - * @see elm_diskselector_bounce_set() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); +/** + * Get the 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 diskselector 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() + * @see elm_diskselector_bounce_set() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - /** - * Get the scrollbar policy. - * - * @see elm_diskselector_scroller_policy_get() for details. - * - * @param obj The diskselector object. - * @param policy_h Pointer where to store horizontal scrollbar policy. - * @param policy_v Pointer where to store vertical scrollbar policy. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); +/** + * Get the scrollbar policy. + * + * @see elm_diskselector_scroller_policy_get() for details. + * + * @param obj The diskselector object. + * @param policy_h Pointer where to store horizontal scrollbar policy. + * @param policy_v Pointer where to store vertical scrollbar policy. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); - /** - * Set the scrollbar policy. - * - * @param obj The diskselector object. - * @param policy_h Horizontal scrollbar policy. - * @param policy_v Vertical scrollbar policy. - * - * 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. - * - * The both are disabled by default, i.e., are set to - * #ELM_SCROLLER_POLICY_OFF. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); +/** + * Set the scrollbar policy. + * + * @param obj The diskselector object. + * @param policy_h Horizontal scrollbar policy. + * @param policy_v Vertical scrollbar policy. + * + * 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. + * + * The both are disabled by default, i.e., are set to + * #ELM_SCROLLER_POLICY_OFF. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); - /** - * Remove all diskselector's items. - * - * @param obj The diskselector object. - * - * @see elm_diskselector_item_del() - * @see elm_diskselector_item_append() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove all diskselector's items. + * + * @param obj The diskselector object. + * + * @see elm_diskselector_item_del() + * @see elm_diskselector_item_append() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get a list of all the diskselector items. - * - * @param obj The diskselector object. - * @return An @c Eina_List of diskselector items, #Elm_Diskselector_Item, - * or @c NULL on failure. - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_item_del() - * @see elm_diskselector_clear() - * - * @ingroup Diskselector - */ - EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a list of all the diskselector items. + * + * @param obj The diskselector object. + * @return An @c Eina_List of diskselector items, #Elm_Diskselector_Item, + * or @c NULL on failure. + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_item_del() + * @see elm_diskselector_clear() + * + * @ingroup Diskselector + */ +EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Appends a new item to the diskselector object. - * - * @param obj The diskselector object. - * @param label The label of the diskselector item. - * @param icon The icon object to use at left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param func The function to call when the item is selected. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the diskselector, i.e., will - * be set as last item. Also, if there is no selected item, it will - * be selected. This will always happens for the first appended item. - * - * If no icon is set, label will be centered on item position, otherwise - * the icon will be placed at left of the label, that will be shifted - * to the right. - * - * Items created with this method can be deleted with - * elm_diskselector_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_diskselector_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user stops the diskselector with this - * item on center position. If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Simple example (with no function callback or data associated): - * @code - * disk = elm_diskselector_add(win); - * ic = elm_icon_add(win); - * elm_icon_file_set(ic, "path/to/image", NULL); - * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); - * elm_diskselector_item_append(disk, "label", ic, NULL, NULL); - * @endcode - * - * @see elm_diskselector_item_del() - * @see elm_diskselector_item_del_cb_set() - * @see elm_diskselector_clear() - * @see elm_icon_add() - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * Appends a new item to the diskselector object. + * + * @param obj The diskselector object. + * @param label The label of the diskselector item. + * @param icon The icon object to use at left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param func The function to call when the item is selected. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the diskselector, i.e., will + * be set as last item. Also, if there is no selected item, it will + * be selected. This will always happens for the first appended item. + * + * If no icon is set, label will be centered on item position, otherwise + * the icon will be placed at left of the label, that will be shifted + * to the right. + * + * Items created with this method can be deleted with + * elm_diskselector_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_diskselector_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user stops the diskselector with this + * item on center position. If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Simple example (with no function callback or data associated): + * @code + * disk = elm_diskselector_add(win); + * ic = elm_icon_add(win); + * elm_icon_file_set(ic, "path/to/image", NULL); + * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); + * elm_diskselector_item_append(disk, "label", ic, NULL, NULL); + * @endcode + * + * @see elm_diskselector_item_del() + * @see elm_diskselector_item_del_cb_set() + * @see elm_diskselector_clear() + * @see elm_icon_add() + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * Delete them item from the diskselector. + * + * @param it The item of diskselector to be deleted. + * + * If deleting all diskselector items is required, elm_diskselector_clear() + * should be used instead of getting items list and deleting each one. + * + * @see elm_diskselector_clear() + * @see elm_diskselector_item_append() + * @see elm_diskselector_item_del_cb_set() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Delete them item from the diskselector. - * - * @param it The item of diskselector to be deleted. - * - * If deleting all diskselector items is required, elm_diskselector_clear() - * should be used instead of getting items list and deleting each one. - * - * @see elm_diskselector_clear() - * @see elm_diskselector_item_append() - * @see elm_diskselector_item_del_cb_set() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Set the function called when a diskselector item is freed. + * + * @param it The item to set the callback on + * @param func The function called + * + * If there is a @p func, then it will be called prior item's memory release. + * That will be called with the following arguments: + * @li item's data; + * @li item's Evas object; + * @li item itself; + * + * This way, a data associated to a diskselector item could be properly + * freed. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - /** - * Set the function called when a diskselector item is freed. - * - * @param it The item to set the callback on - * @param func The function called - * - * If there is a @p func, then it will be called prior item's memory release. - * That will be called with the following arguments: - * @li item's data; - * @li item's Evas object; - * @li item itself; - * - * This way, a data associated to a diskselector item could be properly - * freed. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +/** + * Get the data associated to the item. + * + * @param it The diskselector item + * @return The data associated to @p it + * + * The return value is a pointer to data associated to @p item when it was + * created, with function elm_diskselector_item_append(). If no data + * was passed as argument, it will return @c NULL. + * + * @see elm_diskselector_item_append() + * + * @ingroup Diskselector + */ +EAPI void *elm_diskselector_item_data_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the data associated to the item. - * - * @param it The diskselector item - * @return The data associated to @p it - * - * The return value is a pointer to data associated to @p item when it was - * created, with function elm_diskselector_item_append(). If no data - * was passed as argument, it will return @c NULL. - * - * @see elm_diskselector_item_append() - * - * @ingroup Diskselector - */ - EAPI void *elm_diskselector_item_data_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Set the icon associated to the item. + * + * @param it The diskselector item + * @param icon The icon object to associate with @p it + * + * The icon object to use at left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * + * Once the icon object is set, a previously set one will be deleted. + * @warning Setting the same icon for two items will cause the icon to + * dissapear from the first item. + * + * If an icon was passed as argument on item creation, with function + * elm_diskselector_item_append(), it will be already + * associated to the item. + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_item_icon_get() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Set the icon associated to the item. - * - * @param it The diskselector item - * @param icon The icon object to associate with @p it - * - * The icon object to use at left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * - * Once the icon object is set, a previously set one will be deleted. - * @warning Setting the same icon for two items will cause the icon to - * dissapear from the first item. - * - * If an icon was passed as argument on item creation, with function - * elm_diskselector_item_append(), it will be already - * associated to the item. - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_item_icon_get() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Get the icon associated to the item. + * + * @param it The diskselector item + * @return The icon associated to @p it + * + * The return value is a pointer to the icon associated to @p item when it was + * created, with function elm_diskselector_item_append(), or later + * with function elm_diskselector_item_icon_set. If no icon + * was passed as argument, it will return @c NULL. + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_item_icon_set() + * + * @ingroup Diskselector + */ +EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the icon associated to the item. - * - * @param it The diskselector item - * @return The icon associated to @p it - * - * The return value is a pointer to the icon associated to @p item when it was - * created, with function elm_diskselector_item_append(), or later - * with function elm_diskselector_item_icon_set. If no icon - * was passed as argument, it will return @c NULL. - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_item_icon_set() - * - * @ingroup Diskselector - */ - EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Set the label of item. + * + * @param it The item of diskselector. + * @param label The label of item. + * + * The label to be displayed by the item. + * + * If no icon is set, label will be centered on item position, otherwise + * the icon will be placed at left of the label, that will be shifted + * to the right. + * + * An item with label "January" would be displayed on side position as + * "Jan" if max length is set to 3 with function + * elm_diskselector_side_label_lenght_set(), or "Janu", if this property + * is set to 4. + * + * When this @p item is selected, the entire label will be displayed, + * except for width restrictions. + * In this case label will be cropped and "..." will be concatenated, + * but only for display purposes. It will keep the entire string, so + * if diskselector is resized the remaining characters will be displayed. + * + * If a label was passed as argument on item creation, with function + * elm_diskselector_item_append(), it will be already + * displayed by the item. + * + * @see elm_diskselector_side_label_lenght_set() + * @see elm_diskselector_item_label_get() + * @see elm_diskselector_item_append() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Item *item, const char *label) EINA_ARG_NONNULL(1); - /** - * Set the label of item. - * - * @param it The item of diskselector. - * @param label The label of item. - * - * The label to be displayed by the item. - * - * If no icon is set, label will be centered on item position, otherwise - * the icon will be placed at left of the label, that will be shifted - * to the right. - * - * An item with label "January" would be displayed on side position as - * "Jan" if max length is set to 3 with function - * elm_diskselector_side_label_lenght_set(), or "Janu", if this property - * is set to 4. - * - * When this @p item is selected, the entire label will be displayed, - * except for width restrictions. - * In this case label will be cropped and "..." will be concatenated, - * but only for display purposes. It will keep the entire string, so - * if diskselector is resized the remaining characters will be displayed. - * - * If a label was passed as argument on item creation, with function - * elm_diskselector_item_append(), it will be already - * displayed by the item. - * - * @see elm_diskselector_side_label_lenght_set() - * @see elm_diskselector_item_label_get() - * @see elm_diskselector_item_append() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Item *item, const char *label) EINA_ARG_NONNULL(1); +/** + * Get the label of item. + * + * @param it The item of diskselector. + * @return The label of item. + * + * The return value is a pointer to the label associated to @p item when it was + * created, with function elm_diskselector_item_append(), or later + * with function elm_diskselector_item_label_set. If no label + * was passed as argument, it will return @c NULL. + * + * @see elm_diskselector_item_label_set() for more details. + * @see elm_diskselector_item_append() + * + * @ingroup Diskselector + */ +EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the label of item. - * - * @param it The item of diskselector. - * @return The label of item. - * - * The return value is a pointer to the label associated to @p item when it was - * created, with function elm_diskselector_item_append(), or later - * with function elm_diskselector_item_label_set. If no label - * was passed as argument, it will return @c NULL. - * - * @see elm_diskselector_item_label_set() for more details. - * @see elm_diskselector_item_append() - * - * @ingroup Diskselector - */ - EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the selected item. + * + * @param obj The diskselector object. + * @return The selected diskselector item. + * + * The selected item can be unselected with function + * elm_diskselector_item_selected_set(), and the first item of + * diskselector will be selected. + * + * The selected item always will be centered on diskselector, with + * full label displayed, i.e., max lenght set to side labels won't + * apply on the selected item. More details on + * elm_diskselector_side_label_length_set(). + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the selected item. - * - * @param obj The diskselector object. - * @return The selected diskselector item. - * - * The selected item can be unselected with function - * elm_diskselector_item_selected_set(), and the first item of - * diskselector will be selected. - * - * The selected item always will be centered on diskselector, with - * full label displayed, i.e., max lenght set to side labels won't - * apply on the selected item. More details on - * elm_diskselector_side_label_length_set(). - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Set the selected state of an item. + * + * @param it The diskselector item + * @param selected The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previosly selected will be unselected. + * Previoulsy selected item can be get with function + * elm_diskselector_selected_item_get(). + * + * If the item @p it is unselected, the first item of diskselector will + * be selected. + * + * Selected items will be visible on center position of diskselector. + * So if it was on another position before selected, or was invisible, + * diskselector will animate items until the selected item reaches center + * position. + * + * @see elm_diskselector_item_selected_get() + * @see elm_diskselector_selected_item_get() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); - /** - * Set the selected state of an item. - * - * @param it The diskselector item - * @param selected The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previosly selected will be unselected. - * Previoulsy selected item can be get with function - * elm_diskselector_selected_item_get(). - * - * If the item @p it is unselected, the first item of diskselector will - * be selected. - * - * Selected items will be visible on center position of diskselector. - * So if it was on another position before selected, or was invisible, - * diskselector will animate items until the selected item reaches center - * position. - * - * @see elm_diskselector_item_selected_get() - * @see elm_diskselector_selected_item_get() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); +/* + * Get whether the @p item is selected or not. + * + * @param it The diskselector item. + * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates + * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_diskselector_selected_item_set() for details. + * @see elm_diskselector_item_selected_get() + * + * @ingroup Diskselector + */ +EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /* - * Get whether the @p item is selected or not. - * - * @param it The diskselector item. - * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates - * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_diskselector_selected_item_set() for details. - * @see elm_diskselector_item_selected_get() - * - * @ingroup Diskselector - */ - EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the first item of the diskselector. + * + * @param obj The diskselector object. + * @return The first item, or @c NULL if none. + * + * The list of items follows append order. So it will return the first + * item appended to the widget that wasn't deleted. + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_items_get() + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the first item of the diskselector. - * - * @param obj The diskselector object. - * @return The first item, or @c NULL if none. - * - * The list of items follows append order. So it will return the first - * item appended to the widget that wasn't deleted. - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_items_get() - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the last item of the diskselector. + * + * @param obj The diskselector object. + * @return The last item, or @c NULL if none. + * + * The list of items follows append order. So it will return last first + * item appended to the widget that wasn't deleted. + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_items_get() + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the last item of the diskselector. - * - * @param obj The diskselector object. - * @return The last item, or @c NULL if none. - * - * The list of items follows append order. So it will return last first - * item appended to the widget that wasn't deleted. - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_items_get() - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the item before @p item in diskselector. + * + * @param it The diskselector item. + * @return The item before @p item, or @c NULL if none or on failure. + * + * The list of items follows append order. So it will return item appended + * just before @p item and that wasn't deleted. + * + * If it is the first item, @c NULL will be returned. + * First item can be get by elm_diskselector_first_item_get(). + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_items_get() + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the item before @p item in diskselector. - * - * @param it The diskselector item. - * @return The item before @p item, or @c NULL if none or on failure. - * - * The list of items follows append order. So it will return item appended - * just before @p item and that wasn't deleted. - * - * If it is the first item, @c NULL will be returned. - * First item can be get by elm_diskselector_first_item_get(). - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_items_get() - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the item after @p item in diskselector. + * + * @param it The diskselector item. + * @return The item after @p item, or @c NULL if none or on failure. + * + * The list of items follows append order. So it will return item appended + * just after @p item and that wasn't deleted. + * + * If it is the last item, @c NULL will be returned. + * Last item can be get by elm_diskselector_last_item_get(). + * + * @see elm_diskselector_item_append() + * @see elm_diskselector_items_get() + * + * @ingroup Diskselector + */ +EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the item after @p item in diskselector. - * - * @param it The diskselector item. - * @return The item after @p item, or @c NULL if none or on failure. - * - * The list of items follows append order. So it will return item appended - * just after @p item and that wasn't deleted. - * - * If it is the last item, @c NULL will be returned. - * Last item can be get by elm_diskselector_last_item_get(). - * - * @see elm_diskselector_item_append() - * @see elm_diskselector_items_get() - * - * @ingroup Diskselector - */ - EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Set the text to be shown in the diskselector item. + * + * @param item Target item + * @param text The text to set in the content + * + * Setup the text as tooltip to object. The item can have only one tooltip, + * so any previous tooltip data is removed. + * + * @see elm_object_tooltip_text_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) EINA_ARG_NONNULL(1); - /** - * Set the text to be shown in the diskselector item. - * - * @param item Target item - * @param text The text to set in the content - * - * Setup the text as tooltip to object. The item can have only one tooltip, - * so any previous tooltip data is removed. - * - * @see elm_object_tooltip_text_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the content to be shown in the tooltip item. + * + * Setup the tooltip to item. The item can have only one tooltip, + * so any previous tooltip data is removed. @p func(with @p data) will + * be called every time that need show the tooltip and it should + * return a valid Evas_Object. This object is then managed fully by + * tooltip system and is deleted when the tooltip is gone. + * + * @param item the diskselector item being attached a tooltip. + * @param func the function used to create 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_diskselector_item_tooltip_unset() or the owner @a item + * dies. This callback receives as the first parameter the + * given @a data, and @c event_info is the item. + * + * @see elm_object_tooltip_content_cb_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); - /** - * Set the content to be shown in the tooltip item. - * - * Setup the tooltip to item. The item can have only one tooltip, - * so any previous tooltip data is removed. @p func(with @p data) will - * be called every time that need show the tooltip and it should - * return a valid Evas_Object. This object is then managed fully by - * tooltip system and is deleted when the tooltip is gone. - * - * @param item the diskselector item being attached a tooltip. - * @param func the function used to create 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_diskselector_item_tooltip_unset() or the owner @a item - * dies. This callback receives as the first parameter the - * given @a data, and @c event_info is the item. - * - * @see elm_object_tooltip_content_cb_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); +/** + * Unset tooltip from item. + * + * @param item diskselector item to remove previously set tooltip. + * + * Remove tooltip from item. The callback provided as del_cb to + * elm_diskselector_item_tooltip_content_cb_set() will be called to notify + * it is not used anymore. + * + * @see elm_object_tooltip_unset() for more details. + * @see elm_diskselector_item_tooltip_content_cb_set() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Unset tooltip from item. - * - * @param item diskselector item to remove previously set tooltip. - * - * Remove tooltip from item. The callback provided as del_cb to - * elm_diskselector_item_tooltip_content_cb_set() will be called to notify - * it is not used anymore. - * - * @see elm_object_tooltip_unset() for more details. - * @see elm_diskselector_item_tooltip_content_cb_set() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Sets a different style for this item tooltip. + * + * @note before you set a style you should define a tooltip with + * elm_diskselector_item_tooltip_content_cb_set() or + * elm_diskselector_item_tooltip_text_set() + * + * @param item diskselector item with tooltip already set. + * @param style the theme style to use (default, transparent, ...) + * + * @see elm_object_tooltip_style_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); - /** - * Sets a different style for this item tooltip. - * - * @note before you set a style you should define a tooltip with - * elm_diskselector_item_tooltip_content_cb_set() or - * elm_diskselector_item_tooltip_text_set() - * - * @param item diskselector item with tooltip already set. - * @param style the theme style to use (default, transparent, ...) - * - * @see elm_object_tooltip_style_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); +/** + * Get the style for this item tooltip. + * + * @param item diskselector item with tooltip already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a tooltip set, then NULL is returned. + * + * @see elm_object_tooltip_style_get() for more details. + * @see elm_diskselector_item_tooltip_style_set() + * + * @ingroup Diskselector + */ +EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the style for this item tooltip. - * - * @param item diskselector item with tooltip already set. - * @return style the theme style in use, defaults to "default". If the - * object does not have a tooltip set, then NULL is returned. - * - * @see elm_object_tooltip_style_get() for more details. - * @see elm_diskselector_item_tooltip_style_set() - * - * @ingroup Diskselector - */ - EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Set the cursor to be shown when mouse is over the diskselector item + * + * @param item Target item + * @param cursor the cursor name to be used. + * + * @see elm_object_cursor_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) EINA_ARG_NONNULL(1); - /** - * Set the cursor to be shown when mouse is over the diskselector item - * - * @param item Target item - * @param cursor the cursor name to be used. - * - * @see elm_object_cursor_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) EINA_ARG_NONNULL(1); +/** + * Get the cursor to be shown when mouse is over the diskselector item + * + * @param item diskselector item with cursor already set. + * @return the cursor name. + * + * @see elm_object_cursor_get() for more details. + * @see elm_diskselector_cursor_set() + * + * @ingroup Diskselector + */ +EAPI const char *elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the cursor to be shown when mouse is over the diskselector item - * - * @param item diskselector item with cursor already set. - * @return the cursor name. - * - * @see elm_object_cursor_get() for more details. - * @see elm_diskselector_cursor_set() - * - * @ingroup Diskselector - */ - EAPI const char *elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Unset the cursor to be shown when mouse is over the diskselector item + * + * @param item Target item + * + * @see elm_object_cursor_unset() for more details. + * @see elm_diskselector_cursor_set() + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Unset the cursor to be shown when mouse is over the diskselector item - * - * @param item Target item - * - * @see elm_object_cursor_unset() for more details. - * @see elm_diskselector_cursor_set() - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +/** + * Sets a different style for this item cursor. + * + * @note before you set a style you should define a cursor with + * elm_diskselector_item_cursor_set() + * + * @param item diskselector item with cursor already set. + * @param style the theme style to use (default, transparent, ...) + * + * @see elm_object_cursor_style_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); - /** - * Sets a different style for this item cursor. - * - * @note before you set a style you should define a cursor with - * elm_diskselector_item_cursor_set() - * - * @param item diskselector item with cursor already set. - * @param style the theme style to use (default, transparent, ...) - * - * @see elm_object_cursor_style_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); +/** + * Get the style for this item cursor. + * + * @param item diskselector item with cursor already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a cursor set, then @c NULL is returned. + * + * @see elm_object_cursor_style_get() for more details. + * @see elm_diskselector_item_cursor_style_set() + * + * @ingroup Diskselector + */ +EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the style for this item cursor. - * - * @param item diskselector item with cursor already set. - * @return style the theme style in use, defaults to "default". If the - * object does not have a cursor set, then @c NULL is returned. - * - * @see elm_object_cursor_style_get() for more details. - * @see elm_diskselector_item_cursor_style_set() - * - * @ingroup Diskselector - */ - EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) 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_diskselector_item_cursor_set(). + * By default it will only look for cursors provided by the engine. + * + * @param item widget item with cursor already set. + * @param engine_only boolean to define if cursors set with + * elm_diskselector_item_cursor_set() should be searched only + * between cursors provided by the engine or searched on widget's + * theme as well. + * + * @see elm_object_cursor_engine_only_set() for more details. + * + * @ingroup Diskselector + */ +EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); +/** + * Get the cursor engine only usage for this item cursor. + * + * @param item widget item 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 item does not have a cursor set, then @c EINA_FALSE is returned. + * + * @see elm_object_cursor_engine_only_get() for more details. + * @see elm_diskselector_item_cursor_engine_only_set() + * + * @ingroup Diskselector + */ +EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) 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_diskselector_item_cursor_set(). - * By default it will only look for cursors provided by the engine. - * - * @param item widget item with cursor already set. - * @param engine_only boolean to define if cursors set with - * elm_diskselector_item_cursor_set() should be searched only - * between cursors provided by the engine or searched on widget's - * theme as well. - * - * @see elm_object_cursor_engine_only_set() for more details. - * - * @ingroup Diskselector - */ - EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); - - /** - * Get the cursor engine only usage for this item cursor. - * - * @param item widget item 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 item does not have a cursor set, then @c EINA_FALSE is returned. - * - * @see elm_object_cursor_engine_only_get() for more details. - * @see elm_diskselector_item_cursor_engine_only_set() - * - * @ingroup Diskselector - */ - EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); - - /** - * @} - */ - +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_engine.h b/legacy/elementary/src/lib/elm_engine.h index 54adcc62aa..1be77abda5 100644 --- a/legacy/elementary/src/lib/elm_engine.h +++ b/legacy/elementary/src/lib/elm_engine.h @@ -1,58 +1,57 @@ - /** - * @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" - * @li "ews" - * @li "opengl_cocoa" - * @li "psl1ght" - * - * @{ - */ +/** + * @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" + * @li "ews" + * @li "opengl_cocoa" + * @li "psl1ght" + * + * @{ + */ - /** - * @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() - */ - // XXX: rename to elm_engine_get() - EAPI const char *elm_engine_current_get(void); +/** + * @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() + */ +// XXX: rename to elm_engine_get() +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); - - /** - * @} - */ +/** + * @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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_entry.h b/legacy/elementary/src/lib/elm_entry.h index 1735712213..c7638cd720 100644 --- a/legacy/elementary/src/lib/elm_entry.h +++ b/legacy/elementary/src/lib/elm_entry.h @@ -1,1253 +1,1255 @@ - typedef enum _Elm_Text_Format - { - ELM_TEXT_FORMAT_PLAIN_UTF8, - ELM_TEXT_FORMAT_MARKUP_UTF8 - } Elm_Text_Format; - - /** - * Line wrapping types. - */ - typedef enum _Elm_Wrap_Type - { - ELM_WRAP_NONE = 0, /**< No wrap - value is zero */ - ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */ - ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */ - ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */ - ELM_WRAP_LAST - } Elm_Wrap_Type; - - 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 // XXX: remove this so we can expand - } Elm_Input_Panel_Layout; - - typedef enum - { - ELM_AUTOCAPITAL_TYPE_NONE, - ELM_AUTOCAPITAL_TYPE_WORD, - ELM_AUTOCAPITAL_TYPE_SENTENCE, - ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, - } Elm_Autocapital_Type; - - /** - * @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 - * - * 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. - * - * 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. - * - * Other features include password mode, filtering of inserted text with - * elm_entry_text_filter_append() and related functions, inline "items" and - * formatted markup text. - * - * @section entry-markup Formatted text - * - * 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 \: Inserts a line break. - * @li \: Inserts a paragraph separator. This is preferred over line - * breaks. - * @li \: Inserts a tab. - * @li \...\: Emphasis. Sets the @em oblique style for the - * enclosed text. - * @li \...\: Sets the @b bold style for the enclosed text. - * @li \...\: Underlines the enclosed text. - * @li \...\: Hilights the enclosed text. - * - * @section entry-special Special markups - * - * 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. - * - * @subsection entry-anchors Anchors - * - * Anchors are similar to HTML anchors. Text can be surrounded by \ and - * \ tags and an event will be generated when this text is clicked, - * like this: - * - * @code - * This text is outside but this one is an anchor - * @endcode - * - * 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. - * - * 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. - * - * @subsection entry-items Items - * - * Inlined in the text, any other @c Evas_Object can be inserted by using - * \ tags this way: - * - * @code - * - * @endcode - * - * 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. - * - * @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. - * - * 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. - * - * The next image shows different configurations of items and how - * 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. - * - * @image html entry_item.png - * @image latex entry_item.eps width=\textwidth - * - * 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. - * - * @image html entry_item_scale.png - * @image latex entry_item_scale.eps width=\textwidth - * - * 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. - * - * All of the following are currently supported: - * - * - 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 - * - * 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. - * - * @section entry-files Loading and saving files - * - * 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. - * - * @section entry-signals Emitted signals - * - * 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. - * @li "language,changed": Program language changed. - * - * @section entry-examples - * - * An overview of the Entry API can be seen in @ref entry_example_01 - * - * @{ - */ - - /** - * @typedef Elm_Entry_Anchor_Info - * - * The info sent in the callback for the "anchor,clicked" signals emitted - * by entries. - */ - typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info; - - /** - * @struct _Elm_Entry_Anchor_Info - * - * The info sent in the callback for the "anchor,clicked" signals emitted - * by entries. - */ - struct _Elm_Entry_Anchor_Info - { - const char *name; /**< The name of the anchor, as stated in its href */ - int button; /**< The mouse button used to click on it */ - Evas_Coord x, /**< Anchor geometry, relative to canvas */ - y, /**< Anchor geometry, relative to canvas */ - w, /**< Anchor geometry, relative to canvas */ - h; /**< Anchor geometry, relative to canvas */ - }; - - /** - * @typedef Elm_Entry_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 - */ - typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text); - - /** - * @typedef Elm_Entry_Change_Info - * This corresponds to Edje_Entry_Change_Info. Includes information about - * a change in the entry. - */ - typedef Edje_Entry_Change_Info Elm_Entry_Change_Info; - - - /** - * This adds an entry to @p parent object. - * - * By default, entries are: - * @li not scrolled - * @li multi-line - * @li word wrapped - * @li autosave is enabled - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_entry_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - - /** - * Sets the entry to single line mode. - * - * 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. - * - * 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 entry object - * @param single_line If true, the text in the entry - * will be on a single line. - */ - EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1); - - /** - * 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. - * - * @see elm_entry_single_line_set() - */ - EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Sets the entry to password mode. - * - * In password mode, entries are implicitly single line and the display of - * any text in them is replaced with asterisks (*). - * - * @param obj The entry object - * @param password If true, password mode is enabled. - */ - EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1); - - /** - * 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 (*). - * - * @see elm_entry_password_set() - */ - EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This sets the text displayed within the entry to @p entry. - * - * @param obj The entry object - * @param entry The text to be displayed - * - * @deprecated Use elm_object_text_set() instead. - * @note Using this function bypasses text filters - */ - 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(). - * - * @param obj The entry object - * @return The currently displayed text or NULL on failure - * - * @deprecated Use elm_object_text_get() instead. - */ - EAPI const char *elm_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * 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 - * - * @see elm_entry_text_filter_append() - */ - EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); - - /** - * 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. - * - * @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. - * - * 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. - * - * @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); - - /** - * Returns the actual textblock object of the entry. - * - * This function exposes the internal textblock object that actually - * contains and draws the text. This should be used for low-level - * manipulations that are otherwise not possible. - * - * Changing the textblock directly from here will not notify edje/elm to - * recalculate the textblock size automatically, so any modifications - * done to the textblock returned by this function should be followed by - * a call to elm_entry_calc_force(). - * - * The return value is marked as const as an additional warning. - * One should not use the returned object with any of the generic evas - * functions (geometry_get/resize/move and etc), but only with the textblock - * functions; The former will either not work at all, or break the correct - * functionality. - * - * IMPORTANT: Many functions may change (i.e delete and create a new one) - * the internal textblock object. Do NOT cache the returned object, and try - * not to mix calls on this object with regular elm_entry calls (which may - * change the internal textblock object). This applies to all cursors - * returned from textblock calls, and all the other derivative values. - * - * @param obj The entry object - * @return The textblock object. - */ - EAPI const Evas_Object *elm_entry_textblock_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Forces calculation of the entry size and text layouting. - * - * This should be used after modifying the textblock object directly. See - * elm_entry_textblock_get() for more information. - * - * @param obj The entry object - * - * @see elm_entry_textblock_get() - */ - EAPI void elm_entry_calc_force(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * 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.) - * - * If any selection exists, it will be replaced by the inserted text. - * - * The inserted text is subject to any filters set for the widget. - * - * @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); - - /** - * 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. - * - * @param obj The entry object - * @param wrap The wrap mode to use. See #Elm_Wrap_Type for details on them - */ - EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); - - /** - * Gets the wrap mode the entry was set to use. - * - * @param obj The entry object - * @return Wrap type - * - * @see also elm_entry_line_wrap_set() - */ - EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * 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. - * - * 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. - * - * @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. - * - * @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. - * - * @param obj The entry object - */ - EAPI void elm_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This selects all text within 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. - * - * @param obj The entry object - * @return EINA_TRUE upon success, EINA_FALSE upon failure - */ - EAPI Eina_Bool elm_entry_cursor_next(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); - - /** - * This moves the cursor one line up within the entry. - * - * @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. - * - * @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. - * - * @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. - * - * @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. - * - * @param obj The entry object - */ - 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); - - /** - * 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 - */ - EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This ends a selection within the entry as though - * the user had just released the mouse button while making a selection. - * - * @param obj The entry object - */ - EAPI void elm_entry_cursor_selection_end(Evas_Object *obj) 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. - * - * @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 Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Gets if the current cursor position holds a visible format node. - * - * @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_entry_cursor_is_format_get() - */ - EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Gets the character pointed by the cursor at its current position. - * - * 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. - * - * @param obj The entry object - * @return The text pointed by the cursors. - */ - EAPI const char *elm_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This function returns the geometry of the cursor. - * - * 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. - * - * @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 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); - - /** - * Sets the cursor position in the entry to the given value - * - * 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(). - * - * @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 entry object - * @return The cursor position - */ - EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This executes a "cut" action on the selected text in the entry. - * - * @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 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 entry object - */ - EAPI void elm_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This clears and frees the items in a entry's contextual (longpress) - * menu. - * - * @param obj The entry object - * - * @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. - * - * 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. - * - * With this function, developers can add other options to this menu to - * perform any action they deem necessary. - * - * @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 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 - */ - 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. - * - * @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 - * - * 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. - * - * @param obj The entry object - * @param func The function called to provide the item object - * @param data The data passed to @p func - * - * @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 - * - * This prepends the given callback. See elm_entry_item_provider_append() for - * more information - * - * @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 - * - * This removes the given callback. See elm_entry_item_provider_append() for - * more information - * - * @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 - * - * 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. - * - * @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 - * - * Prepend the given callback to the list. See elm_entry_text_filter_append() - * for more information - * - * @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 - * - * Removes the given callback from the filter list. See - * elm_entry_text_filter_append() for more information. - * - * @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. - * - * The returned string is a malloc'ed buffer and it should be freed when - * not needed anymore. - * - * @param s The string (in markup) to be converted - * @return The converted string (in UTF-8). It should be freed. - */ - 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). - * - * The returned string is a malloc'ed buffer and it should be freed when - * not needed anymore. - * - * @param s The string (in UTF-8) to be converted - * @return The converted string (in markup). It should be freed. - */ - 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). - * - * 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. - * - * @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. - * - * 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. - * - * @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() - * - * @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. - * - * @param obj The entry object - * @param autosave Autosave the loaded file or not - * - * @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. - * - * @param obj The entry object - * @return Autosave the loaded file or not - * - * @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. - * - * Normally the entry allows both text and images to be pasted. By setting - * textonly to be true, this prevents images from being pasted. - * - * Note this only changes the behaviour of text. - * - * @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. - * - * In textonly mode, only text may be pasted or dropped into the widget. - * - * @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 - * - * 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); - - /** - * 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. - * - * @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() - */ - 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. - * - * @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. - * - * @param obj The scrolled entry object - * @return the previously set icon sub-object of this entry, on - * success. - * - * @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(). - * - * @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. - * - * @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_end_set(Evas_Object *obj, Evas_Object *end); - - /** - * Gets the endmost 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 right widget inside the scroller - */ - EAPI Evas_Object *elm_entry_end_get(const Evas_Object *obj); - - /** - * Unset the endmost widget of the scrolled entry, unparenting and - * returning it. - * - * @param obj The scrolled entry object - * @return the previously set icon sub-object of this entry, on - * success. - * - * @see elm_entry_icon_set() - */ - EAPI Evas_Object *elm_entry_end_unset(Evas_Object *obj); - - /** - * Sets the visibility of the end widget of the scrolled entry, set by - * elm_entry_end_set(). - * - * @param obj The scrolled entry object - * @param setting EINA_TRUE if the object should be displayed, - * EINA_FALSE if not. - */ - EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting); - - /** - * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling - * them). - * - * 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 scrolled entry object - * @param h The horizontal scrollbar policy to apply - * @param v The vertical scrollbar policy to apply - */ - EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v); - - /** - * This enables/disables bouncing within the entry. - * - * This function sets whether the entry will bounce when scrolling reaches - * the end of the contained entry. - * - * @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 Entry object - * @param h_bounce Allow bounce horizontally - * @param v_bounce Allow bounce vertically - */ - EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); - - /* pre-made filters for entries */ - /** - * @typedef Elm_Entry_Filter_Limit_Size - * - * Data for the elm_entry_filter_limit_size() entry filter. - */ - typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size; - - /** - * @struct _Elm_Entry_Filter_Limit_Size - * - * Data for the elm_entry_filter_limit_size() entry filter. - */ - struct _Elm_Entry_Filter_Limit_Size - { - int max_char_count; /**< The maximum number of characters allowed. */ - int max_byte_count; /**< The maximum number of bytes allowed*/ - }; - - /** - * Filter inserted text based on user defined character and byte limits - * - * Add this filter to an entry to limit the characters that it will accept - * based the 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 user must create an #Elm_Entry_Filter_Limit_Size structure and pass - * it as data when setting the filter. In it, it's possible to set limits - * by character count or bytes (any of them is disabled if 0), and both can - * be set at the same time. In that case, it first checks for characters, - * then bytes. - * - * The function will cut the inserted text in order to allow only the first - * number of characters that are still allowed. The cut is made in - * characters, even when limiting by bytes, in order to always contain - * valid ones and avoid half unicode characters making it in. - * - * This filter, like any others, does not apply when setting the entry text - * directly with elm_object_text_set() (or the deprecated - * elm_entry_entry_set()). - */ - EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 2, 3); - - /** - * @typedef Elm_Entry_Filter_Accept_Set - * - * Data for the elm_entry_filter_accept_set() entry filter. - */ - typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set; - - /** - * @struct _Elm_Entry_Filter_Accept_Set - * - * Data for the elm_entry_filter_accept_set() entry filter. - */ - struct _Elm_Entry_Filter_Accept_Set - { - const char *accepted; /**< Set of characters accepted in the entry. */ - const char *rejected; /**< Set of characters rejected from the entry. */ - }; - - /** - * Filter inserted text based on accepted or rejected sets of characters - * - * Add this filter to an entry to restrict the set of accepted characters - * based on the sets in the provided #Elm_Entry_Filter_Accept_Set. - * This structure contains both accepted and rejected sets, but they are - * mutually exclusive. - * - * The @c accepted set takes preference, so if it is set, the filter will - * only work based on the accepted characters, ignoring anything in the - * @c rejected value. If @c accepted is @c NULL, then @c rejected is used. - * - * In both cases, the function filters by matching utf8 characters to the - * raw markup text, so it can be used to remove formatting tags. - * - * This filter, like any others, does not apply when setting the entry text - * directly with elm_object_text_set() (or the deprecated - * elm_entry_entry_set()). - */ - EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 3); - /** - * Set the input panel layout of the entry - * - * @param obj The entry object - * @param layout layout type - */ - EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout) EINA_ARG_NONNULL(1); - - /** - * Get the input panel layout of the entry - * - * @param obj The entry object - * @return layout type - * - * @see elm_entry_input_panel_layout_set - */ - EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the autocapitalization type on the immodule. - * - * @param obj The entry object - * @param autocapital_type The type of autocapitalization - */ - EAPI void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type) EINA_ARG_NONNULL(1); - - /** - * Retrieve the autocapitalization type on the immodule. - * - * @param obj The entry object - * @return autocapitalization type - */ - EAPI Elm_Autocapital_Type elm_entry_autocapital_type_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Sets the attribute to show the input panel automatically. - * - * @param obj The entry object - * @param enabled If true, the input panel is appeared when entry is clicked or has a focus - */ - EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); - - /** - * Retrieve the attribute to show the input panel automatically. - * - * @param obj The entry object - * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_entry_input_panel_enabled_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ - +typedef enum _Elm_Text_Format +{ + ELM_TEXT_FORMAT_PLAIN_UTF8, + ELM_TEXT_FORMAT_MARKUP_UTF8 +} Elm_Text_Format; + +/** + * Line wrapping types. + */ +typedef enum _Elm_Wrap_Type +{ + ELM_WRAP_NONE = 0, /**< No wrap - value is zero */ + ELM_WRAP_CHAR, /**< Char wrap - wrap between characters */ + ELM_WRAP_WORD, /**< Word wrap - wrap in allowed wrapping points (as defined in the unicode standard) */ + ELM_WRAP_MIXED, /**< Mixed wrap - Word wrap, and if that fails, char wrap. */ + ELM_WRAP_LAST +} Elm_Wrap_Type; + +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 // XXX: remove this so we can expand +} Elm_Input_Panel_Layout; + +typedef enum +{ + ELM_AUTOCAPITAL_TYPE_NONE, + ELM_AUTOCAPITAL_TYPE_WORD, + ELM_AUTOCAPITAL_TYPE_SENTENCE, + ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, +} Elm_Autocapital_Type; + +/** + * @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 + * + * 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. + * + * 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. + * + * Other features include password mode, filtering of inserted text with + * elm_entry_text_filter_append() and related functions, inline "items" and + * formatted markup text. + * + * @section entry-markup Formatted text + * + * 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 \: Inserts a line break. + * @li \: Inserts a paragraph separator. This is preferred over line + * breaks. + * @li \: Inserts a tab. + * @li \...\: Emphasis. Sets the @em oblique style for the + * enclosed text. + * @li \...\: Sets the @b bold style for the enclosed text. + * @li \...\: Underlines the enclosed text. + * @li \...\: Hilights the enclosed text. + * + * @section entry-special Special markups + * + * 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. + * + * @subsection entry-anchors Anchors + * + * Anchors are similar to HTML anchors. Text can be surrounded by \ and + * \ tags and an event will be generated when this text is clicked, + * like this: + * + * @code + * This text is outside but this one is an anchor + * @endcode + * + * 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. + * + * 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. + * + * @subsection entry-items Items + * + * Inlined in the text, any other @c Evas_Object can be inserted by using + * \ tags this way: + * + * @code + * + * @endcode + * + * 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. + * + * @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. + * + * 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. + * + * The next image shows different configurations of items and how + * 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. + * + * @image html entry_item.png + * @image latex entry_item.eps width=\textwidth + * + * 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. + * + * @image html entry_item_scale.png + * @image latex entry_item_scale.eps width=\textwidth + * + * 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. + * + * All of the following are currently supported: + * + * - 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 + * + * 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. + * + * @section entry-files Loading and saving files + * + * 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. + * + * @section entry-signals Emitted signals + * + * 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. + * @li "language,changed": Program language changed. + * + * @section entry-examples + * + * An overview of the Entry API can be seen in @ref entry_example_01 + * + * @{ + */ + +/** + * @typedef Elm_Entry_Anchor_Info + * + * The info sent in the callback for the "anchor,clicked" signals emitted + * by entries. + */ +typedef struct _Elm_Entry_Anchor_Info Elm_Entry_Anchor_Info; + +/** + * @struct _Elm_Entry_Anchor_Info + * + * The info sent in the callback for the "anchor,clicked" signals emitted + * by entries. + */ +struct _Elm_Entry_Anchor_Info +{ + const char *name; /**< The name of the anchor, as stated in its href */ + int button; /**< The mouse button used to click on it */ + Evas_Coord x, /**< Anchor geometry, relative to canvas */ + y, /**< Anchor geometry, relative to canvas */ + w, /**< Anchor geometry, relative to canvas */ + h; /**< Anchor geometry, relative to canvas */ +}; + +/** + * @typedef Elm_Entry_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 + */ +typedef void (*Elm_Entry_Filter_Cb)(void *data, Evas_Object *entry, char **text); + +/** + * @typedef Elm_Entry_Change_Info + * This corresponds to Edje_Entry_Change_Info. Includes information about + * a change in the entry. + */ +typedef Edje_Entry_Change_Info Elm_Entry_Change_Info; + +/** + * This adds an entry to @p parent object. + * + * By default, entries are: + * @li not scrolled + * @li multi-line + * @li word wrapped + * @li autosave is enabled + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_entry_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); + +/** + * Sets the entry to single line mode. + * + * 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. + * + * 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 entry object + * @param single_line If true, the text in the entry + * will be on a single line. + */ +EAPI void elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) EINA_ARG_NONNULL(1); + +/** + * 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. + * + * @see elm_entry_single_line_set() + */ +EAPI Eina_Bool elm_entry_single_line_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Sets the entry to password mode. + * + * In password mode, entries are implicitly single line and the display of + * any text in them is replaced with asterisks (*). + * + * @param obj The entry object + * @param password If true, password mode is enabled. + */ +EAPI void elm_entry_password_set(Evas_Object *obj, Eina_Bool password) EINA_ARG_NONNULL(1); + +/** + * 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 (*). + * + * @see elm_entry_password_set() + */ +EAPI Eina_Bool elm_entry_password_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This sets the text displayed within the entry to @p entry. + * + * @param obj The entry object + * @param entry The text to be displayed + * + * @deprecated Use elm_object_text_set() instead. + * @note Using this function bypasses text filters + */ +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(). + * + * @param obj The entry object + * @return The currently displayed text or NULL on failure + * + * @deprecated Use elm_object_text_get() instead. + */ +EAPI const char *elm_entry_entry_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * 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 + * + * @see elm_entry_text_filter_append() + */ +EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry) EINA_ARG_NONNULL(1); + +/** + * 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. + * + * @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. + * + * 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. + * + * @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); + +/** + * Returns the actual textblock object of the entry. + * + * This function exposes the internal textblock object that actually + * contains and draws the text. This should be used for low-level + * manipulations that are otherwise not possible. + * + * Changing the textblock directly from here will not notify edje/elm to + * recalculate the textblock size automatically, so any modifications + * done to the textblock returned by this function should be followed by + * a call to elm_entry_calc_force(). + * + * The return value is marked as const as an additional warning. + * One should not use the returned object with any of the generic evas + * functions (geometry_get/resize/move and etc), but only with the textblock + * functions; The former will either not work at all, or break the correct + * functionality. + * + * IMPORTANT: Many functions may change (i.e delete and create a new one) + * the internal textblock object. Do NOT cache the returned object, and try + * not to mix calls on this object with regular elm_entry calls (which may + * change the internal textblock object). This applies to all cursors + * returned from textblock calls, and all the other derivative values. + * + * @param obj The entry object + * @return The textblock object. + */ +EAPI const Evas_Object *elm_entry_textblock_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Forces calculation of the entry size and text layouting. + * + * This should be used after modifying the textblock object directly. See + * elm_entry_textblock_get() for more information. + * + * @param obj The entry object + * + * @see elm_entry_textblock_get() + */ +EAPI void elm_entry_calc_force(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * 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.) + * + * If any selection exists, it will be replaced by the inserted text. + * + * The inserted text is subject to any filters set for the widget. + * + * @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); + +/** + * 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. + * + * @param obj The entry object + * @param wrap The wrap mode to use. See #Elm_Wrap_Type for details on them + */ +EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); + +/** + * Gets the wrap mode the entry was set to use. + * + * @param obj The entry object + * @return Wrap type + * + * @see also elm_entry_line_wrap_set() + */ +EAPI Elm_Wrap_Type elm_entry_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * 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. + * + * 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. + * + * @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. + * + * @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. + * + * @param obj The entry object + */ +EAPI void elm_entry_select_none(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This selects all text within 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. + * + * @param obj The entry object + * @return EINA_TRUE upon success, EINA_FALSE upon failure + */ +EAPI Eina_Bool elm_entry_cursor_next(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); + +/** + * This moves the cursor one line up within the entry. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @param obj The entry object + */ +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); + +/** + * 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 + */ +EAPI void elm_entry_cursor_selection_begin(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This ends a selection within the entry as though + * the user had just released the mouse button while making a selection. + * + * @param obj The entry object + */ +EAPI void elm_entry_cursor_selection_end(Evas_Object *obj) 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. + * + * @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 Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Gets if the current cursor position holds a visible format node. + * + * @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_entry_cursor_is_format_get() + */ +EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Gets the character pointed by the cursor at its current position. + * + * 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. + * + * @param obj The entry object + * @return The text pointed by the cursors. + */ +EAPI const char *elm_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This function returns the geometry of the cursor. + * + * 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. + * + * @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 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); + +/** + * Sets the cursor position in the entry to the given value + * + * 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(). + * + * @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 entry object + * @return The cursor position + */ +EAPI int elm_entry_cursor_pos_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This executes a "cut" action on the selected text in the entry. + * + * @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 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 entry object + */ +EAPI void elm_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This clears and frees the items in a entry's contextual (longpress) + * menu. + * + * @param obj The entry object + * + * @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. + * + * 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. + * + * With this function, developers can add other options to this menu to + * perform any action they deem necessary. + * + * @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 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 + */ +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. + * + * @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 + * + * 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. + * + * @param obj The entry object + * @param func The function called to provide the item object + * @param data The data passed to @p func + * + * @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 + * + * This prepends the given callback. See elm_entry_item_provider_append() for + * more information + * + * @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 + * + * This removes the given callback. See elm_entry_item_provider_append() for + * more information + * + * @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 + * + * 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. + * + * @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 + * + * Prepend the given callback to the list. See elm_entry_text_filter_append() + * for more information + * + * @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 + * + * Removes the given callback from the filter list. See + * elm_entry_text_filter_append() for more information. + * + * @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. + * + * The returned string is a malloc'ed buffer and it should be freed when + * not needed anymore. + * + * @param s The string (in markup) to be converted + * @return The converted string (in UTF-8). It should be freed. + */ +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). + * + * The returned string is a malloc'ed buffer and it should be freed when + * not needed anymore. + * + * @param s The string (in UTF-8) to be converted + * @return The converted string (in markup). It should be freed. + */ +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). + * + * 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. + * + * @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. + * + * 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. + * + * @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() + * + * @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. + * + * @param obj The entry object + * @param autosave Autosave the loaded file or not + * + * @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. + * + * @param obj The entry object + * @return Autosave the loaded file or not + * + * @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. + * + * Normally the entry allows both text and images to be pasted. By setting + * textonly to be true, this prevents images from being pasted. + * + * Note this only changes the behaviour of text. + * + * @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. + * + * In textonly mode, only text may be pasted or dropped into the widget. + * + * @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 + * + * 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); + +/** + * 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. + * + * @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() + */ +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. + * + * @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. + * + * @param obj The scrolled entry object + * @return the previously set icon sub-object of this entry, on + * success. + * + * @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(). + * + * @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. + * + * @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_end_set(Evas_Object *obj, Evas_Object *end); + +/** + * Gets the endmost 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 right widget inside the scroller + */ +EAPI Evas_Object *elm_entry_end_get(const Evas_Object *obj); + +/** + * Unset the endmost widget of the scrolled entry, unparenting and + * returning it. + * + * @param obj The scrolled entry object + * @return the previously set icon sub-object of this entry, on + * success. + * + * @see elm_entry_icon_set() + */ +EAPI Evas_Object *elm_entry_end_unset(Evas_Object *obj); + +/** + * Sets the visibility of the end widget of the scrolled entry, set by + * elm_entry_end_set(). + * + * @param obj The scrolled entry object + * @param setting EINA_TRUE if the object should be displayed, + * EINA_FALSE if not. + */ +EAPI void elm_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting); + +/** + * This sets the scrolled entry's scrollbar policy (ie. enabling/disabling + * them). + * + * 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 scrolled entry object + * @param h The horizontal scrollbar policy to apply + * @param v The vertical scrollbar policy to apply + */ +EAPI void elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v); + +/** + * This enables/disables bouncing within the entry. + * + * This function sets whether the entry will bounce when scrolling reaches + * the end of the contained entry. + * + * @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 Entry object + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + */ +EAPI void elm_entry_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); + +/* pre-made filters for entries */ +/** + * @typedef Elm_Entry_Filter_Limit_Size + * + * Data for the elm_entry_filter_limit_size() entry filter. + */ +typedef struct _Elm_Entry_Filter_Limit_Size Elm_Entry_Filter_Limit_Size; + +/** + * @struct _Elm_Entry_Filter_Limit_Size + * + * Data for the elm_entry_filter_limit_size() entry filter. + */ +struct _Elm_Entry_Filter_Limit_Size +{ + int max_char_count; /**< The maximum number of characters allowed. */ + int max_byte_count; /**< The maximum number of bytes allowed*/ +}; + +/** + * Filter inserted text based on user defined character and byte limits + * + * Add this filter to an entry to limit the characters that it will accept + * based the 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 user must create an #Elm_Entry_Filter_Limit_Size structure and pass + * it as data when setting the filter. In it, it's possible to set limits + * by character count or bytes (any of them is disabled if 0), and both can + * be set at the same time. In that case, it first checks for characters, + * then bytes. + * + * The function will cut the inserted text in order to allow only the first + * number of characters that are still allowed. The cut is made in + * characters, even when limiting by bytes, in order to always contain + * valid ones and avoid half unicode characters making it in. + * + * This filter, like any others, does not apply when setting the entry text + * directly with elm_object_text_set() (or the deprecated + * elm_entry_entry_set()). + */ +EAPI void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 2, 3); + +/** + * @typedef Elm_Entry_Filter_Accept_Set + * + * Data for the elm_entry_filter_accept_set() entry filter. + */ +typedef struct _Elm_Entry_Filter_Accept_Set Elm_Entry_Filter_Accept_Set; + +/** + * @struct _Elm_Entry_Filter_Accept_Set + * + * Data for the elm_entry_filter_accept_set() entry filter. + */ +struct _Elm_Entry_Filter_Accept_Set +{ + const char *accepted; /**< Set of characters accepted in the entry. */ + const char *rejected; /**< Set of characters rejected from the entry. */ +}; + +/** + * Filter inserted text based on accepted or rejected sets of characters + * + * Add this filter to an entry to restrict the set of accepted characters + * based on the sets in the provided #Elm_Entry_Filter_Accept_Set. + * This structure contains both accepted and rejected sets, but they are + * mutually exclusive. + * + * The @c accepted set takes preference, so if it is set, the filter will + * only work based on the accepted characters, ignoring anything in the + * @c rejected value. If @c accepted is @c NULL, then @c rejected is used. + * + * In both cases, the function filters by matching utf8 characters to the + * raw markup text, so it can be used to remove formatting tags. + * + * This filter, like any others, does not apply when setting the entry text + * directly with elm_object_text_set() (or the deprecated + * elm_entry_entry_set()). + */ +EAPI void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) EINA_ARG_NONNULL(1, 3); +/** + * Set the input panel layout of the entry + * + * @param obj The entry object + * @param layout layout type + */ +EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout) EINA_ARG_NONNULL(1); + +/** + * Get the input panel layout of the entry + * + * @param obj The entry object + * @return layout type + * + * @see elm_entry_input_panel_layout_set + */ +EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the autocapitalization type on the immodule. + * + * @param obj The entry object + * @param autocapital_type The type of autocapitalization + */ +EAPI void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type) EINA_ARG_NONNULL(1); + +/** + * Retrieve the autocapitalization type on the immodule. + * + * @param obj The entry object + * @return autocapitalization type + */ +EAPI Elm_Autocapital_Type elm_entry_autocapital_type_get(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Sets the attribute to show the input panel automatically. + * + * @param obj The entry object + * @param enabled If true, the input panel is appeared when entry is clicked or has a focus + */ +EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); + +/** + * Retrieve the attribute to show the input panel automatically. + * + * @param obj The entry object + * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_entry_input_panel_enabled_get(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_factory.h b/legacy/elementary/src/lib/elm_factory.h index 26efbdf4f8..e3b0fa4a83 100644 --- a/legacy/elementary/src/lib/elm_factory.h +++ b/legacy/elementary/src/lib/elm_factory.h @@ -1,7 +1,6 @@ - EAPI Evas_Object *elm_factory_add(Evas_Object *parent); - EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content); - EINA_DEPRECATED 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); - +EAPI Evas_Object *elm_factory_add(Evas_Object *parent); +EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content); +EINA_DEPRECATED 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); diff --git a/legacy/elementary/src/lib/elm_finger.h b/legacy/elementary/src/lib/elm_finger.h index d3652b9c0d..fad563c7da 100644 --- a/legacy/elementary/src/lib/elm_finger.h +++ b/legacy/elementary/src/lib/elm_finger.h @@ -1,78 +1,77 @@ - /** - * @defgroup Fingers Fingers - * - * Elementary is designed to be finger-friendly for touchscreens, - * and so in addition to scaling for display resolution, it can - * also scale based on finger "resolution" (or size). You can then - * customize the granularity of the areas meant to receive clicks - * on touchscreens. - * - * Different profiles may have pre-set values for finger sizes. - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - * - * @{ - */ +/** + * @defgroup Fingers Fingers + * + * Elementary is designed to be finger-friendly for touchscreens, + * and so in addition to scaling for display resolution, it can + * also scale based on finger "resolution" (or size). You can then + * customize the granularity of the areas meant to receive clicks + * on touchscreens. + * + * Different profiles may have pre-set values for finger sizes. + * + * @ref general_functions_example_page "This" example contemplates + * some of these functions. + * + * @{ + */ - /** - * Get the configured "finger size" - * - * @return The finger size - * - * This gets the globally configured finger size, in pixels - * - * @ingroup Fingers - */ - EAPI Evas_Coord elm_finger_size_get(void); +/** + * Get the configured "finger size" + * + * @return The finger size + * + * This gets the globally configured finger size, in pixels + * + * @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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_finger_size_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_finger_size_all_set(Evas_Coord size); - /** - * 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 - * - * 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 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_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h); - - /** - * @} - */ +/** + * 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 + * + * 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 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_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_flip.h b/legacy/elementary/src/lib/elm_flip.h index 3f1834ca4c..f7e358e71b 100644 --- a/legacy/elementary/src/lib/elm_flip.h +++ b/legacy/elementary/src/lib/elm_flip.h @@ -1,290 +1,291 @@ - /** - * @defgroup Flip Flip - * - * @image html img/widget/flip/preview-00.png - * @image latex img/widget/flip/preview-00.eps - * - * This widget holds 2 content objects(Evas_Object): one on the front and one - * on the back. It allows you to flip from front to back and vice-versa using - * various animations. - * - * If either the front or back contents are not set the flip will treat that - * as transparent. So if you wore to set the front content but not the back, - * and then call elm_flip_go() you would see whatever is below the flip. - * - * For a list of supported animations see elm_flip_go(). - * - * Signals that you can add callbacks for are: - * "animate,begin" - when a flip animation was started - * "animate,done" - when a flip animation is finished - * - * @ref tutorial_flip show how to use most of the API. - * - * @{ - */ - typedef enum _Elm_Flip_Mode - { - ELM_FLIP_ROTATE_Y_CENTER_AXIS, - ELM_FLIP_ROTATE_X_CENTER_AXIS, - ELM_FLIP_ROTATE_XZ_CENTER_AXIS, - ELM_FLIP_ROTATE_YZ_CENTER_AXIS, - ELM_FLIP_CUBE_LEFT, - ELM_FLIP_CUBE_RIGHT, - ELM_FLIP_CUBE_UP, - ELM_FLIP_CUBE_DOWN, - ELM_FLIP_PAGE_LEFT, - ELM_FLIP_PAGE_RIGHT, - ELM_FLIP_PAGE_UP, - ELM_FLIP_PAGE_DOWN - } Elm_Flip_Mode; - typedef enum _Elm_Flip_Interaction - { - ELM_FLIP_INTERACTION_NONE, - ELM_FLIP_INTERACTION_ROTATE, - ELM_FLIP_INTERACTION_CUBE, - ELM_FLIP_INTERACTION_PAGE - } Elm_Flip_Interaction; - typedef enum _Elm_Flip_Direction - { - ELM_FLIP_DIRECTION_UP, /**< Allows interaction with the top of the widget */ - ELM_FLIP_DIRECTION_DOWN, /**< Allows interaction with the bottom of the widget */ - ELM_FLIP_DIRECTION_LEFT, /**< Allows interaction with the left portion of the widget */ - ELM_FLIP_DIRECTION_RIGHT /**< Allows interaction with the right portion of the widget */ - } Elm_Flip_Direction; +/** + * @defgroup Flip Flip + * + * @image html img/widget/flip/preview-00.png + * @image latex img/widget/flip/preview-00.eps + * + * This widget holds 2 content objects(Evas_Object): one on the front and one + * on the back. It allows you to flip from front to back and vice-versa using + * various animations. + * + * If either the front or back contents are not set the flip will treat that + * as transparent. So if you wore to set the front content but not the back, + * and then call elm_flip_go() you would see whatever is below the flip. + * + * For a list of supported animations see elm_flip_go(). + * + * Signals that you can add callbacks for are: + * "animate,begin" - when a flip animation was started + * "animate,done" - when a flip animation is finished + * + * @ref tutorial_flip show how to use most of the API. + * + * @{ + */ +typedef enum _Elm_Flip_Mode +{ + ELM_FLIP_ROTATE_Y_CENTER_AXIS, + ELM_FLIP_ROTATE_X_CENTER_AXIS, + ELM_FLIP_ROTATE_XZ_CENTER_AXIS, + ELM_FLIP_ROTATE_YZ_CENTER_AXIS, + ELM_FLIP_CUBE_LEFT, + ELM_FLIP_CUBE_RIGHT, + ELM_FLIP_CUBE_UP, + ELM_FLIP_CUBE_DOWN, + ELM_FLIP_PAGE_LEFT, + ELM_FLIP_PAGE_RIGHT, + ELM_FLIP_PAGE_UP, + ELM_FLIP_PAGE_DOWN +} Elm_Flip_Mode; +typedef enum _Elm_Flip_Interaction +{ + ELM_FLIP_INTERACTION_NONE, + ELM_FLIP_INTERACTION_ROTATE, + ELM_FLIP_INTERACTION_CUBE, + ELM_FLIP_INTERACTION_PAGE +} Elm_Flip_Interaction; +typedef enum _Elm_Flip_Direction +{ + ELM_FLIP_DIRECTION_UP, /**< Allows interaction with the top of the widget */ + ELM_FLIP_DIRECTION_DOWN, /**< Allows interaction with the bottom of the widget */ + ELM_FLIP_DIRECTION_LEFT, /**< Allows interaction with the left portion of the widget */ + ELM_FLIP_DIRECTION_RIGHT /**< Allows interaction with the right portion of the widget */ +} Elm_Flip_Direction; - /** - * @brief Add a new flip to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_flip_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new flip to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_flip_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Set the front content of the flip widget. - * - * @param obj The flip object - * @param content The new front content 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_flip_content_front_unset() function. - */ - EAPI void elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Set the front content of the flip widget. + * + * @param obj The flip object + * @param content The new front content 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_flip_content_front_unset() function. + */ +EAPI void elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Set the back content of the flip widget. - * - * @param obj The flip object - * @param content The new back content 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_flip_content_back_unset() function. - */ - EAPI void elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Set the back content of the flip widget. + * + * @param obj The flip object + * @param content The new back content 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_flip_content_back_unset() function. + */ +EAPI void elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Get the front content used for the flip - * - * @param obj The flip object - * @return The front content object that is being used - * - * Return the front content object which is set for this widget. - */ - EAPI Evas_Object *elm_flip_content_front_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the front content used for the flip + * + * @param obj The flip object + * @return The front content object that is being used + * + * Return the front content object which is set for this widget. + */ +EAPI Evas_Object *elm_flip_content_front_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the back content used for the flip - * - * @param obj The flip object - * @return The back content object that is being used - * - * Return the back content object which is set for this widget. - */ - EAPI Evas_Object *elm_flip_content_back_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the back content used for the flip + * + * @param obj The flip object + * @return The back content object that is being used + * + * Return the back content object which is set for this widget. + */ +EAPI Evas_Object *elm_flip_content_back_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the front content used for the flip - * - * @param obj The flip object - * @return The front content object that was being used - * - * Unparent and return the front content object which was set for this widget. - */ - EAPI Evas_Object *elm_flip_content_front_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the front content used for the flip + * + * @param obj The flip object + * @return The front content object that was being used + * + * Unparent and return the front content object which was set for this widget. + */ +EAPI Evas_Object *elm_flip_content_front_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the back content used for the flip - * - * @param obj The flip object - * @return The back content object that was being used - * - * Unparent and return the back content object which was set for this widget. - */ - EAPI Evas_Object *elm_flip_content_back_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the back content used for the flip + * + * @param obj The flip object + * @return The back content object that was being used + * + * Unparent and return the back content object which was set for this widget. + */ +EAPI Evas_Object *elm_flip_content_back_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get flip front visibility state - * - * @param obj The flip objct - * @return EINA_TRUE if front front is showing, EINA_FALSE if the back is - * showing. - */ - EAPI Eina_Bool elm_flip_front_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get flip front visibility state + * + * @param obj The flip objct + * @return EINA_TRUE if front front is showing, EINA_FALSE if the back is + * showing. + */ +EAPI Eina_Bool elm_flip_front_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set flip perspective - * - * @param obj The flip object - * @param foc The coordinate to set the focus on - * @param x The X coordinate - * @param y The Y coordinate - * - * @warning This function currently does nothing. - */ - EAPI void elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); +/** + * @brief Set flip perspective + * + * @param obj The flip object + * @param foc The coordinate to set the focus on + * @param x The X coordinate + * @param y The Y coordinate + * + * @warning This function currently does nothing. + */ +EAPI void elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); - /** - * @brief Runs the flip animation - * - * @param obj The flip object - * @param mode The mode type - * - * Flips the front and back contents using the @p mode animation. This - * efectively hides the currently visible content and shows the hidden one. - * - * There a number of possible animations to use for the flipping: - * @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content - * around a horizontal axis in the middle of its height, the other content - * is shown as the other side of the flip. - * @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content - * around a vertical axis in the middle of its width, the other content is - * shown as the other side of the flip. - * @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content - * around a diagonal axis in the middle of its width, the other content is - * shown as the other side of the flip. - * @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content - * around a diagonal axis in the middle of its height, the other content is - * shown as the other side of the flip. - * @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left - * as if the flip was a cube, the other content is show as the right face of - * the cube. - * @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the - * right as if the flip was a cube, the other content is show as the left - * face of the cube. - * @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the - * flip was a cube, the other content is show as the bottom face of the cube. - * @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if - * the flip was a cube, the other content is show as the upper face of the - * cube. - * @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as - * if the flip was a book, the other content is shown as the page below that. - * @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right - * as if the flip was a book, the other content is shown as the page below - * that. - * @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the - * flip was a book, the other content is shown as the page below that. - * @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the - * flip was a book, the other content is shown as the page below that. - * - * @image html elm_flip.png - * @image latex elm_flip.eps width=\textwidth - */ - EAPI void elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode) EINA_ARG_NONNULL(1); +/** + * @brief Runs the flip animation + * + * @param obj The flip object + * @param mode The mode type + * + * Flips the front and back contents using the @p mode animation. This + * efectively hides the currently visible content and shows the hidden one. + * + * There a number of possible animations to use for the flipping: + * @li ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content + * around a horizontal axis in the middle of its height, the other content + * is shown as the other side of the flip. + * @li ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content + * around a vertical axis in the middle of its width, the other content is + * shown as the other side of the flip. + * @li ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content + * around a diagonal axis in the middle of its width, the other content is + * shown as the other side of the flip. + * @li ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content + * around a diagonal axis in the middle of its height, the other content is + * shown as the other side of the flip. + * @li ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left + * as if the flip was a cube, the other content is show as the right face of + * the cube. + * @li ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the + * right as if the flip was a cube, the other content is show as the left + * face of the cube. + * @li ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the + * flip was a cube, the other content is show as the bottom face of the cube. + * @li ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if + * the flip was a cube, the other content is show as the upper face of the + * cube. + * @li ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as + * if the flip was a book, the other content is shown as the page below that. + * @li ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right + * as if the flip was a book, the other content is shown as the page below + * that. + * @li ELM_FLIP_PAGE_UP - Move the currently visible content up as if the + * flip was a book, the other content is shown as the page below that. + * @li ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the + * flip was a book, the other content is shown as the page below that. + * + * @image html elm_flip.png + * @image latex elm_flip.eps width=\textwidth + */ +EAPI void elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode) EINA_ARG_NONNULL(1); - /** - * @brief Set the interactive flip mode - * - * @param obj The flip object - * @param mode The interactive flip mode to use - * - * This sets if the flip should be interactive (allow user to click and - * drag a side of the flip to reveal the back page and cause it to flip). - * By default a flip is not interactive. You may also need to set which - * sides of the flip are "active" for flipping and how much space they use - * (a minimum of a finger size) with elm_flip_interacton_direction_enabled_set() - * and elm_flip_interacton_direction_hitsize_set() - * - * The four avilable mode of interaction are: - * @li ELM_FLIP_INTERACTION_NONE - No interaction is allowed - * @li ELM_FLIP_INTERACTION_ROTATE - Interaction will cause rotate animation - * @li ELM_FLIP_INTERACTION_CUBE - Interaction will cause cube animation - * @li ELM_FLIP_INTERACTION_PAGE - Interaction will cause page animation - * - * @note ELM_FLIP_INTERACTION_ROTATE won't cause - * ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to - * happen, those can only be acheived with elm_flip_go(); - */ - EAPI void elm_flip_interaction_set(Evas_Object *obj, Elm_Flip_Interaction mode); +/** + * @brief Set the interactive flip mode + * + * @param obj The flip object + * @param mode The interactive flip mode to use + * + * This sets if the flip should be interactive (allow user to click and + * drag a side of the flip to reveal the back page and cause it to flip). + * By default a flip is not interactive. You may also need to set which + * sides of the flip are "active" for flipping and how much space they use + * (a minimum of a finger size) with elm_flip_interacton_direction_enabled_set() + * and elm_flip_interacton_direction_hitsize_set() + * + * The four avilable mode of interaction are: + * @li ELM_FLIP_INTERACTION_NONE - No interaction is allowed + * @li ELM_FLIP_INTERACTION_ROTATE - Interaction will cause rotate animation + * @li ELM_FLIP_INTERACTION_CUBE - Interaction will cause cube animation + * @li ELM_FLIP_INTERACTION_PAGE - Interaction will cause page animation + * + * @note ELM_FLIP_INTERACTION_ROTATE won't cause + * ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to + * happen, those can only be acheived with elm_flip_go(); + */ +EAPI void elm_flip_interaction_set(Evas_Object *obj, Elm_Flip_Interaction mode); - /** - * @brief Get the interactive flip mode - * - * @param obj The flip object - * @return The interactive flip mode - * - * Returns the interactive flip mode set by elm_flip_interaction_set() - */ - EAPI Elm_Flip_Interaction elm_flip_interaction_get(const Evas_Object *obj); +/** + * @brief Get the interactive flip mode + * + * @param obj The flip object + * @return The interactive flip mode + * + * Returns the interactive flip mode set by elm_flip_interaction_set() + */ +EAPI Elm_Flip_Interaction elm_flip_interaction_get(const Evas_Object *obj); - /** - * @brief Set which directions of the flip respond to interactive flip - * - * @param obj The flip object - * @param dir The direction to change - * @param enabled If that direction is enabled or not - * - * By default all directions are disabled, so you may want to enable the - * desired directions for flipping if you need interactive flipping. You must - * call this function once for each direction that should be enabled. - * - * @see elm_flip_interaction_set() - */ - EAPI void elm_flip_interacton_direction_enabled_set(Evas_Object *obj, Elm_Flip_Direction dir, Eina_Bool enabled); +/** + * @brief Set which directions of the flip respond to interactive flip + * + * @param obj The flip object + * @param dir The direction to change + * @param enabled If that direction is enabled or not + * + * By default all directions are disabled, so you may want to enable the + * desired directions for flipping if you need interactive flipping. You must + * call this function once for each direction that should be enabled. + * + * @see elm_flip_interaction_set() + */ +EAPI void elm_flip_interacton_direction_enabled_set(Evas_Object *obj, Elm_Flip_Direction dir, Eina_Bool enabled); - /** - * @brief Get the enabled state of that flip direction - * - * @param obj The flip object - * @param dir The direction to check - * @return If that direction is enabled or not - * - * Gets the enabled state set by elm_flip_interacton_direction_enabled_set() - * - * @see elm_flip_interaction_set() - */ - EAPI Eina_Bool elm_flip_interacton_direction_enabled_get(Evas_Object *obj, Elm_Flip_Direction dir); +/** + * @brief Get the enabled state of that flip direction + * + * @param obj The flip object + * @param dir The direction to check + * @return If that direction is enabled or not + * + * Gets the enabled state set by elm_flip_interacton_direction_enabled_set() + * + * @see elm_flip_interaction_set() + */ +EAPI Eina_Bool elm_flip_interacton_direction_enabled_get(Evas_Object *obj, Elm_Flip_Direction dir); - /** - * @brief Set the amount of the flip that is sensitive to interactive flip - * - * @param obj The flip object - * @param dir The direction to modify - * @param hitsize The amount of that dimension (0.0 to 1.0) to use - * - * Set the amount of the flip that is sensitive to interactive flip, with 0 - * representing no area in the flip and 1 representing the entire flip. There - * is however a consideration to be made in that the area will never be - * smaller than the finger size set(as set in your Elementary configuration). - * - * @see elm_flip_interaction_set() - */ - EAPI void elm_flip_interacton_direction_hitsize_set(Evas_Object *obj, Elm_Flip_Direction dir, double hitsize); +/** + * @brief Set the amount of the flip that is sensitive to interactive flip + * + * @param obj The flip object + * @param dir The direction to modify + * @param hitsize The amount of that dimension (0.0 to 1.0) to use + * + * Set the amount of the flip that is sensitive to interactive flip, with 0 + * representing no area in the flip and 1 representing the entire flip. There + * is however a consideration to be made in that the area will never be + * smaller than the finger size set(as set in your Elementary configuration). + * + * @see elm_flip_interaction_set() + */ +EAPI void elm_flip_interacton_direction_hitsize_set(Evas_Object *obj, Elm_Flip_Direction dir, double hitsize); - /** - * @brief Get the amount of the flip that is sensitive to interactive flip - * - * @param obj The flip object - * @param dir The direction to check - * @return The size set for that direction - * - * Returns the amount os sensitive area set by - * elm_flip_interacton_direction_hitsize_set(). - */ - EAPI double elm_flip_interacton_direction_hitsize_get(Evas_Object *obj, Elm_Flip_Direction dir); - - /** - * @} - */ +/** + * @brief Get the amount of the flip that is sensitive to interactive flip + * + * @param obj The flip object + * @param dir The direction to check + * @return The size set for that direction + * + * Returns the amount os sensitive area set by + * elm_flip_interacton_direction_hitsize_set(). + */ +EAPI double elm_flip_interacton_direction_hitsize_get(Evas_Object *obj, Elm_Flip_Direction dir); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_flipselector.h b/legacy/elementary/src/lib/elm_flipselector.h index 576a5e3b2e..3085cd630b 100644 --- a/legacy/elementary/src/lib/elm_flipselector.h +++ b/legacy/elementary/src/lib/elm_flipselector.h @@ -1,338 +1,339 @@ - /** - * @defgroup Flipselector Flip Selector - * - * @image html img/widget/flipselector/preview-00.png - * @image latex img/widget/flipselector/preview-00.eps - * - * A flip selector is a widget to show a set of @b text items, one - * at a time, with the same sheet switching style as the @ref Clock - * "clock" widget, when one changes the current displaying sheet - * (thus, the "flip" in the name). - * - * User clicks to flip sheets which are @b held for some time will - * make the flip selector to flip continuosly and automatically for - * the user. The interval between flips will keep growing in time, - * so that it helps the user to reach an item which is distant from - * the current selection. - * - * Smart callbacks one can register to: - * - @c "selected" - when the widget's selected text item is changed - * - @c "overflowed" - when the widget's current selection is changed - * from the first item in its list to the last - * - @c "underflowed" - when the widget's current selection is changed - * from the last item in its list to the first - * - * Available styles for it: - * - @c "default" - * - * To set/get the label of the flipselector item, you can use - * elm_object_item_text_set/get APIs. - * Once the text is set, a previously set one will be deleted. - * - * Here is an example on its usage: - * @li @ref flipselector_example - */ +/** + * @defgroup Flipselector Flip Selector + * + * @image html img/widget/flipselector/preview-00.png + * @image latex img/widget/flipselector/preview-00.eps + * + * A flip selector is a widget to show a set of @b text items, one + * at a time, with the same sheet switching style as the @ref Clock + * "clock" widget, when one changes the current displaying sheet + * (thus, the "flip" in the name). + * + * User clicks to flip sheets which are @b held for some time will + * make the flip selector to flip continuosly and automatically for + * the user. The interval between flips will keep growing in time, + * so that it helps the user to reach an item which is distant from + * the current selection. + * + * Smart callbacks one can register to: + * - @c "selected" - when the widget's selected text item is changed + * - @c "overflowed" - when the widget's current selection is changed + * from the first item in its list to the last + * - @c "underflowed" - when the widget's current selection is changed + * from the last item in its list to the first + * + * Available styles for it: + * - @c "default" + * + * To set/get the label of the flipselector item, you can use + * elm_object_item_text_set/get APIs. + * Once the text is set, a previously set one will be deleted. + * + * Here is an example on its usage: + * @li @ref flipselector_example + */ - /** - * @addtogroup Flipselector - * @{ - */ +/** + * @addtogroup Flipselector + * @{ + */ - /** - * Add a new flip selector widget to the given parent Elementary - * (container) widget - * - * @param parent The parent object - * @return a new flip selector widget handle or @c NULL, on errors - * - * This function inserts a new flip selector widget on the canvas. - * - * @ingroup Flipselector - */ - EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new flip selector widget to the given parent Elementary + * (container) widget + * + * @param parent The parent object + * @return a new flip selector widget handle or @c NULL, on errors + * + * This function inserts a new flip selector widget on the canvas. + * + * @ingroup Flipselector + */ +EAPI Evas_Object * + elm_flipselector_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Programmatically select the next item of a flip selector widget - * - * @param obj The flipselector object - * - * @note The selection will be animated. Also, if it reaches the - * end of its list of member items, it will continue with the first - * one onwards. - * - * @ingroup Flipselector - */ - EAPI void elm_flipselector_flip_next(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Programmatically select the next item of a flip selector widget + * + * @param obj The flipselector object + * + * @note The selection will be animated. Also, if it reaches the + * end of its list of member items, it will continue with the first + * one onwards. + * + * @ingroup Flipselector + */ +EAPI void elm_flipselector_flip_next(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Programmatically select the previous item of a flip selector - * widget - * - * @param obj The flipselector object - * - * @note The selection will be animated. Also, if it reaches the - * beginning of its list of member items, it will continue with the - * last one backwards. - * - * @ingroup Flipselector - */ - EAPI void elm_flipselector_flip_prev(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Programmatically select the previous item of a flip selector + * widget + * + * @param obj The flipselector object + * + * @note The selection will be animated. Also, if it reaches the + * beginning of its list of member items, it will continue with the + * last one backwards. + * + * @ingroup Flipselector + */ +EAPI void elm_flipselector_flip_prev(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Append a (text) item to a flip selector widget - * - * @param obj The flipselector object - * @param label The (text) label of the new item - * @param func Convenience callback function to take place when - * item is selected - * @param data Data passed to @p func, above - * @return A handle to the item added or @c NULL, on errors - * - * The widget's list of labels to show will be appended with the - * given value. If the user wishes so, a callback function pointer - * can be passed, which will get called when this same item is - * selected. - * - * @note The current selection @b won't be modified by appending an - * element to the list. - * - * @note The maximum length of the text label is going to be - * determined by the widget's theme. Strings larger than - * that value are going to be @b truncated. - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data) EINA_ARG_NONNULL(1); +/** + * Append a (text) item to a flip selector widget + * + * @param obj The flipselector object + * @param label The (text) label of the new item + * @param func Convenience callback function to take place when + * item is selected + * @param data Data passed to @p func, above + * @return A handle to the item added or @c NULL, on errors + * + * The widget's list of labels to show will be appended with the + * given value. If the user wishes so, a callback function pointer + * can be passed, which will get called when this same item is + * selected. + * + * @note The current selection @b won't be modified by appending an + * element to the list. + * + * @note The maximum length of the text label is going to be + * determined by the widget's theme. Strings larger than + * that value are going to be @b truncated. + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data) EINA_ARG_NONNULL(1); - /** - * Prepend a (text) item to a flip selector widget - * - * @param obj The flipselector object - * @param label The (text) label of the new item - * @param func Convenience callback function to take place when - * item is selected - * @param data Data passed to @p func, above - * @return A handle to the item added or @c NULL, on errors - * - * The widget's list of labels to show will be prepended with the - * given value. If the user wishes so, a callback function pointer - * can be passed, which will get called when this same item is - * selected. - * - * @note The current selection @b won't be modified by prepending - * an element to the list. - * - * @note The maximum length of the text label is going to be - * determined by the widget's theme. Strings larger than - * that value are going to be @b truncated. - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data) EINA_ARG_NONNULL(1); +/** + * Prepend a (text) item to a flip selector widget + * + * @param obj The flipselector object + * @param label The (text) label of the new item + * @param func Convenience callback function to take place when + * item is selected + * @param data Data passed to @p func, above + * @return A handle to the item added or @c NULL, on errors + * + * The widget's list of labels to show will be prepended with the + * given value. If the user wishes so, a callback function pointer + * can be passed, which will get called when this same item is + * selected. + * + * @note The current selection @b won't be modified by prepending + * an element to the list. + * + * @note The maximum length of the text label is going to be + * determined by the widget's theme. Strings larger than + * that value are going to be @b truncated. + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data) EINA_ARG_NONNULL(1); - /** - * Get the internal list of items in a given flip selector widget. - * - * @param obj The flipselector object - * @return The list of items (#Elm_Object_Item as data) or - * @c NULL on errors. - * - * This list is @b not to be modified in any way and must not be - * freed. Use the list members with functions like - * elm_object_item_text_set(), - * elm_object_item_text_get(), - * elm_flipselector_item_del(), - * elm_flipselector_item_selected_get(), - * elm_flipselector_item_selected_set(). - * - * @warning This list is only valid until @p obj object's internal - * items list is changed. It should be fetched again with another - * call to this function when changes happen. - * - * @ingroup Flipselector - */ - EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the internal list of items in a given flip selector widget. + * + * @param obj The flipselector object + * @return The list of items (#Elm_Object_Item as data) or + * @c NULL on errors. + * + * This list is @b not to be modified in any way and must not be + * freed. Use the list members with functions like + * elm_object_item_text_set(), + * elm_object_item_text_get(), + * elm_flipselector_item_del(), + * elm_flipselector_item_selected_get(), + * elm_flipselector_item_selected_set(). + * + * @warning This list is only valid until @p obj object's internal + * items list is changed. It should be fetched again with another + * call to this function when changes happen. + * + * @ingroup Flipselector + */ +EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the first item in the given flip selector widget's list of - * items. - * - * @param obj The flipselector object - * @return The first item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_flipselector_item_append() - * @see elm_flipselector_last_item_get() - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the first item in the given flip selector widget's list of + * items. + * + * @param obj The flipselector object + * @return The first item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_flipselector_item_append() + * @see elm_flipselector_last_item_get() + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the last item in the given flip selector widget's list of - * items. - * - * @param obj The flipselector object - * @return The last item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_flipselector_item_prepend() - * @see elm_flipselector_first_item_get() - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the last item in the given flip selector widget's list of + * items. + * + * @param obj The flipselector object + * @return The last item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_flipselector_item_prepend() + * @see elm_flipselector_first_item_get() + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the currently selected item in a flip selector widget. - * - * @param obj The flipselector object - * @return The selected item or @c NULL, if the widget has no items - * (and on erros) - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the currently selected item in a flip selector widget. + * + * @param obj The flipselector object + * @return The selected item or @c NULL, if the widget has no items + * (and on erros) + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set whether a given flip selector widget's item should be the - * currently selected one. - * - * @param it The flip selector item - * @param selected @c EINA_TRUE to select it, @c EINA_FALSE to unselect. - * - * This sets whether @p item is or not the selected (thus, under - * display) one. If @p item is different than one under display, - * the latter will be unselected. If the @p item is set to be - * unselected, on the other hand, the @b first item in the widget's - * internal members list will be the new selected one. - * - * @see elm_flipselector_item_selected_get() - * - * @ingroup Flipselector - */ - EAPI void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); +/** + * Set whether a given flip selector widget's item should be the + * currently selected one. + * + * @param it The flip selector item + * @param selected @c EINA_TRUE to select it, @c EINA_FALSE to unselect. + * + * This sets whether @p item is or not the selected (thus, under + * display) one. If @p item is different than one under display, + * the latter will be unselected. If the @p item is set to be + * unselected, on the other hand, the @b first item in the widget's + * internal members list will be the new selected one. + * + * @see elm_flipselector_item_selected_get() + * + * @ingroup Flipselector + */ +EAPI void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); - /** - * Get whether a given flip selector widget's item is the currently - * selected one. - * - * @param it The flip selector item - * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise - * (or on errors). - * - * @see elm_flipselector_item_selected_set() - * - * @ingroup Flipselector - */ - EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Get whether a given flip selector widget's item is the currently + * selected one. + * + * @param it The flip selector item + * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise + * (or on errors). + * + * @see elm_flipselector_item_selected_set() + * + * @ingroup Flipselector + */ +EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Delete a given item from a flip selector widget. - * - * @param it The item to delete - * - * @ingroup Flipselector - */ - EAPI void elm_flipselector_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Delete a given item from a flip selector widget. + * + * @param it The item to delete + * + * @ingroup Flipselector + */ +EAPI void elm_flipselector_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Get the label of a given flip selector widget's item. - * - * @param it The item to get label from - * @return The text label of @p item or @c NULL, on errors - * - * @see elm_object_item_text_set() - * - * @deprecated see elm_object_item_text_get() instead - * @ingroup Flipselector - */ - EINA_DEPRECATED EAPI const char *elm_flipselector_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the label of a given flip selector widget's item. + * + * @param it The item to get label from + * @return The text label of @p item or @c NULL, on errors + * + * @see elm_object_item_text_set() + * + * @deprecated see elm_object_item_text_get() instead + * @ingroup Flipselector + */ +EINA_DEPRECATED EAPI const char *elm_flipselector_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Set the label of a given flip selector widget's item. - * - * @param it The item to set label on - * @param label The text label string, in UTF-8 encoding - * - * @see elm_object_item_text_get() - * - * @deprecated see elm_object_item_text_set() instead - * @ingroup Flipselector - */ - EINA_DEPRECATED EAPI void elm_flipselector_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label of a given flip selector widget's item. + * + * @param it The item to set label on + * @param label The text label string, in UTF-8 encoding + * + * @see elm_object_item_text_get() + * + * @deprecated see elm_object_item_text_set() instead + * @ingroup Flipselector + */ +EINA_DEPRECATED EAPI void elm_flipselector_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); - /** - * Gets the item before @p item in a flip selector widget's - * internal list of items. - * - * @param it The item to fetch previous from - * @return The item before the @p item, in its parent's list. If - * there is no previous item for @p item or there's an - * error, @c NULL is returned. - * - * @see elm_flipselector_item_next_get() - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_item_prev_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Gets the item before @p item in a flip selector widget's + * internal list of items. + * + * @param it The item to fetch previous from + * @return The item before the @p item, in its parent's list. If + * there is no previous item for @p item or there's an + * error, @c NULL is returned. + * + * @see elm_flipselector_item_next_get() + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_item_prev_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Gets the item after @p item in a flip selector widget's - * internal list of items. - * - * @param it The item to fetch next from - * @return The item after the @p item, in its parent's list. If - * there is no next item for @p item or there's an - * error, @c NULL is returned. - * - * @see elm_flipselector_item_next_get() - * - * @ingroup Flipselector - */ - EAPI Elm_Object_Item *elm_flipselector_item_next_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Gets the item after @p item in a flip selector widget's + * internal list of items. + * + * @param it The item to fetch next from + * @return The item after the @p item, in its parent's list. If + * there is no next item for @p item or there's an + * error, @c NULL is returned. + * + * @see elm_flipselector_item_next_get() + * + * @ingroup Flipselector + */ +EAPI Elm_Object_Item *elm_flipselector_item_next_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Set the interval on time updates for an user mouse button hold - * on a flip selector widget. - * - * @param obj The flip selector object - * @param interval The (first) interval value in seconds - * - * This interval value is @b decreased while the user holds the - * mouse pointer either flipping up or flipping doww a given flip - * selector. - * - * This helps the user to get to a given item distant from the - * current one easier/faster, as it will start to flip quicker and - * quicker on mouse button holds. - * - * The calculation for the next flip interval value, starting from - * the one set with this call, is the previous interval divided by - * 1.05, so it decreases a little bit. - * - * The default starting interval value for automatic flips is - * @b 0.85 seconds. - * - * @see elm_flipselector_interval_get() - * - * @ingroup Flipselector - */ - EAPI void elm_flipselector_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); - - /** - * Get the interval on time updates for an user mouse button hold - * on a flip selector widget. - * - * @param obj The flip selector object - * @return The (first) interval value, in seconds, set on it - * - * @see elm_flipselector_interval_set() for more details - * - * @ingroup Flipselector - */ - EAPI double elm_flipselector_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @} - */ +/** + * Set the interval on time updates for an user mouse button hold + * on a flip selector widget. + * + * @param obj The flip selector object + * @param interval The (first) interval value in seconds + * + * This interval value is @b decreased while the user holds the + * mouse pointer either flipping up or flipping doww a given flip + * selector. + * + * This helps the user to get to a given item distant from the + * current one easier/faster, as it will start to flip quicker and + * quicker on mouse button holds. + * + * The calculation for the next flip interval value, starting from + * the one set with this call, is the previous interval divided by + * 1.05, so it decreases a little bit. + * + * The default starting interval value for automatic flips is + * @b 0.85 seconds. + * + * @see elm_flipselector_interval_get() + * + * @ingroup Flipselector + */ +EAPI void elm_flipselector_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); +/** + * Get the interval on time updates for an user mouse button hold + * on a flip selector widget. + * + * @param obj The flip selector object + * @return The (first) interval value, in seconds, set on it + * + * @see elm_flipselector_interval_set() for more details + * + * @ingroup Flipselector + */ +EAPI double elm_flipselector_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_focus.h b/legacy/elementary/src/lib/elm_focus.h index 9680a41553..0c1a320b19 100644 --- a/legacy/elementary/src/lib/elm_focus.h +++ b/legacy/elementary/src/lib/elm_focus.h @@ -1,294 +1,295 @@ - /** - * @defgroup Focus Focus - * - * An Elementary application has, at all times, one (and only one) - * @b focused object. This is what determines where the input - * events go to within the application's window. Also, focused - * objects can be decorated differently, in order to signal to the - * user where the input is, at a given moment. - * - * Elementary applications also have the concept of focus - * chain: one can cycle through all the windows' focusable - * objects by input (tab key) or programmatically. The default - * focus chain for an application is the one define by the order in - * which the widgets where added in code. One will cycle through - * top level widgets, and, for each one containg sub-objects, cycle - * through them all, before returning to the level - * above. Elementary also allows one to set @b custom focus chains - * for their applications. - * - * Besides the focused decoration a widget may exhibit, when it - * gets focus, Elementary has a @b global focus highlight object - * that can be enabled for a window. If one chooses to do so, this - * extra highlight effect will surround the current focused object, - * too. - * - * @note Some Elementary widgets are @b unfocusable, after - * creation, by their very nature: they are not meant to be - * interacted with input events, but are there just for visual - * purposes. - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - */ +/** + * @defgroup Focus Focus + * + * An Elementary application has, at all times, one (and only one) + * @b focused object. This is what determines where the input + * events go to within the application's window. Also, focused + * objects can be decorated differently, in order to signal to the + * user where the input is, at a given moment. + * + * Elementary applications also have the concept of focus + * chain: one can cycle through all the windows' focusable + * objects by input (tab key) or programmatically. The default + * focus chain for an application is the one define by the order in + * which the widgets where added in code. One will cycle through + * top level widgets, and, for each one containg sub-objects, cycle + * through them all, before returning to the level + * above. Elementary also allows one to set @b custom focus chains + * for their applications. + * + * Besides the focused decoration a widget may exhibit, when it + * gets focus, Elementary has a @b global focus highlight object + * that can be enabled for a window. If one chooses to do so, this + * extra highlight effect will surround the current focused object, + * too. + * + * @note Some Elementary widgets are @b unfocusable, after + * creation, by their very nature: they are not meant to be + * interacted with input events, but are there just for visual + * purposes. + * + * @ref general_functions_example_page "This" example contemplates + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); - /** - * Get the whether an Elementary object has the focus or not. - * - * @param obj The Elementary object to get the information from - * @return @c EINA_TRUE, if the object is focused, @c EINA_FALSE if - * not (and on errors). - * - * @see elm_object_focus_set() - * - * @ingroup Focus - */ - EAPI Eina_Bool elm_object_focus_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the whether an Elementary object has the focus or not. + * + * @param obj The Elementary object to get the information from + * @return @c EINA_TRUE, if the object is focused, @c EINA_FALSE if + * not (and on errors). + * + * @see elm_object_focus_set() + * + * @ingroup Focus + */ +EAPI Eina_Bool + elm_object_focus_get(const Evas_Object *obj) +EINA_ARG_NONNULL(1); - /** - * Set/unset focus to a given Elementary object. - * - * @param obj The Elementary object to operate on. - * @param enable @c EINA_TRUE Set focus to a given object, - * @c EINA_FALSE Unset focus to a given object. - * - * @note When you set focus to this object, if it can handle focus, will - * take the focus away from the one who had it previously and will, for - * now on, be the one receiving input events. Unsetting focus will remove - * the focus from @p obj, passing it back to the previous element in the - * focus chain list. - * - * @see elm_object_focus_get(), elm_object_focus_custom_chain_get() - * - * @ingroup Focus - */ - EAPI void elm_object_focus_set(Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); +/** + * Set/unset focus to a given Elementary object. + * + * @param obj The Elementary object to operate on. + * @param enable @c EINA_TRUE Set focus to a given object, + * @c EINA_FALSE Unset focus to a given object. + * + * @note When you set focus to this object, if it can handle focus, will + * take the focus away from the one who had it previously and will, for + * now on, be the one receiving input events. Unsetting focus will remove + * the focus from @p obj, passing it back to the previous element in the + * focus chain list. + * + * @see elm_object_focus_get(), elm_object_focus_custom_chain_get() + * + * @ingroup Focus + */ +EAPI void elm_object_focus_set(Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); - /** - * Make a given Elementary object the focused one. - * - * @param obj The Elementary object to make focused. - * - * @note This object, if it can handle focus, will take the focus - * away from the one who had it previously and will, for now on, be - * the one receiving input events. - * - * @see elm_object_focus_get() - * @deprecated use elm_object_focus_set() instead. - * - * @ingroup Focus - */ - EINA_DEPRECATED EAPI void elm_object_focus(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Make a given Elementary object the focused one. + * + * @param obj The Elementary object to make focused. + * + * @note This object, if it can handle focus, will take the focus + * away from the one who had it previously and will, for now on, be + * the one receiving input events. + * + * @see elm_object_focus_get() + * @deprecated use elm_object_focus_set() instead. + * + * @ingroup Focus + */ +EINA_DEPRECATED EAPI void elm_object_focus(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Remove the focus from an Elementary object - * - * @param obj The Elementary to take focus from - * - * This removes the focus from @p obj, passing it back to the - * previous element in the focus chain list. - * - * @see elm_object_focus() and elm_object_focus_custom_chain_get() - * @deprecated use elm_object_focus_set() instead. - * - * @ingroup Focus - */ - EINA_DEPRECATED EAPI void elm_object_unfocus(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove the focus from an Elementary object + * + * @param obj The Elementary to take focus from + * + * This removes the focus from @p obj, passing it back to the + * previous element in the focus chain list. + * + * @see elm_object_focus() and elm_object_focus_custom_chain_get() + * @deprecated use elm_object_focus_set() instead. + * + * @ingroup Focus + */ +EINA_DEPRECATED EAPI void elm_object_unfocus(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the ability for an Element object to be focused - * - * @param obj The Elementary object to operate on - * @param enable @c EINA_TRUE if the object can be focused, @c - * EINA_FALSE if not (and on errors) - * - * This sets whether the object @p obj is able to take focus or - * not. Unfocusable objects do nothing when programmatically - * focused, being the nearest focusable parent object the one - * really getting focus. Also, when they receive mouse input, they - * will get the event, but not take away the focus from where it - * was previously. - * - * @ingroup Focus - */ - EAPI void elm_object_focus_allow_set(Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1); +/** + * Set the ability for an Element object to be focused + * + * @param obj The Elementary object to operate on + * @param enable @c EINA_TRUE if the object can be focused, @c + * EINA_FALSE if not (and on errors) + * + * This sets whether the object @p obj is able to take focus or + * not. Unfocusable objects do nothing when programmatically + * focused, being the nearest focusable parent object the one + * really getting focus. Also, when they receive mouse input, they + * will get the event, but not take away the focus from where it + * was previously. + * + * @ingroup Focus + */ +EAPI void elm_object_focus_allow_set(Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1); - /** - * Get whether an Elementary object is focusable or not - * - * @param obj The Elementary object to operate on - * @return @c EINA_TRUE if the object is allowed to be focused, @c - * EINA_FALSE if not (and on errors) - * - * @note Objects which are meant to be interacted with by input - * events are created able to be focused, by default. All the - * others are not. - * - * @ingroup Focus - */ - EAPI Eina_Bool elm_object_focus_allow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether an Elementary object is focusable or not + * + * @param obj The Elementary object to operate on + * @return @c EINA_TRUE if the object is allowed to be focused, @c + * EINA_FALSE if not (and on errors) + * + * @note Objects which are meant to be interacted with by input + * events are created able to be focused, by default. All the + * others are not. + * + * @ingroup Focus + */ +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); +/** + * 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); - /** - * Unset a custom focus chain on a given Elementary widget - * - * @param obj The container object to remove focus chain from - * - * Any focus chain previously set on @p obj (for its child objects) - * is removed entirely after this call. - * - * @ingroup Focus - */ - EAPI void elm_object_focus_custom_chain_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset a custom focus chain on a given Elementary widget + * + * @param obj The container object to remove focus chain from + * + * Any focus chain previously set on @p obj (for its child objects) + * is removed entirely after this call. + * + * @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 const Eina_List *elm_object_focus_custom_chain_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get custom focus chain + * + * @param obj The container object + * @ingroup Focus + */ +EAPI const Eina_List *elm_object_focus_custom_chain_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Append object to custom focus chain. - * - * @note If relative_child equal to NULL or not in custom chain, the object - * will be added in end. - * - * @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 void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2); +/** + * Append object to custom focus chain. + * + * @note If relative_child equal to NULL or not in custom chain, the object + * will be added in end. + * + * @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 void elm_object_focus_custom_chain_append(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2); - /** - * Prepend object to custom focus chain. - * - * @note If relative_child equal to NULL or not in custom chain, the object - * will be added in begin. - * - * @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 void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2); +/** + * Prepend object to custom focus chain. + * + * @note If relative_child equal to NULL or not in custom chain, the object + * will be added in begin. + * + * @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 void elm_object_focus_custom_chain_prepend(Evas_Object *obj, Evas_Object *child, Evas_Object *relative_child) EINA_ARG_NONNULL(1, 2); - /** - * 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_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) EINA_ARG_NONNULL(1); +/** + * 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_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) EINA_ARG_NONNULL(1); - /** - * Give focus to near object in one direction. - * - * Give focus to near object in direction of one object. - * If none focusable object in given direction, the focus will not change. - * - * @param obj The reference object - * @param x Horizontal component of direction to focus - * @param y Vertical component of direction to focus - * - * @ingroup Focus - */ - EAPI void elm_object_focus_direction_go(Evas_Object *obj, int x, int y) EINA_ARG_NONNULL(1); +/** + * Give focus to near object in one direction. + * + * Give focus to near object in direction of one object. + * If none focusable object in given direction, the focus will not change. + * + * @param obj The reference object + * @param x Horizontal component of direction to focus + * @param y Vertical component of direction to focus + * + * @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). - * - * @param obj The Elementary object to operate on - * @param tree_unfocusable @c EINA_TRUE for unfocusable, - * @c EINA_FALSE for focusable. - * - * 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. - * - * @see elm_object_tree_unfocusable_get() - * - * @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. - * - * @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). - * - * @see elm_object_tree_unfocusable_set() - * - * @ingroup Focus - */ - EAPI Eina_Bool elm_object_tree_unfocusable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Make the elementary object and its children to be unfocusable + * (or focusable). + * + * @param obj The Elementary object to operate on + * @param tree_unfocusable @c EINA_TRUE for unfocusable, + * @c EINA_FALSE for focusable. + * + * 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. + * + * @see elm_object_tree_unfocusable_get() + * + * @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. + * + * @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). + * + * @see elm_object_tree_unfocusable_set() + * + * @ingroup Focus + */ +EAPI Eina_Bool elm_object_tree_unfocusable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_fonts.h b/legacy/elementary/src/lib/elm_fonts.h index f5c92312d5..53538a7ec0 100644 --- a/legacy/elementary/src/lib/elm_fonts.h +++ b/legacy/elementary/src/lib/elm_fonts.h @@ -1,196 +1,197 @@ - /** - * @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). - * - * @{ - */ +/** + * @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; - const char *desc; - } Elm_Text_Class; +typedef struct _Elm_Text_Class +{ + const char *name; + const char *desc; +} Elm_Text_Class; - typedef struct _Elm_Font_Overlay - { - const char *text_class; - const char *font; - Evas_Font_Size size; - } Elm_Font_Overlay; +typedef struct _Elm_Font_Overlay +{ + const char *text_class; + const char *font; + Evas_Font_Size size; +} Elm_Font_Overlay; - typedef struct _Elm_Font_Properties - { - const char *name; - Eina_List *styles; - } Elm_Font_Properties; +typedef struct _Elm_Font_Properties +{ + 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); +/** + * 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); +/** + * 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 font overlay 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); +/** + * 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 font overlay 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); +/** + * 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); +/** + * 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 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. - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_font_overlay_all_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. + */ +// XXX: deprecate and replace with elm_config_all_flush() +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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_frame.h b/legacy/elementary/src/lib/elm_frame.h index d1a68a7de7..4b5c24713a 100644 --- a/legacy/elementary/src/lib/elm_frame.h +++ b/legacy/elementary/src/lib/elm_frame.h @@ -1,102 +1,103 @@ - /** - * @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. - * - * 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 - * - * Of all this styles only default shows the title. Frame emits no signals. - * - * Default contents parts of the frame widget that you can use for are: - * @li "default" - A content of the frame - * - * Default text parts of the frame widget that you can use for are: - * @li "elm.text" - Label of the frame - * - * For a detailed example see the @ref tutorial_frame. - * - * @{ - */ +/** + * @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. + * + * 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 + * + * Of all this styles only default shows the title. Frame emits no signals. + * + * Default contents parts of the frame widget that you can use for are: + * @li "default" - A content of the frame + * + * Default text parts of the frame widget that you can use for are: + * @li "elm.text" - Label of the frame + * + * For a detailed example see the @ref tutorial_frame. + * + * @{ + */ - /** - * @brief Add a new frame to the parent - * - * @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 Add a new frame to the parent + * + * @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 - * - * @param obj The frame object - * @param label The label of this frame object - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_frame_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Set the frame label + * + * @param obj The frame object + * @param label The label of this frame object + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_frame_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Get the frame label - * - * @param obj The frame object - * - * @return The label of this frame objet or NULL if unable to get frame - * - * @deprecated use elm_object_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_frame_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the frame label + * + * @param obj The frame object + * + * @return The label of this frame objet or NULL if unable to get frame + * + * @deprecated use elm_object_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_frame_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the content of the frame widget - * - * 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 frame object - * @param content The content will be filled in this frame object - * - * @deprecated use elm_object_content_set() instead. - */ - EINA_DEPRECATED EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Set the content of the frame widget + * + * 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 frame object + * @param content The content will be filled in this frame object + * + * @deprecated use elm_object_content_set() instead. + */ +EINA_DEPRECATED EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Get the content of the frame widget - * - * Return the content object which is set for this widget - * - * @param obj The frame object - * @return The content that is being used - * - * @deprecated use elm_object_content_get() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the content of the frame widget + * + * Return the content object which is set for this widget + * + * @param obj The frame object + * @return The content that is being used + * + * @deprecated use elm_object_content_get() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the content of the frame widget - * - * Unparent and return the content object which was set for this widget - * - * @param obj The frame object - * @return The content that was being used - * - * @deprecated use elm_object_content_unset() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Unset the content of the frame widget + * + * Unparent and return the content object which was set for this widget + * + * @param obj The frame object + * @return The content that was being used + * + * @deprecated use elm_object_content_unset() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_gen_common.h b/legacy/elementary/src/lib/elm_gen_common.h index 038098c8ff..c747b97b80 100644 --- a/legacy/elementary/src/lib/elm_gen_common.h +++ b/legacy/elementary/src/lib/elm_gen_common.h @@ -1,26 +1,26 @@ #ifndef ELM_GEN_H_ -# define ELM_GEN_H_ +#define ELM_GEN_H_ #include #include #include "elm_priv.h" #define ELM_GEN_ITEM_FROM_INLIST(it) \ - ((it) ? EINA_INLIST_CONTAINER_GET(it, Elm_Gen_Item) : NULL) + ((it) ? EINA_INLIST_CONTAINER_GET(it, Elm_Gen_Item) : NULL) -#define SWIPE_MOVES 12 +#define SWIPE_MOVES 12 -typedef struct Elm_Gen_Item_Type Elm_Gen_Item_Type; +typedef struct Elm_Gen_Item_Type Elm_Gen_Item_Type; typedef struct Elm_Gen_Item_Tooltip Elm_Gen_Item_Tooltip; -typedef struct _Widget_Data Widget_Data; +typedef struct _Widget_Data Widget_Data; typedef enum _Elm_Genlist_Item_Scrollto_Type - { - ELM_GENLIST_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */ - ELM_GENLIST_ITEM_SCROLLTO_IN = (1 << 0), /**< show, bring in */ - ELM_GENLIST_ITEM_SCROLLTO_TOP = (1 << 1), /**< top show, top bring in */ - ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2) /**< middle show, middle bring in */ - } Elm_Genlist_Item_Scrollto_Type; +{ + ELM_GENLIST_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */ + ELM_GENLIST_ITEM_SCROLLTO_IN = (1 << 0), /**< show, bring in */ + ELM_GENLIST_ITEM_SCROLLTO_TOP = (1 << 1), /**< top show, top bring in */ + ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2) /**< middle show, middle bring in */ +} Elm_Genlist_Item_Scrollto_Type; struct Elm_Gen_Item_Tooltip { @@ -35,18 +35,18 @@ struct Elm_Gen_Item { ELM_WIDGET_ITEM; EINA_INLIST; - Widget_Data *wd; - Elm_Gen_Item_Type *item; - const Elm_Gen_Item_Class *itc; - Evas_Coord x, y, dx, dy; - Evas_Object *spacer; - Elm_Gen_Item *parent; - Eina_List *texts, *contents, *states, *content_objs; - Ecore_Timer *long_timer; - int relcount; - int walking; - int generation; /* a generation of an item. when the item is created, this value is set to the value of genlist generation. this value will be decreased when the item is going to be deleted */ - const char *mouse_cursor; + Widget_Data *wd; + Elm_Gen_Item_Type *item; + const Elm_Gen_Item_Class *itc; + Evas_Coord x, y, dx, dy; + Evas_Object *spacer; + Elm_Gen_Item *parent; + Eina_List *texts, *contents, *states, *content_objs; + Ecore_Timer *long_timer; + int relcount; + int walking; + int generation; /* a generation of an item. when the item is created, this value is set to the value of genlist generation. this value will be decreased when the item is going to be deleted */ + const char *mouse_cursor; struct { @@ -54,178 +54,146 @@ struct Elm_Gen_Item const void *data; } func; - Elm_Gen_Item_Tooltip tooltip; - Ecore_Cb del_cb, sel_cb, highlight_cb; - Ecore_Cb unsel_cb, unhighlight_cb, unrealize_cb; + Elm_Gen_Item_Tooltip tooltip; + Ecore_Cb del_cb, sel_cb, highlight_cb; + Ecore_Cb unsel_cb, unhighlight_cb, unrealize_cb; - int position; + int position; - Eina_Bool position_update : 1; - Eina_Bool want_unrealize : 1; - Eina_Bool display_only : 1; - Eina_Bool realized : 1; - Eina_Bool selected : 1; - Eina_Bool highlighted : 1; - Eina_Bool disabled : 1; - Eina_Bool dragging : 1; - Eina_Bool down : 1; - Eina_Bool group : 1; - Eina_Bool reorder : 1; - Eina_Bool mode_set : 1; /* item uses style mode for highlight/select */ + Eina_Bool position_update : 1; + Eina_Bool want_unrealize : 1; + Eina_Bool display_only : 1; + Eina_Bool realized : 1; + Eina_Bool selected : 1; + Eina_Bool highlighted : 1; + Eina_Bool disabled : 1; + Eina_Bool dragging : 1; + Eina_Bool down : 1; + Eina_Bool group : 1; + Eina_Bool reorder : 1; + Eina_Bool mode_set : 1; /* item uses style mode for highlight/select */ }; typedef struct _Pan Pan; struct _Pan { - Evas_Object_Smart_Clipped_Data __clipped_data; - Widget_Data *wd; - Ecore_Job *resize_job; + Evas_Object_Smart_Clipped_Data __clipped_data; + Widget_Data *wd; + Ecore_Job *resize_job; }; struct _Widget_Data { - Eina_Inlist_Sorted_State *state; - Evas_Object *obj; /* the genlist object */ - Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ - Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ - Eina_List *selected; - Eina_List *group_items; /* list of groups index items */ - Eina_Inlist *items; /* inlist of all items */ - Elm_Gen_Item *reorder_it; /* item currently being repositioned */ - Elm_Gen_Item *last_selected_item; - Pan *pan; /* pan_smart object's smart data */ - Ecore_Job *calc_job; - int walking; - int item_width, item_height; - int group_item_width, group_item_height; - int minw, minh; - long count; - Evas_Coord pan_x, pan_y; - Eina_Bool reorder_mode : 1; /* a flag for reorder mode enable/disable */ - Eina_Bool on_hold : 1; - Eina_Bool multi : 1; /* a flag for item multi selection */ - Eina_Bool no_select : 1; - Eina_Bool wasselected : 1; - Eina_Bool always_select : 1; - Eina_Bool clear_me : 1; /* a flag whether genlist is marked as to be cleared or not. if this flag is true, genlist clear was already deferred. */ - Eina_Bool h_bounce : 1; - Eina_Bool v_bounce : 1; - Ecore_Cb del_cb, calc_cb, sizing_cb; - Ecore_Cb clear_cb; + Eina_Inlist_Sorted_State *state; + Evas_Object *obj; /* the genlist object */ + Evas_Object *scr; /* a smart scroller object which is used internally in genlist */ + Evas_Object *pan_smart; /* "elm_genlist_pan" evas smart object. this is an extern pan of smart scroller(scr). */ + Eina_List *selected; + Eina_List *group_items; /* list of groups index items */ + Eina_Inlist *items; /* inlist of all items */ + Elm_Gen_Item *reorder_it; /* item currently being repositioned */ + Elm_Gen_Item *last_selected_item; + Pan *pan; /* pan_smart object's smart data */ + Ecore_Job *calc_job; + int walking; + int item_width, item_height; + int group_item_width, group_item_height; + int minw, minh; + long count; + Evas_Coord pan_x, pan_y; + Eina_Bool reorder_mode : 1; /* a flag for reorder mode enable/disable */ + Eina_Bool on_hold : 1; + Eina_Bool multi : 1; /* a flag for item multi selection */ + Eina_Bool no_select : 1; + Eina_Bool wasselected : 1; + Eina_Bool always_select : 1; + Eina_Bool clear_me : 1; /* a flag whether genlist is marked as to be cleared or not. if this flag is true, genlist clear was already deferred. */ + Eina_Bool h_bounce : 1; + Eina_Bool v_bounce : 1; + Ecore_Cb del_cb, calc_cb, sizing_cb; + Ecore_Cb clear_cb; //////////////////////////////////// - Eina_Inlist *blocks; /* inlist of all blocks. a block consists of a certain number of items. maximum number of items in a block is 'max_items_per_block'. */ - Evas_Coord reorder_old_pan_y, w, h, realminw, prev_viewport_w; - Ecore_Job *update_job; - Ecore_Idle_Enterer *queue_idle_enterer; - Ecore_Idler *must_recalc_idler; - Eina_List *queue; - Elm_Gen_Item *show_item, *anchor_item, *mode_item, *reorder_rel, *expanded_item; - Eina_Inlist *item_cache; /* an inlist of edje object it cache. */ - Evas_Coord anchor_y; - Evas_Coord reorder_start_y; /* reorder it's initial y coordinate in the pan. */ - Elm_List_Mode mode; - Ecore_Timer *multi_timer, *scr_hold_timer; - Ecore_Animator *reorder_move_animator; - const char *mode_type; - const char *mode_item_style; - unsigned int start_time; - Evas_Coord prev_x, prev_y, prev_mx, prev_my; - Evas_Coord cur_x, cur_y, cur_mx, cur_my; - Eina_Bool mouse_down : 1; - Eina_Bool multi_down : 1; - Eina_Bool multi_timeout : 1; - Eina_Bool multitouched : 1; - Eina_Bool longpressed : 1; - Eina_Bool bring_in : 1; /* a flag to describe the scroll animation. (show, bring in) */ - Eina_Bool compress : 1; - Eina_Bool height_for_width : 1; - Eina_Bool homogeneous : 1; - Eina_Bool swipe : 1; - Eina_Bool reorder_pan_move : 1; - Eina_Bool auto_scroll_enabled : 1; - Eina_Bool pan_changed : 1; - Eina_Bool requeued : 1; /* this is set to EINA_TRUE when the item is re-queued. this happens when the item is un-queued but the rel item is still in the queue. this item will be processed later. */ - Eina_Bool check_scroll : 1; /* this flag means genlist is supposed to be scrolled. if this flag is set to EINA_TRUE, genlist checks whether it's ok to scroll genlist now or not. */ + Eina_Inlist *blocks; /* inlist of all blocks. a block consists of a certain number of items. maximum number of items in a block is 'max_items_per_block'. */ + Evas_Coord reorder_old_pan_y, w, h, realminw, prev_viewport_w; + Ecore_Job *update_job; + Ecore_Idle_Enterer *queue_idle_enterer; + Ecore_Idler *must_recalc_idler; + Eina_List *queue; + Elm_Gen_Item *show_item, *anchor_item, *mode_item, *reorder_rel, *expanded_item; + Eina_Inlist *item_cache; /* an inlist of edje object it cache. */ + Evas_Coord anchor_y; + Evas_Coord reorder_start_y; /* reorder it's initial y coordinate in the pan. */ + Elm_List_Mode mode; + Ecore_Timer *multi_timer, *scr_hold_timer; + Ecore_Animator *reorder_move_animator; + const char *mode_type; + const char *mode_item_style; + unsigned int start_time; + Evas_Coord prev_x, prev_y, prev_mx, prev_my; + Evas_Coord cur_x, cur_y, cur_mx, cur_my; + Eina_Bool mouse_down : 1; + Eina_Bool multi_down : 1; + Eina_Bool multi_timeout : 1; + Eina_Bool multitouched : 1; + Eina_Bool longpressed : 1; + Eina_Bool bring_in : 1; /* a flag to describe the scroll animation. (show, bring in) */ + Eina_Bool compress : 1; + Eina_Bool height_for_width : 1; + Eina_Bool homogeneous : 1; + Eina_Bool swipe : 1; + Eina_Bool reorder_pan_move : 1; + Eina_Bool auto_scroll_enabled : 1; + Eina_Bool pan_changed : 1; + Eina_Bool requeued : 1; /* this is set to EINA_TRUE when the item is re-queued. this happens when the item is un-queued but the rel item is still in the queue. this item will be processed later. */ + Eina_Bool check_scroll : 1; /* this flag means genlist is supposed to be scrolled. if this flag is set to EINA_TRUE, genlist checks whether it's ok to scroll genlist now or not. */ struct { Evas_Coord x, y; } history[SWIPE_MOVES]; - int multi_device; - int item_cache_count; - int item_cache_max; /* maximum number of cached items */ - int movements; - int max_items_per_block; /* maximum number of items per block */ - double longpress_timeout; /* longpress timeout. this value comes from _elm_config by default. this can be changed by elm_genlist_longpress_timeout_set() */ - int generation; /* a generation of genlist. when genlist is cleared, this value will be increased and a new generation will start */ - Eina_Compare_Cb item_compare_cb; - Eina_Compare_Cb item_compare_data_cb; + int multi_device; + int item_cache_count; + int item_cache_max; /* maximum number of cached items */ + int movements; + int max_items_per_block; /* maximum number of items per block */ + double longpress_timeout; /* longpress timeout. this value comes from _elm_config by default. this can be changed by elm_genlist_longpress_timeout_set() */ + int generation; /* a generation of genlist. when genlist is cleared, this value will be increased and a new generation will start */ + Eina_Compare_Cb item_compare_cb; + Eina_Compare_Cb item_compare_data_cb; Elm_Genlist_Item_Scrollto_Type scrollto_type; /* a scrollto type which remembers where to scroll ex) in, top, middle */ /* The stuff below directly come from gengrid without any thinking */ - unsigned int nmax; - Evas_Coord reorder_item_x, reorder_item_y; - Evas_Coord old_pan_x, old_pan_y; - long items_lost; - double align_x, align_y; + unsigned int nmax; + Evas_Coord reorder_item_x, reorder_item_y; + Evas_Coord old_pan_x, old_pan_y; + long items_lost; + double align_x, align_y; - Eina_Bool horizontal : 1; - Eina_Bool move_effect_enabled : 1; - Eina_Bool reorder_item_changed : 1; + Eina_Bool horizontal : 1; + Eina_Bool move_effect_enabled : 1; + Eina_Bool reorder_item_changed : 1; }; -Elm_Gen_Item * -_elm_genlist_item_new(Widget_Data *wd, - const Elm_Gen_Item_Class *itc, - const void *data, - Elm_Gen_Item *parent, - Evas_Smart_Cb func, - const void *func_data); +Elm_Gen_Item *_elm_genlist_item_new(Widget_Data *wd, const Elm_Gen_Item_Class *itc, const void *data, Elm_Gen_Item *parent, Evas_Smart_Cb func, const void *func_data); -Evas_Object * -_elm_genlist_item_widget_get(const Elm_Gen_Item *it); +Evas_Object *_elm_genlist_item_widget_get(const Elm_Gen_Item *it); -void -_elm_genlist_page_relative_set(Evas_Object *obj, - double h_pagerel, - double v_pagerel); +void _elm_genlist_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); -void -_elm_genlist_page_relative_get(const Evas_Object *obj, - double *h_pagerel, - double *v_pagerel); +void _elm_genlist_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel); -void -_elm_genlist_page_size_set(Evas_Object *obj, - Evas_Coord h_pagesize, - Evas_Coord v_pagesize); +void _elm_genlist_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); -void -_elm_genlist_current_page_get(const Evas_Object *obj, - int *h_pagenumber, - int *v_pagenumber); +void _elm_genlist_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); -void -_elm_genlist_last_page_get(const Evas_Object *obj, - int *h_pagenumber, - int *v_pagenumber); +void _elm_genlist_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); -void -_elm_genlist_page_show(const Evas_Object *obj, - int h_pagenumber, - int v_pagenumber); +void _elm_genlist_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); -void -_elm_genlist_page_bring_in(const Evas_Object *obj, - int h_pagenumber, - int v_pagenumber); +void _elm_genlist_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber); -void -_elm_genlist_item_unrealize(Elm_Gen_Item *it, - Eina_Bool calc); -void -_elm_genlist_item_del_serious(Elm_Gen_Item *it); +void _elm_genlist_item_unrealize(Elm_Gen_Item *it, Eina_Bool calc); +void _elm_genlist_item_del_serious(Elm_Gen_Item *it); -void -_elm_genlist_item_del_notserious(Elm_Gen_Item *it); +void _elm_genlist_item_del_notserious(Elm_Gen_Item *it); #endif diff --git a/legacy/elementary/src/lib/elm_general.h b/legacy/elementary/src/lib/elm_general.h index 9e1e0d53c7..5e76aeb545 100644 --- a/legacy/elementary/src/lib/elm_general.h +++ b/legacy/elementary/src/lib/elm_general.h @@ -1,356 +1,355 @@ - /** - * @defgroup General General - * - * @brief General Elementary API. Functions that don't relate to - * Elementary objects specifically. - * - * Here are documented functions which init/shutdown the library, - * that apply to generic Elementary objects, that deal with - * configuration, et cetera. - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - */ +/** + * @defgroup General General + * + * @brief General Elementary API. Functions that don't relate to + * Elementary objects specifically. + * + * Here are documented functions which init/shutdown the library, + * that apply to generic Elementary objects, that deal with + * configuration, et cetera. + * + * @ref general_functions_example_page "This" example contemplates + * some of these functions. + */ - /** - * @addtogroup General - * @{ - */ - - /** - * Defines couple of standard Evas_Object layers to be used - * with evas_object_layer_set(). - * - * @note whenever extending with new values, try to keep some padding - * to siblings so there is room for further extensions. - */ - typedef enum _Elm_Object_Layer - { - ELM_OBJECT_LAYER_BACKGROUND = EVAS_LAYER_MIN + 64, /**< where to place backgrounds */ - ELM_OBJECT_LAYER_DEFAULT = 0, /**< Evas_Object default layer (and thus for Elementary) */ - ELM_OBJECT_LAYER_FOCUS = EVAS_LAYER_MAX - 128, /**< where focus object visualization is */ - ELM_OBJECT_LAYER_TOOLTIP = EVAS_LAYER_MAX - 64, /**< where to show tooltips */ - ELM_OBJECT_LAYER_CURSOR = EVAS_LAYER_MAX - 32, /**< where to show cursors */ - ELM_OBJECT_LAYER_LAST /**< last layer known by Elementary */ - } Elm_Object_Layer; - - /**************************************************************************/ - EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT; - - /** - * Emitted when the application has reconfigured elementary settings due - * to an external configuration tool asking it to. - */ - EAPI extern int ELM_EVENT_CONFIG_ALL_CHANGED; +/** + * @addtogroup General + * @{ + */ - /** - * Emitted when any Elementary's policy value is changed. - */ - EAPI extern int ELM_EVENT_POLICY_CHANGED; +/** + * Defines couple of standard Evas_Object layers to be used + * with evas_object_layer_set(). + * + * @note whenever extending with new values, try to keep some padding + * to siblings so there is room for further extensions. + */ +typedef enum _Elm_Object_Layer +{ + ELM_OBJECT_LAYER_BACKGROUND = EVAS_LAYER_MIN + 64, /**< where to place backgrounds */ + ELM_OBJECT_LAYER_DEFAULT = 0, /**< Evas_Object default layer (and thus for Elementary) */ + ELM_OBJECT_LAYER_FOCUS = EVAS_LAYER_MAX - 128, /**< where focus object visualization is */ + ELM_OBJECT_LAYER_TOOLTIP = EVAS_LAYER_MAX - 64, /**< where to show tooltips */ + ELM_OBJECT_LAYER_CURSOR = EVAS_LAYER_MAX - 32, /**< where to show cursors */ + ELM_OBJECT_LAYER_LAST /**< last layer known by Elementary */ +} Elm_Object_Layer; - /** - * @typedef Elm_Event_Policy_Changed - * - * Data on the event when an Elementary policy has changed - */ - typedef struct _Elm_Event_Policy_Changed Elm_Event_Policy_Changed; - - /** - * @struct _Elm_Event_Policy_Changed - * - * Data on the event when an Elementary policy has changed - */ - struct _Elm_Event_Policy_Changed - { - unsigned int policy; /**< the policy identifier */ - int new_value; /**< value the policy had before the change */ - int old_value; /**< new value the policy got */ - }; +/**************************************************************************/ +EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT; - /** - * Policy identifiers. - */ - typedef enum _Elm_Policy - { - ELM_POLICY_QUIT, /**< under which circumstances the application - * should quit automatically. @see - * Elm_Policy_Quit. - */ - ELM_POLICY_LAST - } Elm_Policy; /**< Elementary policy identifiers/groups enumeration. @see elm_policy_set() */ - - typedef enum _Elm_Policy_Quit - { - ELM_POLICY_QUIT_NONE = 0, /**< never quit the application - * automatically */ - ELM_POLICY_QUIT_LAST_WINDOW_CLOSED /**< quit when the - * application's last - * window is closed */ - } Elm_Policy_Quit; /**< Possible values for the #ELM_POLICY_QUIT policy */ +/** + * Emitted when the application has reconfigured elementary settings due + * to an external configuration tool asking it to. + */ +EAPI extern int ELM_EVENT_CONFIG_ALL_CHANGED; - typedef enum _Elm_Focus_Direction - { - ELM_FOCUS_PREVIOUS, - ELM_FOCUS_NEXT - } Elm_Focus_Direction; +/** + * Emitted when any Elementary's policy value is changed. + */ +EAPI extern int ELM_EVENT_POLICY_CHANGED; - /** - * @typedef Elm_Object_Item - * An Elementary Object item handle. - * @ingroup General - */ - typedef struct _Elm_Object_Item Elm_Object_Item; +/** + * @typedef Elm_Event_Policy_Changed + * + * Data on the event when an Elementary policy has changed + */ +typedef struct _Elm_Event_Policy_Changed Elm_Event_Policy_Changed; - 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. */ +/** + * @struct _Elm_Event_Policy_Changed + * + * Data on the event when an Elementary policy has changed + */ +struct _Elm_Event_Policy_Changed +{ + unsigned int policy; /**< the policy identifier */ + int new_value; /**< value the policy had before the change */ + int old_value; /**< new value the policy got */ +}; + +/** + * Policy identifiers. + */ +typedef enum _Elm_Policy +{ + ELM_POLICY_QUIT, /**< under which circumstances the application + * should quit automatically. @see + * Elm_Policy_Quit. + */ + ELM_POLICY_LAST +} Elm_Policy; /**< Elementary policy identifiers/groups enumeration. @see elm_policy_set() */ + +typedef enum _Elm_Policy_Quit +{ + ELM_POLICY_QUIT_NONE = 0, /**< never quit the application + * automatically */ + ELM_POLICY_QUIT_LAST_WINDOW_CLOSED /**< quit when the + * application's last + * window is closed */ +} Elm_Policy_Quit; /**< Possible values for the #ELM_POLICY_QUIT policy */ + +typedef enum _Elm_Focus_Direction +{ + ELM_FOCUS_PREVIOUS, + ELM_FOCUS_NEXT +} Elm_Focus_Direction; + +/** + * @typedef Elm_Object_Item + * An Elementary Object item handle. + * @ingroup General + */ +typedef struct _Elm_Object_Item Elm_Object_Item; + +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 */ +#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 */ #else -#define ELM_MAIN() int main(int argc, char **argv) {return elm_quicklaunch_fallback(argc, argv);} /**< macro to be used after the elm_main() function */ +#define ELM_MAIN() int main(int argc, char **argv) {return elm_quicklaunch_fallback(argc, argv); } /**< macro to be used after the elm_main() function */ #endif /**************************************************************************/ - /* General calls */ +/* General calls */ - /** - * Initialize Elementary - * - * @param[in] argc System's argument count value - * @param[in] argv System's pointer to array of argument strings - * @return The init counter value. - * - * This function initializes Elementary and increments a counter of - * 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 - * is highly advisable). An elm_main() should contain the entry - * point code for your application, having the same prototype as - * elm_init(), and @b not being static (putting the @c EAPI symbol - * in front of its type declaration is advisable). The @c - * ELM_MAIN() call should be placed just after it. - * - * Example: - * @dontinclude bg_example_01.c - * @skip static void - * @until ELM_MAIN - * - * See the full @ref bg_example_01_c "example". - * - * @see elm_shutdown(). - * @ingroup General - */ - EAPI int elm_init(int argc, char **argv); +/** + * Initialize Elementary + * + * @param[in] argc System's argument count value + * @param[in] argv System's pointer to array of argument strings + * @return The init counter value. + * + * This function initializes Elementary and increments a counter of + * 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 + * is highly advisable). An elm_main() should contain the entry + * point code for your application, having the same prototype as + * elm_init(), and @b not being static (putting the @c EAPI symbol + * in front of its type declaration is advisable). The @c + * ELM_MAIN() call should be placed just after it. + * + * Example: + * @dontinclude bg_example_01.c + * @skip static void + * @until ELM_MAIN + * + * See the full @ref bg_example_01_c "example". + * + * @see elm_shutdown(). + * @ingroup General + */ +EAPI int elm_init(int argc, char **argv); - /** - * Shut down Elementary - * - * @return The init counter value. - * - * This should be called at the end of your application, just - * before it ceases to do any more processing. This will clean up - * any permanent resources your application may have allocated via - * Elementary that would otherwise persist. - * - * @see elm_init() for an example - * - * @ingroup General - */ - EAPI int elm_shutdown(void); +/** + * Shut down Elementary + * + * @return The init counter value. + * + * This should be called at the end of your application, just + * before it ceases to do any more processing. This will clean up + * any permanent resources your application may have allocated via + * Elementary that would otherwise persist. + * + * @see elm_init() for an example + * + * @ingroup General + */ +EAPI int elm_shutdown(void); - /** - * Run Elementary's main loop - * - * This call should be issued just after all initialization is - * completed. This function will not return until elm_exit() is - * called. It will keep looping, running the main - * (event/processing) loop for Elementary. - * - * @see elm_init() for an example - * - * @ingroup General - */ - EAPI void elm_run(void); +/** + * Run Elementary's main loop + * + * This call should be issued just after all initialization is + * completed. This function will not return until elm_exit() is + * called. It will keep looping, running the main + * (event/processing) loop for Elementary. + * + * @see elm_init() for an example + * + * @ingroup General + */ +EAPI void elm_run(void); - /** - * Exit Elementary's main loop - * - * If this call is issued, it will flag the main loop to cease - * processing and return back to its parent function (usually your - * elm_main() function). - * - * @see elm_init() for an example. There, just after a request to - * close the window comes, the main loop will be left. - * - * @note By using the appropriate #ELM_POLICY_QUIT on your Elementary - * applications, you'll be able to get this function called automatically for you. - * - * @ingroup General - */ - EAPI void elm_exit(void); +/** + * Exit Elementary's main loop + * + * If this call is issued, it will flag the main loop to cease + * processing and return back to its parent function (usually your + * elm_main() function). + * + * @see elm_init() for an example. There, just after a request to + * close the window comes, the main loop will be left. + * + * @note By using the appropriate #ELM_POLICY_QUIT on your Elementary + * applications, you'll be able to get this function called automatically for you. + * + * @ingroup General + */ +EAPI void elm_exit(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI void elm_quicklaunch_mode_set(Eina_Bool ql_on); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI void elm_quicklaunch_mode_set(Eina_Bool ql_on); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI Eina_Bool elm_quicklaunch_mode_get(void); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI Eina_Bool elm_quicklaunch_mode_get(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI int elm_quicklaunch_init(int argc, char **argv); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI int elm_quicklaunch_init(int argc, char **argv); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI int elm_quicklaunch_sub_init(int argc, char **argv); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI int elm_quicklaunch_sub_init(int argc, char **argv); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI int elm_quicklaunch_sub_shutdown(void); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI int elm_quicklaunch_sub_shutdown(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI int elm_quicklaunch_shutdown(void); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI int elm_quicklaunch_shutdown(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI void elm_quicklaunch_seed(void); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI void elm_quicklaunch_seed(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI Eina_Bool elm_quicklaunch_prepare(int argc, char **argv); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI Eina_Bool elm_quicklaunch_prepare(int argc, char **argv); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI Eina_Bool elm_quicklaunch_fork(int argc, char **argv, char *cwd, void (postfork_func) (void *data), void *postfork_data); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI Eina_Bool elm_quicklaunch_fork(int argc, char **argv, char *cwd, void (postfork_func) (void *data), void *postfork_data); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI void elm_quicklaunch_cleanup(void); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI void elm_quicklaunch_cleanup(void); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI int elm_quicklaunch_fallback(int argc, char **argv); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI int elm_quicklaunch_fallback(int argc, char **argv); - /** - * Exposed symbol used only by macros and should not be used by apps - */ - EAPI char *elm_quicklaunch_exe_path_get(const char *exe); +/** + * Exposed symbol used only by macros and should not be used by apps + */ +EAPI char *elm_quicklaunch_exe_path_get(const char *exe); - /** - * Set a new policy's value (for a given policy group/identifier). - * - * @param policy policy identifier, as in @ref Elm_Policy. - * @param value policy value, which depends on the identifier - * - * @return @c EINA_TRUE on success or @c EINA_FALSE, on error. - * - * Elementary policies define applications' behavior, - * somehow. These behaviors are divided in policy groups (see - * #Elm_Policy enumeration). This call will emit the Ecore event - * #ELM_EVENT_POLICY_CHANGED, which can be hooked at with - * handlers. An #Elm_Event_Policy_Changed struct will be passed, - * then. - * - * @note Currently, we have only one policy identifier/group - * (#ELM_POLICY_QUIT), which has two possible values. - * - * @ingroup General - */ - EAPI Eina_Bool elm_policy_set(unsigned int policy, int value); +/** + * Set a new policy's value (for a given policy group/identifier). + * + * @param policy policy identifier, as in @ref Elm_Policy. + * @param value policy value, which depends on the identifier + * + * @return @c EINA_TRUE on success or @c EINA_FALSE, on error. + * + * Elementary policies define applications' behavior, + * somehow. These behaviors are divided in policy groups (see + * #Elm_Policy enumeration). This call will emit the Ecore event + * #ELM_EVENT_POLICY_CHANGED, which can be hooked at with + * handlers. An #Elm_Event_Policy_Changed struct will be passed, + * then. + * + * @note Currently, we have only one policy identifier/group + * (#ELM_POLICY_QUIT), which has two possible values. + * + * @ingroup General + */ +EAPI Eina_Bool elm_policy_set(unsigned int policy, int value); - /** - * Gets the policy value for given policy identifier. - * - * @param policy policy identifier, as in #Elm_Policy. - * @return The currently set policy value, for that - * identifier. Will be @c 0 if @p policy passed is invalid. - * - * @ingroup General - */ - EAPI int elm_policy_get(unsigned int policy); +/** + * Gets the policy value for given policy identifier. + * + * @param policy policy identifier, as in #Elm_Policy. + * @return The currently set policy value, for that + * identifier. Will be @c 0 if @p policy passed is invalid. + * + * @ingroup General + */ +EAPI int elm_policy_get(unsigned int policy); - /** - * Change the language of the current application - * - * The @p lang passed must be the full name of the locale to use, for - * example "en_US.utf8" or "es_ES@euro". - * - * Changing language with this function will make Elementary run through - * all its widgets, translating strings set with - * elm_object_domain_translatable_text_part_set(). This way, an entire - * UI can have its language changed without having to restart the program. - * - * For more complex cases, like having formatted strings that need - * translation, widgets will also emit a "language,changed" signal that - * the user can listen to to manually translate the text. - * - * @param lang Language to set, must be the full name of the locale - * - * @ingroup General - */ - EAPI void elm_language_set(const char *lang); +/** + * Change the language of the current application + * + * The @p lang passed must be the full name of the locale to use, for + * example "en_US.utf8" or "es_ES@euro". + * + * Changing language with this function will make Elementary run through + * all its widgets, translating strings set with + * elm_object_domain_translatable_text_part_set(). This way, an entire + * UI can have its language changed without having to restart the program. + * + * For more complex cases, like having formatted strings that need + * translation, widgets will also emit a "language,changed" signal that + * the user can listen to to manually translate the text. + * + * @param lang Language to set, must be the full name of the locale + * + * @ingroup General + */ +EAPI void elm_language_set(const char *lang); - /** - * Set the text for an objects' part, marking it as translatable. - * - * The string to set as @p text must be the original one. Do not pass the - * return of @c gettext() here. Elementary will translate the string - * internally and set it on the object using elm_object_part_text_set(), - * also storing the original string so that it can be automatically - * translated when the language is changed with elm_language_set(). - * - * The @p domain will be stored along to find the translation in the - * correct catalog. It can be NULL, in which case it will use whatever - * domain was set by the application with @c textdomain(). This is useful - * in case you are building a library on top of Elementary that will have - * its own translatable strings, that should not be mixed with those of - * programs using the library. - * - * @param obj The object containing the text part - * @param part The name of the part to set - * @param domain The translation domain to use - * @param text The original, non-translated text to set - * - * @ingroup General - */ - EAPI void elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text); +/** + * Set the text for an objects' part, marking it as translatable. + * + * The string to set as @p text must be the original one. Do not pass the + * return of @c gettext() here. Elementary will translate the string + * internally and set it on the object using elm_object_part_text_set(), + * also storing the original string so that it can be automatically + * translated when the language is changed with elm_language_set(). + * + * The @p domain will be stored along to find the translation in the + * correct catalog. It can be NULL, in which case it will use whatever + * domain was set by the application with @c textdomain(). This is useful + * in case you are building a library on top of Elementary that will have + * its own translatable strings, that should not be mixed with those of + * programs using the library. + * + * @param obj The object containing the text part + * @param part The name of the part to set + * @param domain The translation domain to use + * @param text The original, non-translated text to set + * + * @ingroup General + */ +EAPI void elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text); #define elm_object_domain_translatable_text_set(obj, domain, text) elm_object_domain_translatable_text_part_set((obj), NULL, (domain), (text)) -#define elm_object_translatable_text_set(obj, text) elm_object_domain_translatable_text_part_set((obj), NULL, NULL, (text)) +#define elm_object_translatable_text_set(obj, text) elm_object_domain_translatable_text_part_set((obj), NULL, NULL, (text)) - /** - * Gets the original string set as translatable for an object - * - * When setting translated strings, the function elm_object_part_text_get() - * will return the translation returned by @c gettext(). To get the - * original string use this function. - * - * @param obj The object - * @param part The name of the part that was set - * - * @return The original, untranslated string - * - * @ingroup General - */ - EAPI const char *elm_object_translatable_text_part_get(const Evas_Object *obj, const char *part); +/** + * Gets the original string set as translatable for an object + * + * When setting translated strings, the function elm_object_part_text_get() + * will return the translation returned by @c gettext(). To get the + * original string use this function. + * + * @param obj The object + * @param part The name of the part that was set + * + * @return The original, untranslated string + * + * @ingroup General + */ +EAPI const char *elm_object_translatable_text_part_get(const Evas_Object *obj, const char *part); #define elm_object_translatable_text_get(obj) elm_object_translatable_text_part_get((obj), NULL) - /** - * @} - */ - +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_gengrid.h b/legacy/elementary/src/lib/elm_gengrid.h index ab2d8ca03c..5f5a798fb5 100644 --- a/legacy/elementary/src/lib/elm_gengrid.h +++ b/legacy/elementary/src/lib/elm_gengrid.h @@ -1,1516 +1,1517 @@ - // XXX: elm_gengrid - make sure api's match 1:1 with genlist api's - // for eventual move to back-end of gengrid == genlist (in grid mode) - /** - * @defgroup Gengrid Gengrid (Generic grid) - * - * 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. - * - * @section Gengrid_Layouts Gengrid layouts - * - * Gengrid may layout its items in one of two possible layouts: - * - horizontal or - * - vertical. - * - * 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). - * - * @section Gengrid_Items Gengrid items - * - * An item in a gengrid can have 0 or more texts (they can be - * regular text or textblock Evas objects - that's up to the style - * to determine), 0 or more contents (which are simply objects - * swallowed into the gengrid item's theming Edje object) and 0 or - * more boolean states, 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 "texts", @c "contents" 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 text part (@c "elm.text"), @b two content - * 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.text_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_Text_Get_Cb. - * - @c func.content_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 (content) swallow parts in the Edje group implementing the - * item's theme. It must return @c NULL, when no content 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_Content_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, text or content - * 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 "edge,top" - This is called when the gengrid is scrolled until - * the top edge. - * - @c "edge,bottom" - This is called when the gengrid is scrolled - * until the bottom edge. - * - @c "edge,left" - This is called when the gengrid is scrolled - * until the left edge. - * - @c "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 */ - #define Elm_Gengrid_Item_Class Elm_Gen_Item_Class - typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item; /**< Gengrid item handles */ - #define Elm_Gengrid_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ - typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */ - - /** - * Text fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The allocated (NOT stringshared) string to set as the text - */ - typedef char *(*Elm_Gengrid_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * Content (swallowed object) fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The content object to swallow - */ - typedef Evas_Object *(*Elm_Gengrid_Item_Content_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * State fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The hell if I know - */ - typedef Eina_Bool (*Elm_Gengrid_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * Deletion class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - */ - typedef void (*Elm_Gengrid_Item_Del_Cb) (void *data, Evas_Object *obj); - - /** - * @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_Text_Get_Cb text_get; /**< Text fetching class function for gengrid item classes.*/ - Elm_Gengrid_Item_Content_Get_Cb content_get; /**< Content fetching class function for gengrid item classes. */ - Elm_Gengrid_Item_State_Get_Cb state_get; /**< State fetching class function for gengrid item classes. */ - Elm_Gengrid_Item_Del_Cb del; /**< Deletion class function for gengrid item classes. */ - } func; - }; /**< #Elm_Gengrid_Item_Class member definitions */ - #define Elm_Gengrid_Item_Class_Func Elm_Gen_Item_Class_Func - - /** - * 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); - - /** - * Insert an item in a gengrid widget using a user-defined sort function. - * - * @param obj The gengrid object. - * @param gic The item class for the item. - * @param data The item data. - * @param comp User defined comparison function that defines the sort order based on - * Elm_Gen_Item and its data param. - * @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 in the gengrid based on user defined comparison function. - * - * @see elm_gengrid_item_append() - * @see elm_gengrid_item_prepend() - * @see elm_gengrid_item_insert_after() - * @see elm_gengrid_item_del() - * @see elm_gengrid_item_direct_sorted_insert() - * - * @ingroup Gengrid - */ - 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); - - /** - * Insert an item in a gengrid widget using a user-defined sort function. - * - * @param obj The gengrid object. - * @param gic The item class for the item. - * @param data The item data. - * @param comp User defined comparison function that defines the sort order based on - * Elm_Gen_Item. - * @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 in the gengrid based on user defined comparison function. - * - * @see elm_gengrid_item_append() - * @see elm_gengrid_item_prepend() - * @see elm_gengrid_item_insert_after() - * @see elm_gengrid_item_del() - * @see elm_gengrid_item_sorted_insert() - * - * @ingroup Gengrid - */ - 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 Double clicks 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 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 interacting 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 relatively to the - * viewport dimensions 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 the direction in which 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 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 contents, texts and states. Use this when the - * original item data has changed and you want the changes to be - * reflected. - * - * @ingroup Gengrid - */ - EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the Gengrid Item class for the given Gengrid Item. - * - * @param item The gengrid item - * - * This returns the Gengrid_Item_Class for the given item. It can be used to examine - * the function pointers and item_style. - * - * @ingroup Gengrid - */ - EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the Gengrid Item class for the given Gengrid Item. - * - * This sets the Gengrid_Item_Class for the given item. It can be used to examine - * the function pointers and item_style. - * - * @param item The gengrid item - * @param gic The gengrid item class describing the function pointers and the item style. - * - * @ingroup Gengrid - */ - 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 with 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 with a given gengrid item - * - * @param item The gengrid item - * @param data The 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 have the item - * updated to reflect the new data. - * - * @see elm_gengrid_item_data_get() - * @see elm_gengrid_item_update() - * - * @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 to store the item's row number. - * @param y Pointer to variable to store the item's column number. - * - * This returns the "logical" position of the item within 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 - * - * This API returns EINA_TRUE for all the items selected in multi-select mode as well. - * - * @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. Do not modify this object (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 area of a gengrid, a given - * item on it. - * - * @param item The gengrid item to display - * - * This causes gengrid to jump to the given @p 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 tooltip - * - * @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 theme style to use on tooltips (e.g. @c - * "default", @c "transparent", etc) - * - * Tooltips can have alternate styles 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_window_mode_set(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_window_mode_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 theme style to use (e.g. @c "default", - * @c "transparent", etc) - * - * This function only makes sense when one is using custom mouse - * cursor decorations defined in a theme file , which can - * have, given a cursor name/type, alternate styles 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 a list 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); - - /** - * @} - */ - +// XXX: elm_gengrid - make sure api's match 1:1 with genlist api's +// for eventual move to back-end of gengrid == genlist (in grid mode) +/** + * @defgroup Gengrid Gengrid (Generic grid) + * + * 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. + * + * @section Gengrid_Layouts Gengrid layouts + * + * Gengrid may layout its items in one of two possible layouts: + * - horizontal or + * - vertical. + * + * 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). + * + * @section Gengrid_Items Gengrid items + * + * An item in a gengrid can have 0 or more texts (they can be + * regular text or textblock Evas objects - that's up to the style + * to determine), 0 or more contents (which are simply objects + * swallowed into the gengrid item's theming Edje object) and 0 or + * more boolean states, 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 "texts", @c "contents" 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 text part (@c "elm.text"), @b two content + * 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.text_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_Text_Get_Cb. + * - @c func.content_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 (content) swallow parts in the Edje group implementing the + * item's theme. It must return @c NULL, when no content 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_Content_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, text or content + * 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 "edge,top" - This is called when the gengrid is scrolled until + * the top edge. + * - @c "edge,bottom" - This is called when the gengrid is scrolled + * until the bottom edge. + * - @c "edge,left" - This is called when the gengrid is scrolled + * until the left edge. + * - @c "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 */ +#define Elm_Gengrid_Item_Class Elm_Gen_Item_Class +typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item; /**< Gengrid item handles */ +#define Elm_Gengrid_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ +typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func; /**< Class functions for gengrid item classes. */ + +/** + * Text fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The allocated (NOT stringshared) string to set as the text + */ +typedef char *(*Elm_Gengrid_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * Content (swallowed object) fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The content object to swallow + */ +typedef Evas_Object *(*Elm_Gengrid_Item_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * State fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The hell if I know + */ +typedef Eina_Bool (*Elm_Gengrid_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * Deletion class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + */ +typedef void (*Elm_Gengrid_Item_Del_Cb)(void *data, Evas_Object *obj); + +/** + * @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_Text_Get_Cb text_get; /**< Text fetching class function for gengrid item classes.*/ + Elm_Gengrid_Item_Content_Get_Cb content_get; /**< Content fetching class function for gengrid item classes. */ + Elm_Gengrid_Item_State_Get_Cb state_get; /**< State fetching class function for gengrid item classes. */ + Elm_Gengrid_Item_Del_Cb del; /**< Deletion class function for gengrid item classes. */ + } func; +}; /**< #Elm_Gengrid_Item_Class member definitions */ +#define Elm_Gengrid_Item_Class_Func Elm_Gen_Item_Class_Func + +/** + * 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); + +/** + * Insert an item in a gengrid widget using a user-defined sort function. + * + * @param obj The gengrid object. + * @param gic The item class for the item. + * @param data The item data. + * @param comp User defined comparison function that defines the sort order based on + * Elm_Gen_Item and its data param. + * @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 in the gengrid based on user defined comparison function. + * + * @see elm_gengrid_item_append() + * @see elm_gengrid_item_prepend() + * @see elm_gengrid_item_insert_after() + * @see elm_gengrid_item_del() + * @see elm_gengrid_item_direct_sorted_insert() + * + * @ingroup Gengrid + */ +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); + +/** + * Insert an item in a gengrid widget using a user-defined sort function. + * + * @param obj The gengrid object. + * @param gic The item class for the item. + * @param data The item data. + * @param comp User defined comparison function that defines the sort order based on + * Elm_Gen_Item. + * @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 in the gengrid based on user defined comparison function. + * + * @see elm_gengrid_item_append() + * @see elm_gengrid_item_prepend() + * @see elm_gengrid_item_insert_after() + * @see elm_gengrid_item_del() + * @see elm_gengrid_item_sorted_insert() + * + * @ingroup Gengrid + */ +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 Double clicks 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 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 interacting 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 relatively to the + * viewport dimensions 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 the direction in which 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 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 contents, texts and states. Use this when the + * original item data has changed and you want the changes to be + * reflected. + * + * @ingroup Gengrid + */ +EAPI void elm_gengrid_item_update(Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the Gengrid Item class for the given Gengrid Item. + * + * @param item The gengrid item + * + * This returns the Gengrid_Item_Class for the given item. It can be used to examine + * the function pointers and item_style. + * + * @ingroup Gengrid + */ +EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Gengrid_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the Gengrid Item class for the given Gengrid Item. + * + * This sets the Gengrid_Item_Class for the given item. It can be used to examine + * the function pointers and item_style. + * + * @param item The gengrid item + * @param gic The gengrid item class describing the function pointers and the item style. + * + * @ingroup Gengrid + */ +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 with 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 with a given gengrid item + * + * @param item The gengrid item + * @param data The 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 have the item + * updated to reflect the new data. + * + * @see elm_gengrid_item_data_get() + * @see elm_gengrid_item_update() + * + * @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 to store the item's row number. + * @param y Pointer to variable to store the item's column number. + * + * This returns the "logical" position of the item within 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 + * + * This API returns EINA_TRUE for all the items selected in multi-select mode as well. + * + * @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. Do not modify this object (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 area of a gengrid, a given + * item on it. + * + * @param item The gengrid item to display + * + * This causes gengrid to jump to the given @p 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 tooltip + * + * @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 theme style to use on tooltips (e.g. @c + * "default", @c "transparent", etc) + * + * Tooltips can have alternate styles 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_window_mode_set(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_window_mode_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 theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file , which can + * have, given a cursor name/type, alternate styles 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 a list 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); + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_genlist.h b/legacy/elementary/src/lib/elm_genlist.h index ed64847899..6ec5562693 100644 --- a/legacy/elementary/src/lib/elm_genlist.h +++ b/legacy/elementary/src/lib/elm_genlist.h @@ -1,1917 +1,1918 @@ - /** - * @defgroup Genlist Genlist - * - * @image html img/widget/genlist/preview-00.png - * @image latex img/widget/genlist/preview-00.eps - * @image html img/genlist.png - * @image latex img/genlist.eps - * - * This widget aims to have more expansive list than the simple list in - * Elementary that could have more flexible items and allow many more entries - * while still being fast and low on memory usage. At the same time it was - * also made to be able to do tree structures. But the price to pay is more - * complexity when it comes to usage. If all you want is a simple list with - * icons and a single text, use the normal @ref List object. - * - * Genlist has a fairly large API, mostly because it's relatively complex, - * trying to be both expansive, powerful and efficient. First we will begin - * an overview on the theory behind genlist. - * - * @section Genlist_Item_Class Genlist item classes - creating items - * - * In order to have the ability to add and delete items on the fly, genlist - * implements a class (callback) system where the application provides a - * structure with information about that type of item (genlist may contain - * multiple different items with different classes, states and styles). - * Genlist 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_Genlist_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 - A struct with pointers to functions that will be called when - * an item is going to be actually created. All of them receive a @c data - * parameter that will point to the same data passed to - * elm_genlist_item_append() and related item creation functions, and a @c - * obj parameter that points to the genlist object itself. - * - * The function pointers inside @c func are @c text_get, @c content_get, @c - * state_get and @c del. The 3 first functions also receive a @c part - * parameter described below. A brief description of these functions follows: - * - * - @c text_get - The @c part parameter 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_Genlist_Item_Text_Get_Cb. - * - @c content_get - The @c part parameter is the name string of one of the - * existing (content) swallow parts in the Edje group implementing the item's - * theme. It must return @c NULL, when no content is desired, or a valid - * object handle, otherwise. The object will be deleted by the genlist on - * its deletion or when the item is "unrealized". See - * #Elm_Genlist_Item_Content_Get_Cb. - * - @c func.state_get - The @c part parameter 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. Genlists 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_Genlist_Item_State_Get_Cb. - * - @c func.del - This is intended for use when genlist items are deleted, - * so any data attached to the item (e.g. its data parameter on creation) - * can be deleted. See #Elm_Genlist_Item_Del_Cb. - * - * available item styles: - * - default - * - default_style - The text part is a textblock - * - * @image html img/widget/genlist/preview-04.png - * @image latex img/widget/genlist/preview-04.eps - * - * - double_label - * - * @image html img/widget/genlist/preview-01.png - * @image latex img/widget/genlist/preview-01.eps - * - * - icon_top_text_bottom - * - * @image html img/widget/genlist/preview-02.png - * @image latex img/widget/genlist/preview-02.eps - * - * - group_index - * - * @image html img/widget/genlist/preview-03.png - * @image latex img/widget/genlist/preview-03.eps - * - * @section Genlist_Items Structure of items - * - * An item in a genlist can have 0 or more texts (they can be regular - * text or textblock Evas objects - that's up to the style to determine), 0 - * or more contents (which are simply objects swallowed into the genlist item's - * theming Edje object) and 0 or more boolean states, 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 genlist, - * under the Edje (string) data items named @c "labels", @c "contents" 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 genlist item theme, we have @b one text - * part (@c "elm.text"), @b two content parts (@c "elm.swalllow.icon" and @c - * "elm.swallow.end") and @b no state parts. - * - * A genlist 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 Genlist_Manipulation Editing and Navigating - * - * Items can be added by several calls. All of them return a @ref - * Elm_Genlist_Item handle that is an internal member inside the genlist. - * They all take a data parameter that is meant to be used for a handle to - * the applications internal data (eg the struct with the original item - * data). The parent parameter is the parent genlist item this belongs to if - * it is a tree or an indexed group, and NULL if there is no parent. The - * flags can be a bitmask of #ELM_GENLIST_ITEM_NONE, - * #ELM_GENLIST_ITEM_SUBITEMS and #ELM_GENLIST_ITEM_GROUP. If - * #ELM_GENLIST_ITEM_SUBITEMS is set then this item is displayed as an item - * that is able to expand and have child items. If ELM_GENLIST_ITEM_GROUP - * is set then this item is group index item that is displayed at the top - * until the next group comes. The func parameter is a convenience callback - * that is called when the item is selected and the data parameter will be - * the func_data parameter, obj be the genlist object and event_info will be - * the genlist item. - * - * elm_genlist_item_append() adds an item to the end of the list, or if - * there is a parent, to the end of all the child items of the parent. - * elm_genlist_item_prepend() is the same but adds to the beginning of - * the list or children list. elm_genlist_item_insert_before() inserts at - * item before another item and elm_genlist_item_insert_after() inserts after - * the indicated item. - * - * The application can clear the list with elm_genlist_clear() which deletes - * all the items in the list and elm_genlist_item_del() will delete a specific - * item. elm_genlist_item_subitems_clear() will clear all items that are - * children of the indicated parent item. - * - * To help inspect list items you can jump to the item at the top of the list - * with elm_genlist_first_item_get() which will return the item pointer, and - * similarly elm_genlist_last_item_get() gets the item at the end of the list. - * elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next - * and previous items respectively relative to the indicated item. Using - * these calls you can walk the entire item list/tree. Note that as a tree - * the items are flattened in the list, so elm_genlist_item_parent_get() will - * let you know which item is the parent (and thus know how to skip them if - * wanted). - * - * @section Genlist_Muti_Selection Multi-selection - * - * If the application wants multiple items to be able to be selected, - * elm_genlist_multi_select_set() can enable this. If the list is - * single-selection only (the default), then elm_genlist_selected_item_get() - * will return the selected item, if any, or NULL if none is selected. If the - * list is multi-select then elm_genlist_selected_items_get() will return a - * list (that is only valid as long as no items are modified (added, deleted, - * selected or unselected)). - * - * @section Genlist_Usage_Hints Usage hints - * - * There are also convenience functions. elm_genlist_item_genlist_get() will - * return the genlist object the item belongs to. elm_genlist_item_show() - * will make the scroller scroll to show that specific item so its visible. - * elm_genlist_item_data_get() returns the data pointer set by the item - * creation functions. - * - * If an item changes (state of boolean changes, text or contents change), - * then use elm_genlist_item_update() to have genlist update the item with - * the new state. Genlist will re-realize the item thus call the functions - * in the _Elm_Genlist_Item_Class for that item. - * - * To programmatically (un)select an item use elm_genlist_item_selected_set(). - * To get its selected state use elm_genlist_item_selected_get(). Similarly - * to expand/contract an item and get its expanded state, use - * elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And - * again to make an item disabled (unable to be selected and appear - * differently) use elm_genlist_item_disabled_set() to set this and - * elm_genlist_item_disabled_get() to get the disabled state. - * - * 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 - * 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 - * to the viewport width and limited to that size. This can be combined with - * a different style that uses edjes' ellipsis feature (cutting text off like - * this: "tex..."). - * - * Items will only call their selection func and callback when first becoming - * selected. Any further clicks will do nothing, unless you enable always - * select with elm_genlist_always_select_mode_set(). This means even if - * selected, every click will make the selected callbacks be called. - * elm_genlist_no_select_mode_set() will turn off the ability to select - * items entirely and they will neither appear selected nor call selected - * callback functions. - * - * 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 Genlist_Implementation Implementation - * - * Evas tracks every object you create. Every time it processes an event - * (mouse move, down, up etc.) it needs to walk through objects and find out - * what event that affects. Even worse every time it renders display updates, - * in order to just calculate what to re-draw, it needs to walk through many - * many many objects. Thus, the more objects you keep active, the more - * overhead Evas has in just doing its work. It is advisable to keep your - * active objects to the minimum working set you need. Also remember that - * object creation and deletion carries an overhead, so there is a - * middle-ground, which is not easily determined. But don't keep massive lists - * of objects you can't see or use. Genlist does this with list objects. It - * creates and destroys them dynamically as you scroll around. It groups them - * into blocks so it can determine the visibility etc. of a whole block at - * once as opposed to having to walk the whole list. This 2-level list allows - * for very large numbers of items to be in the list (tests have used up to - * 2,000,000 items). Also genlist employs a queue for adding items. As items - * may be different sizes, every item added needs to be calculated as to its - * size and thus this presents a lot of overhead on populating the list, this - * genlist employs a queue. Any item added is queued and spooled off over - * time, actually appearing some time later, so if your list has many members - * you may find it takes a while for them to all appear, with your process - * consuming a lot of CPU while it is busy spooling. - * - * Genlist also implements a tree structure, but it does so with callbacks to - * the application, with the application filling in tree structures when - * requested (allowing for efficient building of a very deep tree that could - * even be used for file-management). See the above smart signal callbacks for - * details. - * - * @section Genlist_Smart_Events Genlist smart events - * - * Signals 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 - * item that was activated. - * - @c "clicked,double" - The user has double-clicked an item. The @c - * event_info parameter is the item that was double-clicked. - * - @c "selected" - This is called when a user has made an item selected. - * The event_info parameter is the genlist item that was selected. - * - @c "unselected" - This is called when a user has made an item - * unselected. The event_info parameter is the genlist item that was - * unselected. - * - @c "expanded" - This is called when elm_genlist_item_expanded_set() is - * called and the item is now meant to be expanded. The event_info - * parameter is the genlist item that was indicated to expand. It is the - * job of this callback to then fill in the child items. - * - @c "contracted" - This is called when elm_genlist_item_expanded_set() is - * called and the item is now meant to be contracted. The event_info - * parameter is the genlist item that was indicated to contract. It is the - * job of this callback to then delete the child items. - * - @c "expand,request" - This is called when a user has indicated they want - * to expand a tree branch item. The callback should decide if the item can - * expand (has any children) and then call elm_genlist_item_expanded_set() - * appropriately to set the state. The event_info parameter is the genlist - * item that was indicated to expand. - * - @c "contract,request" - This is called when a user has indicated they - * want to contract a tree branch item. The callback should decide if the - * item can contract (has any children) and then call - * elm_genlist_item_expanded_set() appropriately to set the state. The - * event_info parameter is the genlist item that was indicated to contract. - * - @c "realized" - This is called when the item in the list is created as a - * real evas object. event_info parameter is the genlist item that was - * created. The object may be deleted at any time, so it is up to the - * caller to not use the object pointer from elm_genlist_item_object_get() - * in a way where it may point to freed objects. - * - @c "unrealized" - This is called just before an item is unrealized. - * After this call content objects provided will be deleted and the item - * object itself delete or be put into a floating cache. - * - @c "drag,start,up" - This is called when the item in the list has been - * dragged (not scrolled) up. - * - @c "drag,start,down" - This is called when the item in the list has been - * dragged (not scrolled) down. - * - @c "drag,start,left" - This is called when the item in the list has been - * dragged (not scrolled) left. - * - @c "drag,start,right" - This is called when the item in the list has - * been dragged (not scrolled) right. - * - @c "drag,stop" - This is called when the item in the list has stopped - * being dragged. - * - @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 "edge,top" - This is called when the genlist is scrolled until - * the top edge. - * - @c "edge,bottom" - This is called when the genlist is scrolled - * until the bottom edge. - * - @c "edge,left" - This is called when the genlist is scrolled - * until the left edge. - * - @c "edge,right" - This is called when the genlist is scrolled - * until the right edge. - * - @c "multi,swipe,left" - This is called when the genlist is multi-touch - * swiped left. - * - @c "multi,swipe,right" - This is called when the genlist is multi-touch - * swiped right. - * - @c "multi,swipe,up" - This is called when the genlist is multi-touch - * swiped up. - * - @c "multi,swipe,down" - This is called when the genlist is multi-touch - * swiped down. - * - @c "multi,pinch,out" - This is called when the genlist is multi-touch - * pinched out. "- @c multi,pinch,in" - This is called when the genlist is - * multi-touch pinched in. - * - @c "swipe" - This is called when the genlist is swiped. - * - @c "moved" - This is called when a genlist item is moved. - * - @c "language,changed" - This is called when the program's language is - * changed. - * - * @section Genlist_Examples Examples - * - * Here is a list of examples that use the genlist, trying to show some of - * its capabilities: - * - @ref genlist_example_01 - * - @ref genlist_example_02 - * - @ref genlist_example_03 - * - @ref genlist_example_04 - * - @ref genlist_example_05 - */ - - /** - * @addtogroup Genlist - * @{ - */ - - /** - * @enum _Elm_Genlist_Item_Flags - * @typedef Elm_Genlist_Item_Flags - * - * Defines if the item is of any special type (has subitems or it's the - * index of a group), or is just a simple item. - * - * @ingroup Genlist - */ - typedef enum _Elm_Genlist_Item_Flags - { - ELM_GENLIST_ITEM_NONE = 0, /**< simple item */ - ELM_GENLIST_ITEM_SUBITEMS = (1 << 0), /**< may expand and have child items */ - ELM_GENLIST_ITEM_GROUP = (1 << 1) /**< index of a group of items */ - } Elm_Genlist_Item_Flags; - typedef enum _Elm_Genlist_Item_Field_Flags - { - ELM_GENLIST_ITEM_FIELD_ALL = 0, - ELM_GENLIST_ITEM_FIELD_LABEL = (1 << 0), - ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1), - ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2) - } Elm_Genlist_Item_Field_Flags; - typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class; /**< Genlist item class definition structs */ - #define Elm_Genlist_Item_Class Elm_Gen_Item_Class - typedef struct _Elm_Genlist_Item Elm_Genlist_Item; /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ - #define Elm_Genlist_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ - typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func; /**< Class functions for genlist item class */ - - /** - * Text fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The allocated (NOT stringshared) string to set as the text - */ - typedef char *(*Elm_Genlist_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * Content (swallowed object) fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The content object to swallow - */ - typedef Evas_Object *(*Elm_Genlist_Item_Content_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * State fetching class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - * @param part The part name of the swallow - * @return The hell if I know - */ - typedef Eina_Bool (*Elm_Genlist_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part); - - /** - * Deletion class function for Elm_Gen_Item_Class. - * @param data The data passed in the item creation function - * @param obj The base widget object - */ - typedef void (*Elm_Genlist_Item_Del_Cb) (void *data, Evas_Object *obj); - - /** - * @struct _Elm_Genlist_Item_Class - * - * Genlist item class definition structs. - * - * This struct contains the style and fetching functions that will define the - * contents of each item. - * - * @see @ref Genlist_Item_Class - */ - struct _Elm_Genlist_Item_Class - { - const char *item_style; /**< style of this class. */ - struct Elm_Genlist_Item_Class_Func - { - Elm_Genlist_Item_Text_Get_Cb text_get; /**< Text fetching class function for genlist item classes.*/ - Elm_Genlist_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist item classes. */ - Elm_Genlist_Item_State_Get_Cb state_get; /**< State fetching class function for genlist item classes. */ - Elm_Genlist_Item_Del_Cb del; /**< Deletion class function for genlist item classes. */ - } func; - }; - #define Elm_Genlist_Item_Class_Func Elm_Gen_Item_Class_Func - /** - * Add a new genlist widget to the given parent Elementary - * (container) object - * - * @param parent The parent object - * @return a new genlist widget handle or @c NULL, on errors - * - * This function inserts a new genlist widget on the canvas. - * - * @see elm_genlist_item_append() - * @see elm_genlist_item_del() - * @see elm_genlist_clear() - * - * @ingroup Genlist - */ - EAPI Evas_Object *elm_genlist_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - - /** - * Remove all items from a given genlist widget. - * - * @param obj The genlist object - * - * This removes (and deletes) all items in @p obj, leaving it empty. - * - * @see elm_genlist_item_del(), to remove just one item. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable or disable multi-selection in the genlist - * - * @param obj The genlist object - * @param multi Multi-select enable/disable. Default is disabled. - * - * This enables (@c EINA_TRUE) or disables (@c EINA_FALSE) multi-selection in - * the list. This allows more than 1 item to be selected. To retrieve the list - * of selected items, use elm_genlist_selected_items_get(). - * - * @see elm_genlist_selected_items_get() - * @see elm_genlist_multi_select_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1); - - /** - * Gets if multi-selection in genlist is enabled or disabled. - * - * @param obj The genlist object - * @return Multi-select enabled/disabled - * (@c EINA_TRUE = enabled/@c EINA_FALSE = disabled). Default is @c EINA_FALSE. - * - * @see elm_genlist_multi_select_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * This sets the horizontal stretching mode. - * - * @param obj The genlist object - * @param mode The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). - * - * This sets the mode used for sizing items horizontally. Valid modes - * are #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 to the viewport width and - * limited to that size. - * - * @see elm_genlist_horizontal_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); - - /** - * Gets the horizontal stretching mode. - * - * @param obj The genlist object - * @return The mode to use - * (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL) - * - * @see elm_genlist_horizontal_set() - * - * @ingroup Genlist - */ - EAPI Elm_List_Mode elm_genlist_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the always select mode. - * - * @param obj The genlist object - * @param always_select The always select mode (@c EINA_TRUE = on, @c - * EINA_FALSE = off). Default is @c EINA_FALSE. - * - * Items will only call their selection func and callback when first - * becoming selected. Any further clicks will do nothing, unless you - * enable always select with elm_genlist_always_select_mode_set(). - * This means that, even if selected, every click will make the selected - * callbacks be called. - * - * @see elm_genlist_always_select_mode_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1); - - /** - * Get the always select mode. - * - * @param obj The genlist object - * @return The always select mode - * (@c EINA_TRUE = on, @c EINA_FALSE = off) - * - * @see elm_genlist_always_select_mode_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable/disable the no select mode. - * - * @param obj The genlist object - * @param no_select The no select mode - * (EINA_TRUE = on, EINA_FALSE = off) - * - * This will turn off the ability to select items entirely and they - * will neither appear selected nor call selected callback functions. - * - * @see elm_genlist_no_select_mode_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1); - - /** - * Gets whether the no select mode is enabled. - * - * @param obj The genlist object - * @return The no select mode - * (@c EINA_TRUE = on, @c EINA_FALSE = off) - * - * @see elm_genlist_no_select_mode_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable/disable compress mode. - * - * @param obj The genlist object - * @param compress The compress mode - * (@c EINA_TRUE = on, @c EINA_FALSE = off). Default is @c EINA_FALSE. - * - * This will enable the compress mode where items are "compressed" - * horizontally to fit the genlist scrollable viewport width. This is - * special for genlist. Do not rely on - * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to - * work as genlist needs to handle it specially. - * - * @see elm_genlist_compress_mode_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress) EINA_ARG_NONNULL(1); - - /** - * Get whether the compress mode is enabled. - * - * @param obj The genlist object - * @return The compress mode - * (@c EINA_TRUE = on, @c EINA_FALSE = off) - * - * @see elm_genlist_compress_mode_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_compress_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable/disable height-for-width mode. - * - * @param obj The genlist object - * @param setting The height-for-width mode (@c EINA_TRUE = on, - * @c EINA_FALSE = off). Default is @c EINA_FALSE. - * - * With height-for-width mode the item width will be fixed (restricted - * to a minimum of) to the list width when calculating its size in - * order to allow the height to be calculated based on it. This allows, - * for instance, text block to wrap lines if the Edje part is - * configured with "text.min: 0 1". - * - * @note This mode will make list resize slower as it will have to - * recalculate every item height again whenever the list width - * changes! - * - * @note When height-for-width mode is enabled, it also enables - * compress mode (see elm_genlist_compress_mode_set()) and - * disables homogeneous (see elm_genlist_homogeneous_set()). - * - * @ingroup Genlist - */ - EAPI void elm_genlist_height_for_width_mode_set(Evas_Object *obj, Eina_Bool height_for_width) EINA_ARG_NONNULL(1); - - /** - * Get whether the height-for-width mode is enabled. - * - * @param obj The genlist object - * @return The height-for-width mode (@c EINA_TRUE = on, @c EINA_FALSE = - * off) - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_height_for_width_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable/disable horizontal and vertical bouncing effect. - * - * @param obj The genlist object - * @param h_bounce Allow bounce horizontally (@c EINA_TRUE = on, @c - * EINA_FALSE = off). Default is @c EINA_FALSE. - * @param v_bounce Allow bounce vertically (@c EINA_TRUE = on, @c - * EINA_FALSE = off). Default is @c EINA_TRUE. - * - * This will enable or disable the scroller bouncing effect for the - * genlist. See elm_scroller_bounce_set() for details. - * - * @see elm_scroller_bounce_set() - * @see elm_genlist_bounce_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - - /** - * Get whether the horizontal and vertical bouncing effect is enabled. - * - * @param obj The genlist object - * @param h_bounce Pointer to a bool to receive if the bounce horizontally - * option is set. - * @param v_bounce Pointer to a bool to receive if the bounce vertically - * option is set. - * - * @see elm_genlist_bounce_set() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - - /** - * Enable/disable homogeneous mode. - * - * @param obj The genlist object - * @param homogeneous Assume the items within the genlist are of the - * same height and width (EINA_TRUE = on, EINA_FALSE = off). Default is @c - * EINA_FALSE. - * - * This will enable the homogeneous mode where items are of the same - * height and width so that genlist may do the lazy-loading at its - * maximum (which increases the performance for scrolling the list). This - * implies 'compressed' mode. - * - * @see elm_genlist_compress_mode_set() - * @see elm_genlist_homogeneous_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); - - /** - * Get whether the homogeneous mode is enabled. - * - * @param obj The genlist object - * @return Assume the items within the genlist are of the same height - * and width (EINA_TRUE = on, EINA_FALSE = off) - * - * @see elm_genlist_homogeneous_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the maximum number of items within an item block - * - * @param obj The genlist object - * @param n Maximum number of items within an item block. Default is 32. - * - * This will configure the block count to tune to the target with - * particular performance matrix. - * - * A block of objects will be used to reduce the number of operations due to - * many objects in the screen. It can determine the visibility, or if the - * object has changed, it theme needs to be updated, etc. doing this kind of - * calculation to the entire block, instead of per object. - * - * The default value for the block count is enough for most lists, so unless - * you know you will have a lot of objects visible in the screen at the same - * time, don't try to change this. - * - * @see elm_genlist_block_count_get() - * @see @ref Genlist_Implementation - * - * @ingroup Genlist - */ - EAPI void elm_genlist_block_count_set(Evas_Object *obj, int n) EINA_ARG_NONNULL(1); - - /** - * Get the maximum number of items within an item block - * - * @param obj The genlist object - * @return Maximum number of items within an item block - * - * @see elm_genlist_block_count_set() - * - * @ingroup Genlist - */ - EAPI int elm_genlist_block_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the timeout in seconds for the longpress event. - * - * @param obj The genlist object - * @param timeout timeout in seconds. Default is 1. - * - * This option will change how long it takes to send an event "longpressed" - * after the mouse down signal is sent to the list. If this event occurs, no - * "clicked" event will be sent. - * - * @see elm_genlist_longpress_timeout_set() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_longpress_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1); - - /** - * Get the timeout in seconds for the longpress event. - * - * @param obj The genlist object - * @return timeout in seconds - * - * @see elm_genlist_longpress_timeout_get() - * - * @ingroup Genlist - */ - EAPI double elm_genlist_longpress_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Append a new item in a given genlist widget. - * - * @param obj The genlist object - * @param itc The item class for the item - * @param data The item data - * @param parent The parent item, or NULL if none - * @param flags Item flags - * @param func Convenience function called when the item is selected - * @param func_data Data passed to @p func above. - * @return A handle to the item added or @c NULL if not possible - * - * This adds the given item to the end of the list or the end of - * the children list if the @p parent is given. - * - * @see elm_genlist_item_prepend() - * @see elm_genlist_item_insert_before() - * @see elm_genlist_item_insert_after() - * @see elm_genlist_item_del() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1); - - /** - * Prepend a new item in a given genlist widget. - * - * @param obj The genlist object - * @param itc The item class for the item - * @param data The item data - * @param parent The parent item, or NULL if none - * @param flags Item flags - * @param func Convenience function called when the item is selected - * @param func_data Data passed to @p func above. - * @return A handle to the item added or NULL if not possible - * - * This adds an item to the beginning of the list or beginning of the - * children of the parent if given. - * - * @see elm_genlist_item_append() - * @see elm_genlist_item_insert_before() - * @see elm_genlist_item_insert_after() - * @see elm_genlist_item_del() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1); - - /** - * Insert an item before another in a genlist widget - * - * @param obj The genlist object - * @param itc The item class for the item - * @param data The item data - * @param before The item to place this new one before. - * @param flags Item flags - * @param func Convenience function called when the item is selected - * @param func_data Data passed to @p func above. - * @return A handle to the item added or @c NULL if not possible - * - * This inserts an item before another in the list. It will be in the - * same tree level or group as the item it is inserted before. - * - * @see elm_genlist_item_append() - * @see elm_genlist_item_prepend() - * @see elm_genlist_item_insert_after() - * @see elm_genlist_item_del() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1, 5); - - /** - * Insert an item after another in a genlist widget - * - * @param obj The genlist object - * @param itc The item class for the item - * @param data The item data - * @param after The item to place this new one after. - * @param flags Item flags - * @param func Convenience function called when the item is selected - * @param func_data Data passed to @p func above. - * @return A handle to the item added or @c NULL if not possible - * - * This inserts an item after another in the list. It will be in the - * same tree level or group as the item it is inserted after. - * - * @see elm_genlist_item_append() - * @see elm_genlist_item_prepend() - * @see elm_genlist_item_insert_before() - * @see elm_genlist_item_del() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1, 5); - - /** - * Insert a new item into the sorted genlist object - * - * @param obj The genlist object - * @param itc The item class for the item - * @param data The item data - * @param parent The parent item, or NULL if none - * @param flags Item flags - * @param comp The function called for the sort - * @param func Convenience function called when item selected - * @param func_data Data passed to @p func above. - * @return A handle to the item added or NULL if not possible - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func,const void *func_data); - EAPI Elm_Genlist_Item *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data); - - /* operations to retrieve existing items */ - /** - * Get the selectd item in the genlist. - * - * @param obj The genlist object - * @return The selected item, or NULL if none is selected. - * - * This gets the selected item in the list (if multi-selection is enabled, only - * the item that was first selected in the list is returned - which is not very - * useful, so see elm_genlist_selected_items_get() for when multi-selection is - * used). - * - * If no item is selected, NULL is returned. - * - * @see elm_genlist_selected_items_get() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get a list of selected items in the genlist. - * - * @param obj The genlist object - * @return The list of selected items, or NULL if none are selected. - * - * It returns a list of the selected items. This list pointer is only valid so - * long as the selection doesn't change (no items are selected or unselected, or - * unselected implicitly by deletion). The list contains Elm_Genlist_Item - * pointers. The order of the items in this list is the order which they were - * selected, i.e. the first item in this list is the first item that was - * selected, and so on. - * - * @note If not in multi-select mode, consider using function - * elm_genlist_selected_item_get() instead. - * - * @see elm_genlist_multi_select_set() - * @see elm_genlist_selected_item_get() - * - * @ingroup Genlist - */ - EAPI const Eina_List *elm_genlist_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the mode item style of items in the genlist - * @param obj The genlist object - * @return The mode item style string, or NULL if none is specified - * - * This is a constant string and simply defines the name of the - * style that will be used for mode animations. It can be - * @c NULL if you don't plan to use Genlist mode. See - * elm_genlist_item_mode_set() for more info. - * - * @ingroup Genlist - */ - EAPI const char *elm_genlist_mode_item_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the mode item style of items in the genlist - * @param obj The genlist object - * @param style The mode item style string, or NULL if none is desired - * - * This is a constant string and simply defines the name of the - * style that will be used for mode animations. It can be - * @c NULL if you don't plan to use Genlist mode. See - * elm_genlist_item_mode_set() for more info. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get a list of realized items in genlist - * - * @param obj The genlist object - * @return The list of realized items, nor NULL if none are realized. - * - * This returns a list of the realized items in the genlist. The list - * contains Elm_Genlist_Item pointers. The list must be freed by the - * caller when done with eina_list_free(). The item pointers in the - * list are only valid so long as those items are not deleted or the - * genlist is not deleted. - * - * @see elm_genlist_realized_items_update() - * - * @ingroup Genlist - */ - EAPI Eina_List *elm_genlist_realized_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the item that is at the x, y canvas coords. - * - * @param obj The gelinst object. - * @param x The input x coordinate - * @param y The input y coordinate - * @param posret The position relative to the item returned here - * @return The item at the coordinates or NULL if none - * - * This returns the item at the given coordinates (which are canvas - * relative, not object-relative). If an item is at that coordinate, - * that item handle is returned, and if @p posret is not NULL, the - * integer pointed to is set to a value of -1, 0 or 1, depending if - * the coordinate is on the upper portion of that item (-1), on the - * middle section (0) or on the lower part (1). If NULL is returned as - * an item (no item found there), then posret may indicate -1 or 1 - * based if the coordinate is above or below all items respectively in - * the genlist. - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret) EINA_ARG_NONNULL(1); - - /** - * Get the first item in the genlist - * - * This returns the first item in the list. - * - * @param obj The genlist object - * @return The first item, or NULL if none - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the last item in the genlist - * - * This returns the last item in the list. - * - * @return The last item, or NULL if none - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the scrollbar policy - * - * @param obj The genlist object - * @param policy_h Horizontal scrollbar policy. - * @param policy_v Vertical scrollbar policy. - * - * This sets the scrollbar visibility policy for the given genlist - * scroller. #ELM_SMART_SCROLLER_POLICY_AUTO means the scrollbar is - * made visible if it is needed, and otherwise kept hidden. - * #ELM_SMART_SCROLLER_POLICY_ON turns it on all the time, and - * #ELM_SMART_SCROLLER_POLICY_OFF always keeps it off. This applies - * respectively for the horizontal and vertical scrollbars. Default is - * #ELM_SMART_SCROLLER_POLICY_AUTO - * - * @see elm_genlist_scroller_policy_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); - - /** - * Get the scrollbar policy - * - * @param obj The genlist object - * @param policy_h Pointer to store the horizontal scrollbar policy. - * @param policy_v Pointer to store the vertical scrollbar policy. - * - * @see elm_genlist_scroller_policy_set() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); - - /** - * Get the @b next item in a genlist widget's internal list of items, - * given a handle to one of those items. - * - * @param item The genlist 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 - * genlist. - * - * @see elm_genlist_item_prev_get() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the @b previous item in a genlist widget's internal list of items, - * given a handle to one of those items. - * - * @param item The genlist 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 - * genlist. - * - * @see elm_genlist_item_next_get() - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_prev_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the genlist object's handle which contains a given genlist - * item - * - * @param item The item to fetch the container from - * @return The genlist (parent) object - * - * This returns the genlist object itself that an item belongs to. - * - * @ingroup Genlist - */ - EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the parent item of the given item - * - * @param it The item - * @return The parent of the item or @c NULL if it has no parent. - * - * This returns the item that was specified as parent of the item @p it on - * elm_genlist_item_append() and insertion related functions. - * - * @ingroup Genlist - */ - EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Remove all sub-items (children) of the given item - * - * @param it The item - * - * This removes all items that are children (and their descendants) of the - * given item @p it. - * - * @see elm_genlist_clear() - * @see elm_genlist_item_del() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_subitems_clear(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Set whether a given genlist item is selected or not - * - * @param it The 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 genlist and @p selected is @c - * EINA_TRUE, any other previously selected items will get - * unselected in favor of this new one. - * - * @see elm_genlist_item_selected_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_selected_set(Elm_Genlist_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); - - /** - * Get whether a given genlist item is selected or not - * - * @param it The item - * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise - * - * @see elm_genlist_item_selected_set() for more details - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Sets the expanded state of an item. - * - * @param it The item - * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded). - * - * This function flags the item of type #ELM_GENLIST_ITEM_SUBITEMS as - * expanded or not. - * - * The theme will respond to this change visually, and a signal "expanded" or - * "contracted" will be sent from the genlist with a pointer to the item that - * has been expanded/contracted. - * - * Calling this function won't show or hide any child of this item (if it is - * a parent). You must manually delete and create them on the callbacks fo - * the "expanded" or "contracted" signals. - * - * @see elm_genlist_item_expanded_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_expanded_set(Elm_Genlist_Item *item, Eina_Bool expanded) EINA_ARG_NONNULL(1); - - /** - * Get the expanded state of an item - * - * @param it The item - * @return The expanded state - * - * This gets the expanded state of an item. - * - * @see elm_genlist_item_expanded_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the depth of expanded item - * - * @param it The genlist item object - * @return The depth of expanded item - * - * @ingroup Genlist - */ - EAPI int elm_genlist_item_expanded_depth_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set whether a given genlist item is disabled or not. - * - * @param it The 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_genlist_item_disabled_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_disabled_set(Elm_Genlist_Item *item, Eina_Bool disabled) EINA_ARG_NONNULL(1); - - /** - * Get whether a given genlist item is disabled or not. - * - * @param it The item - * @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise - * (and on errors). - * - * @see elm_genlist_item_disabled_set() for more details - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Sets the display only state of an item. - * - * @param it The item - * @param display_only @c EINA_TRUE if the item is display only, @c - * EINA_FALSE otherwise. - * - * A display only item cannot be selected or unselected. It is for - * display only and not selecting or otherwise clicking, dragging - * etc. by the user, thus finger size rules will not be applied to - * this item. - * - * It's good to set group index items to display only state. - * - * @see elm_genlist_item_display_only_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_display_only_set(Elm_Genlist_Item *it, Eina_Bool display_only) EINA_ARG_NONNULL(1); - - /** - * Get the display only state of an item - * - * @param it The item - * @return @c EINA_TRUE if the item is display only, @c - * EINA_FALSE otherwise. - * - * @see elm_genlist_item_display_only_set() - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Show the portion of a genlist's internal list containing a given - * item, immediately. - * - * @param it The item to display - * - * This causes genlist to jump to the given item @p it and show it (by - * immediately scrolling to that position), if it is not fully visible. - * - * @see elm_genlist_item_bring_in() - * @see elm_genlist_item_top_show() - * @see elm_genlist_item_middle_show() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_show(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Animatedly bring in, to the visible are of a genlist, a given - * item on it. - * - * @param it The item to display - * - * This causes genlist to jump to the given item @p it and show it (by - * animatedly scrolling), if it is not fully visible. This may use animation - * to do so and take a period of time - * - * @see elm_genlist_item_show() - * @see elm_genlist_item_top_bring_in() - * @see elm_genlist_item_middle_bring_in() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Show the portion of a genlist's internal list containing a given - * item, immediately. - * - * @param it The item to display - * - * This causes genlist to jump to the given item @p it and show it (by - * immediately scrolling to that position), if it is not fully visible. - * - * The item will be positioned at the top of the genlist viewport. - * - * @see elm_genlist_item_show() - * @see elm_genlist_item_top_bring_in() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Animatedly bring in, to the visible are of a genlist, a given - * item on it. - * - * @param it The item - * - * This causes genlist to jump to the given item @p it and show it (by - * animatedly scrolling), if it is not fully visible. This may use animation - * to do so and take a period of time - * - * The item will be positioned at the top of the genlist viewport. - * - * @see elm_genlist_item_bring_in() - * @see elm_genlist_item_top_show() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_top_bring_in(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Show the portion of a genlist's internal list containing a given - * item, immediately. - * - * @param it The item to display - * - * This causes genlist to jump to the given item @p it and show it (by - * immediately scrolling to that position), if it is not fully visible. - * - * The item will be positioned at the middle of the genlist viewport. - * - * @see elm_genlist_item_show() - * @see elm_genlist_item_middle_bring_in() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_middle_show(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Animatedly bring in, to the visible are of a genlist, a given - * item on it. - * - * @param it The item - * - * This causes genlist to jump to the given item @p it and show it (by - * animatedly scrolling), if it is not fully visible. This may use animation - * to do so and take a period of time - * - * The item will be positioned at the middle of the genlist viewport. - * - * @see elm_genlist_item_bring_in() - * @see elm_genlist_item_middle_show() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_middle_bring_in(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Remove a genlist 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_genlist_clear(), to remove all items in a genlist at - * once. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_del(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Return the data associated to a given genlist item - * - * @param item The genlist item. - * @return the data associated to this item. - * - * This returns the @c data value passed on the - * elm_genlist_item_append() and related item addition calls. - * - * @see elm_genlist_item_append() - * @see elm_genlist_item_data_set() - * - * @ingroup Genlist - */ - EAPI void *elm_genlist_item_data_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Set the data associated to a given genlist item - * - * @param item The genlist item - * @param data The new data pointer to set on it - * - * This @b overrides the @c data value passed on the - * elm_genlist_item_append() and related item addition calls. This - * function @b won't call elm_genlist_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_genlist_item_data_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *it, const void *data) EINA_ARG_NONNULL(1); - - /** - * Tells genlist to "orphan" contents fetchs by the item class - * - * @param it The item - * - * This instructs genlist to release references to contents in the item, - * meaning that they will no longer be managed by genlist and are - * floating "orphans" that can be re-used elsewhere if the user wants - * to. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_contents_orphan(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - EINA_DEPRECATED EAPI void elm_genlist_item_icons_orphan(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the real Evas object created to implement the view of a - * given genlist item - * - * @param item The genlist item. - * @return the Evas object implementing this item's view. - * - * This returns the actual Evas object used to implement the - * specified genlist 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 genlist. Do not modify this object (move, resize, - * show, hide, etc.), as the genlist 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_genlist_item_data_get() - * - * @ingroup Genlist - */ - EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Update the contents of an item - * - * @param it The item - * - * This updates an item by calling all the item class functions again - * to get the contents, texts and states. Use this when the original - * item data has changed and the changes are desired to be reflected. - * - * Use elm_genlist_realized_items_update() to update all already realized - * items. - * - * @see elm_genlist_realized_items_update() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_update(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Promote an item to the top of the list - * - * @param it The item - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_promote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1); - - /** - * Demote an item to the end of the list - * - * @param it The item - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_demote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1); - - /** - * Update the part of an item - * - * @param it The item - * @param parts The name of item's part - * @param itf The flags of item's part type - * - * This updates an item's part by calling item's fetching functions again - * to get the contents, texts and states. Use this when the original - * item data has changed and the changes are desired to be reflected. - * Second parts argument is used for globbing to match '*', '?', and '.' - * It can be used at updating multi fields. - * - * Use elm_genlist_realized_items_update() to update an item's all - * property. - * - * @see elm_genlist_item_update() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_fields_update(Elm_Genlist_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf) EINA_ARG_NONNULL(1); - - /** - * Update the item class of an item - * - * @param it The item - * @param itc The item class for the item - * - * This sets another class fo the item, changing the way that it is - * displayed. After changing the item class, elm_genlist_item_update() is - * called on the item @p it. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_item_class_update(Elm_Genlist_Item *it, const Elm_Genlist_Item_Class *itc) EINA_ARG_NONNULL(1, 2); - EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the text to be shown in a given genlist item's tooltips. - * - * @param item The genlist 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. - * - * In order to set a content or something else as a tooltip, look at - * elm_genlist_item_tooltip_content_cb_set(). - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_tooltip_text_set(Elm_Genlist_Item *item, const char *text) EINA_ARG_NONNULL(1); - - /** - * Set the content to be shown in a given genlist item's tooltips - * - * @param item The genlist 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_genlist_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. - * - * In order to set just a text as a tooltip, look at - * elm_genlist_item_tooltip_text_set(). - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_Genlist_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 genlist item - * - * @param item genlist 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_genlist_item_tooltip_content_cb_set() will be called to - * notify it is not used anymore (and have resources cleaned, if - * need be). - * - * @see elm_genlist_item_tooltip_content_cb_set() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_tooltip_unset(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Set a different @b style for a given genlist item's tooltip. - * - * @param item genlist item with tooltip set - * @param style the theme style to use on tooltips (e.g. @c - * "default", @c "transparent", etc) - * - * Tooltips can have alternate styles 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 genlist item objects. The default style for - * tooltips is @c "default". - * - * @note before you set a style you should define a tooltip with - * elm_genlist_item_tooltip_content_cb_set() or - * elm_genlist_item_tooltip_text_set() - * - * @see elm_genlist_item_tooltip_style_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_tooltip_style_set(Elm_Genlist_Item *item, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get the style set a given genlist item's tooltip. - * - * @param item genlist 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_genlist_item_tooltip_style_set() for more details - * - * @ingroup Genlist - */ - EAPI const char *elm_genlist_item_tooltip_style_get(const Elm_Genlist_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_genlist_item_tooltip_window_mode_set(Elm_Genlist_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_genlist_item_tooltip_window_mode_get(const Elm_Genlist_Item *item); - - /** - * Set the type of mouse pointer/cursor decoration to be shown, - * when the mouse pointer is over the given genlist widget item - * - * @param item genlist 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_genlist_item_cursor_get() - * @see elm_genlist_item_cursor_unset() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_cursor_set(Elm_Genlist_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 genlist widget item - * - * @param item genlist 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_genlist_item_cursor_set() for more details - * @see elm_genlist_item_cursor_unset() - * - * @ingroup Genlist - */ - EAPI const char *elm_genlist_item_cursor_get(const Elm_Genlist_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 genlist widget - * item, thus making it show the @b default cursor again. - * - * @param item a genlist 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_genlist_item_cursor_set() for more details - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_cursor_unset(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Set a different @b style for a given custom cursor set for a - * genlist item. - * - * @param item genlist item with custom cursor set - * @param style the theme style to use (e.g. @c "default", - * @c "transparent", etc) - * - * This function only makes sense when one is using custom mouse - * cursor decorations defined in a theme file , which can - * have, given a cursor name/type, alternate styles on - * it. It works analogously as elm_object_cursor_style_set(), but - * here applied only to genlist item objects. - * - * @warning Before you set a cursor style you should have defined a - * custom cursor previously on the item, with - * elm_genlist_item_cursor_set() - * - * @see elm_genlist_item_cursor_engine_only_set() - * @see elm_genlist_item_cursor_style_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_cursor_style_set(Elm_Genlist_Item *item, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get the current @b style set for a given genlist item's custom - * cursor - * - * @param item genlist 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_genlist_item_cursor_style_set() for more details - * - * @ingroup Genlist - */ - EAPI const char *elm_genlist_item_cursor_style_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Set if the (custom) cursor for a given genlist 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 genlist items, with elm_genlist_item_cursor_set(). - * - * @note By default, cursors will only be looked for between those - * provided by the rendering engine. - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_cursor_engine_only_set(Elm_Genlist_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); - - /** - * Get if the (custom) cursor for a given genlist item is being - * searched in its theme, also, or is only relying on the rendering - * engine. - * - * @param item a genlist 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_genlist_item_cursor_engine_only_set(), for more details - * - * @ingroup Genlist - */ - EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); - - /** - * Get the index of the item. It is only valid once displayed. - * - * @param item a genlist item - * @return the position inside the list of item. - * - * @ingroup Genlist - */ - EAPI int elm_genlist_item_index_get(Elm_Gen_Item *it); - - /** - * Update the contents of all realized items. - * - * @param obj The genlist object. - * - * This updates all realized items by calling all the item class functions again - * to get the contents, texts and states. Use this when the original - * item data has changed and the changes are desired to be reflected. - * - * To update just one item, use elm_genlist_item_update(). - * - * @see elm_genlist_realized_items_get() - * @see elm_genlist_item_update() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_realized_items_update(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Activate a genlist mode on an item - * - * @param item The genlist item - * @param mode Mode name - * @param mode_set Boolean to define set or unset mode. - * - * A genlist mode is a different way of selecting an item. Once a mode is - * activated on an item, any other selected item is immediately unselected. - * This feature provides an easy way of implementing a new kind of animation - * for selecting an item, without having to entirely rewrite the item style - * theme. However, the elm_genlist_selected_* API can't be used to get what - * item is activate for a mode. - * - * The current item style will still be used, but applying a genlist mode to - * an item will select it using a different kind of animation. - * - * The current active item for a mode can be found by - * elm_genlist_mode_item_get(). - * - * The characteristics of genlist mode are: - * - Only one mode can be active at any time, and for only one item. - * - Genlist handles deactivating other items when one item is activated. - * - A mode is defined in the genlist theme (edc), and more modes can easily - * be added. - * - A mode style and the genlist item style are different things. They - * can be combined to provide a default style to the item, with some kind - * of animation for that item when the mode is activated. - * - * When a mode is activated on an item, a new view for that item is created. - * The theme of this mode defines the animation that will be used to transit - * the item from the old view to the new view. This second (new) view will be - * active for that item while the mode is active on the item, and will be - * destroyed after the mode is totally deactivated from that item. - * - * @see elm_genlist_mode_get() - * @see elm_genlist_mode_item_get() - * - * @ingroup Genlist - */ - EAPI void elm_genlist_item_mode_set(Elm_Genlist_Item *it, const char *mode_type, Eina_Bool mode_set) EINA_ARG_NONNULL(1, 2); - - /** - * Get the last (or current) genlist mode used. - * - * @param obj The genlist object - * - * This function just returns the name of the last used genlist mode. It will - * be the current mode if it's still active. - * - * @see elm_genlist_item_mode_set() - * @see elm_genlist_mode_item_get() - * - * @ingroup Genlist - */ - EAPI const char *elm_genlist_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get active genlist mode item - * - * @param obj The genlist object - * @return The active item for that current mode. Or @c NULL if no item is - * activated with any mode. - * - * This function returns the item that was activated with a mode, by the - * function elm_genlist_item_mode_set(). - * - * @see elm_genlist_item_mode_set() - * @see elm_genlist_mode_get() - * - * @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); - - /** - * @} - */ - +/** + * @defgroup Genlist Genlist + * + * @image html img/widget/genlist/preview-00.png + * @image latex img/widget/genlist/preview-00.eps + * @image html img/genlist.png + * @image latex img/genlist.eps + * + * This widget aims to have more expansive list than the simple list in + * Elementary that could have more flexible items and allow many more entries + * while still being fast and low on memory usage. At the same time it was + * also made to be able to do tree structures. But the price to pay is more + * complexity when it comes to usage. If all you want is a simple list with + * icons and a single text, use the normal @ref List object. + * + * Genlist has a fairly large API, mostly because it's relatively complex, + * trying to be both expansive, powerful and efficient. First we will begin + * an overview on the theory behind genlist. + * + * @section Genlist_Item_Class Genlist item classes - creating items + * + * In order to have the ability to add and delete items on the fly, genlist + * implements a class (callback) system where the application provides a + * structure with information about that type of item (genlist may contain + * multiple different items with different classes, states and styles). + * Genlist 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_Genlist_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 - A struct with pointers to functions that will be called when + * an item is going to be actually created. All of them receive a @c data + * parameter that will point to the same data passed to + * elm_genlist_item_append() and related item creation functions, and a @c + * obj parameter that points to the genlist object itself. + * + * The function pointers inside @c func are @c text_get, @c content_get, @c + * state_get and @c del. The 3 first functions also receive a @c part + * parameter described below. A brief description of these functions follows: + * + * - @c text_get - The @c part parameter 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_Genlist_Item_Text_Get_Cb. + * - @c content_get - The @c part parameter is the name string of one of the + * existing (content) swallow parts in the Edje group implementing the item's + * theme. It must return @c NULL, when no content is desired, or a valid + * object handle, otherwise. The object will be deleted by the genlist on + * its deletion or when the item is "unrealized". See + * #Elm_Genlist_Item_Content_Get_Cb. + * - @c func.state_get - The @c part parameter 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. Genlists 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_Genlist_Item_State_Get_Cb. + * - @c func.del - This is intended for use when genlist items are deleted, + * so any data attached to the item (e.g. its data parameter on creation) + * can be deleted. See #Elm_Genlist_Item_Del_Cb. + * + * available item styles: + * - default + * - default_style - The text part is a textblock + * + * @image html img/widget/genlist/preview-04.png + * @image latex img/widget/genlist/preview-04.eps + * + * - double_label + * + * @image html img/widget/genlist/preview-01.png + * @image latex img/widget/genlist/preview-01.eps + * + * - icon_top_text_bottom + * + * @image html img/widget/genlist/preview-02.png + * @image latex img/widget/genlist/preview-02.eps + * + * - group_index + * + * @image html img/widget/genlist/preview-03.png + * @image latex img/widget/genlist/preview-03.eps + * + * @section Genlist_Items Structure of items + * + * An item in a genlist can have 0 or more texts (they can be regular + * text or textblock Evas objects - that's up to the style to determine), 0 + * or more contents (which are simply objects swallowed into the genlist item's + * theming Edje object) and 0 or more boolean states, 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 genlist, + * under the Edje (string) data items named @c "labels", @c "contents" 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 genlist item theme, we have @b one text + * part (@c "elm.text"), @b two content parts (@c "elm.swalllow.icon" and @c + * "elm.swallow.end") and @b no state parts. + * + * A genlist 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 Genlist_Manipulation Editing and Navigating + * + * Items can be added by several calls. All of them return a @ref + * Elm_Genlist_Item handle that is an internal member inside the genlist. + * They all take a data parameter that is meant to be used for a handle to + * the applications internal data (eg the struct with the original item + * data). The parent parameter is the parent genlist item this belongs to if + * it is a tree or an indexed group, and NULL if there is no parent. The + * flags can be a bitmask of #ELM_GENLIST_ITEM_NONE, + * #ELM_GENLIST_ITEM_SUBITEMS and #ELM_GENLIST_ITEM_GROUP. If + * #ELM_GENLIST_ITEM_SUBITEMS is set then this item is displayed as an item + * that is able to expand and have child items. If ELM_GENLIST_ITEM_GROUP + * is set then this item is group index item that is displayed at the top + * until the next group comes. The func parameter is a convenience callback + * that is called when the item is selected and the data parameter will be + * the func_data parameter, obj be the genlist object and event_info will be + * the genlist item. + * + * elm_genlist_item_append() adds an item to the end of the list, or if + * there is a parent, to the end of all the child items of the parent. + * elm_genlist_item_prepend() is the same but adds to the beginning of + * the list or children list. elm_genlist_item_insert_before() inserts at + * item before another item and elm_genlist_item_insert_after() inserts after + * the indicated item. + * + * The application can clear the list with elm_genlist_clear() which deletes + * all the items in the list and elm_genlist_item_del() will delete a specific + * item. elm_genlist_item_subitems_clear() will clear all items that are + * children of the indicated parent item. + * + * To help inspect list items you can jump to the item at the top of the list + * with elm_genlist_first_item_get() which will return the item pointer, and + * similarly elm_genlist_last_item_get() gets the item at the end of the list. + * elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next + * and previous items respectively relative to the indicated item. Using + * these calls you can walk the entire item list/tree. Note that as a tree + * the items are flattened in the list, so elm_genlist_item_parent_get() will + * let you know which item is the parent (and thus know how to skip them if + * wanted). + * + * @section Genlist_Muti_Selection Multi-selection + * + * If the application wants multiple items to be able to be selected, + * elm_genlist_multi_select_set() can enable this. If the list is + * single-selection only (the default), then elm_genlist_selected_item_get() + * will return the selected item, if any, or NULL if none is selected. If the + * list is multi-select then elm_genlist_selected_items_get() will return a + * list (that is only valid as long as no items are modified (added, deleted, + * selected or unselected)). + * + * @section Genlist_Usage_Hints Usage hints + * + * There are also convenience functions. elm_genlist_item_genlist_get() will + * return the genlist object the item belongs to. elm_genlist_item_show() + * will make the scroller scroll to show that specific item so its visible. + * elm_genlist_item_data_get() returns the data pointer set by the item + * creation functions. + * + * If an item changes (state of boolean changes, text or contents change), + * then use elm_genlist_item_update() to have genlist update the item with + * the new state. Genlist will re-realize the item thus call the functions + * in the _Elm_Genlist_Item_Class for that item. + * + * To programmatically (un)select an item use elm_genlist_item_selected_set(). + * To get its selected state use elm_genlist_item_selected_get(). Similarly + * to expand/contract an item and get its expanded state, use + * elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And + * again to make an item disabled (unable to be selected and appear + * differently) use elm_genlist_item_disabled_set() to set this and + * elm_genlist_item_disabled_get() to get the disabled state. + * + * 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 + * 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 + * to the viewport width and limited to that size. This can be combined with + * a different style that uses edjes' ellipsis feature (cutting text off like + * this: "tex..."). + * + * Items will only call their selection func and callback when first becoming + * selected. Any further clicks will do nothing, unless you enable always + * select with elm_genlist_always_select_mode_set(). This means even if + * selected, every click will make the selected callbacks be called. + * elm_genlist_no_select_mode_set() will turn off the ability to select + * items entirely and they will neither appear selected nor call selected + * callback functions. + * + * 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 Genlist_Implementation Implementation + * + * Evas tracks every object you create. Every time it processes an event + * (mouse move, down, up etc.) it needs to walk through objects and find out + * what event that affects. Even worse every time it renders display updates, + * in order to just calculate what to re-draw, it needs to walk through many + * many many objects. Thus, the more objects you keep active, the more + * overhead Evas has in just doing its work. It is advisable to keep your + * active objects to the minimum working set you need. Also remember that + * object creation and deletion carries an overhead, so there is a + * middle-ground, which is not easily determined. But don't keep massive lists + * of objects you can't see or use. Genlist does this with list objects. It + * creates and destroys them dynamically as you scroll around. It groups them + * into blocks so it can determine the visibility etc. of a whole block at + * once as opposed to having to walk the whole list. This 2-level list allows + * for very large numbers of items to be in the list (tests have used up to + * 2,000,000 items). Also genlist employs a queue for adding items. As items + * may be different sizes, every item added needs to be calculated as to its + * size and thus this presents a lot of overhead on populating the list, this + * genlist employs a queue. Any item added is queued and spooled off over + * time, actually appearing some time later, so if your list has many members + * you may find it takes a while for them to all appear, with your process + * consuming a lot of CPU while it is busy spooling. + * + * Genlist also implements a tree structure, but it does so with callbacks to + * the application, with the application filling in tree structures when + * requested (allowing for efficient building of a very deep tree that could + * even be used for file-management). See the above smart signal callbacks for + * details. + * + * @section Genlist_Smart_Events Genlist smart events + * + * Signals 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 + * item that was activated. + * - @c "clicked,double" - The user has double-clicked an item. The @c + * event_info parameter is the item that was double-clicked. + * - @c "selected" - This is called when a user has made an item selected. + * The event_info parameter is the genlist item that was selected. + * - @c "unselected" - This is called when a user has made an item + * unselected. The event_info parameter is the genlist item that was + * unselected. + * - @c "expanded" - This is called when elm_genlist_item_expanded_set() is + * called and the item is now meant to be expanded. The event_info + * parameter is the genlist item that was indicated to expand. It is the + * job of this callback to then fill in the child items. + * - @c "contracted" - This is called when elm_genlist_item_expanded_set() is + * called and the item is now meant to be contracted. The event_info + * parameter is the genlist item that was indicated to contract. It is the + * job of this callback to then delete the child items. + * - @c "expand,request" - This is called when a user has indicated they want + * to expand a tree branch item. The callback should decide if the item can + * expand (has any children) and then call elm_genlist_item_expanded_set() + * appropriately to set the state. The event_info parameter is the genlist + * item that was indicated to expand. + * - @c "contract,request" - This is called when a user has indicated they + * want to contract a tree branch item. The callback should decide if the + * item can contract (has any children) and then call + * elm_genlist_item_expanded_set() appropriately to set the state. The + * event_info parameter is the genlist item that was indicated to contract. + * - @c "realized" - This is called when the item in the list is created as a + * real evas object. event_info parameter is the genlist item that was + * created. The object may be deleted at any time, so it is up to the + * caller to not use the object pointer from elm_genlist_item_object_get() + * in a way where it may point to freed objects. + * - @c "unrealized" - This is called just before an item is unrealized. + * After this call content objects provided will be deleted and the item + * object itself delete or be put into a floating cache. + * - @c "drag,start,up" - This is called when the item in the list has been + * dragged (not scrolled) up. + * - @c "drag,start,down" - This is called when the item in the list has been + * dragged (not scrolled) down. + * - @c "drag,start,left" - This is called when the item in the list has been + * dragged (not scrolled) left. + * - @c "drag,start,right" - This is called when the item in the list has + * been dragged (not scrolled) right. + * - @c "drag,stop" - This is called when the item in the list has stopped + * being dragged. + * - @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 "edge,top" - This is called when the genlist is scrolled until + * the top edge. + * - @c "edge,bottom" - This is called when the genlist is scrolled + * until the bottom edge. + * - @c "edge,left" - This is called when the genlist is scrolled + * until the left edge. + * - @c "edge,right" - This is called when the genlist is scrolled + * until the right edge. + * - @c "multi,swipe,left" - This is called when the genlist is multi-touch + * swiped left. + * - @c "multi,swipe,right" - This is called when the genlist is multi-touch + * swiped right. + * - @c "multi,swipe,up" - This is called when the genlist is multi-touch + * swiped up. + * - @c "multi,swipe,down" - This is called when the genlist is multi-touch + * swiped down. + * - @c "multi,pinch,out" - This is called when the genlist is multi-touch + * pinched out. "- @c multi,pinch,in" - This is called when the genlist is + * multi-touch pinched in. + * - @c "swipe" - This is called when the genlist is swiped. + * - @c "moved" - This is called when a genlist item is moved. + * - @c "language,changed" - This is called when the program's language is + * changed. + * + * @section Genlist_Examples Examples + * + * Here is a list of examples that use the genlist, trying to show some of + * its capabilities: + * - @ref genlist_example_01 + * - @ref genlist_example_02 + * - @ref genlist_example_03 + * - @ref genlist_example_04 + * - @ref genlist_example_05 + */ + +/** + * @addtogroup Genlist + * @{ + */ + +/** + * @enum _Elm_Genlist_Item_Flags + * @typedef Elm_Genlist_Item_Flags + * + * Defines if the item is of any special type (has subitems or it's the + * index of a group), or is just a simple item. + * + * @ingroup Genlist + */ +typedef enum _Elm_Genlist_Item_Flags +{ + ELM_GENLIST_ITEM_NONE = 0, /**< simple item */ + ELM_GENLIST_ITEM_SUBITEMS = (1 << 0), /**< may expand and have child items */ + ELM_GENLIST_ITEM_GROUP = (1 << 1) /**< index of a group of items */ +} Elm_Genlist_Item_Flags; +typedef enum _Elm_Genlist_Item_Field_Flags +{ + ELM_GENLIST_ITEM_FIELD_ALL = 0, + ELM_GENLIST_ITEM_FIELD_LABEL = (1 << 0), + ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1), + ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2) +} Elm_Genlist_Item_Field_Flags; +typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class; /**< Genlist item class definition structs */ +#define Elm_Genlist_Item_Class Elm_Gen_Item_Class +typedef struct _Elm_Genlist_Item Elm_Genlist_Item; /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ +#define Elm_Genlist_Item Elm_Gen_Item /**< Item of Elm_Genlist. Sub-type of Elm_Widget_Item */ +typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func; /**< Class functions for genlist item class */ + +/** + * Text fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The allocated (NOT stringshared) string to set as the text + */ +typedef char *(*Elm_Genlist_Item_Text_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * Content (swallowed object) fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The content object to swallow + */ +typedef Evas_Object *(*Elm_Genlist_Item_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * State fetching class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + * @param part The part name of the swallow + * @return The hell if I know + */ +typedef Eina_Bool (*Elm_Genlist_Item_State_Get_Cb)(void *data, Evas_Object *obj, const char *part); + +/** + * Deletion class function for Elm_Gen_Item_Class. + * @param data The data passed in the item creation function + * @param obj The base widget object + */ +typedef void (*Elm_Genlist_Item_Del_Cb)(void *data, Evas_Object *obj); + +/** + * @struct _Elm_Genlist_Item_Class + * + * Genlist item class definition structs. + * + * This struct contains the style and fetching functions that will define the + * contents of each item. + * + * @see @ref Genlist_Item_Class + */ +struct _Elm_Genlist_Item_Class +{ + const char *item_style; /**< style of this class. */ + struct Elm_Genlist_Item_Class_Func + { + Elm_Genlist_Item_Text_Get_Cb text_get; /**< Text fetching class function for genlist item classes.*/ + Elm_Genlist_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist item classes. */ + Elm_Genlist_Item_State_Get_Cb state_get; /**< State fetching class function for genlist item classes. */ + Elm_Genlist_Item_Del_Cb del; /**< Deletion class function for genlist item classes. */ + } func; +}; +#define Elm_Genlist_Item_Class_Func Elm_Gen_Item_Class_Func +/** + * Add a new genlist widget to the given parent Elementary + * (container) object + * + * @param parent The parent object + * @return a new genlist widget handle or @c NULL, on errors + * + * This function inserts a new genlist widget on the canvas. + * + * @see elm_genlist_item_append() + * @see elm_genlist_item_del() + * @see elm_genlist_clear() + * + * @ingroup Genlist + */ +EAPI Evas_Object * + elm_genlist_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); + +/** + * Remove all items from a given genlist widget. + * + * @param obj The genlist object + * + * This removes (and deletes) all items in @p obj, leaving it empty. + * + * @see elm_genlist_item_del(), to remove just one item. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable or disable multi-selection in the genlist + * + * @param obj The genlist object + * @param multi Multi-select enable/disable. Default is disabled. + * + * This enables (@c EINA_TRUE) or disables (@c EINA_FALSE) multi-selection in + * the list. This allows more than 1 item to be selected. To retrieve the list + * of selected items, use elm_genlist_selected_items_get(). + * + * @see elm_genlist_selected_items_get() + * @see elm_genlist_multi_select_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1); + +/** + * Gets if multi-selection in genlist is enabled or disabled. + * + * @param obj The genlist object + * @return Multi-select enabled/disabled + * (@c EINA_TRUE = enabled/@c EINA_FALSE = disabled). Default is @c EINA_FALSE. + * + * @see elm_genlist_multi_select_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * This sets the horizontal stretching mode. + * + * @param obj The genlist object + * @param mode The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). + * + * This sets the mode used for sizing items horizontally. Valid modes + * are #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 to the viewport width and + * limited to that size. + * + * @see elm_genlist_horizontal_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); + +/** + * Gets the horizontal stretching mode. + * + * @param obj The genlist object + * @return The mode to use + * (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL) + * + * @see elm_genlist_horizontal_set() + * + * @ingroup Genlist + */ +EAPI Elm_List_Mode elm_genlist_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the always select mode. + * + * @param obj The genlist object + * @param always_select The always select mode (@c EINA_TRUE = on, @c + * EINA_FALSE = off). Default is @c EINA_FALSE. + * + * Items will only call their selection func and callback when first + * becoming selected. Any further clicks will do nothing, unless you + * enable always select with elm_genlist_always_select_mode_set(). + * This means that, even if selected, every click will make the selected + * callbacks be called. + * + * @see elm_genlist_always_select_mode_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1); + +/** + * Get the always select mode. + * + * @param obj The genlist object + * @return The always select mode + * (@c EINA_TRUE = on, @c EINA_FALSE = off) + * + * @see elm_genlist_always_select_mode_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable/disable the no select mode. + * + * @param obj The genlist object + * @param no_select The no select mode + * (EINA_TRUE = on, EINA_FALSE = off) + * + * This will turn off the ability to select items entirely and they + * will neither appear selected nor call selected callback functions. + * + * @see elm_genlist_no_select_mode_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1); + +/** + * Gets whether the no select mode is enabled. + * + * @param obj The genlist object + * @return The no select mode + * (@c EINA_TRUE = on, @c EINA_FALSE = off) + * + * @see elm_genlist_no_select_mode_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable/disable compress mode. + * + * @param obj The genlist object + * @param compress The compress mode + * (@c EINA_TRUE = on, @c EINA_FALSE = off). Default is @c EINA_FALSE. + * + * This will enable the compress mode where items are "compressed" + * horizontally to fit the genlist scrollable viewport width. This is + * special for genlist. Do not rely on + * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to + * work as genlist needs to handle it specially. + * + * @see elm_genlist_compress_mode_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress) EINA_ARG_NONNULL(1); + +/** + * Get whether the compress mode is enabled. + * + * @param obj The genlist object + * @return The compress mode + * (@c EINA_TRUE = on, @c EINA_FALSE = off) + * + * @see elm_genlist_compress_mode_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_compress_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable/disable height-for-width mode. + * + * @param obj The genlist object + * @param setting The height-for-width mode (@c EINA_TRUE = on, + * @c EINA_FALSE = off). Default is @c EINA_FALSE. + * + * With height-for-width mode the item width will be fixed (restricted + * to a minimum of) to the list width when calculating its size in + * order to allow the height to be calculated based on it. This allows, + * for instance, text block to wrap lines if the Edje part is + * configured with "text.min: 0 1". + * + * @note This mode will make list resize slower as it will have to + * recalculate every item height again whenever the list width + * changes! + * + * @note When height-for-width mode is enabled, it also enables + * compress mode (see elm_genlist_compress_mode_set()) and + * disables homogeneous (see elm_genlist_homogeneous_set()). + * + * @ingroup Genlist + */ +EAPI void elm_genlist_height_for_width_mode_set(Evas_Object *obj, Eina_Bool height_for_width) EINA_ARG_NONNULL(1); + +/** + * Get whether the height-for-width mode is enabled. + * + * @param obj The genlist object + * @return The height-for-width mode (@c EINA_TRUE = on, @c EINA_FALSE = + * off) + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_height_for_width_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable/disable horizontal and vertical bouncing effect. + * + * @param obj The genlist object + * @param h_bounce Allow bounce horizontally (@c EINA_TRUE = on, @c + * EINA_FALSE = off). Default is @c EINA_FALSE. + * @param v_bounce Allow bounce vertically (@c EINA_TRUE = on, @c + * EINA_FALSE = off). Default is @c EINA_TRUE. + * + * This will enable or disable the scroller bouncing effect for the + * genlist. See elm_scroller_bounce_set() for details. + * + * @see elm_scroller_bounce_set() + * @see elm_genlist_bounce_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); + +/** + * Get whether the horizontal and vertical bouncing effect is enabled. + * + * @param obj The genlist object + * @param h_bounce Pointer to a bool to receive if the bounce horizontally + * option is set. + * @param v_bounce Pointer to a bool to receive if the bounce vertically + * option is set. + * + * @see elm_genlist_bounce_set() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); + +/** + * Enable/disable homogeneous mode. + * + * @param obj The genlist object + * @param homogeneous Assume the items within the genlist are of the + * same height and width (EINA_TRUE = on, EINA_FALSE = off). Default is @c + * EINA_FALSE. + * + * This will enable the homogeneous mode where items are of the same + * height and width so that genlist may do the lazy-loading at its + * maximum (which increases the performance for scrolling the list). This + * implies 'compressed' mode. + * + * @see elm_genlist_compress_mode_set() + * @see elm_genlist_homogeneous_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); + +/** + * Get whether the homogeneous mode is enabled. + * + * @param obj The genlist object + * @return Assume the items within the genlist are of the same height + * and width (EINA_TRUE = on, EINA_FALSE = off) + * + * @see elm_genlist_homogeneous_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the maximum number of items within an item block + * + * @param obj The genlist object + * @param n Maximum number of items within an item block. Default is 32. + * + * This will configure the block count to tune to the target with + * particular performance matrix. + * + * A block of objects will be used to reduce the number of operations due to + * many objects in the screen. It can determine the visibility, or if the + * object has changed, it theme needs to be updated, etc. doing this kind of + * calculation to the entire block, instead of per object. + * + * The default value for the block count is enough for most lists, so unless + * you know you will have a lot of objects visible in the screen at the same + * time, don't try to change this. + * + * @see elm_genlist_block_count_get() + * @see @ref Genlist_Implementation + * + * @ingroup Genlist + */ +EAPI void elm_genlist_block_count_set(Evas_Object *obj, int n) EINA_ARG_NONNULL(1); + +/** + * Get the maximum number of items within an item block + * + * @param obj The genlist object + * @return Maximum number of items within an item block + * + * @see elm_genlist_block_count_set() + * + * @ingroup Genlist + */ +EAPI int elm_genlist_block_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the timeout in seconds for the longpress event. + * + * @param obj The genlist object + * @param timeout timeout in seconds. Default is 1. + * + * This option will change how long it takes to send an event "longpressed" + * after the mouse down signal is sent to the list. If this event occurs, no + * "clicked" event will be sent. + * + * @see elm_genlist_longpress_timeout_set() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_longpress_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1); + +/** + * Get the timeout in seconds for the longpress event. + * + * @param obj The genlist object + * @return timeout in seconds + * + * @see elm_genlist_longpress_timeout_get() + * + * @ingroup Genlist + */ +EAPI double elm_genlist_longpress_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Append a new item in a given genlist widget. + * + * @param obj The genlist object + * @param itc The item class for the item + * @param data The item data + * @param parent The parent item, or NULL if none + * @param flags Item flags + * @param func Convenience function called when the item is selected + * @param func_data Data passed to @p func above. + * @return A handle to the item added or @c NULL if not possible + * + * This adds the given item to the end of the list or the end of + * the children list if the @p parent is given. + * + * @see elm_genlist_item_prepend() + * @see elm_genlist_item_insert_before() + * @see elm_genlist_item_insert_after() + * @see elm_genlist_item_del() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1); + +/** + * Prepend a new item in a given genlist widget. + * + * @param obj The genlist object + * @param itc The item class for the item + * @param data The item data + * @param parent The parent item, or NULL if none + * @param flags Item flags + * @param func Convenience function called when the item is selected + * @param func_data Data passed to @p func above. + * @return A handle to the item added or NULL if not possible + * + * This adds an item to the beginning of the list or beginning of the + * children of the parent if given. + * + * @see elm_genlist_item_append() + * @see elm_genlist_item_insert_before() + * @see elm_genlist_item_insert_after() + * @see elm_genlist_item_del() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1); + +/** + * Insert an item before another in a genlist widget + * + * @param obj The genlist object + * @param itc The item class for the item + * @param data The item data + * @param before The item to place this new one before. + * @param flags Item flags + * @param func Convenience function called when the item is selected + * @param func_data Data passed to @p func above. + * @return A handle to the item added or @c NULL if not possible + * + * This inserts an item before another in the list. It will be in the + * same tree level or group as the item it is inserted before. + * + * @see elm_genlist_item_append() + * @see elm_genlist_item_prepend() + * @see elm_genlist_item_insert_after() + * @see elm_genlist_item_del() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1, 5); + +/** + * Insert an item after another in a genlist widget + * + * @param obj The genlist object + * @param itc The item class for the item + * @param data The item data + * @param after The item to place this new one after. + * @param flags Item flags + * @param func Convenience function called when the item is selected + * @param func_data Data passed to @p func above. + * @return A handle to the item added or @c NULL if not possible + * + * This inserts an item after another in the list. It will be in the + * same tree level or group as the item it is inserted after. + * + * @see elm_genlist_item_append() + * @see elm_genlist_item_prepend() + * @see elm_genlist_item_insert_before() + * @see elm_genlist_item_del() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data) EINA_ARG_NONNULL(1, 5); + +/** + * Insert a new item into the sorted genlist object + * + * @param obj The genlist object + * @param itc The item class for the item + * @param data The item data + * @param parent The parent item, or NULL if none + * @param flags Item flags + * @param comp The function called for the sort + * @param func Convenience function called when item selected + * @param func_data Data passed to @p func above. + * @return A handle to the item added or NULL if not possible + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data); +EAPI Elm_Genlist_Item *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data); + +/* operations to retrieve existing items */ +/** + * Get the selectd item in the genlist. + * + * @param obj The genlist object + * @return The selected item, or NULL if none is selected. + * + * This gets the selected item in the list (if multi-selection is enabled, only + * the item that was first selected in the list is returned - which is not very + * useful, so see elm_genlist_selected_items_get() for when multi-selection is + * used). + * + * If no item is selected, NULL is returned. + * + * @see elm_genlist_selected_items_get() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get a list of selected items in the genlist. + * + * @param obj The genlist object + * @return The list of selected items, or NULL if none are selected. + * + * It returns a list of the selected items. This list pointer is only valid so + * long as the selection doesn't change (no items are selected or unselected, or + * unselected implicitly by deletion). The list contains Elm_Genlist_Item + * pointers. The order of the items in this list is the order which they were + * selected, i.e. the first item in this list is the first item that was + * selected, and so on. + * + * @note If not in multi-select mode, consider using function + * elm_genlist_selected_item_get() instead. + * + * @see elm_genlist_multi_select_set() + * @see elm_genlist_selected_item_get() + * + * @ingroup Genlist + */ +EAPI const Eina_List *elm_genlist_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the mode item style of items in the genlist + * @param obj The genlist object + * @return The mode item style string, or NULL if none is specified + * + * This is a constant string and simply defines the name of the + * style that will be used for mode animations. It can be + * @c NULL if you don't plan to use Genlist mode. See + * elm_genlist_item_mode_set() for more info. + * + * @ingroup Genlist + */ +EAPI const char *elm_genlist_mode_item_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the mode item style of items in the genlist + * @param obj The genlist object + * @param style The mode item style string, or NULL if none is desired + * + * This is a constant string and simply defines the name of the + * style that will be used for mode animations. It can be + * @c NULL if you don't plan to use Genlist mode. See + * elm_genlist_item_mode_set() for more info. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); + +/** + * Get a list of realized items in genlist + * + * @param obj The genlist object + * @return The list of realized items, nor NULL if none are realized. + * + * This returns a list of the realized items in the genlist. The list + * contains Elm_Genlist_Item pointers. The list must be freed by the + * caller when done with eina_list_free(). The item pointers in the + * list are only valid so long as those items are not deleted or the + * genlist is not deleted. + * + * @see elm_genlist_realized_items_update() + * + * @ingroup Genlist + */ +EAPI Eina_List *elm_genlist_realized_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the item that is at the x, y canvas coords. + * + * @param obj The gelinst object. + * @param x The input x coordinate + * @param y The input y coordinate + * @param posret The position relative to the item returned here + * @return The item at the coordinates or NULL if none + * + * This returns the item at the given coordinates (which are canvas + * relative, not object-relative). If an item is at that coordinate, + * that item handle is returned, and if @p posret is not NULL, the + * integer pointed to is set to a value of -1, 0 or 1, depending if + * the coordinate is on the upper portion of that item (-1), on the + * middle section (0) or on the lower part (1). If NULL is returned as + * an item (no item found there), then posret may indicate -1 or 1 + * based if the coordinate is above or below all items respectively in + * the genlist. + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret) EINA_ARG_NONNULL(1); + +/** + * Get the first item in the genlist + * + * This returns the first item in the list. + * + * @param obj The genlist object + * @return The first item, or NULL if none + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the last item in the genlist + * + * This returns the last item in the list. + * + * @return The last item, or NULL if none + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the scrollbar policy + * + * @param obj The genlist object + * @param policy_h Horizontal scrollbar policy. + * @param policy_v Vertical scrollbar policy. + * + * This sets the scrollbar visibility policy for the given genlist + * scroller. #ELM_SMART_SCROLLER_POLICY_AUTO means the scrollbar is + * made visible if it is needed, and otherwise kept hidden. + * #ELM_SMART_SCROLLER_POLICY_ON turns it on all the time, and + * #ELM_SMART_SCROLLER_POLICY_OFF always keeps it off. This applies + * respectively for the horizontal and vertical scrollbars. Default is + * #ELM_SMART_SCROLLER_POLICY_AUTO + * + * @see elm_genlist_scroller_policy_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); + +/** + * Get the scrollbar policy + * + * @param obj The genlist object + * @param policy_h Pointer to store the horizontal scrollbar policy. + * @param policy_v Pointer to store the vertical scrollbar policy. + * + * @see elm_genlist_scroller_policy_set() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); + +/** + * Get the @b next item in a genlist widget's internal list of items, + * given a handle to one of those items. + * + * @param item The genlist 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 + * genlist. + * + * @see elm_genlist_item_prev_get() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the @b previous item in a genlist widget's internal list of items, + * given a handle to one of those items. + * + * @param item The genlist 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 + * genlist. + * + * @see elm_genlist_item_next_get() + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_prev_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the genlist object's handle which contains a given genlist + * item + * + * @param item The item to fetch the container from + * @return The genlist (parent) object + * + * This returns the genlist object itself that an item belongs to. + * + * @ingroup Genlist + */ +EAPI Evas_Object *elm_genlist_item_genlist_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the parent item of the given item + * + * @param it The item + * @return The parent of the item or @c NULL if it has no parent. + * + * This returns the item that was specified as parent of the item @p it on + * elm_genlist_item_append() and insertion related functions. + * + * @ingroup Genlist + */ +EAPI Elm_Genlist_Item *elm_genlist_item_parent_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Remove all sub-items (children) of the given item + * + * @param it The item + * + * This removes all items that are children (and their descendants) of the + * given item @p it. + * + * @see elm_genlist_clear() + * @see elm_genlist_item_del() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_subitems_clear(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Set whether a given genlist item is selected or not + * + * @param it The 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 genlist and @p selected is @c + * EINA_TRUE, any other previously selected items will get + * unselected in favor of this new one. + * + * @see elm_genlist_item_selected_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_selected_set(Elm_Genlist_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); + +/** + * Get whether a given genlist item is selected or not + * + * @param it The item + * @return @c EINA_TRUE, if it's selected, @c EINA_FALSE otherwise + * + * @see elm_genlist_item_selected_set() for more details + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_item_selected_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Sets the expanded state of an item. + * + * @param it The item + * @param expanded The expanded state (@c EINA_TRUE expanded, @c EINA_FALSE not expanded). + * + * This function flags the item of type #ELM_GENLIST_ITEM_SUBITEMS as + * expanded or not. + * + * The theme will respond to this change visually, and a signal "expanded" or + * "contracted" will be sent from the genlist with a pointer to the item that + * has been expanded/contracted. + * + * Calling this function won't show or hide any child of this item (if it is + * a parent). You must manually delete and create them on the callbacks fo + * the "expanded" or "contracted" signals. + * + * @see elm_genlist_item_expanded_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_expanded_set(Elm_Genlist_Item *item, Eina_Bool expanded) EINA_ARG_NONNULL(1); + +/** + * Get the expanded state of an item + * + * @param it The item + * @return The expanded state + * + * This gets the expanded state of an item. + * + * @see elm_genlist_item_expanded_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_item_expanded_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the depth of expanded item + * + * @param it The genlist item object + * @return The depth of expanded item + * + * @ingroup Genlist + */ +EAPI int elm_genlist_item_expanded_depth_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set whether a given genlist item is disabled or not. + * + * @param it The 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_genlist_item_disabled_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_disabled_set(Elm_Genlist_Item *item, Eina_Bool disabled) EINA_ARG_NONNULL(1); + +/** + * Get whether a given genlist item is disabled or not. + * + * @param it The item + * @return @c EINA_TRUE, if it's disabled, @c EINA_FALSE otherwise + * (and on errors). + * + * @see elm_genlist_item_disabled_set() for more details + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Sets the display only state of an item. + * + * @param it The item + * @param display_only @c EINA_TRUE if the item is display only, @c + * EINA_FALSE otherwise. + * + * A display only item cannot be selected or unselected. It is for + * display only and not selecting or otherwise clicking, dragging + * etc. by the user, thus finger size rules will not be applied to + * this item. + * + * It's good to set group index items to display only state. + * + * @see elm_genlist_item_display_only_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_display_only_set(Elm_Genlist_Item *it, Eina_Bool display_only) EINA_ARG_NONNULL(1); + +/** + * Get the display only state of an item + * + * @param it The item + * @return @c EINA_TRUE if the item is display only, @c + * EINA_FALSE otherwise. + * + * @see elm_genlist_item_display_only_set() + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Show the portion of a genlist's internal list containing a given + * item, immediately. + * + * @param it The item to display + * + * This causes genlist to jump to the given item @p it and show it (by + * immediately scrolling to that position), if it is not fully visible. + * + * @see elm_genlist_item_bring_in() + * @see elm_genlist_item_top_show() + * @see elm_genlist_item_middle_show() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_show(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Animatedly bring in, to the visible are of a genlist, a given + * item on it. + * + * @param it The item to display + * + * This causes genlist to jump to the given item @p it and show it (by + * animatedly scrolling), if it is not fully visible. This may use animation + * to do so and take a period of time + * + * @see elm_genlist_item_show() + * @see elm_genlist_item_top_bring_in() + * @see elm_genlist_item_middle_bring_in() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Show the portion of a genlist's internal list containing a given + * item, immediately. + * + * @param it The item to display + * + * This causes genlist to jump to the given item @p it and show it (by + * immediately scrolling to that position), if it is not fully visible. + * + * The item will be positioned at the top of the genlist viewport. + * + * @see elm_genlist_item_show() + * @see elm_genlist_item_top_bring_in() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Animatedly bring in, to the visible are of a genlist, a given + * item on it. + * + * @param it The item + * + * This causes genlist to jump to the given item @p it and show it (by + * animatedly scrolling), if it is not fully visible. This may use animation + * to do so and take a period of time + * + * The item will be positioned at the top of the genlist viewport. + * + * @see elm_genlist_item_bring_in() + * @see elm_genlist_item_top_show() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_top_bring_in(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Show the portion of a genlist's internal list containing a given + * item, immediately. + * + * @param it The item to display + * + * This causes genlist to jump to the given item @p it and show it (by + * immediately scrolling to that position), if it is not fully visible. + * + * The item will be positioned at the middle of the genlist viewport. + * + * @see elm_genlist_item_show() + * @see elm_genlist_item_middle_bring_in() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_middle_show(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Animatedly bring in, to the visible are of a genlist, a given + * item on it. + * + * @param it The item + * + * This causes genlist to jump to the given item @p it and show it (by + * animatedly scrolling), if it is not fully visible. This may use animation + * to do so and take a period of time + * + * The item will be positioned at the middle of the genlist viewport. + * + * @see elm_genlist_item_bring_in() + * @see elm_genlist_item_middle_show() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_middle_bring_in(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Remove a genlist 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_genlist_clear(), to remove all items in a genlist at + * once. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_del(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Return the data associated to a given genlist item + * + * @param item The genlist item. + * @return the data associated to this item. + * + * This returns the @c data value passed on the + * elm_genlist_item_append() and related item addition calls. + * + * @see elm_genlist_item_append() + * @see elm_genlist_item_data_set() + * + * @ingroup Genlist + */ +EAPI void *elm_genlist_item_data_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Set the data associated to a given genlist item + * + * @param item The genlist item + * @param data The new data pointer to set on it + * + * This @b overrides the @c data value passed on the + * elm_genlist_item_append() and related item addition calls. This + * function @b won't call elm_genlist_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_genlist_item_data_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *it, const void *data) EINA_ARG_NONNULL(1); + +/** + * Tells genlist to "orphan" contents fetchs by the item class + * + * @param it The item + * + * This instructs genlist to release references to contents in the item, + * meaning that they will no longer be managed by genlist and are + * floating "orphans" that can be re-used elsewhere if the user wants + * to. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_contents_orphan(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); +EINA_DEPRECATED EAPI void elm_genlist_item_icons_orphan(Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the real Evas object created to implement the view of a + * given genlist item + * + * @param item The genlist item. + * @return the Evas object implementing this item's view. + * + * This returns the actual Evas object used to implement the + * specified genlist 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 genlist. Do not modify this object (move, resize, + * show, hide, etc.), as the genlist 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_genlist_item_data_get() + * + * @ingroup Genlist + */ +EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Update the contents of an item + * + * @param it The item + * + * This updates an item by calling all the item class functions again + * to get the contents, texts and states. Use this when the original + * item data has changed and the changes are desired to be reflected. + * + * Use elm_genlist_realized_items_update() to update all already realized + * items. + * + * @see elm_genlist_realized_items_update() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_update(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Promote an item to the top of the list + * + * @param it The item + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_promote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1); + +/** + * Demote an item to the end of the list + * + * @param it The item + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_demote(Elm_Gen_Item *it) EINA_ARG_NONNULL(1); + +/** + * Update the part of an item + * + * @param it The item + * @param parts The name of item's part + * @param itf The flags of item's part type + * + * This updates an item's part by calling item's fetching functions again + * to get the contents, texts and states. Use this when the original + * item data has changed and the changes are desired to be reflected. + * Second parts argument is used for globbing to match '*', '?', and '.' + * It can be used at updating multi fields. + * + * Use elm_genlist_realized_items_update() to update an item's all + * property. + * + * @see elm_genlist_item_update() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_fields_update(Elm_Genlist_Item *it, const char *parts, Elm_Genlist_Item_Field_Flags itf) EINA_ARG_NONNULL(1); + +/** + * Update the item class of an item + * + * @param it The item + * @param itc The item class for the item + * + * This sets another class fo the item, changing the way that it is + * displayed. After changing the item class, elm_genlist_item_update() is + * called on the item @p it. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_item_class_update(Elm_Genlist_Item *it, const Elm_Genlist_Item_Class *itc) EINA_ARG_NONNULL(1, 2); +EAPI const Elm_Genlist_Item_Class *elm_genlist_item_item_class_get(const Elm_Genlist_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the text to be shown in a given genlist item's tooltips. + * + * @param item The genlist 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. + * + * In order to set a content or something else as a tooltip, look at + * elm_genlist_item_tooltip_content_cb_set(). + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_tooltip_text_set(Elm_Genlist_Item *item, const char *text) EINA_ARG_NONNULL(1); + +/** + * Set the content to be shown in a given genlist item's tooltips + * + * @param item The genlist 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_genlist_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. + * + * In order to set just a text as a tooltip, look at + * elm_genlist_item_tooltip_text_set(). + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_tooltip_content_cb_set(Elm_Genlist_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 genlist item + * + * @param item genlist 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_genlist_item_tooltip_content_cb_set() will be called to + * notify it is not used anymore (and have resources cleaned, if + * need be). + * + * @see elm_genlist_item_tooltip_content_cb_set() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_tooltip_unset(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Set a different @b style for a given genlist item's tooltip. + * + * @param item genlist item with tooltip set + * @param style the theme style to use on tooltips (e.g. @c + * "default", @c "transparent", etc) + * + * Tooltips can have alternate styles 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 genlist item objects. The default style for + * tooltips is @c "default". + * + * @note before you set a style you should define a tooltip with + * elm_genlist_item_tooltip_content_cb_set() or + * elm_genlist_item_tooltip_text_set() + * + * @see elm_genlist_item_tooltip_style_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_tooltip_style_set(Elm_Genlist_Item *item, const char *style) EINA_ARG_NONNULL(1); + +/** + * Get the style set a given genlist item's tooltip. + * + * @param item genlist 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_genlist_item_tooltip_style_set() for more details + * + * @ingroup Genlist + */ +EAPI const char *elm_genlist_item_tooltip_style_get(const Elm_Genlist_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_genlist_item_tooltip_window_mode_set(Elm_Genlist_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_genlist_item_tooltip_window_mode_get(const Elm_Genlist_Item *item); + +/** + * Set the type of mouse pointer/cursor decoration to be shown, + * when the mouse pointer is over the given genlist widget item + * + * @param item genlist 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_genlist_item_cursor_get() + * @see elm_genlist_item_cursor_unset() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_cursor_set(Elm_Genlist_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 genlist widget item + * + * @param item genlist 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_genlist_item_cursor_set() for more details + * @see elm_genlist_item_cursor_unset() + * + * @ingroup Genlist + */ +EAPI const char *elm_genlist_item_cursor_get(const Elm_Genlist_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 genlist widget + * item, thus making it show the @b default cursor again. + * + * @param item a genlist 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_genlist_item_cursor_set() for more details + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_cursor_unset(Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Set a different @b style for a given custom cursor set for a + * genlist item. + * + * @param item genlist item with custom cursor set + * @param style the theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file , which can + * have, given a cursor name/type, alternate styles on + * it. It works analogously as elm_object_cursor_style_set(), but + * here applied only to genlist item objects. + * + * @warning Before you set a cursor style you should have defined a + * custom cursor previously on the item, with + * elm_genlist_item_cursor_set() + * + * @see elm_genlist_item_cursor_engine_only_set() + * @see elm_genlist_item_cursor_style_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_cursor_style_set(Elm_Genlist_Item *item, const char *style) EINA_ARG_NONNULL(1); + +/** + * Get the current @b style set for a given genlist item's custom + * cursor + * + * @param item genlist 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_genlist_item_cursor_style_set() for more details + * + * @ingroup Genlist + */ +EAPI const char *elm_genlist_item_cursor_style_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Set if the (custom) cursor for a given genlist 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 genlist items, with elm_genlist_item_cursor_set(). + * + * @note By default, cursors will only be looked for between those + * provided by the rendering engine. + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_cursor_engine_only_set(Elm_Genlist_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); + +/** + * Get if the (custom) cursor for a given genlist item is being + * searched in its theme, also, or is only relying on the rendering + * engine. + * + * @param item a genlist 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_genlist_item_cursor_engine_only_set(), for more details + * + * @ingroup Genlist + */ +EAPI Eina_Bool elm_genlist_item_cursor_engine_only_get(const Elm_Genlist_Item *item) EINA_ARG_NONNULL(1); + +/** + * Get the index of the item. It is only valid once displayed. + * + * @param item a genlist item + * @return the position inside the list of item. + * + * @ingroup Genlist + */ +EAPI int elm_genlist_item_index_get(Elm_Gen_Item *it); + +/** + * Update the contents of all realized items. + * + * @param obj The genlist object. + * + * This updates all realized items by calling all the item class functions again + * to get the contents, texts and states. Use this when the original + * item data has changed and the changes are desired to be reflected. + * + * To update just one item, use elm_genlist_item_update(). + * + * @see elm_genlist_realized_items_get() + * @see elm_genlist_item_update() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_realized_items_update(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Activate a genlist mode on an item + * + * @param item The genlist item + * @param mode Mode name + * @param mode_set Boolean to define set or unset mode. + * + * A genlist mode is a different way of selecting an item. Once a mode is + * activated on an item, any other selected item is immediately unselected. + * This feature provides an easy way of implementing a new kind of animation + * for selecting an item, without having to entirely rewrite the item style + * theme. However, the elm_genlist_selected_* API can't be used to get what + * item is activate for a mode. + * + * The current item style will still be used, but applying a genlist mode to + * an item will select it using a different kind of animation. + * + * The current active item for a mode can be found by + * elm_genlist_mode_item_get(). + * + * The characteristics of genlist mode are: + * - Only one mode can be active at any time, and for only one item. + * - Genlist handles deactivating other items when one item is activated. + * - A mode is defined in the genlist theme (edc), and more modes can easily + * be added. + * - A mode style and the genlist item style are different things. They + * can be combined to provide a default style to the item, with some kind + * of animation for that item when the mode is activated. + * + * When a mode is activated on an item, a new view for that item is created. + * The theme of this mode defines the animation that will be used to transit + * the item from the old view to the new view. This second (new) view will be + * active for that item while the mode is active on the item, and will be + * destroyed after the mode is totally deactivated from that item. + * + * @see elm_genlist_mode_get() + * @see elm_genlist_mode_item_get() + * + * @ingroup Genlist + */ +EAPI void elm_genlist_item_mode_set(Elm_Genlist_Item *it, const char *mode_type, Eina_Bool mode_set) EINA_ARG_NONNULL(1, 2); + +/** + * Get the last (or current) genlist mode used. + * + * @param obj The genlist object + * + * This function just returns the name of the last used genlist mode. It will + * be the current mode if it's still active. + * + * @see elm_genlist_item_mode_set() + * @see elm_genlist_mode_item_get() + * + * @ingroup Genlist + */ +EAPI const char *elm_genlist_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get active genlist mode item + * + * @param obj The genlist object + * @return The active item for that current mode. Or @c NULL if no item is + * activated with any mode. + * + * This function returns the item that was activated with a mode, by the + * function elm_genlist_item_mode_set(). + * + * @see elm_genlist_item_mode_set() + * @see elm_genlist_mode_get() + * + * @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); + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_gesture_layer.h b/legacy/elementary/src/lib/elm_gesture_layer.h index 150c36c14c..08ff95309c 100644 --- a/legacy/elementary/src/lib/elm_gesture_layer.h +++ b/legacy/elementary/src/lib/elm_gesture_layer.h @@ -1,324 +1,323 @@ - /** - * @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. - * - * @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). - */ +/** + * @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. + * + * @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). + */ - /** - * @enum _Elm_Gesture_Types - * Enum of supported gesture types. - * @ingroup Elm_Gesture_Layer - */ - enum _Elm_Gesture_Types - { - ELM_GESTURE_FIRST = 0, +/** + * @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_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_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_N_LINES, /**< N fingers line gesture */ + ELM_GESTURE_N_FLICKS, /**< N fingers flick gesture */ - ELM_GESTURE_ZOOM, /**< Zoom */ - ELM_GESTURE_ROTATE, /**< Rotate */ + ELM_GESTURE_ZOOM, /**< Zoom */ + ELM_GESTURE_ROTATE, /**< Rotate */ - ELM_GESTURE_LAST - }; + ELM_GESTURE_LAST +}; - /** - * @typedef Elm_Gesture_Types - * gesture types enum - * @ingroup Elm_Gesture_Layer - */ - typedef enum _Elm_Gesture_Types Elm_Gesture_Types; +/** + * @typedef Elm_Gesture_Types + * gesture types enum + * @ingroup Elm_Gesture_Layer + */ +typedef enum _Elm_Gesture_Types Elm_Gesture_Types; - /** - * @enum _Elm_Gesture_State - * Enum of gesture states. - * @ingroup Elm_Gesture_Layer - */ - 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 */ - }; +/** + * @enum _Elm_Gesture_State + * Enum of gesture states. + * @ingroup Elm_Gesture_Layer + */ +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 */ +}; - /** - * @typedef Elm_Gesture_State - * gesture states enum - * @ingroup Elm_Gesture_Layer - */ - typedef enum _Elm_Gesture_State Elm_Gesture_State; +/** + * @typedef Elm_Gesture_State + * gesture states enum + * @ingroup Elm_Gesture_Layer + */ +typedef enum _Elm_Gesture_State Elm_Gesture_State; - /** - * @struct _Elm_Gesture_Taps_Info - * Struct holds taps info for user - * @ingroup Elm_Gesture_Layer - */ - 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 */ - }; +/** + * @struct _Elm_Gesture_Taps_Info + * Struct holds taps info for user + * @ingroup Elm_Gesture_Layer + */ +struct _Elm_Gesture_Taps_Info +{ + Evas_Coord x, y; /**< Holds center point between fingers */ + unsigned int n; /**< Number of fingers tapped */ + unsigned int timestamp; /**< event timestamp */ +}; - /** - * @typedef Elm_Gesture_Taps_Info - * holds taps info for user - * @ingroup Elm_Gesture_Layer - */ - typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info; +/** + * @typedef Elm_Gesture_Taps_Info + * holds taps info for user + * @ingroup Elm_Gesture_Layer + */ +typedef struct _Elm_Gesture_Taps_Info Elm_Gesture_Taps_Info; - /** - * @struct _Elm_Gesture_Momentum_Info - * Struct holds momentum info for user - * x1 and y1 are not necessarily in sync - * x1 holds x value of x direction starting point - * and same holds for y1. - * This is noticeable when doing V-shape movement - * @ingroup Elm_Gesture_Layer - */ - 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_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 + */ +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 */ + 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 */ + Evas_Coord mx; /**< Momentum on X */ + Evas_Coord my; /**< Momentum on Y */ - unsigned int n; /**< Number of fingers */ - }; + unsigned int n; /**< Number of fingers */ +}; - /** - * @typedef Elm_Gesture_Momentum_Info - * holds momentum info for user - * @ingroup Elm_Gesture_Layer - */ - typedef struct _Elm_Gesture_Momentum_Info Elm_Gesture_Momentum_Info; +/** + * @typedef Elm_Gesture_Momentum_Info + * holds momentum info for user + * @ingroup Elm_Gesture_Layer + */ +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 */ - double angle; /**< Angle (direction) of lines */ - }; +/** + * @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 */ + double angle; /**< Angle (direction) of lines */ +}; - /** - * @typedef Elm_Gesture_Line_Info - * Holds line info for user - * @ingroup Elm_Gesture_Layer - */ - typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info; +/** + * @typedef Elm_Gesture_Line_Info + * Holds line info for user + * @ingroup Elm_Gesture_Layer + */ +typedef struct _Elm_Gesture_Line_Info Elm_Gesture_Line_Info; - /** - * @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) */ - }; +/** + * @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_Gesture_Zoom_Info - * Holds zoom info for user - * @ingroup Elm_Gesture_Layer - */ - typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info; +/** + * @typedef Elm_Gesture_Zoom_Info + * Holds zoom info for user + * @ingroup Elm_Gesture_Layer + */ +typedef struct _Elm_Gesture_Zoom_Info Elm_Gesture_Zoom_Info; - /** - * @struct _Elm_Gesture_Rotate_Info - * Struct holds rotation info for user - * @ingroup Elm_Gesture_Layer - */ - 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) */ - }; +/** + * @struct _Elm_Gesture_Rotate_Info + * Struct holds rotation info for user + * @ingroup Elm_Gesture_Layer + */ +struct _Elm_Gesture_Rotate_Info +{ + Evas_Coord x, y; /**< Holds zoom center point reported to user */ + Evas_Coord radius; /**< Holds radius between fingers reported to user */ + double base_angle; /**< Holds start-angle */ + double angle; /**< Rotation value: 0.0 means no rotation */ + double momentum; /**< Rotation momentum: rotation done per second (NOT YET SUPPORTED) */ +}; - /** - * @typedef Elm_Gesture_Rotate_Info - * Holds rotation info for user - * @ingroup Elm_Gesture_Layer - */ - typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info; +/** + * @typedef Elm_Gesture_Rotate_Info + * Holds rotation info for user + * @ingroup Elm_Gesture_Layer + */ +typedef struct _Elm_Gesture_Rotate_Info Elm_Gesture_Rotate_Info; - /** - * @typedef Elm_Gesture_Event_Cb - * User callback used to stream gesture info from gesture layer - * @param data user data - * @param event_info gesture report info - * Returns a flag field to be applied on the causing event. - * You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted - * upon the event, in an irreversible way. - * - * @ingroup Elm_Gesture_Layer - */ - typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb) (void *data, void *event_info); +/** + * @typedef Elm_Gesture_Event_Cb + * User callback used to stream gesture info from gesture layer + * @param data user data + * @param event_info gesture report info + * Returns a flag field to be applied on the causing event. + * You should probably return EVAS_EVENT_FLAG_ON_HOLD if your widget acted + * upon the event, in an irreversible way. + * + * @ingroup Elm_Gesture_Layer + */ +typedef Evas_Event_Flags (*Elm_Gesture_Event_Cb)(void *data, void *event_info); - /** - * Use function to set callbacks to be notified about - * change of state of gesture. - * When a user registers a callback with this function - * this means this gesture has to be tested. - * - * When ALL callbacks for a gesture are set to NULL - * it means user isn't interested in gesture-state - * and it will not be tested. - * - * @param obj 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 - */ - 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); +/** + * Use function to set callbacks to be notified about + * change of state of gesture. + * When a user registers a callback with this function + * this means this gesture has to be tested. + * + * When ALL callbacks for a gesture are set to NULL + * it means user isn't interested in gesture-state + * and it will not be tested. + * + * @param obj 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 + */ +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); - /** - * Call this function to get repeat-events settings. - * - * @param obj Pointer to gesture-layer. - * - * @return repeat events settings. - * @see elm_gesture_layer_hold_events_set() - * @ingroup Elm_Gesture_Layer - */ - EAPI Eina_Bool elm_gesture_layer_hold_events_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Call this function to get repeat-events settings. + * + * @param obj Pointer to gesture-layer. + * + * @return repeat events settings. + * @see elm_gesture_layer_hold_events_set() + * @ingroup Elm_Gesture_Layer + */ +EAPI Eina_Bool elm_gesture_layer_hold_events_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * 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. - * - * @param obj Pointer to gesture-layer. - * @param r Repeat: TRUE/FALSE - * - * @ingroup Elm_Gesture_Layer - */ - EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool r) EINA_ARG_NONNULL(1); +/** + * 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. + * + * @param obj Pointer to gesture-layer. + * @param r Repeat: TRUE/FALSE + * + * @ingroup Elm_Gesture_Layer + */ +EAPI void elm_gesture_layer_hold_events_set(Evas_Object *obj, Eina_Bool r) EINA_ARG_NONNULL(1); - /** - * This function sets step-value for zoom action. - * Set step to any positive value. - * Cancel step setting by setting to 0.0 - * - * @param obj Pointer to gesture-layer. - * @param s new zoom step value. - * - * @ingroup Elm_Gesture_Layer - */ - EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1); +/** + * This function sets step-value for zoom action. + * Set step to any positive value. + * Cancel step setting by setting to 0.0 + * + * @param obj Pointer to gesture-layer. + * @param s new zoom step value. + * + * @ingroup Elm_Gesture_Layer + */ +EAPI void elm_gesture_layer_zoom_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1); - /** - * This function sets step-value for rotate action. - * Set step to any positive value. - * Cancel step setting by setting to 0.0 - * - * @param obj Pointer to gesture-layer. - * @param s new roatate step value. - * - * @ingroup Elm_Gesture_Layer - */ - EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1); +/** + * This function sets step-value for rotate action. + * Set step to any positive value. + * Cancel step setting by setting to 0.0 + * + * @param obj Pointer to gesture-layer. + * @param s new roatate step value. + * + * @ingroup Elm_Gesture_Layer + */ +EAPI void elm_gesture_layer_rotate_step_set(Evas_Object *obj, double s) EINA_ARG_NONNULL(1); - /** - * 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) - * - * @return TRUE, FALSE on success, failure. - * - * @ingroup Elm_Gesture_Layer - */ - EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *t) EINA_ARG_NONNULL(1, 2); - - /** - * 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. - * - * @param parent the parent object. - * - * @return Pointer to new gesture-layer object. - * - * @ingroup Elm_Gesture_Layer - */ - EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * 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) + * + * @return TRUE, FALSE on success, failure. + * + * @ingroup Elm_Gesture_Layer + */ +EAPI Eina_Bool elm_gesture_layer_attach(Evas_Object *obj, Evas_Object *t) EINA_ARG_NONNULL(1, 2); +/** + * 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. + * + * @param parent the parent object. + * + * @return Pointer to new gesture-layer object. + * + * @ingroup Elm_Gesture_Layer + */ +EAPI Evas_Object *elm_gesture_layer_add(Evas_Object *parent) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_getting_started.h b/legacy/elementary/src/lib/elm_getting_started.h new file mode 100644 index 0000000000..a5e74560d5 --- /dev/null +++ b/legacy/elementary/src/lib/elm_getting_started.h @@ -0,0 +1,196 @@ +/** + * @defgroup Start Getting Started + * + * To write an Elementary app, you can get started with the following: + * + * @code + * #include + * EAPI_MAIN int + * elm_main(int argc, char **argv) + * { + * // create window(s) here and do any application init + * elm_run(); // run main loop + * elm_shutdown(); // after mainloop finishes running, shutdown + * return 0; // exit 0 for exit code + * } + * ELM_MAIN() + * @endcode + * + * 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 build it is there) you will need a + * configure.ac, Makefile.am and autogen.sh file. + * + * configure.ac: + * + * @verbatim + * AC_INIT(myapp, 0.0.0, myname@mydomain.com) + * AC_PREREQ(2.52) + * AC_CONFIG_SRCDIR(configure.ac) + * AM_CONFIG_HEADER(config.h) + * AC_PROG_CC + * AM_INIT_AUTOMAKE(1.6 dist-bzip2) + * PKG_CHECK_MODULES([ELEMENTARY], elementary) + * AC_OUTPUT(Makefile) + * @endverbatim + * + * Makefile.am: + * + * @verbatim + * AUTOMAKE_OPTIONS = 1.4 foreign + * MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in configure depcomp install-sh missing + * + * INCLUDES = -I$(top_srcdir) + * + * bin_PROGRAMS = myapp + * + * myapp_SOURCES = main.c + * myapp_LDADD = @ELEMENTARY_LIBS@ + * myapp_CFLAGS = @ELEMENTARY_CFLAGS@ + * @endverbatim + * + * autogen.sh: + * + * @verbatim + *#!/bin/sh + * echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 + * echo "Running autoheader..." ; autoheader || exit 1 + * echo "Running autoconf..." ; autoconf || exit 1 + * echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + * ./configure "$@" + * @endverbatim + * + * To generate all the things needed to bootstrap just run: + * + * @verbatim + * ./autogen.sh + * @endverbatim + * + * This will generate Makefile.in's, the confgure script and everything else. + * After this it works like all normal autotools projects: + * @verbatim + * ./configure + * make + * sudo make install + * @endverbatim + * + * Note sudo was assumed to get root permissions, as this would install in + * /usr/local which is system-owned. Use any way you like to gain root, or + * specify a different prefix with configure: + * + * @verbatim + * ./confiugre --prefix=$HOME/mysoftware + * @endverbatim + * + * Also remember that autotools buys you some useful commands like: + * @verbatim + * make uninstall + * @endverbatim + * + * This uninstalls the software after it was installed with "make install". + * It is very useful to clear up what you built if you wish to clean the + * system. + * + * @verbatim + * make distcheck + * @endverbatim + * + * This firstly checks if your build tree is "clean" and ready for + * distribution. It also builds a tarball (myapp-0.0.0.tar.gz) that is + * ready to upload and distribute to the world, that contains the generated + * Makefile.in's and configure script. The users do not need to run + * autogen.sh - just configure and on. They don't need autotools installed. + * This tarball also builds cleanly, has all the sources it needs to build + * included (that is sources for your application, not libraries it depends + * on like Elementary). It builds cleanly in a buildroot and does not + * contain any files that are temporarily generated like binaries and other + * build-generated files, so the tarball is clean, and no need to worry + * about cleaning up your tree before packaging. + * + * @verbatim + * make clean + * @endverbatim + * + * This cleans up all build files (binaries, objects etc.) from the tree. + * + * @verbatim + * make distclean + * @endverbatim + * + * This cleans out all files from the build and from configure's output too. + * + * @verbatim + * make maintainer-clean + * @endverbatim + * + * This deletes all the files autogen.sh will produce so the tree is clean + * to be put into a revision-control system (like CVS, SVN or GIT for example). + * + * 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: + * + * @code + * #include + * + * static void + * on_done(void *data, Evas_Object *obj, void *event_info) + * { + * // quit the mainloop (elm_run function will return) + * elm_exit(); + * } + * + * 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 (hello) and title (Hello) + * win = elm_win_util_standard_add("hello", "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 box object - default is vertical. a box holds children in a row, + * // either horizontally or vertically. nothing more. + * box = elm_box_add(win); + * // make the box hotizontal + * elm_box_horizontal_set(box, EINA_TRUE); + * // 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, 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 + * elm_object_text_set(lab, "Hello out there world!"); + * // 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" + * elm_object_text_set(btn, "OK"); + * // pack the button at the end of the box + * elm_box_pack_end(box, btn); + * 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(); + * elm_shutdown(); + * return 0; + * } + * ELM_MAIN() + * @endcode + * + */ diff --git a/legacy/elementary/src/lib/elm_glview.h b/legacy/elementary/src/lib/elm_glview.h index 774cbc4c60..cf702e6298 100644 --- a/legacy/elementary/src/lib/elm_glview.h +++ b/legacy/elementary/src/lib/elm_glview.h @@ -1,185 +1,186 @@ - /** - * @defgroup GLView - * - * A simple GLView widget that allows GL rendering. - * - * Signals that you can add callbacks for are: - * - * @{ - */ +/** + * @defgroup GLView + * + * A simple GLView widget that allows GL rendering. + * + * Signals that you can add callbacks for are: + * + * @{ + */ - typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj); +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; +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. - * - * @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; +/** + * Defines a policy for the glview resizing. + * + * @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; +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; - /** - * Add a new glview to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup GLView - */ - EAPI Evas_Object *elm_glview_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new glview to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup GLView + */ +EAPI Evas_Object * + elm_glview_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Sets the size of the glview - * - * @param obj The glview object - * @param width width of the glview object - * @param height height of the glview object - * - * @ingroup GLView - */ - EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1); +/** + * Sets the size of the glview + * + * @param obj The glview object + * @param width width of the glview object + * @param height height of the glview object + * + * @ingroup GLView + */ +EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height) EINA_ARG_NONNULL(1); - /** - * Gets the size of the glview. - * - * @param obj The glview object - * @param width width of the glview object - * @param height height of the glview object - * - * Note that this function returns the actual image size of the - * glview. This means that when the scale policy is set to - * ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled - * size. - * - * @ingroup GLView - */ - EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height) EINA_ARG_NONNULL(1); +/** + * Gets the size of the glview. + * + * @param obj The glview object + * @param width width of the glview object + * @param height height of the glview object + * + * Note that this function returns the actual image size of the + * glview. This means that when the scale policy is set to + * ELM_GLVIEW_RESIZE_POLICY_SCALE, it'll return the non-scaled + * size. + * + * @ingroup GLView + */ +EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *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); +/** + * 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); - /** - * Set the mode of the GLView. Supports Three simple modes. - * - * @param obj The glview object - * @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil. - * @return True if set properly. - * - * @ingroup GLView - */ - EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) EINA_ARG_NONNULL(1); +/** + * Set the mode of the GLView. Supports Three simple modes. + * + * @param obj The glview object + * @param mode The mode Options OR'ed enabling Alpha, Depth, Stencil. + * @return True if set properly. + * + * @ingroup GLView + */ +EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode) EINA_ARG_NONNULL(1); - /** - * Set the resize policy for the glview object. - * - * @param obj The glview object. - * @param policy The scaling policy. - * - * By default, the resize policy is set to - * ELM_GLVIEW_RESIZE_POLICY_RECREATE. When resize is called it - * destroys the previous surface and recreates the newly specified - * size. If the policy is set to ELM_GLVIEW_RESIZE_POLICY_SCALE, - * however, glview only scales the image object and not the underlying - * GL Surface. - * - * @ingroup GLView - */ - EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) EINA_ARG_NONNULL(1); +/** + * Set the resize policy for the glview object. + * + * @param obj The glview object. + * @param policy The scaling policy. + * + * By default, the resize policy is set to + * ELM_GLVIEW_RESIZE_POLICY_RECREATE. When resize is called it + * destroys the previous surface and recreates the newly specified + * size. If the policy is set to ELM_GLVIEW_RESIZE_POLICY_SCALE, + * however, glview only scales the image object and not the underlying + * GL Surface. + * + * @ingroup GLView + */ +EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy) EINA_ARG_NONNULL(1); - /** - * Set the render policy for the glview object. - * - * @param obj The glview object. - * @param policy The render policy. - * - * By default, the render policy is set to - * ELM_GLVIEW_RENDER_POLICY_ON_DEMAND. This policy is set such - * that during the render loop, glview is only redrawn if it needs - * to be redrawn. (i.e. When it is visible) If the policy is set to - * ELM_GLVIEWW_RENDER_POLICY_ALWAYS, it redraws regardless of - * whether it is visible/need redrawing or not. - * - * @ingroup GLView - */ - EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) EINA_ARG_NONNULL(1); +/** + * Set the render policy for the glview object. + * + * @param obj The glview object. + * @param policy The render policy. + * + * By default, the render policy is set to + * ELM_GLVIEW_RENDER_POLICY_ON_DEMAND. This policy is set such + * that during the render loop, glview is only redrawn if it needs + * to be redrawn. (i.e. When it is visible) If the policy is set to + * ELM_GLVIEWW_RENDER_POLICY_ALWAYS, it redraws regardless of + * whether it is visible/need redrawing or not. + * + * @ingroup GLView + */ +EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy) EINA_ARG_NONNULL(1); - /** - * Set the init function that runs once in the main loop. - * - * @param obj The glview object. - * @param func The init function to be registered. - * - * The registered init function gets called once during the render loop. - * - * @ingroup GLView - */ - EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the init function that runs once in the main loop. + * + * @param obj The glview object. + * @param func The init function to be registered. + * + * The registered init function gets called once during the render loop. + * + * @ingroup GLView + */ +EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); - /** - * Set the render function that runs in the main loop. - * - * @param obj The glview object. - * @param func The delete function to be registered. - * - * The registered del function gets called when GLView object is deleted. - * - * @ingroup GLView - */ - EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the render function that runs in the main loop. + * + * @param obj The glview object. + * @param func The delete function to be registered. + * + * The registered del function gets called when GLView object is deleted. + * + * @ingroup GLView + */ +EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); - /** - * Set the resize function that gets called when resize happens. - * - * @param obj The glview object. - * @param func The resize function to be registered. - * - * @ingroup GLView - */ - EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the resize function that gets called when resize happens. + * + * @param obj The glview object. + * @param func The resize function to be registered. + * + * @ingroup GLView + */ +EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); - /** - * Set the render function that runs in the main loop. - * - * @param obj The glview object. - * @param func The render function to be registered. - * - * @ingroup GLView - */ - EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the render function that runs in the main loop. + * + * @param obj The glview object. + * @param func The render function to be registered. + * + * @ingroup GLView + */ +EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func) EINA_ARG_NONNULL(1); - /** - * Notifies that there has been changes in the GLView. - * - * @param obj The glview object. - * - * @ingroup GLView - */ - EAPI void elm_glview_changed_set(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Notifies that there has been changes in the GLView. + * + * @param obj The glview object. + * + * @ingroup GLView + */ +EAPI void elm_glview_changed_set(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_grid.h b/legacy/elementary/src/lib/elm_grid.h index 362130e408..ccdc2ca67a 100644 --- a/legacy/elementary/src/lib/elm_grid.h +++ b/legacy/elementary/src/lib/elm_grid.h @@ -1,111 +1,110 @@ - /** - * @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 - * - * @{ - */ +/** + * @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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_hover.h b/legacy/elementary/src/lib/elm_hover.h index eafd822b4b..ff12b317e1 100644 --- a/legacy/elementary/src/lib/elm_hover.h +++ b/legacy/elementary/src/lib/elm_hover.h @@ -1,193 +1,194 @@ - /** - * @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. - * - * A Hover object has two parents. One parent that owns it during creation - * and the other parent being the one over which the hover object spans. - * - * - * @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. - * - * @{ - */ - 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; +/** + * @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. + * + * A Hover object has two parents. One parent that owns it during creation + * and the other parent being the one over which the hover object spans. + * + * + * @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. + * + * @{ + */ +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 - * - * @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 Adds a hover object to @p parent + * + * @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. - * - * @param obj The hover object - * @param target The object to center the hover onto. - * - * This function will cause the hover to be centered on the target object. - */ - EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target) EINA_ARG_NONNULL(1); +/** + * @brief Sets the target object for the hover. + * + * @param obj The hover object + * @param target The object to center the hover onto. + * + * This function will cause the hover to be centered on the target object. + */ +EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target) EINA_ARG_NONNULL(1); - /** - * @brief Gets the target object for the hover. - * - * @param obj The hover object - * @return The target object for the hover. - * - * @see elm_hover_target_set() - */ - EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Gets the target object for the hover. + * + * @param obj The hover object + * @return The target object for the hover. + * + * @see elm_hover_target_set() + */ +EAPI Evas_Object *elm_hover_target_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Sets the parent object for the hover. - * - * @param obj The hover object - * @param parent The object to locate the hover over. - * - * This function will cause the hover to take up the entire space that the - * parent object fills. - */ - EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Sets the parent object for the hover. + * + * @param obj The hover object + * @param parent The object to locate the hover over. + * + * This function will cause the hover to take up the entire space that the + * parent object fills. + */ +EAPI void elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * @brief Gets the parent object for the hover. - * - * @param obj The hover object - * @return The parent object to locate the hover over. - * - * @see elm_hover_parent_set() - */ - EAPI Evas_Object *elm_hover_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Gets the parent object for the hover. + * + * @param obj The hover object + * @return The parent object to locate the hover over. + * + * @see elm_hover_parent_set() + */ +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. - * - * @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 - * - * 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. - * - * 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 dynamic 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 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 + * + * 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. + * + * 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 dynamic 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. - * - * 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 - * - * @see elm_hover_content_set() - */ - EAPI Evas_Object *elm_hover_content_get(const Evas_Object *obj, const char *swallow) 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 + * + * @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. - * - * Unparent and return the content object set at @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. - * - * @see elm_hover_content_set() - */ - EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1); +/** + * @brief Unset the content of the hover object, in a given direction. + * + * Unparent and return the content object set at @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. + * + * @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. - * - * @param obj The hover object - * @param pref_axis The preferred orientation axis for the hover object to use - * @return The edje location to place content into the hover or @c - * NULL, on errors. - * - * Best is defined here as the location at which there is the most available - * space. - * - * @p pref_axis may be one of - * - @c ELM_HOVER_AXIS_NONE -- no prefered orientation - * - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal - * - @c ELM_HOVER_AXIS_VERTICAL -- vertical - * - @c ELM_HOVER_AXIS_BOTH -- both - * - * If ELM_HOVER_AXIS_HORIZONTAL is 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. - * - * @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); - - /** - * @} - */ +/** + * @brief Returns the best swallow location for content in the hover. + * + * @param obj The hover object + * @param pref_axis The preferred orientation axis for the hover object to use + * @return The edje location to place content into the hover or @c + * NULL, on errors. + * + * Best is defined here as the location at which there is the most available + * space. + * + * @p pref_axis may be one of + * - @c ELM_HOVER_AXIS_NONE -- no prefered orientation + * - @c ELM_HOVER_AXIS_HORIZONTAL -- horizontal + * - @c ELM_HOVER_AXIS_VERTICAL -- vertical + * - @c ELM_HOVER_AXIS_BOTH -- both + * + * If ELM_HOVER_AXIS_HORIZONTAL is 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. + * + * @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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_icon.h b/legacy/elementary/src/lib/elm_icon.h index 4ea61e2c08..23fdb9f32f 100644 --- a/legacy/elementary/src/lib/elm_icon.h +++ b/legacy/elementary/src/lib/elm_icon.h @@ -1,531 +1,532 @@ - /** - * @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 - * - * Signals that you can add callbacks for are: - * - * "clicked" - This is called when a user has clicked the icon - * - * An example of usage for this API follows: - * @li @ref tutorial_icon - */ +/** + * @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 + * + * Signals that you can add callbacks for are: + * + * "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 - * @{ - */ +/** + * @addtogroup Icon + * @{ + */ - typedef enum _Elm_Icon_Type - { - ELM_ICON_NONE, - ELM_ICON_FILE, - ELM_ICON_STANDARD - } Elm_Icon_Type; +typedef enum _Elm_Icon_Type +{ + ELM_ICON_NONE, + ELM_ICON_FILE, + ELM_ICON_STANDARD +} Elm_Icon_Type; - /** - * @enum _Elm_Icon_Lookup_Order - * @typedef Elm_Icon_Lookup_Order - * - * Lookup order used by elm_icon_standard_set(). Should look for icons in the - * theme, FDO paths, or both? - * - * @ingroup Icon - */ - typedef enum _Elm_Icon_Lookup_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; +/** + * @enum _Elm_Icon_Lookup_Order + * @typedef Elm_Icon_Lookup_Order + * + * Lookup order used by elm_icon_standard_set(). Should look for icons in the + * theme, FDO paths, or both? + * + * @ingroup Icon + */ +typedef enum _Elm_Icon_Lookup_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; - /** - * Add a new icon object to the parent. - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @see elm_icon_file_set() - * - * @ingroup Icon - */ - EAPI Evas_Object *elm_icon_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new icon object to the parent. + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @see elm_icon_file_set() + * + * @ingroup Icon + */ +EAPI Evas_Object * + elm_icon_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set 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 image - * @param group The group that the icon belongs to an edje file - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * @note The icon image set by this function can be changed by - * elm_icon_standard_set(). - * - * @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); +/** + * Set 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 image + * @param group The group that the icon belongs to an edje file + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * @note The icon image set by this function can be changed by + * elm_icon_standard_set(). + * + * @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); - /** - * 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) - * - * The @p format string should be something like "png", "jpg", "tga", - * "tiff", "bmp" etc. if it is provided (NULL if not). This improves - * the loader performance as it tries the "correct" loader first before - * trying a range of other possible loaders until one succeeds. - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * @note The icon image set by this function can be changed by - * elm_icon_standard_set(). - * - * @ingroup Icon - */ - 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 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) + * + * The @p format string should be something like "png", "jpg", "tga", + * "tiff", "bmp" etc. if it is provided (NULL if not). This improves + * the loader performance as it tries the "correct" loader first before + * trying a range of other possible loaders until one succeeds. + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * @note The icon image set by this function can be changed by + * elm_icon_standard_set(). + * + * @ingroup Icon + */ +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); - /** - * 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 the icon image - * @param group The group that the icon belongs to, in edje file - * - * @see elm_icon_file_set() - * - * @ingroup Icon - */ - EAPI void elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group) 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 the icon image + * @param group The group that the icon belongs to, in edje file + * + * @see elm_icon_file_set() + * + * @ingroup Icon + */ +EAPI void elm_icon_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1); - /** - * Set the file that will be used, but use a generated thumbnail. - * - * @param obj The icon object - * @param file The path to file that will be used as icon image - * @param group The group that the icon belongs to an edje file - * - * This functions like elm_icon_file_set() but requires the Ethumb library - * support to be enabled successfully with elm_need_ethumb(). When set - * the file indicated has a thumbnail generated and cached on disk for - * future use or will directly use an existing cached thumbnail if it - * is valid. - * - * @see elm_icon_file_set() - * - * @ingroup Icon - */ - EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); +/** + * Set the file that will be used, but use a generated thumbnail. + * + * @param obj The icon object + * @param file The path to file that will be used as icon image + * @param group The group that the icon belongs to an edje file + * + * This functions like elm_icon_file_set() but requires the Ethumb library + * support to be enabled successfully with elm_need_ethumb(). When set + * the file indicated has a thumbnail generated and cached on disk for + * future use or will directly use an existing cached thumbnail if it + * is valid. + * + * @see elm_icon_file_set() + * + * @ingroup Icon + */ +EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); - /** - * Set the icon by icon standards names. - * - * @param obj The icon object - * @param name The icon name - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * For example, freedesktop.org defines standard icon names such as "home", - * "network", etc. There can be different icon sets to match those icon - * keys. The @p name given as parameter is one of these "keys", and will be - * used to look in the freedesktop.org paths and elementary theme. One can - * change the lookup order with elm_icon_order_lookup_set(). - * - * If name is not found in any of the expected locations and it is the - * absolute path of an image file, this image will be used. - * - * @note The icon image set by this function can be changed by - * elm_icon_file_set(). - * - * @see elm_icon_standard_get() - * @see elm_icon_file_set() - * - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); +/** + * Set the icon by icon standards names. + * + * @param obj The icon object + * @param name The icon name + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * For example, freedesktop.org defines standard icon names such as "home", + * "network", etc. There can be different icon sets to match those icon + * keys. The @p name given as parameter is one of these "keys", and will be + * used to look in the freedesktop.org paths and elementary theme. One can + * change the lookup order with elm_icon_order_lookup_set(). + * + * If name is not found in any of the expected locations and it is the + * absolute path of an image file, this image will be used. + * + * @note The icon image set by this function can be changed by + * elm_icon_file_set(). + * + * @see elm_icon_standard_get() + * @see elm_icon_file_set() + * + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); - /** - * Get the icon name set by icon standard names. - * - * @param obj The icon object - * @return The icon name - * - * If the icon image was set using elm_icon_file_set() instead of - * elm_icon_standard_set(), then this function will return @c NULL. - * - * @see elm_icon_standard_set() - * - * @ingroup Icon - */ - EAPI const char *elm_icon_standard_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the icon name set by icon standard names. + * + * @param obj The icon object + * @return The icon name + * + * If the icon image was set using elm_icon_file_set() instead of + * elm_icon_standard_set(), then this function will return @c NULL. + * + * @see elm_icon_standard_set() + * + * @ingroup Icon + */ +EAPI const char *elm_icon_standard_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the smooth scaling 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. - * - * Set the scaling algorithm to be used when scaling the icon image. Smooth - * scaling provides a better resulting image, but is slower. - * - * 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_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1); +/** + * Set the smooth scaling 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. + * + * Set the scaling algorithm to be used when scaling the icon image. Smooth + * scaling provides a better resulting image, but is slower. + * + * 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_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1); - /** - * Get whether smooth scaling is enabled for an icon object. - * - * @param obj The icon object - * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise. - * - * @see elm_icon_smooth_set() - * - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether smooth scaling is enabled for an icon object. + * + * @param obj The icon object + * @return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise. + * + * @see elm_icon_smooth_set() + * + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Disable scaling of this object. - * - * @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 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_icon_no_scale_get() - * @see elm_icon_scale_set() - * @see elm_object_scale_set() - * - * @ingroup Icon - */ - EAPI void elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1); +/** + * Disable scaling of this object. + * + * @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 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_icon_no_scale_get() + * @see elm_icon_scale_set() + * @see elm_object_scale_set() + * + * @ingroup Icon + */ +EAPI void elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) 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 - * - * @see elm_icon_no_scale_set() - * - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_no_scale_get(const Evas_Object *obj) 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 + * + * @see elm_icon_no_scale_set() + * + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set if the object is (up/down) resizable. - * - * @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. - * - * 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_icon_scale_get() - * - * @ingroup Icon - */ - EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1); +/** + * Set if the object is (up/down) resizable. + * + * @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. + * + * 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_icon_scale_get() + * + * @ingroup Icon + */ +EAPI void elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1); - /** - * Get if the object is (up/down) resizable. - * - * @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 - * - * @see elm_icon_scale_set() - * - * @ingroup Icon - */ - EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1); +/** + * Get if the object is (up/down) resizable. + * + * @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 + * + * @see elm_icon_scale_set() + * + * @ingroup Icon + */ +EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1); - /** - * Get the object's image size - * - * @param obj The icon object - * @param w A pointer to store the width in - * @param h A pointer to store the height in - * - * @ingroup Icon - */ - EAPI void elm_icon_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); +/** + * Get the object's image size + * + * @param obj The icon object + * @param w A pointer to store the width in + * @param h A pointer to store the height in + * + * @ingroup Icon + */ +EAPI void elm_icon_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); - /** - * Set if the icon fill the entire object area. - * - * @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. - * - * 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). - * - * @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. - * - * @see elm_icon_fill_outside_get() - * @see elm_image_fill_outside_set() - * - * @ingroup Icon - */ - EAPI void elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1); +/** + * Set if the icon fill the entire object area. + * + * @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. + * + * 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). + * + * @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. + * + * @see elm_icon_fill_outside_get() + * @see elm_image_fill_outside_set() + * + * @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() - * - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj) 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() + * + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the prescale size for the icon. - * - * @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 - */ - EAPI void elm_icon_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1); +/** + * Set the prescale size for the icon. + * + * @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 + */ +EAPI void elm_icon_prescale_set(Evas_Object *obj, int size) 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() - * - * @ingroup Icon - */ - EAPI int elm_icon_prescale_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() + * + * @ingroup Icon + */ +EAPI int elm_icon_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Gets the image object of the icon. DO NOT MODIFY THIS. - * - * @param obj The icon object - * @return The internal icon object - * - * @ingroup Icon - */ - EAPI Evas_Object *elm_icon_object_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Gets the image object of the icon. DO NOT MODIFY THIS. + * + * @param obj The icon object + * @return The internal icon object + * + * @ingroup Icon + */ +EAPI Evas_Object *elm_icon_object_get(Evas_Object *obj) 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 - * - * @ingroup Icon - */ - EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) 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 + * + * @ingroup Icon + */ +EAPI void elm_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) 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 - * - * @ingroup Icon - */ - EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_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 + * + * @ingroup Icon + */ +EAPI Elm_Icon_Lookup_Order elm_icon_order_lookup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable preloading of the icon - * - * @param obj The icon object - * @param disable If EINA_TRUE, preloading will be disabled - * @ingroup Icon - */ - EAPI void elm_icon_preload_set(Evas_Object *obj, Eina_Bool disable) EINA_ARG_NONNULL(1); +/** + * Enable or disable preloading of the icon + * + * @param obj The icon object + * @param disable If EINA_TRUE, preloading will be disabled + * @ingroup Icon + */ +EAPI void elm_icon_preload_set(Evas_Object *obj, Eina_Bool disable) EINA_ARG_NONNULL(1); - /** - * Get if the icon supports animation or not. - * - * @param obj The icon object - * @return @c EINA_TRUE if the icon supports animation, - * @c EINA_FALSE otherwise. - * - * 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); +/** + * Get if the icon supports animation or not. + * + * @param obj The icon object + * @return @c EINA_TRUE if the icon supports animation, + * @c EINA_FALSE otherwise. + * + * 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. - * - * @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. - * - * Since the default animation mode is set to EINA_FALSE, - * the icon is shown without animation. Files like animated GIF files - * can animate, and this is supported if you enable animated support - * on the icon. - * Set it to EINA_TRUE when the icon needs to be animated. - * @ingroup Icon - */ - EAPI void elm_icon_animated_set(Evas_Object *obj, Eina_Bool animated) EINA_ARG_NONNULL(1); +/** + * Set animation mode of the icon. + * + * @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. + * + * Since the default animation mode is set to EINA_FALSE, + * the icon is shown without animation. Files like animated GIF files + * can animate, and this is supported if you enable animated support + * on the icon. + * Set it to EINA_TRUE when the icon needs to be animated. + * @ingroup Icon + */ +EAPI void elm_icon_animated_set(Evas_Object *obj, Eina_Bool animated) EINA_ARG_NONNULL(1); - /** - * Get animation mode of the icon. - * - * @param obj The icon object - * @return The animation mode of the icon object - * @see elm_icon_animated_set - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_animated_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get animation mode of the icon. + * + * @param obj The icon object + * @return The animation mode of the icon object + * @see elm_icon_animated_set + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_animated_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set animation play mode of the icon. - * - * @param obj The icon object - * @param play @c EINA_TRUE the object play animation images, - * @c EINA_FALSE otherwise. Default is @c EINA_FALSE. - * - * To play elm icon's animation, set play to EINA_TURE. - * For example, you make gif player using this set/get API and click event. - * This literally lets you control current play or paused state. To have - * this work with animated GIF files for example, you first, before - * setting the file have to use elm_icon_animated_set() to enable animation - * at all on the icon. - * - * 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 - */ - EAPI void elm_icon_animated_play_set(Evas_Object *obj, Eina_Bool play) EINA_ARG_NONNULL(1); +/** + * Set animation play mode of the icon. + * + * @param obj The icon object + * @param play @c EINA_TRUE the object play animation images, + * @c EINA_FALSE otherwise. Default is @c EINA_FALSE. + * + * To play elm icon's animation, set play to EINA_TURE. + * For example, you make gif player using this set/get API and click event. + * This literally lets you control current play or paused state. To have + * this work with animated GIF files for example, you first, before + * setting the file have to use elm_icon_animated_set() to enable animation + * at all on the icon. + * + * 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 + */ +EAPI void elm_icon_animated_play_set(Evas_Object *obj, Eina_Bool play) EINA_ARG_NONNULL(1); - /** - * Get animation play mode of the icon. - * - * @param obj The icon object - * @return The play mode of the icon object - * - * @see elm_icon_animated_play_get - * @ingroup Icon - */ - EAPI Eina_Bool elm_icon_animated_play_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get animation play mode of the icon. + * + * @param obj The icon object + * @return The play mode of the icon object + * + * @see elm_icon_animated_play_get + * @ingroup Icon + */ +EAPI Eina_Bool elm_icon_animated_play_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_image.h b/legacy/elementary/src/lib/elm_image.h index c79008b4d7..c24aa8f93a 100644 --- a/legacy/elementary/src/lib/elm_image.h +++ b/legacy/elementary/src/lib/elm_image.h @@ -1,392 +1,396 @@ - /** - * @defgroup Image Image - * - * @image html img/widget/image/preview-00.png - * @image latex img/widget/image/preview-00.eps +/** + * @defgroup Image Image + * + * @image html img/widget/image/preview-00.png + * @image latex img/widget/image/preview-00.eps - * - * An object that allows one to load an image file to it. It can be used - * anywhere like any other elementary widget. - * - * 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). - * - * 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(). - * - * Signals that you can add callbacks for are: - * - * @li @c "clicked" - This is called when a user has clicked the image - * - * An example of usage for this API follows: - * @li @ref tutorial_image - */ + * + * An object that allows one to load an image file to it. It can be used + * anywhere like any other elementary widget. + * + * 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). + * + * 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(). + * + * Signals that you can add callbacks for are: + * + * @li @c "clicked" - This is called when a user has clicked the image + * + * An example of usage for this API follows: + * @li @ref tutorial_image + */ - /** - * @addtogroup Image - * @{ - */ +/** + * @addtogroup Image + * @{ + */ - /** - * @enum _Elm_Image_Orient - * @typedef Elm_Image_Orient - * - * Possible orientation options for elm_image_orient_set(). - * - * @image html elm_image_orient_set.png - * @image latex elm_image_orient_set.eps width=\textwidth - * - * @ingroup Image - */ - typedef enum _Elm_Image_Orient - { - ELM_IMAGE_ORIENT_NONE = 0, /**< no orientation change */ - ELM_IMAGE_ORIENT_0 = 0, /**< no orientation change */ - ELM_IMAGE_ROTATE_90 = 1, /**< rotate 90 degrees clockwise */ - ELM_IMAGE_ROTATE_180 = 2, /**< rotate 180 degrees clockwise */ - ELM_IMAGE_ROTATE_270 = 3, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */ - // XXX: remove - /*EINA_DEPRECATED*/ELM_IMAGE_ROTATE_90_CW = 1, /**< rotate 90 degrees clockwise */ - // XXX: remove - /*EINA_DEPRECATED*/ELM_IMAGE_ROTATE_180_CW = 2, /**< rotate 180 degrees clockwise */ - // XXX: remove - /*EINA_DEPRECATED*/ELM_IMAGE_ROTATE_90_CCW = 3, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */ - ELM_IMAGE_FLIP_HORIZONTAL = 4, /**< flip image horizontally */ - ELM_IMAGE_FLIP_VERTICAL = 5, /**< flip image vertically */ - ELM_IMAGE_FLIP_TRANSPOSE = 6, /**< flip the image along the y = (width - x) line (bottom-left to top-right) */ - ELM_IMAGE_FLIP_TRANSVERSE = 7 /**< flip the image along the y = x line (top-left to bottom-right) */ - } Elm_Image_Orient; +/** + * @enum _Elm_Image_Orient + * @typedef Elm_Image_Orient + * + * Possible orientation options for elm_image_orient_set(). + * + * @image html elm_image_orient_set.png + * @image latex elm_image_orient_set.eps width=\textwidth + * + * @ingroup Image + */ +typedef enum _Elm_Image_Orient +{ + ELM_IMAGE_ORIENT_NONE = 0, /**< no orientation change */ + ELM_IMAGE_ORIENT_0 = 0, /**< no orientation change */ + ELM_IMAGE_ROTATE_90 = 1, /**< rotate 90 degrees clockwise */ + ELM_IMAGE_ROTATE_180 = 2, /**< rotate 180 degrees clockwise */ + ELM_IMAGE_ROTATE_270 = 3, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */ + // XXX: remove + /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_90_CW = 1, + /**< rotate 90 degrees clockwise */ + // XXX: remove + /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_180_CW = 2, + /**< rotate 180 degrees clockwise */ + // XXX: remove + /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_90_CCW = 3, + /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */ + ELM_IMAGE_FLIP_HORIZONTAL = 4, /**< flip image horizontally */ + ELM_IMAGE_FLIP_VERTICAL = 5, /**< flip image vertically */ + ELM_IMAGE_FLIP_TRANSPOSE = 6, /**< flip the image along the y = (width - x) line (bottom-left to top-right) */ + ELM_IMAGE_FLIP_TRANSVERSE = 7 /**< flip the image along the y = x line (top-left to bottom-right) */ +} Elm_Image_Orient; - /** - * Add a new image to the parent. - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @see elm_image_file_set() - * - * @ingroup Image - */ - EAPI Evas_Object *elm_image_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new image to the parent. + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @see elm_image_file_set() + * + * @ingroup Image + */ +EAPI Evas_Object * + elm_image_add(Evas_Object *parent) +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) - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * @see elm_image_file_get() - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); +/** + * 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) + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * @see elm_image_file_get() + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); - /** - * 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 - * - * @see elm_image_file_set() - * - * @ingroup Image - */ - EAPI void elm_image_file_get(const Evas_Object *obj, const char **file, const char **group) 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 + * + * @see elm_image_file_set() + * + * @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. - * - * @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. - * - * Set the scaling algorithm to be used when scaling the image. Smooth - * scaling provides a better resulting image, but is slower. - * - * 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 elm_image_smooth_get() - * - * @ingroup Image - */ - EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) 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. + * + * Set the scaling algorithm to be used when scaling the image. Smooth + * scaling provides a better resulting image, but is slower. + * + * 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 elm_image_smooth_get() + * + * @ingroup Image + */ +EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) 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. - * - * @see elm_image_smooth_get() - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_smooth_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. + * + * @see elm_image_smooth_get() + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_smooth_get(const 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. - * - * This is the real size of the image, not the size of the object. - * - * On error, neither w and h will be fileld with 0. - * - * @ingroup Image - */ - EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) 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. + * + * This is the real size of the image, not the size of the object. + * + * On error, neither w and h will be fileld with 0. + * + * @ingroup Image + */ +EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); - /** - * Disable scaling of this object. - * - * @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. - * - * 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 - */ - EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1); +/** + * Disable scaling of this object. + * + * @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. + * + * 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 + */ +EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1); - /** - * 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 - * - * @see elm_image_no_scale_set() - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * 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 + * + * @see elm_image_no_scale_set() + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set if the object is (up/down) resizable. - * - * @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. - * - * 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 void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1); +/** + * Set if the object is (up/down) resizable. + * + * @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. + * + * 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 void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1); - /** - * Get if the object is (up/down) resizable. - * - * @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 - * - * @see elm_image_scale_set() - * - * @ingroup Image - */ - EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1); +/** + * Get if the object is (up/down) resizable. + * + * @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 + * + * @see elm_image_scale_set() + * + * @ingroup Image + */ +EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1); - /** - * Set if the image fills 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). - * - * @note This option will have no effect if - * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE. - * - * @see elm_image_fill_outside_get() - * @see elm_image_aspect_ratio_retained_set() - * - * @ingroup Image - */ - EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1); +/** + * Set if the image fills 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). + * + * @note This option will have no effect if + * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE. + * + * @see elm_image_fill_outside_get() + * @see elm_image_aspect_ratio_retained_set() + * + * @ingroup Image + */ +EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) 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. - * - * @see elm_image_fill_outside_set() - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj) 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. + * + * @see elm_image_fill_outside_set() + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_fill_outside_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. - * - * @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_image_prescale_set(Evas_Object *obj, int size) 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. + * + * @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_image_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1); - /** - * Get the prescale size for the image - * - * @param obj The image object - * @return The prescale size - * - * @see elm_image_prescale_set() - * - * @ingroup Image - */ - EAPI int elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the prescale size for the image + * + * @param obj The image object + * @return The prescale size + * + * @see elm_image_prescale_set() + * + * @ingroup Image + */ +EAPI int elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the image orientation. - * - * @param obj The image object - * @param orient The image orientation @ref Elm_Image_Orient - * Default is #ELM_IMAGE_ORIENT_NONE. - * - * This function allows to rotate or flip the given image. - * - * @see elm_image_orient_get() - * @see @ref Elm_Image_Orient - * - * @ingroup Image - */ - EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) EINA_ARG_NONNULL(1); +/** + * Set the image orientation. + * + * @param obj The image object + * @param orient The image orientation @ref Elm_Image_Orient + * Default is #ELM_IMAGE_ORIENT_NONE. + * + * This function allows to rotate or flip the given image. + * + * @see elm_image_orient_get() + * @see @ref Elm_Image_Orient + * + * @ingroup Image + */ +EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) EINA_ARG_NONNULL(1); - /** - * Get the image orientation. - * - * @param obj The image object - * @return The image orientation @ref Elm_Image_Orient - * - * @see elm_image_orient_set() - * @see @ref Elm_Image_Orient - * - * @ingroup Image - */ - EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the image orientation. + * + * @param obj The image object + * @return The image orientation @ref Elm_Image_Orient + * + * @see elm_image_orient_set() + * @see @ref Elm_Image_Orient + * + * @ingroup Image + */ +EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Make the image 'editable'. - * - * @param obj Image object. - * @param set Turn on or off editability. Default is @c EINA_FALSE. - * - * 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_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1); +/** + * Make the image 'editable'. + * + * @param obj Image object. + * @param set Turn on or off editability. Default is @c EINA_FALSE. + * + * 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_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1); - /** - * Check if the image 'editable'. - * - * @param obj Image object. - * @return Editability. - * - * A return value of EINA_TRUE means the image is a valid drag target - * for drag and drop, and can be cut or pasted too. - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Check if the image 'editable'. + * + * @param obj Image object. + * @return Editability. + * + * A return value of EINA_TRUE means the image is a valid drag target + * for drag and drop, and can be cut or pasted too. + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the basic Evas_Image object from this object (widget). - * - * @param obj The image object to get the inlined image from - * @return The inlined image object, or NULL if none exists - * - * 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 Evas_Object *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the basic Evas_Image object from this object (widget). + * + * @param obj The image object to get the inlined image from + * @return The inlined image object, or NULL if none exists + * + * 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 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. - * - * @param obj The image object. - * @param retained @c EINA_TRUE if the image should retain the aspect, - * @c EINA_FALSE otherwise. - * - * 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_image_aspect_ratio_retained_get() - * @see elm_image_fill_outside_set() - * - * @ingroup Image - */ - EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained) EINA_ARG_NONNULL(1); +/** + * Set whether the original aspect ratio of the image should be kept on resize. + * + * @param obj The image object. + * @param retained @c EINA_TRUE if the image should retain the aspect, + * @c EINA_FALSE otherwise. + * + * 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_image_aspect_ratio_retained_get() + * @see elm_image_fill_outside_set() + * + * @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. - * - * @param obj The image object. - * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE - * otherwise. - * - * @ingroup Image - */ - EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get if the object retains the original aspect ratio. + * + * @param obj The image object. + * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE + * otherwise. + * + * @ingroup Image + */ +EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_index.h b/legacy/elementary/src/lib/elm_index.h index d2fcdac209..7ddc421e94 100644 --- a/legacy/elementary/src/lib/elm_index.h +++ b/legacy/elementary/src/lib/elm_index.h @@ -1,345 +1,346 @@ - /** - * @defgroup Index Index - * - * @image html img/widget/index/preview-00.png - * @image latex img/widget/index/preview-00.eps - * - * An index widget gives you an index for fast access to whichever - * group of other UI items one might have. It's a list of text - * items (usually letters, for alphabetically ordered access). - * - * Index widgets are by default hidden and just appear when the - * user clicks over it's reserved area in the canvas. In its - * default theme, it's an area one @ref Fingers "finger" wide on - * the right side of the index widget's container. - * - * When items on the index are selected, smart callbacks get - * called, so that its user can make other container objects to - * show a given area or child object depending on the index item - * selected. You'd probably be using an index together with @ref - * List "lists", @ref Genlist "generic lists" or @ref Gengrid - * "general grids". - * - * Smart events one can add callbacks for are: - * - @c "changed" - When the selected index item changes. @c - * event_info is the selected item's data pointer. - * - @c "delay,changed" - When the selected index item changes, but - * after a small idling period. @c event_info is the selected - * item's data pointer. - * - @c "selected" - When the user releases a mouse button and - * selects an item. @c event_info is the selected item's data - * pointer. - * - @c "level,up" - when the user moves a finger from the first - * level to the second level - * - @c "level,down" - when the user moves a finger from the second - * level to the first level - * - * The @c "delay,changed" event is so that it'll wait a small time - * before actually reporting those events and, moreover, just the - * last event happening on those time frames will actually be - * reported. - * - * Here are some examples on its usage: - * @li @ref index_example_01 - * @li @ref index_example_02 - */ +/** + * @defgroup Index Index + * + * @image html img/widget/index/preview-00.png + * @image latex img/widget/index/preview-00.eps + * + * An index widget gives you an index for fast access to whichever + * group of other UI items one might have. It's a list of text + * items (usually letters, for alphabetically ordered access). + * + * Index widgets are by default hidden and just appear when the + * user clicks over it's reserved area in the canvas. In its + * default theme, it's an area one @ref Fingers "finger" wide on + * the right side of the index widget's container. + * + * When items on the index are selected, smart callbacks get + * called, so that its user can make other container objects to + * show a given area or child object depending on the index item + * selected. You'd probably be using an index together with @ref + * List "lists", @ref Genlist "generic lists" or @ref Gengrid + * "general grids". + * + * Smart events one can add callbacks for are: + * - @c "changed" - When the selected index item changes. @c + * event_info is the selected item's data pointer. + * - @c "delay,changed" - When the selected index item changes, but + * after a small idling period. @c event_info is the selected + * item's data pointer. + * - @c "selected" - When the user releases a mouse button and + * selects an item. @c event_info is the selected item's data + * pointer. + * - @c "level,up" - when the user moves a finger from the first + * level to the second level + * - @c "level,down" - when the user moves a finger from the second + * level to the first level + * + * The @c "delay,changed" event is so that it'll wait a small time + * before actually reporting those events and, moreover, just the + * last event happening on those time frames will actually be + * reported. + * + * Here are some examples on its usage: + * @li @ref index_example_01 + * @li @ref index_example_02 + */ - /** - * @addtogroup Index - * @{ - */ +/** + * @addtogroup Index + * @{ + */ - /** - * Add a new index widget to the given parent Elementary - * (container) object - * - * @param parent The parent object - * @return a new index widget handle or @c NULL, on errors - * - * This function inserts a new index widget on the canvas. - * - * @ingroup Index - */ - EAPI Evas_Object *elm_index_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new index widget to the given parent Elementary + * (container) object + * + * @param parent The parent object + * @return a new index widget handle or @c NULL, on errors + * + * This function inserts a new index widget on the canvas. + * + * @ingroup Index + */ +EAPI Evas_Object * + elm_index_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set whether a given index widget is or not visible, - * programatically. - * - * @param obj The index object - * @param active @c EINA_TRUE to show it, @c EINA_FALSE to hide it - * - * Not to be confused with visible as in @c evas_object_show() -- - * visible with regard to the widget's auto hiding feature. - * - * @see elm_index_active_get() - * - * @ingroup Index - */ - EAPI void elm_index_active_set(Evas_Object *obj, Eina_Bool active) EINA_ARG_NONNULL(1); +/** + * Set whether a given index widget is or not visible, + * programatically. + * + * @param obj The index object + * @param active @c EINA_TRUE to show it, @c EINA_FALSE to hide it + * + * Not to be confused with visible as in @c evas_object_show() -- + * visible with regard to the widget's auto hiding feature. + * + * @see elm_index_active_get() + * + * @ingroup Index + */ +EAPI void elm_index_active_set(Evas_Object *obj, Eina_Bool active) EINA_ARG_NONNULL(1); - /** - * Get whether a given index widget is currently visible or not. - * - * @param obj The index object - * @return @c EINA_TRUE, if it's shown, @c EINA_FALSE otherwise - * - * @see elm_index_active_set() for more details - * - * @ingroup Index - */ - EAPI Eina_Bool elm_index_active_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether a given index widget is currently visible or not. + * + * @param obj The index object + * @return @c EINA_TRUE, if it's shown, @c EINA_FALSE otherwise + * + * @see elm_index_active_set() for more details + * + * @ingroup Index + */ +EAPI Eina_Bool elm_index_active_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the items level for a given index widget. - * - * @param obj The index object. - * @param level @c 0 or @c 1, the currently implemented levels. - * - * @see elm_index_item_level_get() - * - * @ingroup Index - */ - EAPI void elm_index_item_level_set(Evas_Object *obj, int level) EINA_ARG_NONNULL(1); +/** + * Set the items level for a given index widget. + * + * @param obj The index object. + * @param level @c 0 or @c 1, the currently implemented levels. + * + * @see elm_index_item_level_get() + * + * @ingroup Index + */ +EAPI void elm_index_item_level_set(Evas_Object *obj, int level) EINA_ARG_NONNULL(1); - /** - * Get the items level set for a given index widget. - * - * @param obj The index object. - * @return @c 0 or @c 1, which are the levels @p obj might be at. - * - * @see elm_index_item_level_set() for more information - * - * @ingroup Index - */ - EAPI int elm_index_item_level_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the items level set for a given index widget. + * + * @param obj The index object. + * @return @c 0 or @c 1, which are the levels @p obj might be at. + * + * @see elm_index_item_level_set() for more information + * + * @ingroup Index + */ +EAPI int elm_index_item_level_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Returns the last selected item, for a given index widget. - * - * @param obj The index object. - * @return The last item @b selected on @p obj (or @c NULL, on errors). - * - * @ingroup Index - */ - EAPI Elm_Object_Item *elm_index_item_selected_get(const Evas_Object *obj, int level) EINA_ARG_NONNULL(1); +/** + * Returns the last selected item, for a given index widget. + * + * @param obj The index object. + * @return The last item @b selected on @p obj (or @c NULL, on errors). + * + * @ingroup Index + */ +EAPI Elm_Object_Item *elm_index_item_selected_get(const Evas_Object *obj, int level) EINA_ARG_NONNULL(1); - /** - * Append a new item on a given index widget. - * - * @param obj The index object. - * @param letter Letter under which the item should be indexed - * @param item The item data to set for the index's item - * - * Despite the most common usage of the @p letter argument is for - * single char strings, one could use arbitrary strings as index - * entries. - * - * @c item will be the pointer returned back on @c "changed", @c - * "delay,changed" and @c "selected" smart events. - * - * @ingroup Index - */ - EAPI void elm_index_item_append(Evas_Object *obj, const char *letter, const void *item) EINA_ARG_NONNULL(1); +/** + * Append a new item on a given index widget. + * + * @param obj The index object. + * @param letter Letter under which the item should be indexed + * @param item The item data to set for the index's item + * + * Despite the most common usage of the @p letter argument is for + * single char strings, one could use arbitrary strings as index + * entries. + * + * @c item will be the pointer returned back on @c "changed", @c + * "delay,changed" and @c "selected" smart events. + * + * @ingroup Index + */ +EAPI void elm_index_item_append(Evas_Object *obj, const char *letter, const void *item) EINA_ARG_NONNULL(1); - /** - * Prepend a new item on a given index widget. - * - * @param obj The index object. - * @param letter Letter under which the item should be indexed - * @param item The item data to set for the index's item - * - * Despite the most common usage of the @p letter argument is for - * single char strings, one could use arbitrary strings as index - * entries. - * - * @c item will be the pointer returned back on @c "changed", @c - * "delay,changed" and @c "selected" smart events. - * - * @ingroup Index - */ - EAPI void elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item) EINA_ARG_NONNULL(1); +/** + * Prepend a new item on a given index widget. + * + * @param obj The index object. + * @param letter Letter under which the item should be indexed + * @param item The item data to set for the index's item + * + * Despite the most common usage of the @p letter argument is for + * single char strings, one could use arbitrary strings as index + * entries. + * + * @c item will be the pointer returned back on @c "changed", @c + * "delay,changed" and @c "selected" smart events. + * + * @ingroup Index + */ +EAPI void elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item) EINA_ARG_NONNULL(1); - /** - * Append a new item, on a given index widget, after the item - * having @p relative as data. - * - * @param obj The index object. - * @param letter Letter under which the item should be indexed - * @param item The item data to set for the index's item - * @param relative The index item to be the predecessor of this new one - * - * Despite the most common usage of the @p letter argument is for - * single char strings, one could use arbitrary strings as index - * entries. - * - * @c item will be the pointer returned back on @c "changed", @c - * "delay,changed" and @c "selected" smart events. - * - * @note If @p relative is @c NULL this function will behave as - * elm_index_item_append(). - * - * @ingroup Index - */ - EAPI void elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative) EINA_ARG_NONNULL(1); +/** + * Append a new item, on a given index widget, after the item + * having @p relative as data. + * + * @param obj The index object. + * @param letter Letter under which the item should be indexed + * @param item The item data to set for the index's item + * @param relative The index item to be the predecessor of this new one + * + * Despite the most common usage of the @p letter argument is for + * single char strings, one could use arbitrary strings as index + * entries. + * + * @c item will be the pointer returned back on @c "changed", @c + * "delay,changed" and @c "selected" smart events. + * + * @note If @p relative is @c NULL this function will behave as + * elm_index_item_append(). + * + * @ingroup Index + */ +EAPI void elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative) EINA_ARG_NONNULL(1); - /** - * Prepend a new item, on a given index widget, after the item - * having @p relative as data. - * - * @param obj The index object. - * @param letter Letter under which the item should be indexed - * @param item The item data to set for the index's item - * @param relative The index item to be the successor of this new one - * - * Despite the most common usage of the @p letter argument is for - * single char strings, one could use arbitrary strings as index - * entries. - * - * @c item will be the pointer returned back on @c "changed", @c - * "delay,changed" and @c "selected" smart events. - * - * @note If @p relative is @c NULL this function will behave as - * elm_index_item_prepend(). - * - * @ingroup Index - */ - EAPI void elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative) EINA_ARG_NONNULL(1); +/** + * Prepend a new item, on a given index widget, after the item + * having @p relative as data. + * + * @param obj The index object. + * @param letter Letter under which the item should be indexed + * @param item The item data to set for the index's item + * @param relative The index item to be the successor of this new one + * + * Despite the most common usage of the @p letter argument is for + * single char strings, one could use arbitrary strings as index + * entries. + * + * @c item will be the pointer returned back on @c "changed", @c + * "delay,changed" and @c "selected" smart events. + * + * @note If @p relative is @c NULL this function will behave as + * elm_index_item_prepend(). + * + * @ingroup Index + */ +EAPI void elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative) EINA_ARG_NONNULL(1); - /** - * Insert a new item into the given index widget, using @p cmp_func - * function to sort items (by item handles). - * - * @param obj The index object. - * @param letter Letter under which the item should be indexed - * @param item The item data to set for the index's item - * @param cmp_func The comparing function to be used to sort index - * items by #index item handles - * @param cmp_data_func A @b fallback function to be called for the - * sorting of index items by item data). It will be used - * when @p cmp_func returns @c 0 (equality), which means an index - * item with provided item data already exists. To decide which - * data item should be pointed to by the index item in question, @p - * cmp_data_func will be used. If @p cmp_data_func returns a - * non-negative value, the previous index item data will be - * replaced by the given @p item pointer. If the previous data need - * to be freed, it should be done by the @p cmp_data_func function, - * because all references to it will be lost. If this function is - * not provided (@c NULL is given), index items will be @b - * duplicated, if @p cmp_func returns @c 0. - * - * Despite the most common usage of the @p letter argument is for - * single char strings, one could use arbitrary strings as index - * entries. - * - * @c item will be the pointer returned back on @c "changed", @c - * "delay,changed" and @c "selected" smart events. - * - * @ingroup Index - */ - EAPI void elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, const void *item, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func) EINA_ARG_NONNULL(1); +/** + * Insert a new item into the given index widget, using @p cmp_func + * function to sort items (by item handles). + * + * @param obj The index object. + * @param letter Letter under which the item should be indexed + * @param item The item data to set for the index's item + * @param cmp_func The comparing function to be used to sort index + * items by #index item handles + * @param cmp_data_func A @b fallback function to be called for the + * sorting of index items by item data). It will be used + * when @p cmp_func returns @c 0 (equality), which means an index + * item with provided item data already exists. To decide which + * data item should be pointed to by the index item in question, @p + * cmp_data_func will be used. If @p cmp_data_func returns a + * non-negative value, the previous index item data will be + * replaced by the given @p item pointer. If the previous data need + * to be freed, it should be done by the @p cmp_data_func function, + * because all references to it will be lost. If this function is + * not provided (@c NULL is given), index items will be @b + * duplicated, if @p cmp_func returns @c 0. + * + * Despite the most common usage of the @p letter argument is for + * single char strings, one could use arbitrary strings as index + * entries. + * + * @c item will be the pointer returned back on @c "changed", @c + * "delay,changed" and @c "selected" smart events. + * + * @ingroup Index + */ +EAPI void elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, const void *item, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func) EINA_ARG_NONNULL(1); - /** - * Remove an item from a given index widget, to be referenced by - * it's data value. - * - * @param obj The index object - * @param item The item to be removed from @p obj - * - * If a deletion callback is set, via elm_index_item_del_cb_set(), - * that callback function will be called by this one. - * - * @ingroup Index - */ - EAPI void elm_index_item_del(Evas_Object *obj, Elm_Object_Item *item) EINA_ARG_NONNULL(1); +/** + * Remove an item from a given index widget, to be referenced by + * it's data value. + * + * @param obj The index object + * @param item The item to be removed from @p obj + * + * If a deletion callback is set, via elm_index_item_del_cb_set(), + * that callback function will be called by this one. + * + * @ingroup Index + */ +EAPI void elm_index_item_del(Evas_Object *obj, Elm_Object_Item *item) EINA_ARG_NONNULL(1); - /** - * Find a given index widget's item, using item data. - * - * @param obj The index object - * @param item The item data pointed to by the desired index item - * @return The index item handle, if found, or @c NULL otherwise - * - * @ingroup Index - */ - EAPI Elm_Object_Item *elm_index_item_find(Evas_Object *obj, const void *item) EINA_ARG_NONNULL(1); +/** + * Find a given index widget's item, using item data. + * + * @param obj The index object + * @param item The item data pointed to by the desired index item + * @return The index item handle, if found, or @c NULL otherwise + * + * @ingroup Index + */ +EAPI Elm_Object_Item *elm_index_item_find(Evas_Object *obj, const void *item) EINA_ARG_NONNULL(1); - /** - * Removes @b all items from a given index widget. - * - * @param obj The index object. - * - * If deletion callbacks are set, via elm_index_item_del_cb_set(), - * that callback function will be called for each item in @p obj. - * - * @ingroup Index - */ - EAPI void elm_index_item_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Removes @b all items from a given index widget. + * + * @param obj The index object. + * + * If deletion callbacks are set, via elm_index_item_del_cb_set(), + * that callback function will be called for each item in @p obj. + * + * @ingroup Index + */ +EAPI void elm_index_item_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Go to a given items level on a index widget - * - * @param obj The index object - * @param level The index level (one of @c 0 or @c 1) - * - * @ingroup Index - */ - EAPI void elm_index_item_go(Evas_Object *obj, int level) EINA_ARG_NONNULL(1); +/** + * Go to a given items level on a index widget + * + * @param obj The index object + * @param level The index level (one of @c 0 or @c 1) + * + * @ingroup Index + */ +EAPI void elm_index_item_go(Evas_Object *obj, int level) EINA_ARG_NONNULL(1); - /** - * Return the data associated with a given index widget item - * - * @param it The index widget item handle - * @return The data associated with @p it - * @deprecated Use elm_object_item_data_get() instead - * - * @see elm_index_item_data_set() - * - * @ingroup Index - */ - EINA_DEPRECATED EAPI void *elm_index_item_data_get(const Elm_Object_Item *item) EINA_ARG_NONNULL(1); +/** + * Return the data associated with a given index widget item + * + * @param it The index widget item handle + * @return The data associated with @p it + * @deprecated Use elm_object_item_data_get() instead + * + * @see elm_index_item_data_set() + * + * @ingroup Index + */ +EINA_DEPRECATED EAPI void *elm_index_item_data_get(const Elm_Object_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the data associated with a given index widget item - * - * @param it The index widget item handle - * @param data The new data pointer to set to @p it - * - * This sets new item data on @p it. - * - * @warning The old data pointer won't be touched by this function, so - * the user had better to free that old data himself/herself. - * - * @deprecated Use elm_object_item_data_set() instead - * @ingroup Index - */ - EINA_DEPRECATED EAPI void elm_index_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); +/** + * Set the data associated with a given index widget item + * + * @param it The index widget item handle + * @param data The new data pointer to set to @p it + * + * This sets new item data on @p it. + * + * @warning The old data pointer won't be touched by this function, so + * the user had better to free that old data himself/herself. + * + * @deprecated Use elm_object_item_data_set() instead + * @ingroup Index + */ +EINA_DEPRECATED EAPI void elm_index_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); - /** - * Set the function to be called when a given index widget item is freed. - * - * @param it The item to set the callback on - * @param func The function to call on the item's deletion - * - * When called, @p func will have both @c data and @c event_info - * arguments with the @p it item's data value and, naturally, the - * @c obj argument with a handle to the parent index widget. - * - * @ingroup Index - */ - EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the function to be called when a given index widget item is freed. + * + * @param it The item to set the callback on + * @param func The function to call on the item's deletion + * + * When called, @p func will have both @c data and @c event_info + * arguments with the @p it item's data value and, naturally, the + * @c obj argument with a handle to the parent index widget. + * + * @ingroup Index + */ +EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - /** - * Get the letter (string) set on a given index widget item. - * - * @param it The index item handle - * @return The letter string set on @p it - * - * @ingroup Index - */ - EAPI const char *elm_index_item_letter_get(const Elm_Object_Item *item) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the letter (string) set on a given index widget item. + * + * @param it The index item handle + * @return The letter string set on @p it + * + * @ingroup Index + */ +EAPI const char *elm_index_item_letter_get(const Elm_Object_Item *item) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_intro.h b/legacy/elementary/src/lib/elm_intro.h new file mode 100644 index 0000000000..665067cb2a --- /dev/null +++ b/legacy/elementary/src/lib/elm_intro.h @@ -0,0 +1,34 @@ +/** + * @mainpage Elementary + * @image html elementary.png + * @version 0.8.0 + * @date 2008-2011 + * + * @section intro What is Elementary? + * + * This is a VERY SIMPLE toolkit. It is not meant for writing extensive desktop + * applications (yet). Small simple ones with simple needs. + * + * It is meant to make the programmers work almost brainless but give them lots + * of flexibility. + * + * @li @ref Start - Go here to quickly get started with writing Apps + * + * @section organization Organization + * + * One can divide Elemementary into three main groups: + * @li @ref infralist - These are modules that deal with Elementary as a whole. + * @li @ref widgetslist - These are the widgets you'll compose your UI out of. + * @li @ref containerslist - These are the containers which hold the widgets. + * + * @section license License + * + * LGPL v2 (see COPYING in the base of Elementary's source). This applies to + * all files in the source tree. + * + * @section ack Acknowledgements + * There is a lot that goes into making a widget set, and they don't happen out of + * nothing. It's like trying to make everyone everywhere happy, regardless of age, + * gender, race or nationality - and that is really tough. So thanks to people and + * organisations behind this, as listed in the @ref authors page. + */ diff --git a/legacy/elementary/src/lib/elm_label.h b/legacy/elementary/src/lib/elm_label.h index b6dbe3dd26..fc8d9691d7 100644 --- a/legacy/elementary/src/lib/elm_label.h +++ b/legacy/elementary/src/lib/elm_label.h @@ -1,236 +1,237 @@ - /** - * @defgroup Label Label - * - * @image html img/widget/label/preview-00.png - * @image latex img/widget/label/preview-00.eps - * - * @brief Widget to display text, with simple html-like markup. - * - * 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 styles 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. - * - * Custom themes can of course invent new markup tags and style them any way - * they like. - * - * The following signals may be emitted by the label widget: - * @li "language,changed": The program's language changed. - * - * See @ref tutorial_label for a demonstration of how to use a label widget. - * @{ - */ +/** + * @defgroup Label Label + * + * @image html img/widget/label/preview-00.png + * @image latex img/widget/label/preview-00.eps + * + * @brief Widget to display text, with simple html-like markup. + * + * 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 styles 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. + * + * Custom themes can of course invent new markup tags and style them any way + * they like. + * + * The following signals may be emitted by the label widget: + * @li "language,changed": The program's language changed. + * + * See @ref tutorial_label for a demonstration of how to use a label widget. + * @{ + */ - /** - * @brief Add a new label to the parent - * - * @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); +/** + * @brief Add a new label to the parent + * + * @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); - /** - * @brief Set the label on the label object - * - * @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); +/** + * @brief Set the label on the label object + * + * @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); - /** - * @brief Get the label used on the label object - * - * @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); +/** + * @brief Get the label used on the label object + * + * @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); - /** - * @brief Set the wrapping behavior of the label - * - * @param obj The label object - * @param wrap To wrap text or not - * - * By default no wrapping is done. Possible values for @p wrap are: - * @li ELM_WRAP_NONE - No wrapping - * @li ELM_WRAP_CHAR - wrap between characters - * @li ELM_WRAP_WORD - wrap between words - * @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap - */ - EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); +/** + * @brief Set the wrapping behavior of the label + * + * @param obj The label object + * @param wrap To wrap text or not + * + * By default no wrapping is done. Possible values for @p wrap are: + * @li ELM_WRAP_NONE - No wrapping + * @li ELM_WRAP_CHAR - wrap between characters + * @li ELM_WRAP_WORD - wrap between words + * @li ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap + */ +EAPI void elm_label_line_wrap_set(Evas_Object *obj, Elm_Wrap_Type wrap) EINA_ARG_NONNULL(1); - /** - * @brief Get the wrapping behavior of the label - * - * @param obj The label object - * @return Wrap type - * - * @see elm_label_line_wrap_set() - */ - EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the wrapping behavior of the label + * + * @param obj The label object + * @return Wrap type + * + * @see elm_label_line_wrap_set() + */ +EAPI Elm_Wrap_Type elm_label_line_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set wrap width of the label - * - * @param obj The label object - * @param w The wrap width in pixels at a minimum where words need to wrap - * - * This function sets the maximum width size hint of the label. - * - * @warning This is only relevant if the label is inside a container. - */ - EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w) EINA_ARG_NONNULL(1); +/** + * @brief Set wrap width of the label + * + * @param obj The label object + * @param w The wrap width in pixels at a minimum where words need to wrap + * + * This function sets the maximum width size hint of the label. + * + * @warning This is only relevant if the label is inside a container. + */ +EAPI void elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w) EINA_ARG_NONNULL(1); - /** - * @brief Get wrap width of the label - * - * @param obj The label object - * @return The wrap width in pixels at a minimum where words need to wrap - * - * @see elm_label_wrap_width_set() - */ - EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get wrap width of the label + * + * @param obj The label object + * @return The wrap width in pixels at a minimum where words need to wrap + * + * @see elm_label_wrap_width_set() + */ +EAPI Evas_Coord elm_label_wrap_width_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set wrap height of the label - * - * @param obj The label object - * @param h The wrap height in pixels at a minimum where words need to wrap - * - * This function sets the maximum height size hint of the label. - * - * @warning This is only relevant if the label is inside a container. - */ - EAPI void elm_label_wrap_height_set(Evas_Object *obj, Evas_Coord h) EINA_ARG_NONNULL(1); +/** + * @brief Set wrap height of the label + * + * @param obj The label object + * @param h The wrap height in pixels at a minimum where words need to wrap + * + * This function sets the maximum height size hint of the label. + * + * @warning This is only relevant if the label is inside a container. + */ +EAPI void elm_label_wrap_height_set(Evas_Object *obj, Evas_Coord h) EINA_ARG_NONNULL(1); - /** - * @brief get wrap width of the label - * - * @param obj The label object - * @return The wrap height in pixels at a minimum where words need to wrap - */ - EAPI Evas_Coord elm_label_wrap_height_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief get wrap width of the label + * + * @param obj The label object + * @return The wrap height in pixels at a minimum where words need to wrap + */ +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. - * - * @param obj The label object - * @param size font size - * - * @warning NEVER use this. It is for hyper-special cases only. use styles - * instead. e.g. "default", "marker", "slide_long" etc. - */ - EAPI void elm_label_fontsize_set(Evas_Object *obj, int fontsize) EINA_ARG_NONNULL(1); +/** + * @brief Set the font size on the label object. + * + * @param obj The label object + * @param size font size + * + * @warning NEVER use this. It is for hyper-special cases only. use styles + * instead. e.g. "default", "marker", "slide_long" etc. + */ +EAPI void elm_label_fontsize_set(Evas_Object *obj, int fontsize) EINA_ARG_NONNULL(1); - /** - * @brief Set the text color on the label object - * - * @param obj The label object - * @param r Red property background color of The label object - * @param g Green property background color of The label object - * @param b Blue property background color of The label object - * @param a Alpha property background color of The label object - * - * @warning NEVER use this. It is for hyper-special cases only. use styles - * instead. e.g. "default", "marker", "slide_long" etc. - */ - 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); +/** + * @brief Set the text color on the label object + * + * @param obj The label object + * @param r Red property background color of The label object + * @param g Green property background color of The label object + * @param b Blue property background color of The label object + * @param a Alpha property background color of The label object + * + * @warning NEVER use this. It is for hyper-special cases only. use styles + * instead. e.g. "default", "marker", "slide_long" etc. + */ +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); - /** - * @brief Set the text align on the label object - * - * @param obj The label object - * @param align align mode ("left", "center", "right") - * - * @warning NEVER use this. It is for hyper-special cases only. use styles - * instead. e.g. "default", "marker", "slide_long" etc. - */ - EAPI void elm_label_text_align_set(Evas_Object *obj, const char *alignmode) EINA_ARG_NONNULL(1); +/** + * @brief Set the text align on the label object + * + * @param obj The label object + * @param align align mode ("left", "center", "right") + * + * @warning NEVER use this. It is for hyper-special cases only. use styles + * instead. e.g. "default", "marker", "slide_long" 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 - * - * @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 - * - * @warning NEVER use this. It is for hyper-special cases only. use styles - * instead. e.g. "default", "marker", "slide_long" etc. - */ - 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); +/** + * @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 + * + * @warning NEVER use this. It is for hyper-special cases only. use styles + * instead. e.g. "default", "marker", "slide_long" etc. + */ +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); - /** - * @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 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 - * - * @param obj The label object - * @param slide To start slide or stop - * - * If set to true, the text of the label will slide/scroll through the length of - * label. - * - * @warning This only works 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 Set the text slide of the label + * + * @param obj The label object + * @param slide To start slide or stop + * + * If set to true, the text of the label will slide/scroll through the length of + * label. + * + * @warning This only works 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 - * - * @param obj The label object - * @return slide slide mode value - * - * @see elm_label_slide_set() - */ - EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the text slide mode of the label + * + * @param obj The label object + * @return slide slide mode value + * + * @see elm_label_slide_set() + */ +EAPI Eina_Bool elm_label_slide_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the slide duration(speed) of the label - * - * @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 Set the slide duration(speed) of the label + * + * @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 - * - * @param obj The label object - * @return The duration time in moving text from slide begin position to slide end position - * - * @see elm_label_slide_duration_set() - */ - EAPI double elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the slide duration(speed) of the label + * + * @param obj The label object + * @return The duration time in moving text from slide begin position to slide end position + * + * @see elm_label_slide_duration_set() + */ +EAPI double elm_label_slide_duration_get(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_layout.h b/legacy/elementary/src/lib/elm_layout.h index 13d992f058..425180610c 100644 --- a/legacy/elementary/src/lib/elm_layout.h +++ b/legacy/elementary/src/lib/elm_layout.h @@ -1,642 +1,644 @@ - /** - * @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_object_content_set/get/unset 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 controlled 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 - * controlled 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 - * controlled 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_object_part_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 - * - */ +/** + * @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_object_content_set/get/unset 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 controlled 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 + * controlled 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 + * controlled 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_object_part_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); +/** + * 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 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 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_object_part_content_unset() function. - * - * @note In an Edje theme, the part used as a content container is called @c - * SWALLOW. This is why the parameter name is called @p swallow, but it is - * expected to be a part name just like the second parameter of - * elm_layout_box_append(). - * - * @see elm_layout_box_append() - * @see elm_object_part_content_get() - * @see elm_object_part_content_unset() - * @see @ref secBox - * @deprecated use elm_object_part_content_set() instead - * - * @ingroup Layout - */ - EINA_DEPRECATED EAPI void elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the layout content. + * + * @param obj The layout object + * @param swallow The swallow part name in the edje file + * @param content The child that will be added in this layout object + * + * Once the content object is set, a previously set one will be deleted. + * If you want to keep that old content object, use the + * elm_object_part_content_unset() function. + * + * @note In an Edje theme, the part used as a content container is called @c + * SWALLOW. This is why the parameter name is called @p swallow, but it is + * expected to be a part name just like the second parameter of + * elm_layout_box_append(). + * + * @see elm_layout_box_append() + * @see elm_object_part_content_get() + * @see elm_object_part_content_unset() + * @see @ref secBox + * @deprecated use elm_object_part_content_set() instead + * + * @ingroup Layout + */ +EINA_DEPRECATED EAPI void elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Get the child object in the given content part. - * - * @param obj The layout object - * @param swallow The SWALLOW part to get its content - * - * @return The swallowed object or NULL if none or an error occurred - * - * @deprecated use elm_object_part_content_get() instead - * - * @ingroup Layout - */ - EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1); +/** + * Get the child object in the given content part. + * + * @param obj The layout object + * @param swallow The SWALLOW part to get its content + * + * @return The swallowed object or NULL if none or an error occurred + * + * @deprecated use elm_object_part_content_get() instead + * + * @ingroup Layout + */ +EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1); - /** - * Unset the layout content. - * - * @param obj The layout object - * @param swallow The swallow part name in the edje file - * @return The content that was being used - * - * Unparent and return the content object which was set for this part. - * - * @deprecated use elm_object_part_content_unset() instead - * - * @ingroup Layout - */ - EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1); +/** + * Unset the layout content. + * + * @param obj The layout object + * @param swallow The swallow part name in the edje file + * @return The content that was being used + * + * Unparent and return the content object which was set for this part. + * + * @deprecated use elm_object_part_content_unset() instead + * + * @ingroup Layout + */ +EINA_DEPRECATED EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow) EINA_ARG_NONNULL(1); - /** - * Set the text of the given part - * - * @param obj The layout object - * @param part The TEXT part where to set the text - * @param text The text to set - * - * @ingroup Layout - * @deprecated use elm_object_part_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_layout_text_set(Evas_Object *obj, const char *part, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the text of the given part + * + * @param obj The layout object + * @param part The TEXT part where to set the text + * @param text The text to set + * + * @ingroup Layout + * @deprecated use elm_object_part_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_layout_text_set(Evas_Object *obj, const char *part, const char *text) EINA_ARG_NONNULL(1); - /** - * Get the text set in the given part - * - * @param obj The layout object - * @param part The TEXT part to retrieve the text off - * - * @return The text set in @p part - * - * @ingroup Layout - * @deprecated use elm_object_part_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part) EINA_ARG_NONNULL(1); +/** + * Get the text set in the given part + * + * @param obj The layout object + * @param part The TEXT part to retrieve the text off + * + * @return The text set in @p part + * + * @ingroup Layout + * @deprecated use elm_object_part_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part) EINA_ARG_NONNULL(1); - /** - * 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); +/** + * 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); +/** + * 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 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); +/** + * 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_object_part_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 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_object_part_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 children 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); +/** + * Remove all children 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); +/** + * 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_object_part_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); +/** + * 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_object_part_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 the child objects 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); +/** + * Remove all the child objects 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_object_part_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_part_text_set() - * @see elm_object_part_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 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_object_part_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_part_text_set() + * @see elm_object_part_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); +/** + * 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); +/** + * 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); - /** - * Sets a specific cursor for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param cursor cursor name to use, see Elementary_Cursor.h - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it has "mouse_events: 0". - * - * @ingroup Layout - */ - EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor) EINA_ARG_NONNULL(1, 2); +/** + * Sets a specific cursor for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param cursor cursor name to use, see Elementary_Cursor.h + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it has "mouse_events: 0". + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor) EINA_ARG_NONNULL(1, 2); - /** - * Get the cursor to be shown when mouse is over an edje part - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @return the cursor name. - * - * @ingroup Layout - */ - EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); +/** + * Get the cursor to be shown when mouse is over an edje part + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @return the cursor name. + * + * @ingroup Layout + */ +EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); - /** - * Unsets a cursor previously set with elm_layout_part_cursor_set(). - * - * @param obj The layout object. - * @param part_name a part from loaded edje group, that had a cursor set - * with elm_layout_part_cursor_set(). - * - * @ingroup Layout - */ - EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); +/** + * Unsets a cursor previously set with elm_layout_part_cursor_set(). + * + * @param obj The layout object. + * @param part_name a part from loaded edje group, that had a cursor set + * with elm_layout_part_cursor_set(). + * + * @ingroup Layout + */ +EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); - /** - * Sets a specific cursor style for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param style the theme style to use (default, transparent, ...) - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it did not had a cursor set. - * - * @ingroup Layout - */ - EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style) EINA_ARG_NONNULL(1, 2); +/** + * Sets a specific cursor style for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param style the theme style to use (default, transparent, ...) + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it did not had a cursor set. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style) EINA_ARG_NONNULL(1, 2); - /** - * Gets a specific cursor style for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * - * @return the theme style in use, defaults to "default". If the - * object does not have a cursor set, then NULL is returned. - * - * @ingroup Layout - */ - EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); +/** + * Gets a specific cursor style for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * + * @return the theme style in use, defaults to "default". If the + * object does not have a cursor set, then NULL is returned. + * + * @ingroup Layout + */ +EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name) EINA_ARG_NONNULL(1, 2); - /** - * Sets if the cursor set should be searched on the theme or should use - * the provided by the engine, only. - * - * @note before you set if should look on theme you should define a - * cursor with elm_layout_part_cursor_set(). By default it will only - * look for cursors provided by the engine. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param engine_only if cursors should be just provided by the engine (EINA_TRUE) - * or should also search on widget's theme as well (EINA_FALSE) - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it did not had a cursor set. - * - * @ingroup Layout - */ - EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only) EINA_ARG_NONNULL(1, 2); +/** + * Sets if the cursor set should be searched on the theme or should use + * the provided by the engine, only. + * + * @note before you set if should look on theme you should define a + * cursor with elm_layout_part_cursor_set(). By default it will only + * look for cursors provided by the engine. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param engine_only if cursors should be just provided by the engine (EINA_TRUE) + * or should also search on widget's theme as well (EINA_FALSE) + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it did not had a cursor set. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only) 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); +/** + * 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 @@ -645,14 +647,14 @@ * * @ingroup Layout */ -#define elm_layout_icon_set(_ly, _obj) \ - do { \ - const char *sig; \ - elm_object_part_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) +#define elm_layout_icon_set(_ly, _obj) \ + do { \ + const char *sig; \ + elm_object_part_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 @@ -671,14 +673,14 @@ * * @ingroup Layout */ -#define elm_layout_end_set(_ly, _obj) \ - do { \ - const char *sig; \ - elm_object_part_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) +#define elm_layout_end_set(_ly, _obj) \ + do { \ + const char *sig; \ + elm_object_part_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 @@ -712,10 +714,10 @@ #define elm_layout_label_get(_ly) \ elm_layout_text_get((_ly), "elm.text") - /* smart callbacks called: - * "theme,changed" - when elm theme is changed. - */ +/* smart callbacks called: + * "theme,changed" - when elm theme is changed. + */ - /** - * @} - */ +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_list.h b/legacy/elementary/src/lib/elm_list.h index 65bd97733f..a290988aca 100644 --- a/legacy/elementary/src/lib/elm_list.h +++ b/legacy/elementary/src/lib/elm_list.h @@ -1,1194 +1,1195 @@ - /** - * @defgroup List List - * @ingroup Elementary - * - * @image html img/widget/list/preview-00.png - * @image latex img/widget/list/preview-00.eps width=\textwidth - * - * @image html img/list.png - * @image latex img/list.eps width=\textwidth - * - * A list widget is a container whose children are displayed vertically or - * horizontally, in order, and can be selected. - * The list can accept only one or multiple items selection. Also has many - * modes of items displaying. - * - * A list is a very simple type of list widget. For more robust - * lists, @ref Genlist should probably be used. - * - * Smart callbacks one can listen to: - * - @c "activated" - The user has double-clicked or pressed - * (enter|return|spacebar) on an item. The @c event_info parameter - * is the item that was activated. - * - @c "clicked,double" - The user has double-clicked an item. - * The @c event_info parameter is the item that was double-clicked. - * - "selected" - when the user selected an item - * - "unselected" - when the user unselected an item - * - "longpressed" - an item in the list is long-pressed - * - "edge,top" - the list is scrolled until the top edge - * - "edge,bottom" - the list is scrolled until the bottom edge - * - "edge,left" - the list is scrolled until the left edge - * - "edge,right" - the list is scrolled until the right edge - * - "language,changed" - the program's language changed - * - * Available styles for it: - * - @c "default" - * - * List of examples: - * @li @ref list_example_01 - * @li @ref list_example_02 - * @li @ref list_example_03 - */ +/** + * @defgroup List List + * @ingroup Elementary + * + * @image html img/widget/list/preview-00.png + * @image latex img/widget/list/preview-00.eps width=\textwidth + * + * @image html img/list.png + * @image latex img/list.eps width=\textwidth + * + * A list widget is a container whose children are displayed vertically or + * horizontally, in order, and can be selected. + * The list can accept only one or multiple items selection. Also has many + * modes of items displaying. + * + * A list is a very simple type of list widget. For more robust + * lists, @ref Genlist should probably be used. + * + * Smart callbacks one can listen to: + * - @c "activated" - The user has double-clicked or pressed + * (enter|return|spacebar) on an item. The @c event_info parameter + * is the item that was activated. + * - @c "clicked,double" - The user has double-clicked an item. + * The @c event_info parameter is the item that was double-clicked. + * - "selected" - when the user selected an item + * - "unselected" - when the user unselected an item + * - "longpressed" - an item in the list is long-pressed + * - "edge,top" - the list is scrolled until the top edge + * - "edge,bottom" - the list is scrolled until the bottom edge + * - "edge,left" - the list is scrolled until the left edge + * - "edge,right" - the list is scrolled until the right edge + * - "language,changed" - the program's language changed + * + * Available styles for it: + * - @c "default" + * + * List of examples: + * @li @ref list_example_01 + * @li @ref list_example_02 + * @li @ref list_example_03 + */ - /** - * @addtogroup List - * @{ - */ +/** + * @addtogroup List + * @{ + */ - /** - * @enum _Elm_List_Mode - * @typedef Elm_List_Mode - * - * Set list's resize behavior, transverse axis scroll and - * items cropping. See each mode's description for more details. - * - * @note Default value is #ELM_LIST_SCROLL. - * - * Values don't work as bitmask, only one can be choosen. - * - * @see elm_list_mode_set() - * @see elm_list_mode_get() - * - * @ingroup List - */ - typedef enum _Elm_List_Mode - { - ELM_LIST_COMPRESS = 0, /**< Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction. */ - ELM_LIST_SCROLL, /**< Default value. Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction (large items will get cropped). */ - ELM_LIST_LIMIT, /**< Set a minimun size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a minimum size hint will be set for its transverse axis, so that the @b largest item in that direction fits well. Can have effects bounded by setting the list object's maximum size hints. */ - ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like the previous mode, will set a minimum size on the longitudinal axis too, trying to reserve space to all its children to be visible at a time. Can have effects bounded by setting the list object's maximum size hints. */ - ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */ - } Elm_List_Mode; +/** + * @enum _Elm_List_Mode + * @typedef Elm_List_Mode + * + * Set list's resize behavior, transverse axis scroll and + * items cropping. See each mode's description for more details. + * + * @note Default value is #ELM_LIST_SCROLL. + * + * Values don't work as bitmask, only one can be choosen. + * + * @see elm_list_mode_set() + * @see elm_list_mode_get() + * + * @ingroup List + */ +typedef enum _Elm_List_Mode +{ + ELM_LIST_COMPRESS = 0, /**< Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction. */ + ELM_LIST_SCROLL, /**< Default value. Won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zero dimensions. The list will respect the container's geometry and, if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction (large items will get cropped). */ + ELM_LIST_LIMIT, /**< Set a minimun size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a minimum size hint will be set for its transverse axis, so that the @b largest item in that direction fits well. Can have effects bounded by setting the list object's maximum size hints. */ + ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like the previous mode, will set a minimum size on the longitudinal axis too, trying to reserve space to all its children to be visible at a time. Can have effects bounded by setting the list object's maximum size hints. */ + ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */ +} Elm_List_Mode; - typedef struct _Elm_List_Item Elm_List_Item; /**< Item of Elm_List. Sub-type of Elm_Widget_Item. Can be created with elm_list_item_append(), elm_list_item_prepend() and functions to add items in relative positions, like elm_list_item_insert_before(), and deleted with elm_list_item_del(). */ +typedef struct _Elm_List_Item Elm_List_Item; /**< Item of Elm_List. Sub-type of Elm_Widget_Item. Can be created with elm_list_item_append(), elm_list_item_prepend() and functions to add items in relative positions, like elm_list_item_insert_before(), and deleted with elm_list_item_del(). */ - /** - * Add a new list widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new list widget handle or @c NULL, on errors. - * - * This function inserts a new list widget on the canvas. - * - * @ingroup List - */ - EAPI Evas_Object *elm_list_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new list widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new list widget handle or @c NULL, on errors. + * + * This function inserts a new list widget on the canvas. + * + * @ingroup List + */ +EAPI Evas_Object * + elm_list_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Starts the list. - * - * @param obj The list object - * - * @note Call before running show() on the list object. - * @warning If not called, it won't display the list properly. - * - * @code - * li = elm_list_add(win); - * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL); - * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL); - * elm_list_go(li); - * evas_object_show(li); - * @endcode - * - * @ingroup List - */ - EAPI void elm_list_go(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Starts the list. + * + * @param obj The list object + * + * @note Call before running show() on the list object. + * @warning If not called, it won't display the list properly. + * + * @code + * li = elm_list_add(win); + * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL); + * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL); + * elm_list_go(li); + * evas_object_show(li); + * @endcode + * + * @ingroup List + */ +EAPI void elm_list_go(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable multiple items selection on the list object. - * - * @param obj The list object - * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to - * disable it. - * - * Disabled by default. If disabled, the user can select a single item of - * the list each time. Selected items are highlighted on list. - * If enabled, many items can be selected. - * - * If a selected item is selected again, it will be unselected. - * - * @see elm_list_multi_select_get() - * - * @ingroup List - */ - EAPI void elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1); +/** + * Enable or disable multiple items selection on the list object. + * + * @param obj The list object + * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to + * disable it. + * + * Disabled by default. If disabled, the user can select a single item of + * the list each time. Selected items are highlighted on list. + * If enabled, many items can be selected. + * + * If a selected item is selected again, it will be unselected. + * + * @see elm_list_multi_select_get() + * + * @ingroup List + */ +EAPI void elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi) EINA_ARG_NONNULL(1); - /** - * Get a value whether multiple items selection is enabled or not. - * - * @see elm_list_multi_select_set() for details. - * - * @param obj The list object. - * @return @c EINA_TRUE means multiple items selection is enabled. - * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, - * @c EINA_FALSE is returned. - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether multiple items selection is enabled or not. + * + * @see elm_list_multi_select_set() for details. + * + * @param obj The list object. + * @return @c EINA_TRUE means multiple items selection is enabled. + * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, + * @c EINA_FALSE is returned. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_multi_select_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set which mode to use for the list object. - * - * @param obj The list object - * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, - * #ELM_LIST_LIMIT or #ELM_LIST_EXPAND. - * - * Set list's resize behavior, transverse axis scroll and - * items cropping. See each mode's description for more details. - * - * @note Default value is #ELM_LIST_SCROLL. - * - * Only one can be set, if a previous one was set, it will be changed - * by the new mode set. Bitmask won't work as well. - * - * @see elm_list_mode_get() - * - * @ingroup List - */ - EAPI void elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); +/** + * Set which mode to use for the list object. + * + * @param obj The list object + * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, + * #ELM_LIST_LIMIT or #ELM_LIST_EXPAND. + * + * Set list's resize behavior, transverse axis scroll and + * items cropping. See each mode's description for more details. + * + * @note Default value is #ELM_LIST_SCROLL. + * + * Only one can be set, if a previous one was set, it will be changed + * by the new mode set. Bitmask won't work as well. + * + * @see elm_list_mode_get() + * + * @ingroup List + */ +EAPI void elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1); - /** - * Get the mode the list is at. - * - * @param obj The list object - * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, - * #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors. - * - * @note see elm_list_mode_set() for more information. - * - * @ingroup List - */ - EAPI Elm_List_Mode elm_list_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the mode the list is at. + * + * @param obj The list object + * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, + * #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors. + * + * @note see elm_list_mode_set() for more information. + * + * @ingroup List + */ +EAPI Elm_List_Mode elm_list_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable horizontal mode on the list object. - * - * @param obj The list object. - * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to - * disable it, i.e., to enable vertical mode. - * - * @note Vertical mode is set by default. - * - * On horizontal mode items are displayed on list from left to right, - * instead of from top to bottom. Also, the list will scroll horizontally. - * Each item will presents left icon on top and right icon, or end, at - * the bottom. - * - * @see elm_list_horizontal_get() - * - * @ingroup List - */ - EAPI void elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * Enable or disable horizontal mode on the list object. + * + * @param obj The list object. + * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to + * disable it, i.e., to enable vertical mode. + * + * @note Vertical mode is set by default. + * + * On horizontal mode items are displayed on list from left to right, + * instead of from top to bottom. Also, the list will scroll horizontally. + * Each item will presents left icon on top and right icon, or end, at + * the bottom. + * + * @see elm_list_horizontal_get() + * + * @ingroup List + */ +EAPI void elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * Get a value whether horizontal mode is enabled or not. - * - * @param obj The list object. - * @return @c EINA_TRUE means horizontal mode selection is enabled. - * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, - * @c EINA_FALSE is returned. - * - * @see elm_list_horizontal_set() for details. - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether horizontal mode is enabled or not. + * + * @param obj The list object. + * @return @c EINA_TRUE means horizontal mode selection is enabled. + * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, + * @c EINA_FALSE is returned. + * + * @see elm_list_horizontal_set() for details. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable always select mode on the list object. - * - * @param obj The list object - * @param always_select @c EINA_TRUE to enable always select mode or - * @c EINA_FALSE to disable it. - * - * @note Always select mode is disabled by default. - * - * Default behavior of list items is to only call its callback function - * the first time it's pressed, i.e., when it is selected. If a selected - * item is pressed again, and multi-select is disabled, it won't call - * this function (if multi-select is enabled it will unselect the item). - * - * If always select is enabled, it will call the callback function - * everytime a item is pressed, so it will call when the item is selected, - * and again when a selected item is pressed. - * - * @see elm_list_always_select_mode_get() - * @see elm_list_multi_select_set() - * - * @ingroup List - */ - EAPI void elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1); +/** + * Enable or disable always select mode on the list object. + * + * @param obj The list object + * @param always_select @c EINA_TRUE to enable always select mode or + * @c EINA_FALSE to disable it. + * + * @note Always select mode is disabled by default. + * + * Default behavior of list items is to only call its callback function + * the first time it's pressed, i.e., when it is selected. If a selected + * item is pressed again, and multi-select is disabled, it won't call + * this function (if multi-select is enabled it will unselect the item). + * + * If always select is enabled, it will call the callback function + * everytime a item is pressed, so it will call when the item is selected, + * and again when a selected item is pressed. + * + * @see elm_list_always_select_mode_get() + * @see elm_list_multi_select_set() + * + * @ingroup List + */ +EAPI void elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) EINA_ARG_NONNULL(1); - /** - * Get a value whether always select mode is enabled or not, meaning that - * an item will always call its callback function, even if already selected. - * - * @param obj The list object - * @return @c EINA_TRUE means horizontal mode selection is enabled. - * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, - * @c EINA_FALSE is returned. - * - * @see elm_list_always_select_mode_set() for details. - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_always_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether always select mode is enabled or not, meaning that + * an item will always call its callback function, even if already selected. + * + * @param obj The list object + * @return @c EINA_TRUE means horizontal mode selection is enabled. + * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, + * @c EINA_FALSE is returned. + * + * @see elm_list_always_select_mode_set() for details. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_always_select_mode_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 - * when it reaches the respective edges for each axis. - * - * @param obj The list 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() - * - * @ingroup List - */ - EAPI void elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 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 + * when it reaches the respective edges for each axis. + * + * @param obj The list 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() + * + * @ingroup List + */ +EAPI void elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - /** - * Get the 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 list 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() - * @see elm_list_bounce_set() - * - * @ingroup List - */ - EAPI void elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); +/** + * Get the 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 list 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() + * @see elm_list_bounce_set() + * + * @ingroup List + */ +EAPI void elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - /** - * Set the scrollbar policy. - * - * @param obj The list object - * @param policy_h Horizontal scrollbar policy. - * @param policy_v Vertical scrollbar policy. - * - * 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. - * - * The both are disabled by default, i.e., are set to - * #ELM_SCROLLER_POLICY_OFF. - * - * @ingroup List - */ - EAPI void elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); +/** + * Set the scrollbar policy. + * + * @param obj The list object + * @param policy_h Horizontal scrollbar policy. + * @param policy_v Vertical scrollbar policy. + * + * 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. + * + * The both are disabled by default, i.e., are set to + * #ELM_SCROLLER_POLICY_OFF. + * + * @ingroup List + */ +EAPI void elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); - /** - * Get the scrollbar policy. - * - * @see elm_list_scroller_policy_get() for details. - * - * @param obj The list object. - * @param policy_h Pointer where to store horizontal scrollbar policy. - * @param policy_v Pointer where to store vertical scrollbar policy. - * - * @ingroup List - */ - EAPI void elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); +/** + * Get the scrollbar policy. + * + * @see elm_list_scroller_policy_get() for details. + * + * @param obj The list object. + * @param policy_h Pointer where to store horizontal scrollbar policy. + * @param policy_v Pointer where to store vertical scrollbar policy. + * + * @ingroup List + */ +EAPI void elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); - /** - * Append a new item to the list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the list, i.e., will - * be set as @b last item. - * - * Items created with this method can be deleted with - * elm_list_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Simple example (with no function callback or data associated): - * @code - * li = elm_list_add(win); - * ic = elm_icon_add(win); - * elm_icon_file_set(ic, "path/to/image", NULL); - * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); - * elm_list_item_append(li, "label", ic, NULL, NULL, NULL); - * elm_list_go(li); - * evas_object_show(li); - * @endcode - * - * @see elm_list_always_select_mode_set() - * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * Append a new item to the list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the list, i.e., will + * be set as @b last item. + * + * Items created with this method can be deleted with + * elm_list_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_list_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Simple example (with no function callback or data associated): + * @code + * li = elm_list_add(win); + * ic = elm_icon_add(win); + * elm_icon_file_set(ic, "path/to/image", NULL); + * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); + * elm_list_item_append(li, "label", ic, NULL, NULL, NULL); + * elm_list_go(li); + * evas_object_show(li); + * @endcode + * + * @see elm_list_always_select_mode_set() + * @see elm_list_item_del() + * @see elm_list_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - /** - * Prepend a new item to the list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and prepended to the list, i.e., will - * be set as @b first item. - * - * Items created with this method can be deleted with - * elm_list_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_always_select_mode_set() - * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * Prepend a new item to the list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and prepended to the list, i.e., will + * be set as @b first item. + * + * Items created with this method can be deleted with + * elm_list_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_list_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_always_select_mode_set() + * @see elm_list_item_del() + * @see elm_list_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - /** - * Insert a new item into the list object before item @p before. - * - * @param obj The list object. - * @param before The list item to insert before. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the list. Its position in - * this list will be just before item @p before. - * - * Items created with this method can be deleted with - * elm_list_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_always_select_mode_set() - * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +/** + * Insert a new item into the list object before item @p before. + * + * @param obj The list object. + * @param before The list item to insert before. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the list. Its position in + * this list will be just before item @p before. + * + * Items created with this method can be deleted with + * elm_list_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_list_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_always_select_mode_set() + * @see elm_list_item_del() + * @see elm_list_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); - /** - * Insert a new item into the list object after item @p after. - * - * @param obj The list object. - * @param after The list item to insert after. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the list. Its position in - * this list will be just after item @p after. - * - * Items created with this method can be deleted with - * elm_list_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_always_select_mode_set() - * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +/** + * Insert a new item into the list object after item @p after. + * + * @param obj The list object. + * @param after The list item to insert after. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the list. Its position in + * this list will be just after item @p after. + * + * Items created with this method can be deleted with + * elm_list_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_list_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_always_select_mode_set() + * @see elm_list_item_del() + * @see elm_list_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); - /** - * Insert a new item into the sorted list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @param cmp_func The comparing function to be used to sort list - * items by #Elm_List_Item item handles. This function will - * receive two items and compare them, returning a non-negative integer - * if the second item should be place after the first, or negative value - * if should be placed before. - * - * @return The created item or @c NULL upon failure. - * - * @note This function inserts values into a list object assuming it was - * sorted and the result will be sorted. - * - * A new item will be created and added to the list. Its position in - * this list will be found comparing the new item with previously inserted - * items using function @p cmp_func. - * - * Items created with this method can be deleted with - * elm_list_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_list_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_always_select_mode_set() - * @see elm_list_item_del() - * @see elm_list_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func) EINA_ARG_NONNULL(1); +/** + * Insert a new item into the sorted list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @param cmp_func The comparing function to be used to sort list + * items by #Elm_List_Item item handles. This function will + * receive two items and compare them, returning a non-negative integer + * if the second item should be place after the first, or negative value + * if should be placed before. + * + * @return The created item or @c NULL upon failure. + * + * @note This function inserts values into a list object assuming it was + * sorted and the result will be sorted. + * + * A new item will be created and added to the list. Its position in + * this list will be found comparing the new item with previously inserted + * items using function @p cmp_func. + * + * Items created with this method can be deleted with + * elm_list_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_list_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_always_select_mode_set() + * @see elm_list_item_del() + * @see elm_list_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func) EINA_ARG_NONNULL(1); - /** - * Remove all list's items. - * - * @param obj The list object - * - * @see elm_list_item_del() - * @see elm_list_item_append() - * - * @ingroup List - */ - EAPI void elm_list_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove all list's items. + * + * @param obj The list object + * + * @see elm_list_item_del() + * @see elm_list_item_append() + * + * @ingroup List + */ +EAPI void elm_list_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get a list of all the list items. - * - * @param obj The list object - * @return An @c Eina_List of list items, #Elm_List_Item, - * or @c NULL on failure. - * - * @see elm_list_item_append() - * @see elm_list_item_del() - * @see elm_list_clear() - * - * @ingroup List - */ - EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a list of all the list items. + * + * @param obj The list object + * @return An @c Eina_List of list items, #Elm_List_Item, + * or @c NULL on failure. + * + * @see elm_list_item_append() + * @see elm_list_item_del() + * @see elm_list_clear() + * + * @ingroup List + */ +EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the selected item. - * - * @param obj The list object. - * @return The selected list item. - * - * The selected item can be unselected with function - * elm_list_item_selected_set(). - * - * The selected item always will be highlighted on list. - * - * @see elm_list_selected_items_get() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the selected item. + * + * @param obj The list object. + * @return The selected list item. + * + * The selected item can be unselected with function + * elm_list_item_selected_set(). + * + * The selected item always will be highlighted on list. + * + * @see elm_list_selected_items_get() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Return a list of the currently selected list items. - * - * @param obj The list object. - * @return An @c Eina_List of list items, #Elm_List_Item, - * or @c NULL on failure. - * - * Multiple items can be selected if multi select is enabled. It can be - * done with elm_list_multi_select_set(). - * - * @see elm_list_selected_item_get() - * @see elm_list_multi_select_set() - * - * @ingroup List - */ - EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Return a list of the currently selected list items. + * + * @param obj The list object. + * @return An @c Eina_List of list items, #Elm_List_Item, + * or @c NULL on failure. + * + * Multiple items can be selected if multi select is enabled. It can be + * done with elm_list_multi_select_set(). + * + * @see elm_list_selected_item_get() + * @see elm_list_multi_select_set() + * + * @ingroup List + */ +EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the selected state of an item. - * - * @param item The list item - * @param selected The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previosly selected will be unselected, - * unless multiple selection is enabled with elm_list_multi_select_set(). - * Previoulsy selected item can be get with function - * elm_list_selected_item_get(). - * - * Selected items will be highlighted. - * - * @see elm_list_item_selected_get() - * @see elm_list_selected_item_get() - * @see elm_list_multi_select_set() - * - * @ingroup List - */ - EAPI void elm_list_item_selected_set(Elm_List_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); +/** + * Set the selected state of an item. + * + * @param item The list item + * @param selected The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previosly selected will be unselected, + * unless multiple selection is enabled with elm_list_multi_select_set(). + * Previoulsy selected item can be get with function + * elm_list_selected_item_get(). + * + * Selected items will be highlighted. + * + * @see elm_list_item_selected_get() + * @see elm_list_selected_item_get() + * @see elm_list_multi_select_set() + * + * @ingroup List + */ +EAPI void elm_list_item_selected_set(Elm_List_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); - /* - * Get whether the @p item is selected or not. - * - * @param item The list item. - * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates - * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_list_selected_item_set() for details. - * @see elm_list_item_selected_get() - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/* + * Get whether the @p item is selected or not. + * + * @param item The list item. + * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates + * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_list_selected_item_set() for details. + * @see elm_list_item_selected_get() + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_selected_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set or unset item as a separator. - * - * @param it The list item. - * @param setting @c EINA_TRUE to set item @p it as separator or - * @c EINA_FALSE to unset, i.e., item will be used as a regular item. - * - * Items aren't set as separator by default. - * - * If set as separator it will display separator theme, so won't display - * icons or label. - * - * @see elm_list_item_separator_get() - * - * @ingroup List - */ - EAPI void elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting) EINA_ARG_NONNULL(1); +/** + * Set or unset item as a separator. + * + * @param it The list item. + * @param setting @c EINA_TRUE to set item @p it as separator or + * @c EINA_FALSE to unset, i.e., item will be used as a regular item. + * + * Items aren't set as separator by default. + * + * If set as separator it will display separator theme, so won't display + * icons or label. + * + * @see elm_list_item_separator_get() + * + * @ingroup List + */ +EAPI void elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting) EINA_ARG_NONNULL(1); - /** - * Get a value whether item is a separator or not. - * - * @see elm_list_item_separator_set() for details. - * - * @param it The list item. - * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE - * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_item_separator_get(const Elm_List_Item *it) EINA_ARG_NONNULL(1); +/** + * Get a value whether item is a separator or not. + * + * @see elm_list_item_separator_set() for details. + * + * @param it The list item. + * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE + * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_separator_get(const Elm_List_Item *it) EINA_ARG_NONNULL(1); - /** - * Show @p item in the list view. - * - * @param item The list item to be shown. - * - * It won't animate list until item is visible. If such behavior is wanted, - * use elm_list_bring_in() intead. - * - * @ingroup List - */ - EAPI void elm_list_item_show(Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Show @p item in the list view. + * + * @param item The list item to be shown. + * + * It won't animate list until item is visible. If such behavior is wanted, + * use elm_list_bring_in() intead. + * + * @ingroup List + */ +EAPI void elm_list_item_show(Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Bring in the given item to list view. - * - * @param item The item. - * - * This causes list to jump to the given item @p item and show it - * (by scrolling), if it is not fully visible. - * - * This may use animation to do so and take a period of time. - * - * If animation isn't wanted, elm_list_item_show() can be used. - * - * @ingroup List - */ - EAPI void elm_list_item_bring_in(Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Bring in the given item to list view. + * + * @param item The item. + * + * This causes list to jump to the given item @p item and show it + * (by scrolling), if it is not fully visible. + * + * This may use animation to do so and take a period of time. + * + * If animation isn't wanted, elm_list_item_show() can be used. + * + * @ingroup List + */ +EAPI void elm_list_item_bring_in(Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Delete them item from the list. - * - * @param item The item of list to be deleted. - * - * If deleting all list items is required, elm_list_clear() - * should be used instead of getting items list and deleting each one. - * - * @see elm_list_clear() - * @see elm_list_item_append() - * @see elm_list_item_del_cb_set() - * - * @ingroup List - */ - EAPI void elm_list_item_del(Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Delete them item from the list. + * + * @param item The item of list to be deleted. + * + * If deleting all list items is required, elm_list_clear() + * should be used instead of getting items list and deleting each one. + * + * @see elm_list_clear() + * @see elm_list_item_append() + * @see elm_list_item_del_cb_set() + * + * @ingroup List + */ +EAPI void elm_list_item_del(Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the function called when a list item is freed. - * - * @param item The item to set the callback on - * @param func The function called - * - * If there is a @p func, then it will be called prior item's memory release. - * That will be called with the following arguments: - * @li item's data; - * @li item's Evas object; - * @li item itself; - * - * This way, a data associated to a list item could be properly freed. - * - * @ingroup List - */ - EAPI void elm_list_item_del_cb_set(Elm_List_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +/** + * Set the function called when a list item is freed. + * + * @param item The item to set the callback on + * @param func The function called + * + * If there is a @p func, then it will be called prior item's memory release. + * That will be called with the following arguments: + * @li item's data; + * @li item's Evas object; + * @li item itself; + * + * This way, a data associated to a list item could be properly freed. + * + * @ingroup List + */ +EAPI void elm_list_item_del_cb_set(Elm_List_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - /** - * Get the data associated to the item. - * - * @param item The list item - * @return The data associated to @p item - * - * The return value is a pointer to data associated to @p item when it was - * created, with function elm_list_item_append() or similar. If no data - * was passed as argument, it will return @c NULL. - * - * @see elm_list_item_append() - * - * @ingroup List - */ - EAPI void *elm_list_item_data_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the data associated to the item. + * + * @param item The list item + * @return The data associated to @p item + * + * The return value is a pointer to data associated to @p item when it was + * created, with function elm_list_item_append() or similar. If no data + * was passed as argument, it will return @c NULL. + * + * @see elm_list_item_append() + * + * @ingroup List + */ +EAPI void *elm_list_item_data_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Get the left side icon associated to the item. - * - * @param item The list item - * @return The left side icon associated to @p item - * - * The return value is a pointer to the icon associated to @p item when - * it was - * created, with function elm_list_item_append() or similar, or later - * with function elm_list_item_icon_set(). If no icon - * was passed as argument, it will return @c NULL. - * - * @see elm_list_item_append() - * @see elm_list_item_icon_set() - * - * @ingroup List - */ - EAPI Evas_Object *elm_list_item_icon_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the left side icon associated to the item. + * + * @param item The list item + * @return The left side icon associated to @p item + * + * The return value is a pointer to the icon associated to @p item when + * it was + * created, with function elm_list_item_append() or similar, or later + * with function elm_list_item_icon_set(). If no icon + * was passed as argument, it will return @c NULL. + * + * @see elm_list_item_append() + * @see elm_list_item_icon_set() + * + * @ingroup List + */ +EAPI Evas_Object *elm_list_item_icon_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the left side icon associated to the item. - * - * @param item The list item - * @param icon The left side icon object to associate with @p item - * - * The icon object to use at left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * - * Once the icon object is set, a previously set one will be deleted. - * @warning Setting the same icon for two items will cause the icon to - * dissapear from the first item. - * - * If an icon was passed as argument on item creation, with function - * elm_list_item_append() or similar, it will be already - * associated to the item. - * - * @see elm_list_item_append() - * @see elm_list_item_icon_get() - * - * @ingroup List - */ - EAPI void elm_list_item_icon_set(Elm_List_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the left side icon associated to the item. + * + * @param item The list item + * @param icon The left side icon object to associate with @p item + * + * The icon object to use at left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * + * Once the icon object is set, a previously set one will be deleted. + * @warning Setting the same icon for two items will cause the icon to + * dissapear from the first item. + * + * If an icon was passed as argument on item creation, with function + * elm_list_item_append() or similar, it will be already + * associated to the item. + * + * @see elm_list_item_append() + * @see elm_list_item_icon_get() + * + * @ingroup List + */ +EAPI void elm_list_item_icon_set(Elm_List_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Get the right side icon associated to the item. - * - * @param item The list item - * @return The right side icon associated to @p item - * - * The return value is a pointer to the icon associated to @p item when - * it was - * created, with function elm_list_item_append() or similar, or later - * with function elm_list_item_icon_set(). If no icon - * was passed as argument, it will return @c NULL. - * - * @see elm_list_item_append() - * @see elm_list_item_icon_set() - * - * @ingroup List - */ - EAPI Evas_Object *elm_list_item_end_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the right side icon associated to the item. + * + * @param item The list item + * @return The right side icon associated to @p item + * + * The return value is a pointer to the icon associated to @p item when + * it was + * created, with function elm_list_item_append() or similar, or later + * with function elm_list_item_icon_set(). If no icon + * was passed as argument, it will return @c NULL. + * + * @see elm_list_item_append() + * @see elm_list_item_icon_set() + * + * @ingroup List + */ +EAPI Evas_Object *elm_list_item_end_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the right side icon associated to the item. - * - * @param item The list item - * @param end The right side icon object to associate with @p item - * - * The icon object to use at right side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * - * Once the icon object is set, a previously set one will be deleted. - * @warning Setting the same icon for two items will cause the icon to - * dissapear from the first item. - * - * If an icon was passed as argument on item creation, with function - * elm_list_item_append() or similar, it will be already - * associated to the item. - * - * @see elm_list_item_append() - * @see elm_list_item_end_get() - * - * @ingroup List - */ - EAPI void elm_list_item_end_set(Elm_List_Item *item, Evas_Object *end) EINA_ARG_NONNULL(1); +/** + * Set the right side icon associated to the item. + * + * @param item The list item + * @param end The right side icon object to associate with @p item + * + * The icon object to use at right side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * + * Once the icon object is set, a previously set one will be deleted. + * @warning Setting the same icon for two items will cause the icon to + * dissapear from the first item. + * + * If an icon was passed as argument on item creation, with function + * elm_list_item_append() or similar, it will be already + * associated to the item. + * + * @see elm_list_item_append() + * @see elm_list_item_end_get() + * + * @ingroup List + */ +EAPI void elm_list_item_end_set(Elm_List_Item *item, Evas_Object *end) EINA_ARG_NONNULL(1); - /** - * Gets the base object of the item. - * - * @param item The list item - * @return The base object associated with @p item - * - * Base object is the @c Evas_Object that represents that item. - * - * @ingroup List - */ - 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); +/** + * Gets the base object of the item. + * + * @param item The list item + * @return The base object associated with @p item + * + * Base object is the @c Evas_Object that represents that item. + * + * @ingroup List + */ +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. - * - * @param item The item of list. - * @return The label of item. - * - * The return value is a pointer to the label associated to @p item when - * it was created, with function elm_list_item_append(), or later - * with function elm_list_item_label_set. If no label - * was passed as argument, it will return @c NULL. - * - * @see elm_list_item_label_set() for more details. - * @see elm_list_item_append() - * - * @ingroup List - */ - EAPI const char *elm_list_item_label_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the label of item. + * + * @param item The item of list. + * @return The label of item. + * + * The return value is a pointer to the label associated to @p item when + * it was created, with function elm_list_item_append(), or later + * with function elm_list_item_label_set. If no label + * was passed as argument, it will return @c NULL. + * + * @see elm_list_item_label_set() for more details. + * @see elm_list_item_append() + * + * @ingroup List + */ +EAPI const char *elm_list_item_label_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the label of item. - * - * @param item The item of list. - * @param text The label of item. - * - * The label to be displayed by the item. - * Label will be placed between left and right side icons (if set). - * - * If a label was passed as argument on item creation, with function - * elm_list_item_append() or similar, it will be already - * displayed by the item. - * - * @see elm_list_item_label_get() - * @see elm_list_item_append() - * - * @ingroup List - */ - EAPI void elm_list_item_label_set(Elm_List_Item *item, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the label of item. + * + * @param item The item of list. + * @param text The label of item. + * + * The label to be displayed by the item. + * Label will be placed between left and right side icons (if set). + * + * If a label was passed as argument on item creation, with function + * elm_list_item_append() or similar, it will be already + * displayed by the item. + * + * @see elm_list_item_label_get() + * @see elm_list_item_append() + * + * @ingroup List + */ +EAPI void elm_list_item_label_set(Elm_List_Item *item, const char *text) EINA_ARG_NONNULL(1); - /** - * Get the item before @p it in list. - * - * @param it The list item. - * @return The item before @p it, or @c NULL if none or on failure. - * - * @note If it is the first item, @c NULL will be returned. - * - * @see elm_list_item_append() - * @see elm_list_items_get() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the item before @p it in list. + * + * @param it The list item. + * @return The item before @p it, or @c NULL if none or on failure. + * + * @note If it is the first item, @c NULL will be returned. + * + * @see elm_list_item_append() + * @see elm_list_items_get() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_prev(const Elm_List_Item *it) EINA_ARG_NONNULL(1); - /** - * Get the item after @p it in list. - * - * @param it The list item. - * @return The item after @p it, or @c NULL if none or on failure. - * - * @note If it is the last item, @c NULL will be returned. - * - * @see elm_list_item_append() - * @see elm_list_items_get() - * - * @ingroup List - */ - EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the item after @p it in list. + * + * @param it The list item. + * @return The item after @p it, or @c NULL if none or on failure. + * + * @note If it is the last item, @c NULL will be returned. + * + * @see elm_list_item_append() + * @see elm_list_items_get() + * + * @ingroup List + */ +EAPI Elm_List_Item *elm_list_item_next(const Elm_List_Item *it) EINA_ARG_NONNULL(1); - /** - * Sets the disabled/enabled state of a list item. - * - * @param it The item. - * @param disabled The disabled state. - * - * A disabled item cannot be selected or unselected. It will also - * change its appearance (generally greyed out). This sets the - * disabled state (@c EINA_TRUE for disabled, @c EINA_FALSE for - * enabled). - * - * @ingroup List - */ - EAPI void elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); +/** + * Sets the disabled/enabled state of a list item. + * + * @param it The item. + * @param disabled The disabled state. + * + * A disabled item cannot be selected or unselected. It will also + * change its appearance (generally greyed out). This sets the + * disabled state (@c EINA_TRUE for disabled, @c EINA_FALSE for + * enabled). + * + * @ingroup List + */ +EAPI void elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); - /** - * Get a value whether list item is disabled or not. - * - * @param it The item. - * @return The disabled state. - * - * @see elm_list_item_disabled_set() for more details. - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_item_disabled_get(const Elm_List_Item *it) EINA_ARG_NONNULL(1); +/** + * Get a value whether list item is disabled or not. + * + * @param it The item. + * @return The disabled state. + * + * @see elm_list_item_disabled_set() for more details. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_disabled_get(const Elm_List_Item *it) EINA_ARG_NONNULL(1); - /** - * Set the text to be shown in a given list item's tooltips. - * - * @param item Target item. - * @param text The text to set in the content. - * - * Setup the text as tooltip to object. The item can have only one tooltip, - * so any previous tooltip data - set with this function or - * elm_list_item_tooltip_content_cb_set() - is removed. - * - * @see elm_object_tooltip_text_set() for more details. - * - * @ingroup List - */ - EAPI void elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text) EINA_ARG_NONNULL(1); +/** + * Set the text to be shown in a given list item's tooltips. + * + * @param item Target item. + * @param text The text to set in the content. + * + * Setup the text as tooltip to object. The item can have only one tooltip, + * so any previous tooltip data - set with this function or + * elm_list_item_tooltip_content_cb_set() - is removed. + * + * @see elm_object_tooltip_text_set() for more details. + * + * @ingroup List + */ +EAPI void elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text) 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_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable) EINA_ARG_NONNULL(1); - /** - * @brief Retrieve size restriction state of an object's tooltip - * @param obj 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_list_item_tooltip_window_mode_get(const Elm_List_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_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable) EINA_ARG_NONNULL(1); +/** + * @brief Retrieve size restriction state of an object's tooltip + * @param obj 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_list_item_tooltip_window_mode_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the content to be shown in the tooltip item. - * - * Setup the tooltip to item. The item can have only one tooltip, - * so any previous tooltip data is removed. @p func(with @p data) will - * be called every time that need show the tooltip and it should - * return a valid Evas_Object. This object is then managed fully by - * tooltip system and is deleted when the tooltip is gone. - * - * @param item the list item being attached a tooltip. - * @param func the function used to create 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 @a func, the tooltip is unset with - * elm_list_item_tooltip_unset() or the owner @a item - * dies. This callback receives as the first parameter the - * given @a data, and @c event_info is the item. - * - * @see elm_object_tooltip_content_cb_set() for more details. - * - * @ingroup List - */ - EAPI void elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); +/** + * Set the content to be shown in the tooltip item. + * + * Setup the tooltip to item. The item can have only one tooltip, + * so any previous tooltip data is removed. @p func(with @p data) will + * be called every time that need show the tooltip and it should + * return a valid Evas_Object. This object is then managed fully by + * tooltip system and is deleted when the tooltip is gone. + * + * @param item the list item being attached a tooltip. + * @param func the function used to create 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 @a func, the tooltip is unset with + * elm_list_item_tooltip_unset() or the owner @a item + * dies. This callback receives as the first parameter the + * given @a data, and @c event_info is the item. + * + * @see elm_object_tooltip_content_cb_set() for more details. + * + * @ingroup List + */ +EAPI void elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); - /** - * Unset tooltip from item. - * - * @param item list item to remove previously set tooltip. - * - * Remove tooltip from item. The callback provided as del_cb to - * elm_list_item_tooltip_content_cb_set() will be called to notify - * it is not used anymore. - * - * @see elm_object_tooltip_unset() for more details. - * @see elm_list_item_tooltip_content_cb_set() - * - * @ingroup List - */ - EAPI void elm_list_item_tooltip_unset(Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Unset tooltip from item. + * + * @param item list item to remove previously set tooltip. + * + * Remove tooltip from item. The callback provided as del_cb to + * elm_list_item_tooltip_content_cb_set() will be called to notify + * it is not used anymore. + * + * @see elm_object_tooltip_unset() for more details. + * @see elm_list_item_tooltip_content_cb_set() + * + * @ingroup List + */ +EAPI void elm_list_item_tooltip_unset(Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Sets a different style for this item tooltip. - * - * @note before you set a style you should define a tooltip with - * elm_list_item_tooltip_content_cb_set() or - * elm_list_item_tooltip_text_set() - * - * @param item list item with tooltip already set. - * @param style the theme style to use (default, transparent, ...) - * - * @see elm_object_tooltip_style_set() for more details. - * - * @ingroup List - */ - EAPI void elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style) EINA_ARG_NONNULL(1); +/** + * Sets a different style for this item tooltip. + * + * @note before you set a style you should define a tooltip with + * elm_list_item_tooltip_content_cb_set() or + * elm_list_item_tooltip_text_set() + * + * @param item list item with tooltip already set. + * @param style the theme style to use (default, transparent, ...) + * + * @see elm_object_tooltip_style_set() for more details. + * + * @ingroup List + */ +EAPI void elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style) EINA_ARG_NONNULL(1); - /** - * Get the style for this item tooltip. - * - * @param item list item with tooltip already set. - * @return style the theme style in use, defaults to "default". If the - * object does not have a tooltip set, then NULL is returned. - * - * @see elm_object_tooltip_style_get() for more details. - * @see elm_list_item_tooltip_style_set() - * - * @ingroup List - */ - EAPI const char *elm_list_item_tooltip_style_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the style for this item tooltip. + * + * @param item list item with tooltip already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a tooltip set, then NULL is returned. + * + * @see elm_object_tooltip_style_get() for more details. + * @see elm_list_item_tooltip_style_set() + * + * @ingroup List + */ +EAPI const char *elm_list_item_tooltip_style_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set the type of mouse pointer/cursor decoration to be shown, - * when the mouse pointer is over the given list widget item - * - * @param item list 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 an - * item with custom cursor set will always show @b that cursor. - * - * 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_list_item_cursor_get() - * @see elm_list_item_cursor_unset() - * - * @ingroup List - */ - EAPI void elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor) EINA_ARG_NONNULL(1); +/** + * Set the type of mouse pointer/cursor decoration to be shown, + * when the mouse pointer is over the given list widget item + * + * @param item list 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 an + * item with custom cursor set will always show @b that cursor. + * + * 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_list_item_cursor_get() + * @see elm_list_item_cursor_unset() + * + * @ingroup List + */ +EAPI void elm_list_item_cursor_set(Elm_List_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 list widget item - * - * @param item list 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_list_item_cursor_set() - * @see elm_list_item_cursor_unset() - * - * @ingroup List - */ - EAPI const char *elm_list_item_cursor_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/* + * Get the type of mouse pointer/cursor decoration set to be shown, + * when the mouse pointer is over the given list widget item + * + * @param item list 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_list_item_cursor_set() + * @see elm_list_item_cursor_unset() + * + * @ingroup List + */ +EAPI const char *elm_list_item_cursor_get(const Elm_List_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 list widget - * item, thus making it show the @b default cursor again. - * - * @param item a list 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_list_item_cursor_set() - * - * @ingroup List - */ - EAPI void elm_list_item_cursor_unset(Elm_List_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 list widget + * item, thus making it show the @b default cursor again. + * + * @param item a list 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_list_item_cursor_set() + * + * @ingroup List + */ +EAPI void elm_list_item_cursor_unset(Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set a different @b style for a given custom cursor set for a - * list item. - * - * @param item list item with custom cursor set - * @param style the theme style to use (e.g. @c "default", - * @c "transparent", etc) - * - * This function only makes sense when one is using custom mouse - * cursor decorations defined in a theme file, which can have, - * given a cursor name/type, alternate styles on it. It - * works analogously as elm_object_cursor_style_set(), but here - * applyed only to list item objects. - * - * @warning Before you set a cursor style you should have definen a - * custom cursor previously on the item, with - * elm_list_item_cursor_set() - * - * @see elm_list_item_cursor_engine_only_set() - * @see elm_list_item_cursor_style_get() - * - * @ingroup List - */ - EAPI void elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style) EINA_ARG_NONNULL(1); +/** + * Set a different @b style for a given custom cursor set for a + * list item. + * + * @param item list item with custom cursor set + * @param style the theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file, which can have, + * given a cursor name/type, alternate styles on it. It + * works analogously as elm_object_cursor_style_set(), but here + * applyed only to list item objects. + * + * @warning Before you set a cursor style you should have definen a + * custom cursor previously on the item, with + * elm_list_item_cursor_set() + * + * @see elm_list_item_cursor_engine_only_set() + * @see elm_list_item_cursor_style_get() + * + * @ingroup List + */ +EAPI void elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style) EINA_ARG_NONNULL(1); - /** - * Get the current @b style set for a given list item's custom - * cursor - * - * @param item list 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_list_item_cursor_style_set() for more details - * - * @ingroup List - */ - EAPI const char *elm_list_item_cursor_style_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * Get the current @b style set for a given list item's custom + * cursor + * + * @param item list 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_list_item_cursor_style_set() for more details + * + * @ingroup List + */ +EAPI const char *elm_list_item_cursor_style_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - /** - * Set if the (custom)cursor for a given list 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 list items, with elm_list_item_cursor_set(). - * - * @note By default, cursors will only be looked for between those - * provided by the rendering engine. - * - * @ingroup List - */ - EAPI void elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); +/** + * Set if the (custom)cursor for a given list 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 list items, with elm_list_item_cursor_set(). + * + * @note By default, cursors will only be looked for between those + * provided by the rendering engine. + * + * @ingroup List + */ +EAPI void elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); - /** - * Get if the (custom) cursor for a given list item is being - * searched in its theme, also, or is only relying on the rendering - * engine. - * - * @param item a list 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_list_item_cursor_engine_only_set(), for more details - * - * @ingroup List - */ - EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get if the (custom) cursor for a given list item is being + * searched in its theme, also, or is only relying on the rendering + * engine. + * + * @param item a list 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_list_item_cursor_engine_only_set(), for more details + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_cursor_engine_only_get(const Elm_List_Item *item) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_map.h b/legacy/elementary/src/lib/elm_map.h index 57290593d0..48e4ea39bb 100644 --- a/legacy/elementary/src/lib/elm_map.h +++ b/legacy/elementary/src/lib/elm_map.h @@ -1,1420 +1,1422 @@ - /** - * @defgroup Map Map - * @ingroup Elementary - * - * @image html img/widget/map/preview-00.png - * @image latex img/widget/map/preview-00.eps - * - * This is a widget specifically for displaying a map. It uses basically - * OpenStreetMap provider http://www.openstreetmap.org/, - * but custom providers can be added. - * - * It supports some basic but yet nice features: - * @li zoom and scroll - * @li markers with content to be displayed when user clicks over it - * @li group of markers - * @li routes - * - * Smart callbacks one can listen to: - * - * - "clicked" - This is called when a user has clicked the map without - * dragging around. - * - "press" - This is called when a user has pressed down on the map. - * - "longpressed" - This is called when a user has pressed down on the map - * for a long time without dragging around. - * - "clicked,double" - This is called when a user has double-clicked - * the map. - * - "load,detail" - Map detailed data load begins. - * - "loaded,detail" - This is called when all currently visible parts of - * the map are loaded. - * - "zoom,start" - Zoom animation started. - * - "zoom,stop" - Zoom animation stopped. - * - "zoom,change" - Zoom changed when using an auto zoom mode. - * - "scroll" - the content has been scrolled (moved). - * - "scroll,anim,start" - scrolling animation has started. - * - "scroll,anim,stop" - scrolling animation has stopped. - * - "scroll,drag,start" - dragging the contents around has started. - * - "scroll,drag,stop" - dragging the contents around has stopped. - * - "downloaded" - This is called when all currently required map images - * are downloaded. - * - "route,load" - This is called when route request begins. - * - "route,loaded" - This is called when route request ends. - * - "name,load" - This is called when name request begins. - * - "name,loaded- This is called when name request ends. - * - * Available style for map widget: - * - @c "default" - * - * Available style for markers: - * - @c "radio" - * - @c "radio2" - * - @c "empty" - * - * Available style for marker bubble: - * - @c "default" - * - * List of examples: - * @li @ref map_example_01 - * @li @ref map_example_02 - * @li @ref map_example_03 - */ - - /** - * @addtogroup Map - * @{ - */ - - /** - * @enum _Elm_Map_Zoom_Mode - * @typedef Elm_Map_Zoom_Mode - * - * Set map's zoom behavior. It can be set to manual or automatic. - * - * Default value is #ELM_MAP_ZOOM_MODE_MANUAL. - * - * Values don't work as bitmask, only one can be choosen. - * - * @note Valid sizes are 2^zoom, consequently the map may be smaller - * than the scroller view. - * - * @see elm_map_zoom_mode_set() - * @see elm_map_zoom_mode_get() - * - * @ingroup Map - */ - typedef enum _Elm_Map_Zoom_Mode - { - ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controlled manually by elm_map_zoom_set(). It's set by default. */ - ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */ - ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */ - ELM_MAP_ZOOM_MODE_LAST - } Elm_Map_Zoom_Mode; - - /** - * @enum _Elm_Map_Route_Sources - * @typedef Elm_Map_Route_Sources - * - * Set route service to be used. By default used source is - * #ELM_MAP_ROUTE_SOURCE_YOURS. - * - * @see elm_map_route_source_set() - * @see elm_map_route_source_get() - * - * @ingroup Map - */ - typedef enum _Elm_Map_Route_Sources - { - ELM_MAP_ROUTE_SOURCE_YOURS, /**< Routing service http://www.yournavigation.org/ . Set by default.*/ - ELM_MAP_ROUTE_SOURCE_MONAV, /**< MoNav offers exact routing without heuristic assumptions. Its routing core is based on Contraction Hierarchies. It's not working with Map yet. */ - ELM_MAP_ROUTE_SOURCE_ORS, /**< Open Route Service: http://www.openrouteservice.org/ . It's not working with Map yet. */ - ELM_MAP_ROUTE_SOURCE_LAST - } Elm_Map_Route_Sources; - - typedef enum _Elm_Map_Name_Sources - { - ELM_MAP_NAME_SOURCE_NOMINATIM, - ELM_MAP_NAME_SOURCE_LAST - } Elm_Map_Name_Sources; - - /** - * @enum _Elm_Map_Route_Type - * @typedef Elm_Map_Route_Type - * - * Set type of transport used on route. - * - * @see elm_map_route_add() - * - * @ingroup Map - */ - typedef enum _Elm_Map_Route_Type - { - ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */ - ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */ - ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */ - ELM_MAP_ROUTE_TYPE_LAST - } Elm_Map_Route_Type; - - /** - * @enum _Elm_Map_Route_Method - * @typedef Elm_Map_Route_Method - * - * Set the routing method, what should be priorized, time or distance. - * - * @see elm_map_route_add() - * - * @ingroup Map - */ - typedef enum _Elm_Map_Route_Method - { - ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should priorize time. */ - ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should priorize distance. */ - ELM_MAP_ROUTE_METHOD_LAST - } Elm_Map_Route_Method; - - typedef enum _Elm_Map_Name_Method - { - ELM_MAP_NAME_METHOD_SEARCH, - ELM_MAP_NAME_METHOD_REVERSE, - ELM_MAP_NAME_METHOD_LAST - } Elm_Map_Name_Method; - - typedef struct _Elm_Map_Marker Elm_Map_Marker; /**< A marker to be shown in a specific point of the map. Can be created with elm_map_marker_add() and deleted with elm_map_marker_remove(). */ - typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class; /**< Each marker must be associated to a class. It's required to add a mark. The class defines the style of the marker when a marker is displayed alone (not grouped). A new class can be created with elm_map_marker_class_new(). */ - typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class; /**< Each marker must be associated to a group class. It's required to add a mark. The group class defines the style of the marker when a marker is grouped to other markers. Markers with the same group are grouped if they are close. A new group class can be created with elm_map_marker_group_class_new(). */ - typedef struct _Elm_Map_Route Elm_Map_Route; /**< A route to be shown in the map. Can be created with elm_map_route_add() and deleted with elm_map_route_remove(). */ - typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */ - typedef struct _Elm_Map_Track Elm_Map_Track; - - typedef Evas_Object *(*ElmMapMarkerGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Bubble content fetching class function for marker classes. When the user click on a marker, a bubble is displayed with a content. */ - typedef void (*ElmMapMarkerDelFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o); /**< Function to delete bubble content for marker classes. */ - typedef Evas_Object *(*ElmMapMarkerIconGetFunc) (Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Icon fetching class function for marker classes. */ - typedef Evas_Object *(*ElmMapGroupIconGetFunc) (Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */ - - typedef char *(*ElmMapModuleSourceFunc) (void); - typedef int (*ElmMapModuleZoomMinFunc) (void); - typedef int (*ElmMapModuleZoomMaxFunc) (void); - typedef char *(*ElmMapModuleUrlFunc) (Evas_Object *obj, int x, int y, int zoom); - typedef int (*ElmMapModuleRouteSourceFunc) (void); - typedef char *(*ElmMapModuleRouteUrlFunc) (Evas_Object *obj, char *type_name, int method, double flon, double flat, double tlon, double tlat); - typedef char *(*ElmMapModuleNameUrlFunc) (Evas_Object *obj, int method, char *name, double lon, double lat); - typedef Eina_Bool (*ElmMapModuleGeoIntoCoordFunc) (const Evas_Object *obj, int zoom, double lon, double lat, int size, int *x, int *y); - typedef Eina_Bool (*ElmMapModuleCoordIntoGeoFunc) (const Evas_Object *obj, int zoom, int x, int y, int size, double *lon, double *lat); - - /** - * Add a new map widget to the given parent Elementary (container) object. - * - * @param parent The parent object. - * @return a new map widget handle or @c NULL, on errors. - * - * This function inserts a new map widget on the canvas. - * - * @ingroup Map - */ - EAPI Evas_Object *elm_map_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - - /** - * Set the zoom level of the map. - * - * @param obj The map object. - * @param zoom The zoom level to set. - * - * This sets the zoom level. - * - * It will respect limits defined by elm_map_source_zoom_min_set() and - * elm_map_source_zoom_max_set(). - * - * By default these values are 0 (world map) and 18 (maximum zoom). - * - * This function should be used when zoom mode is set to - * #ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set - * with elm_map_zoom_mode_set(). - * - * @see elm_map_zoom_mode_set(). - * @see elm_map_zoom_get(). - * - * @ingroup Map - */ - EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); - - /** - * Get the zoom level of the map. - * - * @param obj The map object. - * @return The current zoom level. - * - * This returns the current zoom level of the map object. - * - * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL - * (which is the default), the zoom level may be changed at any time by the - * map object itself to account for map size and map viewport size. - * - * @see elm_map_zoom_set() for details. - * - * @ingroup Map - */ - EAPI int elm_map_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the zoom mode used by the map object. - * - * @param obj The map object. - * @param mode The zoom mode of the map, being it one of - * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, - * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. - * - * This sets the zoom mode to manual or one of the automatic levels. - * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by - * elm_map_zoom_set() and will stay at that level until changed by code - * or until zoom mode is changed. This is the default mode. - * - * The Automatic modes will allow the map object to automatically - * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will - * adjust zoom so the map fits inside the scroll frame with no pixels - * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but - * ensure no pixels within the frame are left unfilled. Do not forget that - * the valid sizes are 2^zoom, consequently the map may be smaller than - * the scroller view. - * - * @see elm_map_zoom_set() - * - * @ingroup Map - */ - EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) EINA_ARG_NONNULL(1); - - /** - * Get the zoom mode used by the map object. - * - * @param obj The map object. - * @return The zoom mode of the map, being it one of - * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, - * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. - * - * This function returns the current zoom mode used by the map object. - * - * @see elm_map_zoom_mode_set() for more details. - * - * @ingroup Map - */ - EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the current coordinates of the map. - * - * @param obj The map object. - * @param lon Pointer where to store longitude. - * @param lat Pointer where to store latitude. - * - * This gets the current center coordinates of the map object. It can be - * set by elm_map_geo_region_bring_in() and elm_map_geo_region_show(). - * - * @see elm_map_geo_region_bring_in() - * @see elm_map_geo_region_show() - * - * @ingroup Map - */ - EAPI void elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) EINA_ARG_NONNULL(1); - - /** - * Animatedly bring in given coordinates to the center of the map. - * - * @param obj The map object. - * @param lon Longitude to center at. - * @param lat Latitude to center at. - * - * This causes map to jump to the given @p lat and @p lon coordinates - * and show it (by scrolling) in the center of the viewport, if it is not - * already centered. This will use animation to do so and take a period - * of time to complete. - * - * @see elm_map_geo_region_show() for a function to avoid animation. - * @see elm_map_geo_region_get() - * - * @ingroup Map - */ - EAPI void elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); - - /** - * Show the given coordinates at the center of the map, @b immediately. - * - * @param obj The map object. - * @param lon Longitude to center at. - * @param lat Latitude to center at. - * - * This causes map to @b redraw its viewport's contents to the - * region contining the given @p lat and @p lon, that will be moved to the - * center of the map. - * - * @see elm_map_geo_region_bring_in() for a function to move with animation. - * @see elm_map_geo_region_get() - * - * @ingroup Map - */ - EAPI void elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); - - /** - * Pause or unpause the map. - * - * @param obj The map object. - * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE - * to unpause it. - * - * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) - * for map. - * - * The default is off. - * - * This will stop zooming using animation, changing zoom levels will - * change instantly. This will stop any existing animations that are running. - * - * @see elm_map_paused_get() - * - * @ingroup Map - */ - EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); - - /** - * Get a value whether map is paused or not. - * - * @param obj The map object. - * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates - * it is not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * This gets the current paused state for the map object. - * - * @see elm_map_paused_set() for details. - * - * @ingroup Map - */ - EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set to show markers during zoom level changes or not. - * - * @param obj The map object. - * @param paused Use @c EINA_TRUE to @b not show markers or @c EINA_FALSE - * to show them. - * - * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) - * for map. - * - * The default is off. - * - * This will stop zooming using animation, changing zoom levels will - * change instantly. This will stop any existing animations that are running. - * - * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) - * for the markers. - * - * The default is off. - * - * Enabling it will force the map to stop displaying the markers during - * zoom level changes. Set to on if you have a large number of markers. - * - * @see elm_map_paused_markers_get() - * - * @ingroup Map - */ - EAPI void elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); - - /** - * Get a value whether markers will be displayed on zoom level changes or not - * - * @param obj The map object. - * @return @c EINA_TRUE means map @b won't display markers or @c EINA_FALSE - * indicates it will. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * This gets the current markers paused state for the map object. - * - * @see elm_map_paused_markers_set() for details. - * - * @ingroup Map - */ - EAPI Eina_Bool elm_map_paused_markers_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the information of downloading status. - * - * @param obj The map object. - * @param try_num Pointer where to store number of tiles being downloaded. - * @param finish_num Pointer where to store number of tiles successfully - * downloaded. - * - * This gets the current downloading status for the map object, the number - * of tiles being downloaded and the number of tiles already downloaded. - * - * @ingroup Map - */ - EAPI void elm_map_utils_downloading_status_get(const Evas_Object *obj, int *try_num, int *finish_num) EINA_ARG_NONNULL(1, 2, 3); - - /** - * Convert a pixel coordinate (x,y) into a geographic coordinate - * (longitude, latitude). - * - * @param obj The map object. - * @param x the coordinate. - * @param y the coordinate. - * @param size the size in pixels of the map. - * The map is a square and generally his size is : pow(2.0, zoom)*256. - * @param lon Pointer where to store the longitude that correspond to x. - * @param lat Pointer where to store the latitude that correspond to y. - * - * @note Origin pixel point is the top left corner of the viewport. - * Map zoom and size are taken on account. - * - * @see elm_map_utils_convert_geo_into_coord() if you need the inverse. - * - * @ingroup Map - */ - EAPI void elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int size, double *lon, double *lat) EINA_ARG_NONNULL(1, 5, 6); - - /** - * Convert a geographic coordinate (longitude, latitude) into a pixel - * coordinate (x, y). - * - * @param obj The map object. - * @param lon the longitude. - * @param lat the latitude. - * @param size the size in pixels of the map. The map is a square - * and generally his size is : pow(2.0, zoom)*256. - * @param x Pointer where to store the horizontal pixel coordinate that - * correspond to the longitude. - * @param y Pointer where to store the vertical pixel coordinate that - * correspond to the latitude. - * - * @note Origin pixel point is the top left corner of the viewport. - * Map zoom and size are taken on account. - * - * @see elm_map_utils_convert_coord_into_geo() if you need the inverse. - * - * @ingroup Map - */ - EAPI void elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double lat, int size, int *x, int *y) EINA_ARG_NONNULL(1, 5, 6); - - /** - * Convert a geographic coordinate (longitude, latitude) into a name - * (address). - * - * @param obj The map object. - * @param lon the longitude. - * @param lat the latitude. - * @return name A #Elm_Map_Name handle for this coordinate. - * - * To get the string for this address, elm_map_name_address_get() - * should be used. - * - * @see elm_map_utils_convert_name_into_coord() if you need the inverse. - * - * @ingroup Map - */ - EAPI Elm_Map_Name *elm_map_utils_convert_coord_into_name(const Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); - - /** - * Convert a name (address) into a geographic coordinate - * (longitude, latitude). - * - * @param obj The map object. - * @param name The address. - * @return name A #Elm_Map_Name handle for this address. - * - * To get the longitude and latitude, elm_map_name_region_get() - * should be used. - * - * @see elm_map_utils_convert_coord_into_name() if you need the inverse. - * - * @ingroup Map - */ - EAPI Elm_Map_Name *elm_map_utils_convert_name_into_coord(const Evas_Object *obj, char *address) EINA_ARG_NONNULL(1, 2); - - /** - * Convert a pixel coordinate into a rotated pixel coordinate. - * - * @param obj The map object. - * @param x horizontal coordinate of the point to rotate. - * @param y vertical coordinate of the point to rotate. - * @param cx rotation's center horizontal position. - * @param cy rotation's center vertical position. - * @param degree amount of degrees from 0.0 to 360.0 to rotate arount Z axis. - * @param xx Pointer where to store rotated x. - * @param yy Pointer where to store rotated y. - * - * @ingroup Map - */ - EAPI void elm_map_utils_rotate_coord(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, const Evas_Coord cx, const Evas_Coord cy, const double degree, Evas_Coord *xx, Evas_Coord *yy) EINA_ARG_NONNULL(1); - - /** - * Add a new marker to the map object. - * - * @param obj The map object. - * @param lon The longitude of the marker. - * @param lat The latitude of the marker. - * @param clas The class, to use when marker @b isn't grouped to others. - * @param clas_group The class group, to use when marker is grouped to others - * @param data The data passed to the callbacks. - * - * @return The created marker or @c NULL upon failure. - * - * A marker will be created and shown in a specific point of the map, defined - * by @p lon and @p lat. - * - * It will be displayed using style defined by @p class when this marker - * is displayed alone (not grouped). A new class can be created with - * elm_map_marker_class_new(). - * - * If the marker is grouped to other markers, it will be displayed with - * style defined by @p class_group. Markers with the same group are grouped - * if they are close. A new group class can be created with - * elm_map_marker_group_class_new(). - * - * Markers created with this method can be deleted with - * elm_map_marker_remove(). - * - * A marker can have associated content to be displayed by a bubble, - * when a user click over it, as well as an icon. These objects will - * be fetch using class' callback functions. - * - * @see elm_map_marker_class_new() - * @see elm_map_marker_group_class_new() - * @see elm_map_marker_remove() - * - * @ingroup Map - */ - EAPI Elm_Map_Marker *elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Class *clas, Elm_Map_Group_Class *clas_group, void *data) EINA_ARG_NONNULL(1, 4, 5); - - /** - * Set the maximum numbers of markers' content to be displayed in a group. - * - * @param obj The map object. - * @param max The maximum numbers of items displayed in a bubble. - * - * A bubble will be displayed when the user clicks over the group, - * and will place the content of markers that belong to this group - * inside it. - * - * A group can have a long list of markers, consequently the creation - * of the content of the bubble can be very slow. - * - * In order to avoid this, a maximum number of items is displayed - * in a bubble. - * - * By default this number is 30. - * - * Marker with the same group class are grouped if they are close. - * - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_max_marker_per_group_set(Evas_Object *obj, int max) EINA_ARG_NONNULL(1); - - /** - * Remove a marker from the map. - * - * @param marker The marker to remove. - * - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_remove(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); - - /** - * Get the current coordinates of the marker. - * - * @param marker marker. - * @param lat Pointer where to store the marker's latitude. - * @param lon Pointer where to store the marker's longitude. - * - * These values are set when adding markers, with function - * elm_map_marker_add(). - * - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat) EINA_ARG_NONNULL(1); - - /** - * Animatedly bring in given marker to the center of the map. - * - * @param marker The marker to center at. - * - * This causes map to jump to the given @p marker's coordinates - * and show it (by scrolling) in the center of the viewport, if it is not - * already centered. This will use animation to do so and take a period - * of time to complete. - * - * @see elm_map_marker_show() for a function to avoid animation. - * @see elm_map_marker_region_get() - * - * @ingroup Map - */ - EAPI void elm_map_marker_bring_in(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); - - /** - * Show the given marker at the center of the map, @b immediately. - * - * @param marker The marker to center at. - * - * This causes map to @b redraw its viewport's contents to the - * region contining the given @p marker's coordinates, that will be - * moved to the center of the map. - * - * @see elm_map_marker_bring_in() for a function to move with animation. - * @see elm_map_markers_list_show() if more than one marker need to be - * displayed. - * @see elm_map_marker_region_get() - * - * @ingroup Map - */ - EAPI void elm_map_marker_show(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); - - /** - * Move and zoom the map to display a list of markers. - * - * @param markers A list of #Elm_Map_Marker handles. - * - * The map will be centered on the center point of the markers in the list. - * Then the map will be zoomed in order to fit the markers using the maximum - * zoom which allows display of all the markers. - * - * @warning All the markers should belong to the same map object. - * - * @see elm_map_marker_show() to show a single marker. - * @see elm_map_marker_bring_in() - * - * @ingroup Map - */ - EAPI void elm_map_markers_list_show(Eina_List *markers) EINA_ARG_NONNULL(1); - - /** - * Get the Evas object returned by the ElmMapMarkerGetFunc callback - * - * @param marker The marker wich content should be returned. - * @return Return the evas object if it exists, else @c NULL. - * - * To set callback function #ElmMapMarkerGetFunc for the marker class, - * elm_map_marker_class_get_cb_set() should be used. - * - * This content is what will be inside the bubble that will be displayed - * when an user clicks over the marker. - * - * This returns the actual Evas object used to be placed inside - * the bubble. This may be @c NULL, as it may - * not have been created or may have been deleted, at any time, by - * the map. Do not modify this object (move, resize, - * show, hide, etc.), as the map 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. - * - * @ingroup Map - */ - EAPI Evas_Object *elm_map_marker_object_get(const Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); - - /** - * Update the marker - * - * @param marker The marker to be updated. - * - * If a content is set to this marker, it will call function to delete it, - * #ElmMapMarkerDelFunc, and then will fetch the content again with - * #ElmMapMarkerGetFunc. - * - * These functions are set for the marker class with - * elm_map_marker_class_get_cb_set() and elm_map_marker_class_del_cb_set(). - * - * @ingroup Map - */ - EAPI void elm_map_marker_update(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); - - /** - * Close all the bubbles opened by the user. - * - * @param obj The map object. - * - * A bubble is displayed with a content fetched with #ElmMapMarkerGetFunc - * when the user clicks on a marker. - * - * This functions is set for the marker class with - * elm_map_marker_class_get_cb_set(). - * - * @ingroup Map - */ - EAPI void elm_map_bubbles_close(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Create a new group class. - * - * @param obj The map object. - * @return Returns the new group class. - * - * Each marker must be associated to a group class. Markers in the same - * group are grouped if they are close. - * - * The group class defines the style of the marker when a marker is grouped - * to others markers. When it is alone, another class will be used. - * - * A group class will need to be provided when creating a marker with - * elm_map_marker_add(). - * - * Some properties and functions can be set by class, as: - * - style, with elm_map_group_class_style_set() - * - data - to be associated to the group class. It can be set using - * elm_map_group_class_data_set(). - * - min zoom to display markers, set with - * elm_map_group_class_zoom_displayed_set(). - * - max zoom to group markers, set using - * elm_map_group_class_zoom_grouped_set(). - * - visibility - set if markers will be visible or not, set with - * elm_map_group_class_hide_set(). - * - #ElmMapGroupIconGetFunc - used to fetch icon for markers group classes. - * It can be set using elm_map_group_class_icon_cb_set(). - * - * @see elm_map_marker_add() - * @see elm_map_group_class_style_set() - * @see elm_map_group_class_data_set() - * @see elm_map_group_class_zoom_displayed_set() - * @see elm_map_group_class_zoom_grouped_set() - * @see elm_map_group_class_hide_set() - * @see elm_map_group_class_icon_cb_set() - * - * @ingroup Map - */ - EAPI Elm_Map_Group_Class *elm_map_group_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the marker's style of a group class. - * - * @param clas The group class. - * @param style The style to be used by markers. - * - * Each marker must be associated to a group class, and will use the style - * defined by such class when grouped to other markers. - * - * The following styles are provided by default theme: - * @li @c radio - blue circle - * @li @c radio2 - green circle - * @li @c empty - * - * @see elm_map_group_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_group_class_style_set(Elm_Map_Group_Class *clas, const char *style) EINA_ARG_NONNULL(1); - - /** - * Set the icon callback function of a group class. - * - * @param clas The group class. - * @param icon_get The callback function that will return the icon. - * - * Each marker must be associated to a group class, and it can display a - * custom icon. The function @p icon_get must return this icon. - * - * @see elm_map_group_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_group_class_icon_cb_set(Elm_Map_Group_Class *clas, ElmMapGroupIconGetFunc icon_get) EINA_ARG_NONNULL(1); - - /** - * Set the data associated to the group class. - * - * @param clas The group class. - * @param data The new user data. - * - * This data will be passed for callback functions, like icon get callback, - * that can be set with elm_map_group_class_icon_cb_set(). - * - * If a data was previously set, the object will lose the pointer for it, - * so if needs to be freed, you must do it yourself. - * - * @see elm_map_group_class_new() for more details. - * @see elm_map_group_class_icon_cb_set() - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_group_class_data_set(Elm_Map_Group_Class *clas, void *data) EINA_ARG_NONNULL(1); - - /** - * Set the minimum zoom from where the markers are displayed. - * - * @param clas The group class. - * @param zoom The minimum zoom. - * - * Markers only will be displayed when the map is displayed at @p zoom - * or bigger. - * - * @see elm_map_group_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_group_class_zoom_displayed_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); - - /** - * Set the zoom from where the markers are no more grouped. - * - * @param clas The group class. - * @param zoom The maximum zoom. - * - * Markers only will be grouped when the map is displayed at - * less than @p zoom. - * - * @see elm_map_group_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); - - /** - * Set if the markers associated to the group class @clas are hidden or not. - * - * @param clas The group class. - * @param hide Use @c EINA_TRUE to hide markers or @c EINA_FALSE - * to show them. - * - * If @p hide is @c EINA_TRUE the markers will be hidden, but default - * is to show them. - * - * @ingroup Map - */ - EAPI void elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide) EINA_ARG_NONNULL(1, 2); - - /** - * Create a new marker class. - * - * @param obj The map object. - * @return Returns the new group class. - * - * Each marker must be associated to a class. - * - * The marker class defines the style of the marker when a marker is - * displayed alone, i.e., not grouped to to others markers. When grouped - * it will use group class style. - * - * A marker class will need to be provided when creating a marker with - * elm_map_marker_add(). - * - * Some properties and functions can be set by class, as: - * - style, with elm_map_marker_class_style_set() - * - #ElmMapMarkerIconGetFunc - used to fetch icon for markers classes. - * It can be set using elm_map_marker_class_icon_cb_set(). - * - #ElmMapMarkerGetFunc - used to fetch bubble content for marker classes. - * Set using elm_map_marker_class_get_cb_set(). - * - #ElmMapMarkerDelFunc - used to delete bubble content for marker classes. - * Set using elm_map_marker_class_del_cb_set(). - * - * @see elm_map_marker_add() - * @see elm_map_marker_class_style_set() - * @see elm_map_marker_class_icon_cb_set() - * @see elm_map_marker_class_get_cb_set() - * @see elm_map_marker_class_del_cb_set() - * - * @ingroup Map - */ - EAPI Elm_Map_Marker_Class *elm_map_marker_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the marker's style of a marker class. - * - * @param clas The marker class. - * @param style The style to be used by markers. - * - * Each marker must be associated to a marker class, and will use the style - * defined by such class when alone, i.e., @b not grouped to other markers. - * - * The following styles are provided by default theme: - * @li @c radio - * @li @c radio2 - * @li @c empty - * - * @see elm_map_marker_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_class_style_set(Elm_Map_Marker_Class *clas, const char *style) EINA_ARG_NONNULL(1); - - /** - * Set the icon callback function of a marker class. - * - * @param clas The marker class. - * @param icon_get The callback function that will return the icon. - * - * Each marker must be associated to a marker class, and it can display a - * custom icon. The function @p icon_get must return this icon. - * - * @see elm_map_marker_class_new() for more details. - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_class_icon_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerIconGetFunc icon_get) EINA_ARG_NONNULL(1); - - /** - * Set the bubble content callback function of a marker class. - * - * @param clas The marker class. - * @param get The callback function that will return the content. - * - * Each marker must be associated to a marker class, and it can display a - * a content on a bubble that opens when the user click over the marker. - * The function @p get must return this content object. - * - * If this content will need to be deleted, elm_map_marker_class_del_cb_set() - * can be used. - * - * @see elm_map_marker_class_new() for more details. - * @see elm_map_marker_class_del_cb_set() - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_class_get_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerGetFunc get) EINA_ARG_NONNULL(1); - - /** - * Set the callback function used to delete bubble content of a marker class. - * - * @param clas The marker class. - * @param del The callback function that will delete the content. - * - * Each marker must be associated to a marker class, and it can display a - * a content on a bubble that opens when the user click over the marker. - * The function to return such content can be set with - * elm_map_marker_class_get_cb_set(). - * - * If this content must be freed, a callback function need to be - * set for that task with this function. - * - * If this callback is defined it will have to delete (or not) the - * object inside, but if the callback is not defined the object will be - * destroyed with evas_object_del(). - * - * @see elm_map_marker_class_new() for more details. - * @see elm_map_marker_class_get_cb_set() - * @see elm_map_marker_add() - * - * @ingroup Map - */ - EAPI void elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc del) EINA_ARG_NONNULL(1); - - /** - * Get the list of available sources. - * - * @param obj The map object. - * @return The source names list. - * - * It will provide a list with all available sources, that can be set as - * current source with elm_map_source_name_set(), or get with - * elm_map_source_name_get(). - * - * Available sources: - * @li "Mapnik" - * @li "Osmarender" - * @li "CycleMap" - * @li "Maplint" - * - * @see elm_map_source_name_set() for more details. - * @see elm_map_source_name_get() - * - * @ingroup Map - */ - EAPI const char **elm_map_source_names_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the source of the map. - * - * @param obj The map object. - * @param source The source to be used. - * - * Map widget retrieves images that composes the map from a web service. - * This web service can be set with this method. - * - * A different service can return a different maps with different - * information and it can use different zoom values. - * - * The @p source_name need to match one of the names provided by - * elm_map_source_names_get(). - * - * The current source can be get using elm_map_source_name_get(). - * - * @see elm_map_source_names_get() - * @see elm_map_source_name_get() - * - * - * @ingroup Map - */ - EAPI void elm_map_source_name_set(Evas_Object *obj, const char *source_name) EINA_ARG_NONNULL(1); - - /** - * Get the name of currently used source. - * - * @param obj The map object. - * @return Returns the name of the source in use. - * - * @see elm_map_source_name_set() for more details. - * - * @ingroup Map - */ - EAPI const char *elm_map_source_name_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the source of the route service to be used by the map. - * - * @param obj The map object. - * @param source The route service to be used, being it one of - * #ELM_MAP_ROUTE_SOURCE_YOURS (default), #ELM_MAP_ROUTE_SOURCE_MONAV, - * and #ELM_MAP_ROUTE_SOURCE_ORS. - * - * Each one has its own algorithm, so the route retrieved may - * differ depending on the source route. Now, only the default is working. - * - * #ELM_MAP_ROUTE_SOURCE_YOURS is the routing service provided at - * http://www.yournavigation.org/. - * - * #ELM_MAP_ROUTE_SOURCE_MONAV, offers exact routing without heuristic - * assumptions. Its routing core is based on Contraction Hierarchies. - * - * #ELM_MAP_ROUTE_SOURCE_ORS, is provided at http://www.openrouteservice.org/ - * - * @see elm_map_route_source_get(). - * - * @ingroup Map - */ - EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) EINA_ARG_NONNULL(1); - - /** - * Get the current route source. - * - * @param obj The map object. - * @return The source of the route service used by the map. - * - * @see elm_map_route_source_set() for details. - * - * @ingroup Map - */ - EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the minimum zoom of the source. - * - * @param obj The map object. - * @param zoom New minimum zoom value to be used. - * - * By default, it's 0. - * - * @ingroup Map - */ - EAPI void elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); - - /** - * Get the minimum zoom of the source. - * - * @param obj The map object. - * @return Returns the minimum zoom of the source. - * - * @see elm_map_source_zoom_min_set() for details. - * - * @ingroup Map - */ - EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the maximum zoom of the source. - * - * @param obj The map object. - * @param zoom New maximum zoom value to be used. - * - * By default, it's 18. - * - * @ingroup Map - */ - EAPI void elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); - - /** - * Get the maximum zoom of the source. - * - * @param obj The map object. - * @return Returns the maximum zoom of the source. - * - * @see elm_map_source_zoom_min_set() for details. - * - * @ingroup Map - */ - EAPI int elm_map_source_zoom_max_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the user agent used by the map object to access routing services. - * - * @param obj The map object. - * @param user_agent The user agent to be used by the map. - * - * User agent is a client application implementing a network protocol used - * in communications within a client–server distributed computing system - * - * The @p user_agent identification string will transmitted in a header - * field @c User-Agent. - * - * @see elm_map_user_agent_get() - * - * @ingroup Map - */ - EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) EINA_ARG_NONNULL(1, 2); - - /** - * Get the user agent used by the map object. - * - * @param obj The map object. - * @return The user agent identification string used by the map. - * - * @see elm_map_user_agent_set() for details. - * - * @ingroup Map - */ - EAPI const char *elm_map_user_agent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Add a new route to the map object. - * - * @param obj The map object. - * @param type The type of transport to be considered when tracing a route. - * @param method The routing method, what should be priorized. - * @param flon The start longitude. - * @param flat The start latitude. - * @param tlon The destination longitude. - * @param tlat The destination latitude. - * - * @return The created route or @c NULL upon failure. - * - * A route will be traced by point on coordinates (@p flat, @p flon) - * to point on coordinates (@p tlat, @p tlon), using the route service - * set with elm_map_route_source_set(). - * - * It will take @p type on consideration to define the route, - * depending if the user will be walking or driving, the route may vary. - * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or - * #ELM_MAP_ROUTE_TYPE_FOOT need to be used. - * - * Another parameter is what the route should priorize, the minor distance - * or the less time to be spend on the route. So @p method should be one - * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST. - * - * Routes created with this method can be deleted with - * elm_map_route_remove(), colored with elm_map_route_color_set(), - * and distance can be get with elm_map_route_distance_get(). - * - * @see elm_map_route_remove() - * @see elm_map_route_color_set() - * @see elm_map_route_distance_get() - * @see elm_map_route_source_set() - * - * @ingroup Map - */ - EAPI Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat) EINA_ARG_NONNULL(1); - - /** - * Remove a route from the map. - * - * @param route The route to remove. - * - * @see elm_map_route_add() - * - * @ingroup Map - */ - EAPI void elm_map_route_remove(Elm_Map_Route *route) EINA_ARG_NONNULL(1); - - /** - * Set the route color. - * - * @param route The route object. - * @param r Red channel value, from 0 to 255. - * @param g Green channel value, from 0 to 255. - * @param b Blue channel value, from 0 to 255. - * @param a Alpha channel value, from 0 to 255. - * - * It uses an additive color model, so each color channel represents - * how much of each primary colors must to be used. 0 represents - * ausence of this color, so if all of the three are set to 0, - * the color will be black. - * - * These component values should be integers in the range 0 to 255, - * (single 8-bit byte). - * - * This sets the color used for the route. By default, it is set to - * solid red (r = 255, g = 0, b = 0, a = 255). - * - * For alpha channel, 0 represents completely transparent, and 255, opaque. - * - * @see elm_map_route_color_get() - * - * @ingroup Map - */ - EAPI void elm_map_route_color_set(Elm_Map_Route *route, int r, int g , int b, int a) EINA_ARG_NONNULL(1); - - /** - * Get the route color. - * - * @param route The route object. - * @param r Pointer where to store the red channel value. - * @param g Pointer where to store the green channel value. - * @param b Pointer where to store the blue channel value. - * @param a Pointer where to store the alpha channel value. - * - * @see elm_map_route_color_set() for details. - * - * @ingroup Map - */ - EAPI void elm_map_route_color_get(const Elm_Map_Route *route, int *r, int *g , int *b, int *a) EINA_ARG_NONNULL(1); - - /** - * Get the route distance in kilometers. - * - * @param route The route object. - * @return The distance of route (unit : km). - * - * @ingroup Map - */ - EAPI double elm_map_route_distance_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); - - /** - * Get the information of route nodes. - * - * @param route The route object. - * @return Returns a string with the nodes of route. - * - * @ingroup Map - */ - EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); - - /** - * Get the information of route waypoint. - * - * @param route the route object. - * @return Returns a string with information about waypoint of route. - * - * @ingroup Map - */ - EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); - - /** - * Get the address of the name. - * - * @param name The name handle. - * @return Returns the address string of @p name. - * - * This gets the coordinates of the @p name, created with one of the - * conversion functions. - * - * @see elm_map_utils_convert_name_into_coord() - * @see elm_map_utils_convert_coord_into_name() - * - * @ingroup Map - */ - EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name) EINA_ARG_NONNULL(1); - - /** - * Get the current coordinates of the name. - * - * @param name The name handle. - * @param lat Pointer where to store the latitude. - * @param lon Pointer where to store The longitude. - * - * This gets the coordinates of the @p name, created with one of the - * conversion functions. - * - * @see elm_map_utils_convert_name_into_coord() - * @see elm_map_utils_convert_coord_into_name() - * - * @ingroup Map - */ - EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat) EINA_ARG_NONNULL(1); - - /** - * Remove a name from the map. - * - * @param name The name to remove. - * - * Basically the struct handled by @p name will be freed, so convertions - * between address and coordinates will be lost. - * - * @see elm_map_utils_convert_name_into_coord() - * @see elm_map_utils_convert_coord_into_name() - * - * @ingroup Map - */ - EAPI void elm_map_name_remove(Elm_Map_Name *name) EINA_ARG_NONNULL(1); - - /** - * Rotate the map. - * - * @param obj The map object. - * @param degree Angle from 0.0 to 360.0 to rotate arount Z axis. - * @param cx Rotation's center horizontal position. - * @param cy Rotation's center vertical position. - * - * @see elm_map_rotate_get() - * - * @ingroup Map - */ - EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy) EINA_ARG_NONNULL(1); - - /** - * Get the rotate degree of the map - * - * @param obj The map object - * @param degree Pointer where to store degrees from 0.0 to 360.0 - * to rotate arount Z axis. - * @param cx Pointer where to store rotation's center horizontal position. - * @param cy Pointer where to store rotation's center vertical position. - * - * @see elm_map_rotate_set() to set map rotation. - * - * @ingroup Map - */ - EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy) EINA_ARG_NONNULL(1, 2, 3, 4); - - /** - * Enable or disable mouse wheel to be used to zoom in / out the map. - * - * @param obj The map object. - * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE - * to enable it. - * - * Mouse wheel can be used for the user to zoom in or zoom out the map. - * - * It's disabled by default. - * - * @see elm_map_wheel_disabled_get() - * - * @ingroup Map - */ - EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); - - /** - * Get a value whether mouse wheel is enabled or not. - * - * @param obj The map object. - * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates - * it is enabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * Mouse wheel can be used for the user to zoom in or zoom out the map. - * - * @see elm_map_wheel_disabled_set() for details. - * - * @ingroup Map - */ - EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @defgroup Map Map + * @ingroup Elementary + * + * @image html img/widget/map/preview-00.png + * @image latex img/widget/map/preview-00.eps + * + * This is a widget specifically for displaying a map. It uses basically + * OpenStreetMap provider http://www.openstreetmap.org/, + * but custom providers can be added. + * + * It supports some basic but yet nice features: + * @li zoom and scroll + * @li markers with content to be displayed when user clicks over it + * @li group of markers + * @li routes + * + * Smart callbacks one can listen to: + * + * - "clicked" - This is called when a user has clicked the map without + * dragging around. + * - "press" - This is called when a user has pressed down on the map. + * - "longpressed" - This is called when a user has pressed down on the map + * for a long time without dragging around. + * - "clicked,double" - This is called when a user has double-clicked + * the map. + * - "load,detail" - Map detailed data load begins. + * - "loaded,detail" - This is called when all currently visible parts of + * the map are loaded. + * - "zoom,start" - Zoom animation started. + * - "zoom,stop" - Zoom animation stopped. + * - "zoom,change" - Zoom changed when using an auto zoom mode. + * - "scroll" - the content has been scrolled (moved). + * - "scroll,anim,start" - scrolling animation has started. + * - "scroll,anim,stop" - scrolling animation has stopped. + * - "scroll,drag,start" - dragging the contents around has started. + * - "scroll,drag,stop" - dragging the contents around has stopped. + * - "downloaded" - This is called when all currently required map images + * are downloaded. + * - "route,load" - This is called when route request begins. + * - "route,loaded" - This is called when route request ends. + * - "name,load" - This is called when name request begins. + * - "name,loaded- This is called when name request ends. + * + * Available style for map widget: + * - @c "default" + * + * Available style for markers: + * - @c "radio" + * - @c "radio2" + * - @c "empty" + * + * Available style for marker bubble: + * - @c "default" + * + * List of examples: + * @li @ref map_example_01 + * @li @ref map_example_02 + * @li @ref map_example_03 + */ + +/** + * @addtogroup Map + * @{ + */ + +/** + * @enum _Elm_Map_Zoom_Mode + * @typedef Elm_Map_Zoom_Mode + * + * Set map's zoom behavior. It can be set to manual or automatic. + * + * Default value is #ELM_MAP_ZOOM_MODE_MANUAL. + * + * Values don't work as bitmask, only one can be choosen. + * + * @note Valid sizes are 2^zoom, consequently the map may be smaller + * than the scroller view. + * + * @see elm_map_zoom_mode_set() + * @see elm_map_zoom_mode_get() + * + * @ingroup Map + */ +typedef enum _Elm_Map_Zoom_Mode +{ + ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controlled manually by elm_map_zoom_set(). It's set by default. */ + ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */ + ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */ + ELM_MAP_ZOOM_MODE_LAST +} Elm_Map_Zoom_Mode; + +/** + * @enum _Elm_Map_Route_Sources + * @typedef Elm_Map_Route_Sources + * + * Set route service to be used. By default used source is + * #ELM_MAP_ROUTE_SOURCE_YOURS. + * + * @see elm_map_route_source_set() + * @see elm_map_route_source_get() + * + * @ingroup Map + */ +typedef enum _Elm_Map_Route_Sources +{ + ELM_MAP_ROUTE_SOURCE_YOURS, /**< Routing service http://www.yournavigation.org/ . Set by default.*/ + ELM_MAP_ROUTE_SOURCE_MONAV, /**< MoNav offers exact routing without heuristic assumptions. Its routing core is based on Contraction Hierarchies. It's not working with Map yet. */ + ELM_MAP_ROUTE_SOURCE_ORS, /**< Open Route Service: http://www.openrouteservice.org/ . It's not working with Map yet. */ + ELM_MAP_ROUTE_SOURCE_LAST +} Elm_Map_Route_Sources; + +typedef enum _Elm_Map_Name_Sources +{ + ELM_MAP_NAME_SOURCE_NOMINATIM, + ELM_MAP_NAME_SOURCE_LAST +} Elm_Map_Name_Sources; + +/** + * @enum _Elm_Map_Route_Type + * @typedef Elm_Map_Route_Type + * + * Set type of transport used on route. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ +typedef enum _Elm_Map_Route_Type +{ + ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */ + ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */ + ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */ + ELM_MAP_ROUTE_TYPE_LAST +} Elm_Map_Route_Type; + +/** + * @enum _Elm_Map_Route_Method + * @typedef Elm_Map_Route_Method + * + * Set the routing method, what should be priorized, time or distance. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ +typedef enum _Elm_Map_Route_Method +{ + ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should priorize time. */ + ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should priorize distance. */ + ELM_MAP_ROUTE_METHOD_LAST +} Elm_Map_Route_Method; + +typedef enum _Elm_Map_Name_Method +{ + ELM_MAP_NAME_METHOD_SEARCH, + ELM_MAP_NAME_METHOD_REVERSE, + ELM_MAP_NAME_METHOD_LAST +} Elm_Map_Name_Method; + +typedef struct _Elm_Map_Marker Elm_Map_Marker; /**< A marker to be shown in a specific point of the map. Can be created with elm_map_marker_add() and deleted with elm_map_marker_remove(). */ +typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class; /**< Each marker must be associated to a class. It's required to add a mark. The class defines the style of the marker when a marker is displayed alone (not grouped). A new class can be created with elm_map_marker_class_new(). */ +typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class; /**< Each marker must be associated to a group class. It's required to add a mark. The group class defines the style of the marker when a marker is grouped to other markers. Markers with the same group are grouped if they are close. A new group class can be created with elm_map_marker_group_class_new(). */ +typedef struct _Elm_Map_Route Elm_Map_Route; /**< A route to be shown in the map. Can be created with elm_map_route_add() and deleted with elm_map_route_remove(). */ +typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */ +typedef struct _Elm_Map_Track Elm_Map_Track; + +typedef Evas_Object *(*ElmMapMarkerGetFunc)(Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Bubble content fetching class function for marker classes. When the user click on a marker, a bubble is displayed with a content. */ +typedef void (*ElmMapMarkerDelFunc)(Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o); /**< Function to delete bubble content for marker classes. */ +typedef Evas_Object *(*ElmMapMarkerIconGetFunc)(Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Icon fetching class function for marker classes. */ +typedef Evas_Object *(*ElmMapGroupIconGetFunc)(Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */ + +typedef char *(*ElmMapModuleSourceFunc)(void); +typedef int (*ElmMapModuleZoomMinFunc)(void); +typedef int (*ElmMapModuleZoomMaxFunc)(void); +typedef char *(*ElmMapModuleUrlFunc)(Evas_Object *obj, int x, int y, int zoom); +typedef int (*ElmMapModuleRouteSourceFunc)(void); +typedef char *(*ElmMapModuleRouteUrlFunc)(Evas_Object *obj, char *type_name, int method, double flon, double flat, double tlon, double tlat); +typedef char *(*ElmMapModuleNameUrlFunc)(Evas_Object *obj, int method, char *name, double lon, double lat); +typedef Eina_Bool (*ElmMapModuleGeoIntoCoordFunc)(const Evas_Object *obj, int zoom, double lon, double lat, int size, int *x, int *y); +typedef Eina_Bool (*ElmMapModuleCoordIntoGeoFunc)(const Evas_Object *obj, int zoom, int x, int y, int size, double *lon, double *lat); + +/** + * Add a new map widget to the given parent Elementary (container) object. + * + * @param parent The parent object. + * @return a new map widget handle or @c NULL, on errors. + * + * This function inserts a new map widget on the canvas. + * + * @ingroup Map + */ +EAPI Evas_Object * + elm_map_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); + +/** + * Set the zoom level of the map. + * + * @param obj The map object. + * @param zoom The zoom level to set. + * + * This sets the zoom level. + * + * It will respect limits defined by elm_map_source_zoom_min_set() and + * elm_map_source_zoom_max_set(). + * + * By default these values are 0 (world map) and 18 (maximum zoom). + * + * This function should be used when zoom mode is set to + * #ELM_MAP_ZOOM_MODE_MANUAL. This is the default mode, and can be set + * with elm_map_zoom_mode_set(). + * + * @see elm_map_zoom_mode_set(). + * @see elm_map_zoom_get(). + * + * @ingroup Map + */ +EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + +/** + * Get the zoom level of the map. + * + * @param obj The map object. + * @return The current zoom level. + * + * This returns the current zoom level of the map object. + * + * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL + * (which is the default), the zoom level may be changed at any time by the + * map object itself to account for map size and map viewport size. + * + * @see elm_map_zoom_set() for details. + * + * @ingroup Map + */ +EAPI int elm_map_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the zoom mode used by the map object. + * + * @param obj The map object. + * @param mode The zoom mode of the map, being it one of + * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, + * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. + * + * This sets the zoom mode to manual or one of the automatic levels. + * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by + * elm_map_zoom_set() and will stay at that level until changed by code + * or until zoom mode is changed. This is the default mode. + * + * The Automatic modes will allow the map object to automatically + * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will + * adjust zoom so the map fits inside the scroll frame with no pixels + * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but + * ensure no pixels within the frame are left unfilled. Do not forget that + * the valid sizes are 2^zoom, consequently the map may be smaller than + * the scroller view. + * + * @see elm_map_zoom_set() + * + * @ingroup Map + */ +EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) EINA_ARG_NONNULL(1); + +/** + * Get the zoom mode used by the map object. + * + * @param obj The map object. + * @return The zoom mode of the map, being it one of + * #ELM_MAP_ZOOM_MODE_MANUAL (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, + * or #ELM_MAP_ZOOM_MODE_AUTO_FILL. + * + * This function returns the current zoom mode used by the map object. + * + * @see elm_map_zoom_mode_set() for more details. + * + * @ingroup Map + */ +EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the current coordinates of the map. + * + * @param obj The map object. + * @param lon Pointer where to store longitude. + * @param lat Pointer where to store latitude. + * + * This gets the current center coordinates of the map object. It can be + * set by elm_map_geo_region_bring_in() and elm_map_geo_region_show(). + * + * @see elm_map_geo_region_bring_in() + * @see elm_map_geo_region_show() + * + * @ingroup Map + */ +EAPI void elm_map_geo_region_get(const Evas_Object *obj, double *lon, double *lat) EINA_ARG_NONNULL(1); + +/** + * Animatedly bring in given coordinates to the center of the map. + * + * @param obj The map object. + * @param lon Longitude to center at. + * @param lat Latitude to center at. + * + * This causes map to jump to the given @p lat and @p lon coordinates + * and show it (by scrolling) in the center of the viewport, if it is not + * already centered. This will use animation to do so and take a period + * of time to complete. + * + * @see elm_map_geo_region_show() for a function to avoid animation. + * @see elm_map_geo_region_get() + * + * @ingroup Map + */ +EAPI void elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + +/** + * Show the given coordinates at the center of the map, @b immediately. + * + * @param obj The map object. + * @param lon Longitude to center at. + * @param lat Latitude to center at. + * + * This causes map to @b redraw its viewport's contents to the + * region contining the given @p lat and @p lon, that will be moved to the + * center of the map. + * + * @see elm_map_geo_region_bring_in() for a function to move with animation. + * @see elm_map_geo_region_get() + * + * @ingroup Map + */ +EAPI void elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + +/** + * Pause or unpause the map. + * + * @param obj The map object. + * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE + * to unpause it. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for map. + * + * The default is off. + * + * This will stop zooming using animation, changing zoom levels will + * change instantly. This will stop any existing animations that are running. + * + * @see elm_map_paused_get() + * + * @ingroup Map + */ +EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); + +/** + * Get a value whether map is paused or not. + * + * @param obj The map object. + * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates + * it is not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * This gets the current paused state for the map object. + * + * @see elm_map_paused_set() for details. + * + * @ingroup Map + */ +EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set to show markers during zoom level changes or not. + * + * @param obj The map object. + * @param paused Use @c EINA_TRUE to @b not show markers or @c EINA_FALSE + * to show them. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for map. + * + * The default is off. + * + * This will stop zooming using animation, changing zoom levels will + * change instantly. This will stop any existing animations that are running. + * + * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE) + * for the markers. + * + * The default is off. + * + * Enabling it will force the map to stop displaying the markers during + * zoom level changes. Set to on if you have a large number of markers. + * + * @see elm_map_paused_markers_get() + * + * @ingroup Map + */ +EAPI void elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); + +/** + * Get a value whether markers will be displayed on zoom level changes or not + * + * @param obj The map object. + * @return @c EINA_TRUE means map @b won't display markers or @c EINA_FALSE + * indicates it will. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * This gets the current markers paused state for the map object. + * + * @see elm_map_paused_markers_set() for details. + * + * @ingroup Map + */ +EAPI Eina_Bool elm_map_paused_markers_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the information of downloading status. + * + * @param obj The map object. + * @param try_num Pointer where to store number of tiles being downloaded. + * @param finish_num Pointer where to store number of tiles successfully + * downloaded. + * + * This gets the current downloading status for the map object, the number + * of tiles being downloaded and the number of tiles already downloaded. + * + * @ingroup Map + */ +EAPI void elm_map_utils_downloading_status_get(const Evas_Object *obj, int *try_num, int *finish_num) EINA_ARG_NONNULL(1, 2, 3); + +/** + * Convert a pixel coordinate (x,y) into a geographic coordinate + * (longitude, latitude). + * + * @param obj The map object. + * @param x the coordinate. + * @param y the coordinate. + * @param size the size in pixels of the map. + * The map is a square and generally his size is : pow(2.0, zoom)*256. + * @param lon Pointer where to store the longitude that correspond to x. + * @param lat Pointer where to store the latitude that correspond to y. + * + * @note Origin pixel point is the top left corner of the viewport. + * Map zoom and size are taken on account. + * + * @see elm_map_utils_convert_geo_into_coord() if you need the inverse. + * + * @ingroup Map + */ +EAPI void elm_map_utils_convert_coord_into_geo(const Evas_Object *obj, int x, int y, int size, double *lon, double *lat) EINA_ARG_NONNULL(1, 5, 6); + +/** + * Convert a geographic coordinate (longitude, latitude) into a pixel + * coordinate (x, y). + * + * @param obj The map object. + * @param lon the longitude. + * @param lat the latitude. + * @param size the size in pixels of the map. The map is a square + * and generally his size is : pow(2.0, zoom)*256. + * @param x Pointer where to store the horizontal pixel coordinate that + * correspond to the longitude. + * @param y Pointer where to store the vertical pixel coordinate that + * correspond to the latitude. + * + * @note Origin pixel point is the top left corner of the viewport. + * Map zoom and size are taken on account. + * + * @see elm_map_utils_convert_coord_into_geo() if you need the inverse. + * + * @ingroup Map + */ +EAPI void elm_map_utils_convert_geo_into_coord(const Evas_Object *obj, double lon, double lat, int size, int *x, int *y) EINA_ARG_NONNULL(1, 5, 6); + +/** + * Convert a geographic coordinate (longitude, latitude) into a name + * (address). + * + * @param obj The map object. + * @param lon the longitude. + * @param lat the latitude. + * @return name A #Elm_Map_Name handle for this coordinate. + * + * To get the string for this address, elm_map_name_address_get() + * should be used. + * + * @see elm_map_utils_convert_name_into_coord() if you need the inverse. + * + * @ingroup Map + */ +EAPI Elm_Map_Name *elm_map_utils_convert_coord_into_name(const Evas_Object *obj, double lon, double lat) EINA_ARG_NONNULL(1); + +/** + * Convert a name (address) into a geographic coordinate + * (longitude, latitude). + * + * @param obj The map object. + * @param name The address. + * @return name A #Elm_Map_Name handle for this address. + * + * To get the longitude and latitude, elm_map_name_region_get() + * should be used. + * + * @see elm_map_utils_convert_coord_into_name() if you need the inverse. + * + * @ingroup Map + */ +EAPI Elm_Map_Name *elm_map_utils_convert_name_into_coord(const Evas_Object *obj, char *address) EINA_ARG_NONNULL(1, 2); + +/** + * Convert a pixel coordinate into a rotated pixel coordinate. + * + * @param obj The map object. + * @param x horizontal coordinate of the point to rotate. + * @param y vertical coordinate of the point to rotate. + * @param cx rotation's center horizontal position. + * @param cy rotation's center vertical position. + * @param degree amount of degrees from 0.0 to 360.0 to rotate arount Z axis. + * @param xx Pointer where to store rotated x. + * @param yy Pointer where to store rotated y. + * + * @ingroup Map + */ +EAPI void elm_map_utils_rotate_coord(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, const Evas_Coord cx, const Evas_Coord cy, const double degree, Evas_Coord *xx, Evas_Coord *yy) EINA_ARG_NONNULL(1); + +/** + * Add a new marker to the map object. + * + * @param obj The map object. + * @param lon The longitude of the marker. + * @param lat The latitude of the marker. + * @param clas The class, to use when marker @b isn't grouped to others. + * @param clas_group The class group, to use when marker is grouped to others + * @param data The data passed to the callbacks. + * + * @return The created marker or @c NULL upon failure. + * + * A marker will be created and shown in a specific point of the map, defined + * by @p lon and @p lat. + * + * It will be displayed using style defined by @p class when this marker + * is displayed alone (not grouped). A new class can be created with + * elm_map_marker_class_new(). + * + * If the marker is grouped to other markers, it will be displayed with + * style defined by @p class_group. Markers with the same group are grouped + * if they are close. A new group class can be created with + * elm_map_marker_group_class_new(). + * + * Markers created with this method can be deleted with + * elm_map_marker_remove(). + * + * A marker can have associated content to be displayed by a bubble, + * when a user click over it, as well as an icon. These objects will + * be fetch using class' callback functions. + * + * @see elm_map_marker_class_new() + * @see elm_map_marker_group_class_new() + * @see elm_map_marker_remove() + * + * @ingroup Map + */ +EAPI Elm_Map_Marker *elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Class *clas, Elm_Map_Group_Class *clas_group, void *data) EINA_ARG_NONNULL(1, 4, 5); + +/** + * Set the maximum numbers of markers' content to be displayed in a group. + * + * @param obj The map object. + * @param max The maximum numbers of items displayed in a bubble. + * + * A bubble will be displayed when the user clicks over the group, + * and will place the content of markers that belong to this group + * inside it. + * + * A group can have a long list of markers, consequently the creation + * of the content of the bubble can be very slow. + * + * In order to avoid this, a maximum number of items is displayed + * in a bubble. + * + * By default this number is 30. + * + * Marker with the same group class are grouped if they are close. + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_max_marker_per_group_set(Evas_Object *obj, int max) EINA_ARG_NONNULL(1); + +/** + * Remove a marker from the map. + * + * @param marker The marker to remove. + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_remove(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + +/** + * Get the current coordinates of the marker. + * + * @param marker marker. + * @param lat Pointer where to store the marker's latitude. + * @param lon Pointer where to store the marker's longitude. + * + * These values are set when adding markers, with function + * elm_map_marker_add(). + * + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_region_get(const Elm_Map_Marker *marker, double *lon, double *lat) EINA_ARG_NONNULL(1); + +/** + * Animatedly bring in given marker to the center of the map. + * + * @param marker The marker to center at. + * + * This causes map to jump to the given @p marker's coordinates + * and show it (by scrolling) in the center of the viewport, if it is not + * already centered. This will use animation to do so and take a period + * of time to complete. + * + * @see elm_map_marker_show() for a function to avoid animation. + * @see elm_map_marker_region_get() + * + * @ingroup Map + */ +EAPI void elm_map_marker_bring_in(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + +/** + * Show the given marker at the center of the map, @b immediately. + * + * @param marker The marker to center at. + * + * This causes map to @b redraw its viewport's contents to the + * region contining the given @p marker's coordinates, that will be + * moved to the center of the map. + * + * @see elm_map_marker_bring_in() for a function to move with animation. + * @see elm_map_markers_list_show() if more than one marker need to be + * displayed. + * @see elm_map_marker_region_get() + * + * @ingroup Map + */ +EAPI void elm_map_marker_show(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + +/** + * Move and zoom the map to display a list of markers. + * + * @param markers A list of #Elm_Map_Marker handles. + * + * The map will be centered on the center point of the markers in the list. + * Then the map will be zoomed in order to fit the markers using the maximum + * zoom which allows display of all the markers. + * + * @warning All the markers should belong to the same map object. + * + * @see elm_map_marker_show() to show a single marker. + * @see elm_map_marker_bring_in() + * + * @ingroup Map + */ +EAPI void elm_map_markers_list_show(Eina_List *markers) EINA_ARG_NONNULL(1); + +/** + * Get the Evas object returned by the ElmMapMarkerGetFunc callback + * + * @param marker The marker wich content should be returned. + * @return Return the evas object if it exists, else @c NULL. + * + * To set callback function #ElmMapMarkerGetFunc for the marker class, + * elm_map_marker_class_get_cb_set() should be used. + * + * This content is what will be inside the bubble that will be displayed + * when an user clicks over the marker. + * + * This returns the actual Evas object used to be placed inside + * the bubble. This may be @c NULL, as it may + * not have been created or may have been deleted, at any time, by + * the map. Do not modify this object (move, resize, + * show, hide, etc.), as the map 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. + * + * @ingroup Map + */ +EAPI Evas_Object *elm_map_marker_object_get(const Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + +/** + * Update the marker + * + * @param marker The marker to be updated. + * + * If a content is set to this marker, it will call function to delete it, + * #ElmMapMarkerDelFunc, and then will fetch the content again with + * #ElmMapMarkerGetFunc. + * + * These functions are set for the marker class with + * elm_map_marker_class_get_cb_set() and elm_map_marker_class_del_cb_set(). + * + * @ingroup Map + */ +EAPI void elm_map_marker_update(Elm_Map_Marker *marker) EINA_ARG_NONNULL(1); + +/** + * Close all the bubbles opened by the user. + * + * @param obj The map object. + * + * A bubble is displayed with a content fetched with #ElmMapMarkerGetFunc + * when the user clicks on a marker. + * + * This functions is set for the marker class with + * elm_map_marker_class_get_cb_set(). + * + * @ingroup Map + */ +EAPI void elm_map_bubbles_close(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Create a new group class. + * + * @param obj The map object. + * @return Returns the new group class. + * + * Each marker must be associated to a group class. Markers in the same + * group are grouped if they are close. + * + * The group class defines the style of the marker when a marker is grouped + * to others markers. When it is alone, another class will be used. + * + * A group class will need to be provided when creating a marker with + * elm_map_marker_add(). + * + * Some properties and functions can be set by class, as: + * - style, with elm_map_group_class_style_set() + * - data - to be associated to the group class. It can be set using + * elm_map_group_class_data_set(). + * - min zoom to display markers, set with + * elm_map_group_class_zoom_displayed_set(). + * - max zoom to group markers, set using + * elm_map_group_class_zoom_grouped_set(). + * - visibility - set if markers will be visible or not, set with + * elm_map_group_class_hide_set(). + * - #ElmMapGroupIconGetFunc - used to fetch icon for markers group classes. + * It can be set using elm_map_group_class_icon_cb_set(). + * + * @see elm_map_marker_add() + * @see elm_map_group_class_style_set() + * @see elm_map_group_class_data_set() + * @see elm_map_group_class_zoom_displayed_set() + * @see elm_map_group_class_zoom_grouped_set() + * @see elm_map_group_class_hide_set() + * @see elm_map_group_class_icon_cb_set() + * + * @ingroup Map + */ +EAPI Elm_Map_Group_Class *elm_map_group_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the marker's style of a group class. + * + * @param clas The group class. + * @param style The style to be used by markers. + * + * Each marker must be associated to a group class, and will use the style + * defined by such class when grouped to other markers. + * + * The following styles are provided by default theme: + * @li @c radio - blue circle + * @li @c radio2 - green circle + * @li @c empty + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_group_class_style_set(Elm_Map_Group_Class *clas, const char *style) EINA_ARG_NONNULL(1); + +/** + * Set the icon callback function of a group class. + * + * @param clas The group class. + * @param icon_get The callback function that will return the icon. + * + * Each marker must be associated to a group class, and it can display a + * custom icon. The function @p icon_get must return this icon. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_group_class_icon_cb_set(Elm_Map_Group_Class *clas, ElmMapGroupIconGetFunc icon_get) EINA_ARG_NONNULL(1); + +/** + * Set the data associated to the group class. + * + * @param clas The group class. + * @param data The new user data. + * + * This data will be passed for callback functions, like icon get callback, + * that can be set with elm_map_group_class_icon_cb_set(). + * + * If a data was previously set, the object will lose the pointer for it, + * so if needs to be freed, you must do it yourself. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_group_class_icon_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_group_class_data_set(Elm_Map_Group_Class *clas, void *data) EINA_ARG_NONNULL(1); + +/** + * Set the minimum zoom from where the markers are displayed. + * + * @param clas The group class. + * @param zoom The minimum zoom. + * + * Markers only will be displayed when the map is displayed at @p zoom + * or bigger. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_group_class_zoom_displayed_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); + +/** + * Set the zoom from where the markers are no more grouped. + * + * @param clas The group class. + * @param zoom The maximum zoom. + * + * Markers only will be grouped when the map is displayed at + * less than @p zoom. + * + * @see elm_map_group_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom) EINA_ARG_NONNULL(1); + +/** + * Set if the markers associated to the group class @p clas are hidden or not. + * + * @param clas The group class. + * @param hide Use @c EINA_TRUE to hide markers or @c EINA_FALSE + * to show them. + * + * If @p hide is @c EINA_TRUE the markers will be hidden, but default + * is to show them. + * + * @ingroup Map + */ +EAPI void elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide) EINA_ARG_NONNULL(1, 2); + +/** + * Create a new marker class. + * + * @param obj The map object. + * @return Returns the new group class. + * + * Each marker must be associated to a class. + * + * The marker class defines the style of the marker when a marker is + * displayed alone, i.e., not grouped to to others markers. When grouped + * it will use group class style. + * + * A marker class will need to be provided when creating a marker with + * elm_map_marker_add(). + * + * Some properties and functions can be set by class, as: + * - style, with elm_map_marker_class_style_set() + * - #ElmMapMarkerIconGetFunc - used to fetch icon for markers classes. + * It can be set using elm_map_marker_class_icon_cb_set(). + * - #ElmMapMarkerGetFunc - used to fetch bubble content for marker classes. + * Set using elm_map_marker_class_get_cb_set(). + * - #ElmMapMarkerDelFunc - used to delete bubble content for marker classes. + * Set using elm_map_marker_class_del_cb_set(). + * + * @see elm_map_marker_add() + * @see elm_map_marker_class_style_set() + * @see elm_map_marker_class_icon_cb_set() + * @see elm_map_marker_class_get_cb_set() + * @see elm_map_marker_class_del_cb_set() + * + * @ingroup Map + */ +EAPI Elm_Map_Marker_Class *elm_map_marker_class_new(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the marker's style of a marker class. + * + * @param clas The marker class. + * @param style The style to be used by markers. + * + * Each marker must be associated to a marker class, and will use the style + * defined by such class when alone, i.e., @b not grouped to other markers. + * + * The following styles are provided by default theme: + * @li @c radio + * @li @c radio2 + * @li @c empty + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_class_style_set(Elm_Map_Marker_Class *clas, const char *style) EINA_ARG_NONNULL(1); + +/** + * Set the icon callback function of a marker class. + * + * @param clas The marker class. + * @param icon_get The callback function that will return the icon. + * + * Each marker must be associated to a marker class, and it can display a + * custom icon. The function @p icon_get must return this icon. + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_class_icon_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerIconGetFunc icon_get) EINA_ARG_NONNULL(1); + +/** + * Set the bubble content callback function of a marker class. + * + * @param clas The marker class. + * @param get The callback function that will return the content. + * + * Each marker must be associated to a marker class, and it can display a + * a content on a bubble that opens when the user click over the marker. + * The function @p get must return this content object. + * + * If this content will need to be deleted, elm_map_marker_class_del_cb_set() + * can be used. + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_class_del_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_class_get_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerGetFunc get) EINA_ARG_NONNULL(1); + +/** + * Set the callback function used to delete bubble content of a marker class. + * + * @param clas The marker class. + * @param del The callback function that will delete the content. + * + * Each marker must be associated to a marker class, and it can display a + * a content on a bubble that opens when the user click over the marker. + * The function to return such content can be set with + * elm_map_marker_class_get_cb_set(). + * + * If this content must be freed, a callback function need to be + * set for that task with this function. + * + * If this callback is defined it will have to delete (or not) the + * object inside, but if the callback is not defined the object will be + * destroyed with evas_object_del(). + * + * @see elm_map_marker_class_new() for more details. + * @see elm_map_marker_class_get_cb_set() + * @see elm_map_marker_add() + * + * @ingroup Map + */ +EAPI void elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc del) EINA_ARG_NONNULL(1); + +/** + * Get the list of available sources. + * + * @param obj The map object. + * @return The source names list. + * + * It will provide a list with all available sources, that can be set as + * current source with elm_map_source_name_set(), or get with + * elm_map_source_name_get(). + * + * Available sources: + * @li "Mapnik" + * @li "Osmarender" + * @li "CycleMap" + * @li "Maplint" + * + * @see elm_map_source_name_set() for more details. + * @see elm_map_source_name_get() + * + * @ingroup Map + */ +EAPI const char **elm_map_source_names_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the source of the map. + * + * @param obj The map object. + * @param source The source to be used. + * + * Map widget retrieves images that composes the map from a web service. + * This web service can be set with this method. + * + * A different service can return a different maps with different + * information and it can use different zoom values. + * + * The @p source_name need to match one of the names provided by + * elm_map_source_names_get(). + * + * The current source can be get using elm_map_source_name_get(). + * + * @see elm_map_source_names_get() + * @see elm_map_source_name_get() + * + * + * @ingroup Map + */ +EAPI void elm_map_source_name_set(Evas_Object *obj, const char *source_name) EINA_ARG_NONNULL(1); + +/** + * Get the name of currently used source. + * + * @param obj The map object. + * @return Returns the name of the source in use. + * + * @see elm_map_source_name_set() for more details. + * + * @ingroup Map + */ +EAPI const char *elm_map_source_name_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the source of the route service to be used by the map. + * + * @param obj The map object. + * @param source The route service to be used, being it one of + * #ELM_MAP_ROUTE_SOURCE_YOURS (default), #ELM_MAP_ROUTE_SOURCE_MONAV, + * and #ELM_MAP_ROUTE_SOURCE_ORS. + * + * Each one has its own algorithm, so the route retrieved may + * differ depending on the source route. Now, only the default is working. + * + * #ELM_MAP_ROUTE_SOURCE_YOURS is the routing service provided at + * http://www.yournavigation.org/. + * + * #ELM_MAP_ROUTE_SOURCE_MONAV, offers exact routing without heuristic + * assumptions. Its routing core is based on Contraction Hierarchies. + * + * #ELM_MAP_ROUTE_SOURCE_ORS, is provided at http://www.openrouteservice.org/ + * + * @see elm_map_route_source_get(). + * + * @ingroup Map + */ +EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source) EINA_ARG_NONNULL(1); + +/** + * Get the current route source. + * + * @param obj The map object. + * @return The source of the route service used by the map. + * + * @see elm_map_route_source_set() for details. + * + * @ingroup Map + */ +EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the minimum zoom of the source. + * + * @param obj The map object. + * @param zoom New minimum zoom value to be used. + * + * By default, it's 0. + * + * @ingroup Map + */ +EAPI void elm_map_source_zoom_min_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + +/** + * Get the minimum zoom of the source. + * + * @param obj The map object. + * @return Returns the minimum zoom of the source. + * + * @see elm_map_source_zoom_min_set() for details. + * + * @ingroup Map + */ +EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the maximum zoom of the source. + * + * @param obj The map object. + * @param zoom New maximum zoom value to be used. + * + * By default, it's 18. + * + * @ingroup Map + */ +EAPI void elm_map_source_zoom_max_set(Evas_Object *obj, int zoom) EINA_ARG_NONNULL(1); + +/** + * Get the maximum zoom of the source. + * + * @param obj The map object. + * @return Returns the maximum zoom of the source. + * + * @see elm_map_source_zoom_min_set() for details. + * + * @ingroup Map + */ +EAPI int elm_map_source_zoom_max_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the user agent used by the map object to access routing services. + * + * @param obj The map object. + * @param user_agent The user agent to be used by the map. + * + * User agent is a client application implementing a network protocol used + * in communications within a client–server distributed computing system + * + * The @p user_agent identification string will transmitted in a header + * field @c User-Agent. + * + * @see elm_map_user_agent_get() + * + * @ingroup Map + */ +EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent) EINA_ARG_NONNULL(1, 2); + +/** + * Get the user agent used by the map object. + * + * @param obj The map object. + * @return The user agent identification string used by the map. + * + * @see elm_map_user_agent_set() for details. + * + * @ingroup Map + */ +EAPI const char *elm_map_user_agent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Add a new route to the map object. + * + * @param obj The map object. + * @param type The type of transport to be considered when tracing a route. + * @param method The routing method, what should be priorized. + * @param flon The start longitude. + * @param flat The start latitude. + * @param tlon The destination longitude. + * @param tlat The destination latitude. + * + * @return The created route or @c NULL upon failure. + * + * A route will be traced by point on coordinates (@p flat, @p flon) + * to point on coordinates (@p tlat, @p tlon), using the route service + * set with elm_map_route_source_set(). + * + * It will take @p type on consideration to define the route, + * depending if the user will be walking or driving, the route may vary. + * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE, or + * #ELM_MAP_ROUTE_TYPE_FOOT need to be used. + * + * Another parameter is what the route should priorize, the minor distance + * or the less time to be spend on the route. So @p method should be one + * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST. + * + * Routes created with this method can be deleted with + * elm_map_route_remove(), colored with elm_map_route_color_set(), + * and distance can be get with elm_map_route_distance_get(). + * + * @see elm_map_route_remove() + * @see elm_map_route_color_set() + * @see elm_map_route_distance_get() + * @see elm_map_route_source_set() + * + * @ingroup Map + */ +EAPI Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat) EINA_ARG_NONNULL(1); + +/** + * Remove a route from the map. + * + * @param route The route to remove. + * + * @see elm_map_route_add() + * + * @ingroup Map + */ +EAPI void elm_map_route_remove(Elm_Map_Route *route) EINA_ARG_NONNULL(1); + +/** + * Set the route color. + * + * @param route The route object. + * @param r Red channel value, from 0 to 255. + * @param g Green channel value, from 0 to 255. + * @param b Blue channel value, from 0 to 255. + * @param a Alpha channel value, from 0 to 255. + * + * It uses an additive color model, so each color channel represents + * how much of each primary colors must to be used. 0 represents + * ausence of this color, so if all of the three are set to 0, + * the color will be black. + * + * These component values should be integers in the range 0 to 255, + * (single 8-bit byte). + * + * This sets the color used for the route. By default, it is set to + * solid red (r = 255, g = 0, b = 0, a = 255). + * + * For alpha channel, 0 represents completely transparent, and 255, opaque. + * + * @see elm_map_route_color_get() + * + * @ingroup Map + */ +EAPI void elm_map_route_color_set(Elm_Map_Route *route, int r, int g, int b, int a) EINA_ARG_NONNULL(1); + +/** + * Get the route color. + * + * @param route The route object. + * @param r Pointer where to store the red channel value. + * @param g Pointer where to store the green channel value. + * @param b Pointer where to store the blue channel value. + * @param a Pointer where to store the alpha channel value. + * + * @see elm_map_route_color_set() for details. + * + * @ingroup Map + */ +EAPI void elm_map_route_color_get(const Elm_Map_Route *route, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); + +/** + * Get the route distance in kilometers. + * + * @param route The route object. + * @return The distance of route (unit : km). + * + * @ingroup Map + */ +EAPI double elm_map_route_distance_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + +/** + * Get the information of route nodes. + * + * @param route The route object. + * @return Returns a string with the nodes of route. + * + * @ingroup Map + */ +EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + +/** + * Get the information of route waypoint. + * + * @param route the route object. + * @return Returns a string with information about waypoint of route. + * + * @ingroup Map + */ +EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route) EINA_ARG_NONNULL(1); + +/** + * Get the address of the name. + * + * @param name The name handle. + * @return Returns the address string of @p name. + * + * This gets the coordinates of the @p name, created with one of the + * conversion functions. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ +EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name) EINA_ARG_NONNULL(1); + +/** + * Get the current coordinates of the name. + * + * @param name The name handle. + * @param lat Pointer where to store the latitude. + * @param lon Pointer where to store The longitude. + * + * This gets the coordinates of the @p name, created with one of the + * conversion functions. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ +EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat) EINA_ARG_NONNULL(1); + +/** + * Remove a name from the map. + * + * @param name The name to remove. + * + * Basically the struct handled by @p name will be freed, so convertions + * between address and coordinates will be lost. + * + * @see elm_map_utils_convert_name_into_coord() + * @see elm_map_utils_convert_coord_into_name() + * + * @ingroup Map + */ +EAPI void elm_map_name_remove(Elm_Map_Name *name) EINA_ARG_NONNULL(1); + +/** + * Rotate the map. + * + * @param obj The map object. + * @param degree Angle from 0.0 to 360.0 to rotate arount Z axis. + * @param cx Rotation's center horizontal position. + * @param cy Rotation's center vertical position. + * + * @see elm_map_rotate_get() + * + * @ingroup Map + */ +EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy) EINA_ARG_NONNULL(1); + +/** + * Get the rotate degree of the map + * + * @param obj The map object + * @param degree Pointer where to store degrees from 0.0 to 360.0 + * to rotate arount Z axis. + * @param cx Pointer where to store rotation's center horizontal position. + * @param cy Pointer where to store rotation's center vertical position. + * + * @see elm_map_rotate_set() to set map rotation. + * + * @ingroup Map + */ +EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy) EINA_ARG_NONNULL(1, 2, 3, 4); + +/** + * Enable or disable mouse wheel to be used to zoom in / out the map. + * + * @param obj The map object. + * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE + * to enable it. + * + * Mouse wheel can be used for the user to zoom in or zoom out the map. + * + * It's disabled by default. + * + * @see elm_map_wheel_disabled_get() + * + * @ingroup Map + */ +EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); + +/** + * Get a value whether mouse wheel is enabled or not. + * + * @param obj The map object. + * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates + * it is enabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * Mouse wheel can be used for the user to zoom in or zoom out the map. + * + * @see elm_map_wheel_disabled_set() for details. + * + * @ingroup Map + */ +EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); #ifdef ELM_EMAP - /** - * Add a track on the map - * - * @param obj The map object. - * @param emap The emap route object. - * @return The route object. This is an elm object of type Route. - * - * @see elm_route_add() for details. - * - * @ingroup Map - */ - EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, EMap_Route *emap) EINA_ARG_NONNULL(1); +/** + * Add a track on the map + * + * @param obj The map object. + * @param emap The emap route object. + * @return The route object. This is an elm object of type Route. + * + * @see elm_route_add() for details. + * + * @ingroup Map + */ +EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, EMap_Route *emap) EINA_ARG_NONNULL(1); #endif - /** - * Remove a track from the map - * - * @param obj The map object. - * @param route The track to remove. - * - * @ingroup Map - */ - EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route) EINA_ARG_NONNULL(1); +/** + * Remove a track from the map + * + * @param obj The map object. + * @param route The track to remove. + * + * @ingroup Map + */ +EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route) EINA_ARG_NONNULL(1); - /** - * @} - */ +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_mapbuf.h b/legacy/elementary/src/lib/elm_mapbuf.h index aabdef832c..4522f0f22e 100644 --- a/legacy/elementary/src/lib/elm_mapbuf.h +++ b/legacy/elementary/src/lib/elm_mapbuf.h @@ -1,195 +1,196 @@ - /** - * @defgroup Mapbuf Mapbuf - * @ingroup Elementary - * - * @image html img/widget/mapbuf/preview-00.png - * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth - * - * This holds one content object and uses an Evas Map of transformation - * points to be later used with this content. So the content will be - * moved, resized, etc as a single image. So it will improve performance - * when you have a complex interafce, with a lot of elements, and will - * need to resize or move it frequently (the content object and its - * children). - * - * Default contents parts of the mapbuf widget that you can use for are: - * @li "default" - A content of the mapbuf - * - * To enable map, elm_mapbuf_enabled_set() should be used. - * - * See how to use this widget in this example: - * @ref mapbuf_example - */ +/** + * @defgroup Mapbuf Mapbuf + * @ingroup Elementary + * + * @image html img/widget/mapbuf/preview-00.png + * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth + * + * This holds one content object and uses an Evas Map of transformation + * points to be later used with this content. So the content will be + * moved, resized, etc as a single image. So it will improve performance + * when you have a complex interafce, with a lot of elements, and will + * need to resize or move it frequently (the content object and its + * children). + * + * Default contents parts of the mapbuf widget that you can use for are: + * @li "default" - A content of the mapbuf + * + * To enable map, elm_mapbuf_enabled_set() should be used. + * + * See how to use this widget in this example: + * @ref mapbuf_example + */ - /** - * @addtogroup Mapbuf - * @{ - */ +/** + * @addtogroup Mapbuf + * @{ + */ - /** - * Add a new mapbuf widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return A new mapbuf widget handle or @c NULL, on errors. - * - * This function inserts a new mapbuf widget on the canvas. - * - * @ingroup Mapbuf - */ - EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new mapbuf widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return A new mapbuf widget handle or @c NULL, on errors. + * + * This function inserts a new mapbuf widget on the canvas. + * + * @ingroup Mapbuf + */ +EAPI Evas_Object * + elm_mapbuf_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the content of the mapbuf. - * - * @param obj The mapbuf object. - * @param content The content that will be filled in this mapbuf 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_mapbuf_content_unset() function. - * - * To enable map, elm_mapbuf_enabled_set() should be used. - * - * @deprecated use elm_object_content_set() instead - * - * @ingroup Mapbuf - */ - EINA_DEPRECATED EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the content of the mapbuf. + * + * @param obj The mapbuf object. + * @param content The content that will be filled in this mapbuf 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_mapbuf_content_unset() function. + * + * To enable map, elm_mapbuf_enabled_set() should be used. + * + * @deprecated use elm_object_content_set() instead + * + * @ingroup Mapbuf + */ +EINA_DEPRECATED EAPI void elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Get the content of the mapbuf. - * - * @param obj The mapbuf object. - * @return The content that is being used. - * - * Return the content object which is set for this widget. - * - * @see elm_mapbuf_content_set() for details. - * - * @deprecated use elm_object_content_get() instead - * - * @ingroup Mapbuf - */ - EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the content of the mapbuf. + * + * @param obj The mapbuf object. + * @return The content that is being used. + * + * Return the content object which is set for this widget. + * + * @see elm_mapbuf_content_set() for details. + * + * @deprecated use elm_object_content_get() instead + * + * @ingroup Mapbuf + */ +EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the content of the mapbuf. - * - * @param obj The mapbuf object. - * @return The content that was being used. - * - * Unparent and return the content object which was set for this widget. - * - * @see elm_mapbuf_content_set() for details. - * - * @deprecated use elm_object_content_unset() instead - * - * @ingroup Mapbuf - */ - EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the content of the mapbuf. + * + * @param obj The mapbuf object. + * @return The content that was being used. + * + * Unparent and return the content object which was set for this widget. + * + * @see elm_mapbuf_content_set() for details. + * + * @deprecated use elm_object_content_unset() instead + * + * @ingroup Mapbuf + */ +EINA_DEPRECATED EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable the map. - * - * @param obj The mapbuf object. - * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it. - * - * This enables the map that is set or disables it. On enable, the object - * geometry will be saved, and the new geometry will change (position and - * size) to reflect the map geometry set. - * - * Also, when enabled, alpha and smooth states will be used, so if the - * content isn't solid, alpha should be enabled, for example, otherwise - * a black retangle will fill the content. - * - * When disabled, the stored map will be freed and geometry prior to - * enabling the map will be restored. - * - * It's disabled by default. - * - * @see elm_mapbuf_alpha_set() - * @see elm_mapbuf_smooth_set() - * - * @ingroup Mapbuf - */ - EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); +/** + * Enable or disable the map. + * + * @param obj The mapbuf object. + * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it. + * + * This enables the map that is set or disables it. On enable, the object + * geometry will be saved, and the new geometry will change (position and + * size) to reflect the map geometry set. + * + * Also, when enabled, alpha and smooth states will be used, so if the + * content isn't solid, alpha should be enabled, for example, otherwise + * a black retangle will fill the content. + * + * When disabled, the stored map will be freed and geometry prior to + * enabling the map will be restored. + * + * It's disabled by default. + * + * @see elm_mapbuf_alpha_set() + * @see elm_mapbuf_smooth_set() + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); - /** - * Get a value whether map is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates - * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_enabled_set() for details. - * - * @ingroup Mapbuf - */ - EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether map is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates + * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_enabled_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Enable or disable smooth map rendering. - * - * @param obj The mapbuf object. - * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE - * to disable it. - * - * This sets smoothing for map rendering. If the object is a type that has - * its own smoothing settings, then both the smooth settings for this object - * and the map must be turned off. - * - * By default smooth maps are enabled. - * - * @ingroup Mapbuf - */ - EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1); +/** + * Enable or disable smooth map rendering. + * + * @param obj The mapbuf object. + * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE + * to disable it. + * + * This sets smoothing for map rendering. If the object is a type that has + * its own smoothing settings, then both the smooth settings for this object + * and the map must be turned off. + * + * By default smooth maps are enabled. + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1); - /** - * Get a value whether smooth map rendering is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE - * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_smooth_set() for details. - * - * @ingroup Mapbuf - */ - EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get a value whether smooth map rendering is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE + * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_smooth_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set or unset alpha flag for map rendering. - * - * @param obj The mapbuf object. - * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE - * to disable it. - * - * This sets alpha flag for map rendering. If the object is a type that has - * its own alpha settings, then this will take precedence. Only image objects - * have this currently. It stops alpha blending of the map area, and is - * useful if you know the object and/or all sub-objects is 100% solid. - * - * Alpha is enabled by default. - * - * @ingroup Mapbuf - */ - EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1); +/** + * Set or unset alpha flag for map rendering. + * + * @param obj The mapbuf object. + * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE + * to disable it. + * + * This sets alpha flag for map rendering. If the object is a type that has + * its own alpha settings, then this will take precedence. Only image objects + * have this currently. It stops alpha blending of the map area, and is + * useful if you know the object and/or all sub-objects is 100% solid. + * + * Alpha is enabled by default. + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1); - /** - * Get a value whether alpha blending is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE - * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_alpha_set() for details. - * - * @ingroup Mapbuf - */ - EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get a value whether alpha blending is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE + * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_alpha_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_menu.h b/legacy/elementary/src/lib/elm_menu.h index f9e9daf6ed..fbd9e84b07 100644 --- a/legacy/elementary/src/lib/elm_menu.h +++ b/legacy/elementary/src/lib/elm_menu.h @@ -1,372 +1,373 @@ - /** - * @defgroup Menu Menu - * - * @image html img/widget/menu/preview-00.png - * @image latex img/widget/menu/preview-00.eps - * - * A menu is a list of items displayed above its parent. When the menu is - * showing its parent is darkened. Each item can have a sub-menu. The menu - * object can be used to display a menu on a right click event, in a toolbar, - * anywhere. - * - * Signals that you can add callbacks for are: - * @li "clicked" - the user clicked the empty space in the menu to dismiss. - * - * Default contents parts of the menu items that you can use for are: - * @li "default" - A main content of the menu item - * - * Default text parts of the menu items that you can use for are: - * @li "default" - label in the menu item - * - * @see @ref tutorial_menu - * @{ - */ +/** + * @defgroup Menu Menu + * + * @image html img/widget/menu/preview-00.png + * @image latex img/widget/menu/preview-00.eps + * + * A menu is a list of items displayed above its parent. When the menu is + * showing its parent is darkened. Each item can have a sub-menu. The menu + * object can be used to display a menu on a right click event, in a toolbar, + * anywhere. + * + * Signals that you can add callbacks for are: + * @li "clicked" - the user clicked the empty space in the menu to dismiss. + * + * Default contents parts of the menu items that you can use for are: + * @li "default" - A main content of the menu item + * + * Default text parts of the menu items that you can use for are: + * @li "default" - label in the menu item + * + * @see @ref tutorial_menu + * @{ + */ - /** - * @brief Add a new menu to the parent - * - * @param parent The parent object. - * @return The new object or NULL if it cannot be created. - */ - EAPI Evas_Object *elm_menu_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new menu to the parent + * + * @param parent The parent object. + * @return The new object or NULL if it cannot be created. + */ +EAPI Evas_Object * + elm_menu_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Set the parent for the given menu widget - * - * @param obj The menu object. - * @param parent The new parent. - */ - EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Set the parent for the given menu widget + * + * @param obj The menu object. + * @param parent The new parent. + */ +EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * @brief Get the parent for the given menu widget - * - * @param obj The menu object. - * @return The parent. - * - * @see elm_menu_parent_set() - */ - EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the parent for the given menu widget + * + * @param obj The menu object. + * @return The parent. + * + * @see elm_menu_parent_set() + */ +EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Move the menu to a new position - * - * @param obj The menu object. - * @param x The new position. - * @param y The new position. - * - * Sets the top-left position of the menu to (@p x,@p y). - * - * @note @p x and @p y coordinates are relative to parent. - */ - EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); +/** + * @brief Move the menu to a new position + * + * @param obj The menu object. + * @param x The new position. + * @param y The new position. + * + * Sets the top-left position of the menu to (@p x,@p y). + * + * @note @p x and @p y coordinates are relative to parent. + */ +EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); - /** - * @brief Close a opened menu - * - * @param obj the menu object - * @return void - * - * Hides the menu and all it's sub-menus. - */ - EAPI void elm_menu_close(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Close a opened menu + * + * @param obj the menu object + * @return void + * + * Hides the menu and all it's sub-menus. + */ +EAPI void elm_menu_close(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Returns a list of @p item's items. - * - * @param obj The menu object - * @return An Eina_List* of @p item's items - */ - EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Returns a list of @p item's items. + * + * @param obj The menu object + * @return An Eina_List* of @p item's items + */ +EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the Evas_Object of an Elm_Object_Item - * - * @param it The menu item object. - * @return The edje object containing the swallowed content - * - * @warning Don't manipulate this object! - * - */ - EAPI Evas_Object *elm_menu_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the Evas_Object of an Elm_Object_Item + * + * @param it The menu item object. + * @return The edje object containing the swallowed content + * + * @warning Don't manipulate this object! + * + */ +EAPI Evas_Object *elm_menu_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Add an item at the end of the given menu widget - * - * @param obj The menu object. - * @param parent The parent menu item (optional) - * @param icon An icon display on the item. The icon will be destryed by the menu. - * @param label The label of the item. - * @param func Function called when the user select the item. - * @param data Data sent by the callback. - * @return Returns the new item. - */ - EAPI Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * @brief Add an item at the end of the given menu widget + * + * @param obj The menu object. + * @param parent The parent menu item (optional) + * @param icon An icon display on the item. The icon will be destryed by the menu. + * @param label The label of the item. + * @param func Function called when the user select the item. + * @param data Data sent by the callback. + * @return Returns the new item. + */ +EAPI Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - /** - * @brief Add an object swallowed in an item at the end of the given menu - * widget - * - * @param obj The menu object. - * @param parent The parent menu item (optional) - * @param subobj The object to swallow - * @param func Function called when the user select the item. - * @param data Data sent by the callback. - * @return Returns the new item. - * - * Add an evas object as an item to the menu. - */ - EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +/** + * @brief Add an object swallowed in an item at the end of the given menu + * widget + * + * @param obj The menu object. + * @param parent The parent menu item (optional) + * @param subobj The object to swallow + * @param func Function called when the user select the item. + * @param data Data sent by the callback. + * @return Returns the new item. + * + * Add an evas object as an item to the menu. + */ +EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - /** - * @brief Set the label of a menu item - * - * @param it The menu item object. - * @param label The label to set for @p item - * - * @warning Don't use this funcion on items created with - * elm_menu_item_add_object() or elm_menu_item_separator_add(). - * - * @deprecated Use elm_object_item_text_set() instead - */ - EINA_DEPRECATED EAPI void elm_menu_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Set the label of a menu item + * + * @param it The menu item object. + * @param label The label to set for @p item + * + * @warning Don't use this funcion on items created with + * elm_menu_item_add_object() or elm_menu_item_separator_add(). + * + * @deprecated Use elm_object_item_text_set() instead + */ +EINA_DEPRECATED EAPI void elm_menu_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Get the label of a menu item - * - * @param it The menu item object. - * @return The label of @p item - * @deprecated Use elm_object_item_text_get() instead - */ - EINA_DEPRECATED EAPI const char *elm_menu_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the label of a menu item + * + * @param it The menu item object. + * @return The label of @p item + * @deprecated Use elm_object_item_text_get() instead + */ +EINA_DEPRECATED EAPI const char *elm_menu_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the icon of a menu item to the standard icon with name @p icon - * - * @param it The menu item object. - * @param icon The icon object to set for the content of @p item - * - * Once this icon is set, any previously set icon will be deleted. - */ - EAPI void elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon) EINA_ARG_NONNULL(1, 2); +/** + * @brief Set the icon of a menu item to the standard icon with name @p icon + * + * @param it The menu item object. + * @param icon The icon object to set for the content of @p item + * + * Once this icon is set, any previously set icon will be deleted. + */ +EAPI void elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon) EINA_ARG_NONNULL(1, 2); - /** - * @brief Get the string representation from the icon of a menu item - * - * @param it The menu item object. - * @return The string representation of @p item's icon or NULL - * - * @see elm_menu_item_object_icon_name_set() - */ - EAPI const char *elm_menu_item_object_icon_name_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the string representation from the icon of a menu item + * + * @param it The menu item object. + * @return The string representation of @p item's icon or NULL + * + * @see elm_menu_item_object_icon_name_set() + */ +EAPI const char *elm_menu_item_object_icon_name_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the content object of a menu item - * - * @param it The menu item object - * @param The content object or NULL - * @return EINA_TRUE on success, else EINA_FALSE - * - * Use this function to change the object swallowed by a menu item, deleting - * any previously swallowed object. - * - * @deprecated Use elm_object_item_content_set() instead - */ - EINA_DEPRECATED EAPI Eina_Bool elm_menu_item_object_content_set(Elm_Object_Item *it, Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Set the content object of a menu item + * + * @param it The menu item object + * @param The content object or NULL + * @return EINA_TRUE on success, else EINA_FALSE + * + * Use this function to change the object swallowed by a menu item, deleting + * any previously swallowed object. + * + * @deprecated Use elm_object_item_content_set() instead + */ +EINA_DEPRECATED EAPI Eina_Bool elm_menu_item_object_content_set(Elm_Object_Item *it, Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the content object of a menu item - * - * @param it The menu item object - * @return The content object or NULL - * @note If @p item was added with elm_menu_item_add_object, this - * function will return the object passed, else it will return the - * icon object. - * - * @see elm_menu_item_object_content_set() - * - * @deprecated Use elm_object_item_content_get() instead - */ - EINA_DEPRECATED EAPI Evas_Object *elm_menu_item_object_content_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the content object of a menu item + * + * @param it The menu item object + * @return The content object or NULL + * @note If @p item was added with elm_menu_item_add_object, this + * function will return the object passed, else it will return the + * icon object. + * + * @see elm_menu_item_object_content_set() + * + * @deprecated Use elm_object_item_content_get() instead + */ +EINA_DEPRECATED EAPI Evas_Object *elm_menu_item_object_content_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the selected state of @p item. - * - * @param it The menu item object. - * @param selected The selected/unselected state of the item - */ - EAPI void elm_menu_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); +/** + * @brief Set the selected state of @p item. + * + * @param it The menu item object. + * @param selected The selected/unselected state of the item + */ +EAPI void elm_menu_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); - /** - * @brief Get the selected state of @p item. - * - * @param it The menu item object. - * @return The selected/unselected state of the item - * - * @see elm_menu_item_selected_set() - */ - EAPI Eina_Bool elm_menu_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the selected state of @p item. + * + * @param it The menu item object. + * @return The selected/unselected state of the item + * + * @see elm_menu_item_selected_set() + */ +EAPI Eina_Bool elm_menu_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the disabled state of @p item. - * - * @param it The menu item object. - * @param disabled The enabled/disabled state of the item - * @deprecated Use elm_object_item_disabled_set() instead - */ - EINA_DEPRECATED EAPI void elm_menu_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); +/** + * @brief Set the disabled state of @p item. + * + * @param it The menu item object. + * @param disabled The enabled/disabled state of the item + * @deprecated Use elm_object_item_disabled_set() instead + */ +EINA_DEPRECATED EAPI void elm_menu_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); - /** - * @brief Get the disabled state of @p item. - * - * @param it The menu item object. - * @return The enabled/disabled state of the item - * - * @see elm_menu_item_disabled_set() - * @deprecated Use elm_object_item_disabled_get() instead - */ - EINA_DEPRECATED EAPI Eina_Bool elm_menu_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the disabled state of @p item. + * + * @param it The menu item object. + * @return The enabled/disabled state of the item + * + * @see elm_menu_item_disabled_set() + * @deprecated Use elm_object_item_disabled_get() instead + */ +EINA_DEPRECATED EAPI Eina_Bool elm_menu_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Add a separator item to menu @p obj under @p parent. - * - * @param obj The menu object - * @param parent The item to add the separator under - * @return The created item or NULL on failure - * - * This is item is a @ref Separator. - */ - EAPI Elm_Object_Item *elm_menu_item_separator_add(Evas_Object *obj, Elm_Object_Item *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a separator item to menu @p obj under @p parent. + * + * @param obj The menu object + * @param parent The item to add the separator under + * @return The created item or NULL on failure + * + * This is item is a @ref Separator. + */ +EAPI Elm_Object_Item *elm_menu_item_separator_add(Evas_Object *obj, Elm_Object_Item *parent) EINA_ARG_NONNULL(1); - /** - * @brief Returns whether @p item is a separator. - * - * @param it The item to check - * @return If true, @p item is a separator - * - * @see elm_menu_item_separator_add() - */ - EAPI Eina_Bool elm_menu_item_is_separator(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Returns whether @p item is a separator. + * + * @param it The item to check + * @return If true, @p item is a separator + * + * @see elm_menu_item_separator_add() + */ +EAPI Eina_Bool elm_menu_item_is_separator(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Deletes an item from the menu. - * - * @param it The item to delete. - * - * @see elm_menu_item_add() - */ - EAPI void elm_menu_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Deletes an item from the menu. + * + * @param it The item to delete. + * + * @see elm_menu_item_add() + */ +EAPI void elm_menu_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Set the function called when a menu item is deleted. - * - * @param it The item to set the callback on - * @param func The function called - * - * @see elm_menu_item_add() - * @see elm_menu_item_del() - */ - EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +/** + * @brief Set the function called when a menu item is deleted. + * + * @param it The item to set the callback on + * @param func The function called + * + * @see elm_menu_item_add() + * @see elm_menu_item_del() + */ +EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - /** - * @brief Returns the data associated with menu item @p item. - * - * @param it The item - * @return The data associated with @p item or NULL if none was set. - * - * This is the data set with elm_menu_add() or elm_menu_item_data_set(). - * - * @deprecated Use elm_object_item_data_get() instead - */ - EINA_DEPRECATED EAPI void *elm_menu_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Returns the data associated with menu item @p item. + * + * @param it The item + * @return The data associated with @p item or NULL if none was set. + * + * This is the data set with elm_menu_add() or elm_menu_item_data_set(). + * + * @deprecated Use elm_object_item_data_get() instead + */ +EINA_DEPRECATED EAPI void *elm_menu_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Sets the data to be associated with menu item @p item. - * - * @param it The item - * @param data The data to be associated with @p item - * - * @deprecated Use elm_object_item_data_set() instead - */ - EINA_DEPRECATED EAPI void elm_menu_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); +/** + * @brief Sets the data to be associated with menu item @p item. + * + * @param it The item + * @param data The data to be associated with @p item + * + * @deprecated Use elm_object_item_data_set() instead + */ +EINA_DEPRECATED EAPI void elm_menu_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); - /** - * @brief Returns a list of @p item's subitems. - * - * @param it The item - * @return An Eina_List* of @p item's subitems - * - * @see elm_menu_add() - */ - EAPI const Eina_List *elm_menu_item_subitems_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Returns a list of @p item's subitems. + * + * @param it The item + * @return An Eina_List* of @p item's subitems + * + * @see elm_menu_add() + */ +EAPI const Eina_List *elm_menu_item_subitems_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Get the position of a menu item - * - * @param it The menu item - * @return The item's index - * - * This function returns the index position of a menu item in a menu. - * For a sub-menu, this number is relative to the first item in the sub-menu. - * - * @note Index values begin with 0 - */ - EAPI unsigned int elm_menu_item_index_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @brief Get the position of a menu item + * + * @param it The menu item + * @return The item's index + * + * This function returns the index position of a menu item in a menu. + * For a sub-menu, this number is relative to the first item in the sub-menu. + * + * @note Index values begin with 0 + */ +EAPI unsigned int elm_menu_item_index_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1) EINA_PURE; - /** - * @brief @brief Return a menu item's owner menu - * - * @param it The menu item - * @return The menu object owning @p item, or NULL on failure - * - * Use this function to get the menu object owning an item. - */ - EAPI Evas_Object *elm_menu_item_menu_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @brief @brief Return a menu item's owner menu + * + * @param it The menu item + * @return The menu object owning @p item, or NULL on failure + * + * Use this function to get the menu object owning an item. + */ +EAPI Evas_Object *elm_menu_item_menu_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1) EINA_PURE; - /** - * @brief Get the selected item in the menu - * - * @param obj The menu object - * @return The selected item, or NULL if none - * - * @see elm_menu_item_selected_get() - * @see elm_menu_item_selected_set() - */ - EAPI Elm_Object_Item *elm_menu_selected_item_get(const Evas_Object * obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the selected item in the menu + * + * @param obj The menu object + * @return The selected item, or NULL if none + * + * @see elm_menu_item_selected_get() + * @see elm_menu_item_selected_set() + */ +EAPI Elm_Object_Item *elm_menu_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the last item in the menu - * - * @param obj The menu object - * @return The last item, or NULL if none - */ - EAPI Elm_Object_Item *elm_menu_last_item_get(const Evas_Object * obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the last item in the menu + * + * @param obj The menu object + * @return The last item, or NULL if none + */ +EAPI Elm_Object_Item *elm_menu_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the first item in the menu - * - * @param obj The menu object - * @return The first item, or NULL if none - */ - EAPI Elm_Object_Item *elm_menu_first_item_get(const Evas_Object * obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the first item in the menu + * + * @param obj The menu object + * @return The first item, or NULL if none + */ +EAPI Elm_Object_Item *elm_menu_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the next item in the menu. - * - * @param it The menu item object. - * @return The item after it, or NULL if none - */ - EAPI Elm_Object_Item *elm_menu_item_next_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @brief Get the next item in the menu. + * + * @param it The menu item object. + * @return The item after it, or NULL if none + */ +EAPI Elm_Object_Item *elm_menu_item_next_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * @brief Get the previous item in the menu. - * - * @param it The menu item object. - * @return The item before it, or NULL if none - */ - EAPI Elm_Object_Item *elm_menu_item_prev_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the previous item in the menu. + * + * @param it The menu item object. + * @return The item before it, or NULL if none + */ +EAPI Elm_Object_Item *elm_menu_item_prev_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_mirroring.h b/legacy/elementary/src/lib/elm_mirroring.h index 27f2962322..5420e381fa 100644 --- a/legacy/elementary/src/lib/elm_mirroring.h +++ b/legacy/elementary/src/lib/elm_mirroring.h @@ -1,55 +1,56 @@ - /** - * @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. - * - * @{ - */ +/** + * @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); +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); +/** + * 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); +/** + * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_need.h b/legacy/elementary/src/lib/elm_need.h index d1d751ac46..e06644865e 100644 --- a/legacy/elementary/src/lib/elm_need.h +++ b/legacy/elementary/src/lib/elm_need.h @@ -1,50 +1,49 @@ - /** - * Request that your elementary application needs efreet - * - * This initializes the Efreet library when called and if support exists - * it returns EINA_TRUE, otherwise returns EINA_FALSE. This must be called - * before any efreet calls. - * - * @return EINA_TRUE if support exists and initialization succeeded. - * - * @ingroup Efreet - */ - EAPI Eina_Bool elm_need_efreet(void); +/** + * Request that your elementary application needs efreet + * + * This initializes the Efreet library when called and if support exists + * it returns EINA_TRUE, otherwise returns EINA_FALSE. This must be called + * before any efreet calls. + * + * @return EINA_TRUE if support exists and initialization succeeded. + * + * @ingroup Efreet + */ +EAPI Eina_Bool elm_need_efreet(void); - /** - * Request that your elementary application needs e_dbus - * - * This initializes the E_dbus library when called and if support exists - * it returns EINA_TRUE, otherwise returns EINA_FALSE. This must be called - * before any e_dbus calls. - * - * @return EINA_TRUE if support exists and initialization succeeded. - * - * @ingroup E_dbus - */ - EAPI Eina_Bool elm_need_e_dbus(void); +/** + * Request that your elementary application needs e_dbus + * + * This initializes the E_dbus library when called and if support exists + * it returns EINA_TRUE, otherwise returns EINA_FALSE. This must be called + * before any e_dbus calls. + * + * @return EINA_TRUE if support exists and initialization succeeded. + * + * @ingroup E_dbus + */ +EAPI Eina_Bool elm_need_e_dbus(void); - /** - * Request that your elementary application needs ethumb - * - * This initializes the Ethumb library when called and if support exists - * it returns EINA_TRUE, otherwise returns EINA_FALSE. - * This must be called before any other function that deals with - * elm_thumb objects or ethumb_client instances. - * - * @ingroup Thumb - */ - EAPI Eina_Bool elm_need_ethumb(void); - - /** - * Request that your elementary application needs web support - * - * This initializes the Ewebkit library when called and if support exists - * it returns EINA_TRUE, otherwise returns EINA_FALSE. - * This must be called before any other function that deals with - * elm_web objects or ewk_view instances. - * - * @ingroup Web - */ - EAPI Eina_Bool elm_need_web(void); +/** + * Request that your elementary application needs ethumb + * + * This initializes the Ethumb library when called and if support exists + * it returns EINA_TRUE, otherwise returns EINA_FALSE. + * This must be called before any other function that deals with + * elm_thumb objects or ethumb_client instances. + * + * @ingroup Thumb + */ +EAPI Eina_Bool elm_need_ethumb(void); +/** + * Request that your elementary application needs web support + * + * This initializes the Ewebkit library when called and if support exists + * it returns EINA_TRUE, otherwise returns EINA_FALSE. + * This must be called before any other function that deals with + * elm_web objects or ewk_view instances. + * + * @ingroup Web + */ +EAPI Eina_Bool elm_need_web(void); diff --git a/legacy/elementary/src/lib/elm_notify.h b/legacy/elementary/src/lib/elm_notify.h index 8fa397e7d9..3dcf4dc503 100644 --- a/legacy/elementary/src/lib/elm_notify.h +++ b/legacy/elementary/src/lib/elm_notify.h @@ -1,191 +1,192 @@ - /** - * @defgroup Notify Notify - * - * @image html img/widget/notify/preview-00.png - * @image latex img/widget/notify/preview-00.eps - * - * 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. - * - * 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 - * - * Default contents parts of the notify widget that you can use for are: - * @li "default" - A content of the notify - * - * @ref tutorial_notify show usage of the API. - * - * @{ - */ +/** + * @defgroup Notify Notify + * + * @image html img/widget/notify/preview-00.png + * @image latex img/widget/notify/preview-00.eps + * + * 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. + * + * 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 + * + * Default contents parts of the notify widget that you can use for are: + * @li "default" - A content of the notify + * + * @ref tutorial_notify show usage of the API. + * + * @{ + */ - /** - * @brief Possible orient values for notify. - * - * 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 Possible orient values for notify. + * + * 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 - * - * @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 Add a new notify to the parent + * + * @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 - * - * @param obj The notify object - * @param content The content will be filled in this notify 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_notify_content_unset() function. - * - * @deprecated use elm_object_content_set() instead - * - */ - EINA_DEPRECATED EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Set the content of the notify widget + * + * @param obj The notify object + * @param content The content will be filled in this notify 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_notify_content_unset() function. + * + * @deprecated use elm_object_content_set() instead + * + */ +EINA_DEPRECATED EAPI void elm_notify_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Unset the content of the notify widget - * - * @param obj The notify object - * @return The content that was being used - * - * Unparent and return the content object which was set for this widget - * - * @see elm_notify_content_set() - * @deprecated use elm_object_content_unset() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the content of the notify widget + * + * @param obj The notify object + * @return The content that was being used + * + * Unparent and return the content object which was set for this widget + * + * @see elm_notify_content_set() + * @deprecated use elm_object_content_unset() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Return the content of the notify widget - * - * @param obj The notify object - * @return The content that is being used - * - * @see elm_notify_content_set() - * @deprecated use elm_object_content_get() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Return the content of the notify widget + * + * @param obj The notify object + * @return The content that is being used + * + * @see elm_notify_content_set() + * @deprecated use elm_object_content_get() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the notify parent - * - * @param obj The notify object - * @param content The new parent - * - * 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 Set the notify parent + * + * @param obj The notify object + * @param content The new parent + * + * 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 - * - * @param obj The notify object - * @return The parent - * - * @see elm_notify_parent_set() - */ - EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the notify parent + * + * @param obj The notify object + * @return The parent + * + * @see elm_notify_parent_set() + */ +EAPI Evas_Object *elm_notify_parent_get(const 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. - * - * @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 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. + * + * @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 - * - * @see elm_notify_orient_set() - * @see Elm_Notify_Orient - */ - EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Return the orientation + * @param obj The notify object + * @return The orientation of the notification + * + * @see elm_notify_orient_set() + * @see Elm_Notify_Orient + */ +EAPI Elm_Notify_Orient elm_notify_orient_get(const 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. - * - * @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 void elm_notify_timeout_set(Evas_Object *obj, double timeout) 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. + * + * @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 void elm_notify_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1); - /** - * @brief Return the timeout value (in seconds) - * @param obj the notify object - * - * @see elm_notify_timeout_set() - */ - EAPI double elm_notify_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Return the timeout value (in seconds) + * @param obj the notify object + * + * @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. - * - * @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. - * - * @note The default value is EINA_TRUE. - */ - EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) 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. + * + * @note The default value is EINA_TRUE. + */ +EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1); - /** - * @brief Return true if events are repeat below the notify object - * @param obj the notify object - * - * @see elm_notify_repeat_events_set() - */ - EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Return true if events are repeat below the notify object + * @param obj the notify object + * + * @see elm_notify_repeat_events_set() + */ +EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_object.h b/legacy/elementary/src/lib/elm_object.h index 27cd338c1c..62c4c7a7fb 100644 --- a/legacy/elementary/src/lib/elm_object.h +++ b/legacy/elementary/src/lib/elm_object.h @@ -1,436 +1,437 @@ - /** - * Set a label of an object - * - * @param obj The Elementary object - * @param part The text part name to set (NULL for the default label) - * @param label The new text of the label - * - * @note Elementary objects may have many labels (e.g. Action Slider) - * @deprecated Use elm_object_part_text_set() instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI void elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label); +/** + * Set a label of an object + * + * @param obj The Elementary object + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary objects may have many labels (e.g. Action Slider) + * @deprecated Use elm_object_part_text_set() instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI void elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label); - /** - * Set a label of an object - * - * @param obj The Elementary object - * @param part The text part name to set (NULL for the default label) - * @param label The new text of the label - * - * @note Elementary objects may have many labels (e.g. Action Slider) - * - * @ingroup General - */ - EAPI void elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label); +/** + * Set a label of an object + * + * @param obj The Elementary object + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary objects may have many labels (e.g. Action Slider) + * + * @ingroup General + */ +EAPI void elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label); #define elm_object_text_set(obj, label) elm_object_part_text_set((obj), NULL, (label)) - /** - * Get a label of an object - * - * @param obj The Elementary object - * @param part The text part name to get (NULL for the default label) - * @return text of the label or NULL for any error - * - * @note Elementary objects may have many labels (e.g. Action Slider) - * @deprecated Use elm_object_part_text_get() instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI const char *elm_object_text_part_get(const Evas_Object *obj, const char *part); +/** + * Get a label of an object + * + * @param obj The Elementary object + * @param part The text part name to get (NULL for the default label) + * @return text of the label or NULL for any error + * + * @note Elementary objects may have many labels (e.g. Action Slider) + * @deprecated Use elm_object_part_text_get() instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI const char *elm_object_text_part_get(const Evas_Object *obj, const char *part); - /** - * Get a label of an object - * - * @param obj The Elementary object - * @param part The text part name to get (NULL for the default label) - * @return text of the label or NULL for any error - * - * @note Elementary objects may have many labels (e.g. Action Slider) - * - * @ingroup General - */ - EAPI const char *elm_object_part_text_get(const Evas_Object *obj, const char *part); +/** + * Get a label of an object + * + * @param obj The Elementary object + * @param part The text part name to get (NULL for the default label) + * @return text of the label or NULL for any error + * + * @note Elementary objects may have many labels (e.g. Action Slider) + * + * @ingroup General + */ +EAPI const char *elm_object_part_text_get(const Evas_Object *obj, const char *part); #define elm_object_text_get(obj) elm_object_part_text_get((obj), NULL) - /** - * Set a content of an object - * - * @param obj The Elementary object - * @param part The content part name to set (NULL for the default content) - * @param content The new content of the object - * - * @note Elementary objects may have many contents - * @deprecated Use elm_object_part_content_set instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI void elm_object_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content); +/** + * Set a content of an object + * + * @param obj The Elementary object + * @param part The content part name to set (NULL for the default content) + * @param content The new content of the object + * + * @note Elementary objects may have many contents + * @deprecated Use elm_object_part_content_set instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI void elm_object_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content); - /** - * Set a content of an object - * - * @param obj The Elementary object - * @param part The content part name to set (NULL for the default content) - * @param content The new content of the object - * - * @note Elementary objects may have many contents - * - * @ingroup General - */ - EAPI void elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content); +/** + * Set a content of an object + * + * @param obj The Elementary object + * @param part The content part name to set (NULL for the default content) + * @param content The new content of the object + * + * @note Elementary objects may have many contents + * + * @ingroup General + */ +EAPI void elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content); #define elm_object_content_set(obj, content) elm_object_part_content_set((obj), NULL, (content)) - /** - * Get a content of an object - * - * @param obj The Elementary object - * @param item The content part name to get (NULL for the default content) - * @return content of the object or NULL for any error - * - * @note Elementary objects may have many contents - * @deprecated Use elm_object_part_content_get instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI Evas_Object *elm_object_content_part_get(const Evas_Object *obj, const char *part); +/** + * Get a content of an object + * + * @param obj The Elementary object + * @param item The content part name to get (NULL for the default content) + * @return content of the object or NULL for any error + * + * @note Elementary objects may have many contents + * @deprecated Use elm_object_part_content_get instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI Evas_Object *elm_object_content_part_get(const Evas_Object *obj, const char *part); - /** - * Get a content of an object - * - * @param obj The Elementary object - * @param item The content part name to get (NULL for the default content) - * @return content of the object or NULL for any error - * - * @note Elementary objects may have many contents - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_part_content_get(const Evas_Object *obj, const char *part); +/** + * Get a content of an object + * + * @param obj The Elementary object + * @param item The content part name to get (NULL for the default content) + * @return content of the object or NULL for any error + * + * @note Elementary objects may have many contents + * + * @ingroup General + */ +EAPI Evas_Object *elm_object_part_content_get(const Evas_Object *obj, const char *part); #define elm_object_content_get(obj) elm_object_part_content_get((obj), NULL) - /** - * Unset a content of an object - * - * @param obj The Elementary object - * @param item The content part name to unset (NULL for the default content) - * - * @note Elementary objects may have many contents - * @deprecated Use elm_object_part_content_unset instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI Evas_Object *elm_object_content_part_unset(Evas_Object *obj, const char *part); +/** + * Unset a content of an object + * + * @param obj The Elementary object + * @param item The content part name to unset (NULL for the default content) + * + * @note Elementary objects may have many contents + * @deprecated Use elm_object_part_content_unset instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI Evas_Object *elm_object_content_part_unset(Evas_Object *obj, const char *part); - /** - * Unset a content of an object - * - * @param obj The Elementary object - * @param item The content part name to unset (NULL for the default content) - * - * @note Elementary objects may have many contents - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_part_content_unset(Evas_Object *obj, const char *part); +/** + * Unset a content of an object + * + * @param obj The Elementary object + * @param item The content part name to unset (NULL for the default content) + * + * @note Elementary objects may have many contents + * + * @ingroup General + */ +EAPI Evas_Object *elm_object_part_content_unset(Evas_Object *obj, const char *part); #define elm_object_content_unset(obj) elm_object_part_content_unset((obj), 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 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); - /** - * Get a named object from the children - * - * @param obj The parent object whose children to look at - * @param name The name of the child to find - * @param recurse Set to thge maximum number of levels to recurse (0 == none, 1 is only look at 1 level of children etc.) - * @return The found object of that name, or NULL if none is found - * - * This function searches the children (or recursively children of - * children and so on) of the given @p obj object looking for a child with - * the name of @p name. If the child is found the object is returned, or - * NULL is returned. You can set the name of an object with - * evas_object_name_set(). If the name is not unique within the child - * objects (or the tree is @p recurse is greater than 0) then it is - * undefined as to which child of that name is returned, so ensure the name - * is unique amongst children. If recurse is set to -1 it will recurse - * without limit. - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_name_find(const Evas_Object *obj, const char *name, int recurse); - - /** - * @defgroup Styles Styles - * - * Widgets can have different styles of look. These generic API's - * set styles of widgets, if they support them (and if the theme(s) - * do). - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - */ +/** + * Get a named object from the children + * + * @param obj The parent object whose children to look at + * @param name The name of the child to find + * @param recurse Set to thge maximum number of levels to recurse (0 == none, 1 is only look at 1 level of children etc.) + * @return The found object of that name, or NULL if none is found + * + * This function searches the children (or recursively children of + * children and so on) of the given @p obj object looking for a child with + * the name of @p name. If the child is found the object is returned, or + * NULL is returned. You can set the name of an object with + * evas_object_name_set(). If the name is not unique within the child + * objects (or the tree is @p recurse is greater than 0) then it is + * undefined as to which child of that name is returned, so ensure the name + * is unique amongst children. If recurse is set to -1 it will recurse + * without limit. + * + * @ingroup General + */ +EAPI Evas_Object *elm_object_name_find(const Evas_Object *obj, const char *name, int recurse); - /** - * Set the style to use by a widget - * - * Sets the style name that will define the appearance of a widget. Styles - * vary from widget to widget and may also be defined by other themes - * by means of extensions and overlays. - * - * @param obj The Elementary widget to style - * @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 Styles - */ - EAPI void elm_object_style_set(Evas_Object *obj, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get the style used by the widget - * - * This gets the style being used for that widget. Note that the string - * pointer is only valid as longas the object is valid and the style doesn't - * change. - * - * @param obj The Elementary widget to query for its style - * @return The style name used - * - * @see elm_object_style_set() - * - * @ingroup Styles - */ - EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @defgroup Styles Styles + * + * Widgets can have different styles of look. These generic API's + * set styles of widgets, if they support them (and if the theme(s) + * do). + * + * @ref general_functions_example_page "This" example contemplates + * some of these functions. + */ - /** - * Set the disabled state of an Elementary object. - * - * @param obj The Elementary object to operate on - * @param disabled The state to put in in: @c EINA_TRUE for - * disabled, @c EINA_FALSE for enabled - * - * Elementary objects can be @b disabled, in which state they won't - * receive input and, in general, will be themed differently from - * their normal state, usually greyed out. Useful for contexts - * where you don't want your users to interact with some of the - * parts of you interface. - * - * This sets the state for the widget, either disabling it or - * enabling it back. - * - * @ingroup Styles - */ - EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); +/** + * Set the style to use by a widget + * + * Sets the style name that will define the appearance of a widget. Styles + * vary from widget to widget and may also be defined by other themes + * by means of extensions and overlays. + * + * @param obj The Elementary widget to style + * @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 Styles + */ +EAPI void + elm_object_style_set(Evas_Object *obj, const char *style) +EINA_ARG_NONNULL(1); - /** - * Get the disabled state of an Elementary object. - * - * @param obj The Elementary object to operate on - * @return @c EINA_TRUE, if the widget is disabled, @c EINA_FALSE - * if it's enabled (or on errors) - * - * This gets the state of the widget, which might be enabled or disabled. - * - * @ingroup Styles - */ - EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the style used by the widget + * + * This gets the style being used for that widget. Note that the string + * pointer is only valid as longas the object is valid and the style doesn't + * change. + * + * @param obj The Elementary widget to query for its style + * @return The style name used + * + * @see elm_object_style_set() + * + * @ingroup Styles + */ +EAPI const char *elm_object_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @defgroup WidgetNavigation Widget Tree Navigation. - * - * How to check if an Evas Object is an Elementary widget? How to - * get the first elementary widget that is parent of the given - * object? These are all covered in widget tree navigation. - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - */ +/** + * Set the disabled state of an Elementary object. + * + * @param obj The Elementary object to operate on + * @param disabled The state to put in in: @c EINA_TRUE for + * disabled, @c EINA_FALSE for enabled + * + * Elementary objects can be @b disabled, in which state they won't + * receive input and, in general, will be themed differently from + * their normal state, usually greyed out. Useful for contexts + * where you don't want your users to interact with some of the + * parts of you interface. + * + * This sets the state for the widget, either disabling it or + * enabling it back. + * + * @ingroup Styles + */ +EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled) EINA_ARG_NONNULL(1); - /** - * 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); +/** + * Get the disabled state of an Elementary object. + * + * @param obj The Elementary object to operate on + * @return @c EINA_TRUE, if the widget is disabled, @c EINA_FALSE + * if it's enabled (or on errors) + * + * This gets the state of the widget, which might be enabled or disabled. + * + * @ingroup Styles + */ +EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the first parent of the given object that is an Elementary - * widget. - * - * @param obj the Elementary object to query parent from. - * @return the parent object that is an Elementary widget, or @c - * NULL, if it was not found. - * - * Use this to query for an object's parent widget. - * - * @note Most of Elementary users wouldn't be mixing non-Elementary - * smart objects in the objects tree of an application, as this is - * an advanced usage of Elementary with Evas. So, except for the - * application's window, which is the root of that tree, all other - * objects would have valid Elementary widget parents. - * - * @ingroup WidgetNavigation - */ - EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @defgroup WidgetNavigation Widget Tree Navigation. + * + * How to check if an Evas Object is an Elementary widget? How to + * get the first elementary widget that is parent of the given + * object? These are all covered in widget tree navigation. + * + * @ref general_functions_example_page "This" example contemplates + * some of these functions. + */ - /** - * 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); +/** + * 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); - /** - * 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); +/** + * Get the first parent of the given object that is an Elementary + * widget. + * + * @param obj the Elementary object to query parent from. + * @return the parent object that is an Elementary widget, or @c + * NULL, if it was not found. + * + * Use this to query for an object's parent widget. + * + * @note Most of Elementary users wouldn't be mixing non-Elementary + * smart objects in the objects tree of an application, as this is + * an advanced usage of Elementary with Evas. So, except for the + * application's window, which is the root of that tree, all other + * objects would have valid Elementary widget parents. + * + * @ingroup WidgetNavigation + */ +EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Send a signal to the widget edje object. - * - * 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 object - * @param emission The signal's name. - * @param source The signal's source. - * @ingroup General - */ - EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source) EINA_ARG_NONNULL(1); +/** + * 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); - /** - * Add a callback for a signal emitted by widget edje object. - * - * 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 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_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 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); - /** - * Remove a signal-triggered callback from a widget edje object. - * - * 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. - * - * @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 void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) EINA_ARG_NONNULL(1, 4); +/** + * Send a signal to the widget edje object. + * + * 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 object + * @param emission The signal's name. + * @param source The signal's source. + * @ingroup General + */ +EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source) EINA_ARG_NONNULL(1); - /** - * 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. - * - * @note Not to be confused with @c - * evas_object_smart_callback_add(), which adds callbacks to smart - * objects' smart events, and not input events. - * - * @see elm_object_event_callback_del() - * - * @ingroup General - */ - EAPI void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +/** + * Add a callback for a signal emitted by widget edje object. + * + * 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 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_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) EINA_ARG_NONNULL(1, 4); - /** - * Remove an event callback from a widget. - * - * 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 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_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +/** + * Remove a signal-triggered callback from a widget edje object. + * + * 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. + * + * @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 void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) EINA_ARG_NONNULL(1, 4); +/** + * 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. + * + * @note Not to be confused with @c + * evas_object_smart_callback_add(), which adds callbacks to smart + * objects' smart events, and not input events. + * + * @see elm_object_event_callback_del() + * + * @ingroup General + */ +EAPI void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * Remove an event callback from a widget. + * + * 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 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_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); diff --git a/legacy/elementary/src/lib/elm_object_item.h b/legacy/elementary/src/lib/elm_object_item.h index 0ab6014bb8..a228bd9b3f 100644 --- a/legacy/elementary/src/lib/elm_object_item.h +++ b/legacy/elementary/src/lib/elm_object_item.h @@ -1,224 +1,225 @@ - /** - * Get the widget object's handle which contains a given item - * - * @param item The Elementary object item - * @return The widget object - * - * @note This returns the widget object itself that an item belongs to. - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the widget object's handle which contains a given item + * + * @param item The Elementary object item + * @return The widget object + * + * @note This returns the widget object itself that an item belongs to. + * + * @ingroup General + */ +EAPI Evas_Object * + elm_object_item_object_get(const Elm_Object_Item *it) +EINA_ARG_NONNULL(1); - /** - * Set a content of an object item - * - * @param it The Elementary object item - * @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 - * @deprecated Use elm_object_item_part_content_set instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI void elm_object_item_content_part_set(Elm_Object_Item *it, const char *part, Evas_Object *content); +/** + * Set a content of an object item + * + * @param it The Elementary object item + * @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 + * @deprecated Use elm_object_item_part_content_set instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI void elm_object_item_content_part_set(Elm_Object_Item *it, const char *part, Evas_Object *content); - /** - * Set a content of an object item - * - * @param it The Elementary object item - * @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 void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content); +/** + * Set a content of an object item + * + * @param it The Elementary object item + * @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 void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content); #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content)) - /** - * Get 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) - * @return content of the object item or NULL for any error - * - * @note Elementary object items may have many contents - * @deprecated Use elm_object_item_part_content_get instead. - * @ingroup General - */ - EAPI Evas_Object *elm_object_item_content_part_get(const Elm_Object_Item *it, const char *part); +/** + * Get 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) + * @return content of the object item or NULL for any error + * + * @note Elementary object items may have many contents + * @deprecated Use elm_object_item_part_content_get instead. + * @ingroup General + */ +EAPI Evas_Object *elm_object_item_content_part_get(const Elm_Object_Item *it, const char *part); - /** - * Get 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) - * @return content of the object item or NULL for any error - * - * @note Elementary object items may have many contents - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part); +/** + * Get 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) + * @return content of the object item or NULL for any error + * + * @note Elementary object items may have many contents + * + * @ingroup General + */ +EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part); #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL) - /** - * Unset 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) - * - * @note Elementary object items may have many contents - * @deprecated Use elm_object_item_part_content_unset instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI Evas_Object *elm_object_item_content_part_unset(Elm_Object_Item *it, const char *part); +/** + * Unset 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) + * + * @note Elementary object items may have many contents + * @deprecated Use elm_object_item_part_content_unset instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI Evas_Object *elm_object_item_content_part_unset(Elm_Object_Item *it, const char *part); - /** - * Unset 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) - * - * @note Elementary object items may have many contents - * - * @ingroup General - */ - EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part); +/** + * Unset 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) + * + * @note Elementary object items may have many contents + * + * @ingroup General + */ +EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part); #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL) - /** - * Set a label of an object item - * - * @param it The Elementary object item - * @param part The text part name to set (NULL for the default label) - * @param label The new text of the label - * - * @note Elementary object items may have many labels - * @deprecated Use elm_object_item_part_text_set instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI void elm_object_item_text_part_set(Elm_Object_Item *it, const char *part, const char *label); +/** + * Set a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary object items may have many labels + * @deprecated Use elm_object_item_part_text_set instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI void elm_object_item_text_part_set(Elm_Object_Item *it, const char *part, const char *label); - /** - * Set a label of an object item - * - * @param it The Elementary object item - * @param part The text part name to set (NULL for the default label) - * @param label The new text of the label - * - * @note Elementary object items may have many labels - * - * @ingroup General - */ - EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label); +/** + * Set a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary object items may have many labels + * + * @ingroup General + */ +EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label); #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label)) - /** - * Get a label of an object item - * - * @param it The Elementary object item - * @param part The text part name to get (NULL for the default label) - * @return text of the label or NULL for any error - * - * @note Elementary object items may have many labels - * @deprecated Use elm_object_item_part_text_get instead. - * @ingroup General - */ - EINA_DEPRECATED EAPI const char *elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part); - /** - * Get a label of an object item - * - * @param it The Elementary object item - * @param part The text part name to get (NULL for the default label) - * @return text of the label or NULL for any error - * - * @note Elementary object items may have many labels - * - * @ingroup General - */ - EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part); +/** + * Get a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to get (NULL for the default label) + * @return text of the label or NULL for any error + * + * @note Elementary object items may have many labels + * @deprecated Use elm_object_item_part_text_get instead. + * @ingroup General + */ +EINA_DEPRECATED EAPI const char *elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part); +/** + * Get a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to get (NULL for the default label) + * @return text of the label or NULL for any error + * + * @note Elementary object items may have many labels + * + * @ingroup General + */ +EAPI const char *elm_object_item_part_text_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 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); +/** + * 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); - /** - * Get the data associated with an object item - * @param it The Elementary object item - * @return The data associated with @p it - * - * @ingroup General - */ - EAPI void *elm_object_item_data_get(const Elm_Object_Item *it); +/** + * Get the data associated with an object item + * @param it The Elementary 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 Elementary 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); +/** + * Set the data associated with an object item + * @param it The Elementary 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); +/** + * 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); - /** - * Set the disabled state of an widget item. - * - * @param obj The Elementary object item - * @param disabled The state to put in in: @c EINA_TRUE for - * disabled, @c EINA_FALSE for enabled - * - * Elementary object item can be @b disabled, in which state they won't - * receive input and, in general, will be themed differently from - * their normal state, usually greyed out. Useful for contexts - * where you don't want your users to interact with some of the - * parts of you interface. - * - * This sets the state for the widget item, either disabling it or - * enabling it back. - * - * @ingroup Styles - */ - EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); - - /** - * Get the disabled state of an widget item. - * - * @param obj The Elementary object - * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE - * if it's enabled (or on errors) - * - * This gets the state of the widget, which might be enabled or disabled. - * - * @ingroup Styles - */ - EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Set the disabled state of an widget item. + * + * @param obj The Elementary object item + * @param disabled The state to put in in: @c EINA_TRUE for + * disabled, @c EINA_FALSE for enabled + * + * Elementary object item can be @b disabled, in which state they won't + * receive input and, in general, will be themed differently from + * their normal state, usually greyed out. Useful for contexts + * where you don't want your users to interact with some of the + * parts of you interface. + * + * This sets the state for the widget item, either disabling it or + * enabling it back. + * + * @ingroup Styles + */ +EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); +/** + * Get the disabled state of an widget item. + * + * @param obj The Elementary object + * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE + * if it's enabled (or on errors) + * + * This gets the state of the widget, which might be enabled or disabled. + * + * @ingroup Styles + */ +EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_pager.h b/legacy/elementary/src/lib/elm_pager.h index 30a763d985..28a3ce410c 100644 --- a/legacy/elementary/src/lib/elm_pager.h +++ b/legacy/elementary/src/lib/elm_pager.h @@ -1,120 +1,121 @@ - /** - * @defgroup Pager Pager - * - * @image html img/widget/pager/preview-00.png - * @image latex img/widget/pager/preview-00.eps - * - * @brief Widget that allows flipping between one or more “pages” - * of objects. - * - * The flipping between pages of objects is animated. All content - * in the pager is kept in a stack, being the last content added - * (visible one) on the top of that stack. - * - * Objects can be pushed or popped from the stack or deleted as - * well. Pushes and pops will animate the widget accordingly to its - * style (a pop will also delete the child object once the - * animation is finished). Any object already in the pager can be - * promoted to the top (from its current stacking position) through - * the use of elm_pager_content_promote(). New objects are pushed - * to the top with elm_pager_content_push(). When the top item is - * no longer wanted, simply pop it with elm_pager_content_pop() and - * it will also be deleted. If an object is no longer needed and is - * not the top item, just delete it as normal. You can query which - * objects are the top and bottom with - * elm_pager_content_bottom_get() and elm_pager_content_top_get(). - * - * Signals that you can add callbacks for are: - * - @c "show,finished" - when a new page is actually shown on the top - * - @c "hide,finished" - when a previous page is hidden - * - * Only after the first of that signals the child object is - * guaranteed to be visible, as in @c evas_object_visible_get(). - * - * This widget has the following styles available: - * - @c "default" - * - @c "fade" - * - @c "fade_translucide" - * - @c "fade_invisible" - * - * @note These styles affect only the flipping animations on the - * default theme; the appearance when not animating is unaffected - * by them. - * - * @ref tutorial_pager gives a good overview of the usage of the API. - * @{ - */ +/** + * @defgroup Pager Pager + * + * @image html img/widget/pager/preview-00.png + * @image latex img/widget/pager/preview-00.eps + * + * @brief Widget that allows flipping between one or more “pages” + * of objects. + * + * The flipping between pages of objects is animated. All content + * in the pager is kept in a stack, being the last content added + * (visible one) on the top of that stack. + * + * Objects can be pushed or popped from the stack or deleted as + * well. Pushes and pops will animate the widget accordingly to its + * style (a pop will also delete the child object once the + * animation is finished). Any object already in the pager can be + * promoted to the top (from its current stacking position) through + * the use of elm_pager_content_promote(). New objects are pushed + * to the top with elm_pager_content_push(). When the top item is + * no longer wanted, simply pop it with elm_pager_content_pop() and + * it will also be deleted. If an object is no longer needed and is + * not the top item, just delete it as normal. You can query which + * objects are the top and bottom with + * elm_pager_content_bottom_get() and elm_pager_content_top_get(). + * + * Signals that you can add callbacks for are: + * - @c "show,finished" - when a new page is actually shown on the top + * - @c "hide,finished" - when a previous page is hidden + * + * Only after the first of that signals the child object is + * guaranteed to be visible, as in @c evas_object_visible_get(). + * + * This widget has the following styles available: + * - @c "default" + * - @c "fade" + * - @c "fade_translucide" + * - @c "fade_invisible" + * + * @note These styles affect only the flipping animations on the + * default theme; the appearance when not animating is unaffected + * by them. + * + * @ref tutorial_pager gives a good overview of the usage of the API. + * @{ + */ - /** - * Add a new pager to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Pager - */ - EAPI Evas_Object *elm_pager_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new pager to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Pager + */ +EAPI Evas_Object * + elm_pager_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Push an object to the top of the pager stack (and show it). - * - * @param obj The pager object - * @param content The object to push - * - * The object pushed becomes a child of the pager, it will be controlled and - * deleted when the pager is deleted. - * - * @note If the content is already in the stack use - * elm_pager_content_promote(). - * @warning Using this function on @p content already in the stack results in - * undefined behavior. - */ - EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Push an object to the top of the pager stack (and show it). + * + * @param obj The pager object + * @param content The object to push + * + * The object pushed becomes a child of the pager, it will be controlled and + * deleted when the pager is deleted. + * + * @note If the content is already in the stack use + * elm_pager_content_promote(). + * @warning Using this function on @p content already in the stack results in + * undefined behavior. + */ +EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Pop the object that is on top of the stack - * - * @param obj The pager object - * - * This pops the object that is on the top(visible) of the pager, makes it - * disappear, then deletes the object. The object that was underneath it on - * the stack will become visible. - */ - EAPI void elm_pager_content_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Pop the object that is on top of the stack + * + * @param obj The pager object + * + * This pops the object that is on the top(visible) of the pager, makes it + * disappear, then deletes the object. The object that was underneath it on + * the stack will become visible. + */ +EAPI void elm_pager_content_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Moves an object already in the pager stack to the top of the stack. - * - * @param obj The pager object - * @param content The object to promote - * - * This will take the @p content and move it to the top of the stack as - * if it had been pushed there. - * - * @note If the content isn't already in the stack use - * elm_pager_content_push(). - * @warning Using this function on @p content not already in the stack - * results in undefined behavior. - */ - EAPI void elm_pager_content_promote(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Moves an object already in the pager stack to the top of the stack. + * + * @param obj The pager object + * @param content The object to promote + * + * This will take the @p content and move it to the top of the stack as + * if it had been pushed there. + * + * @note If the content isn't already in the stack use + * elm_pager_content_push(). + * @warning Using this function on @p content not already in the stack + * results in undefined behavior. + */ +EAPI void elm_pager_content_promote(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Return the object at the bottom of the pager stack - * - * @param obj The pager object - * @return The bottom object or NULL if none - */ - EAPI Evas_Object *elm_pager_content_bottom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Return the object at the bottom of the pager stack + * + * @param obj The pager object + * @return The bottom object or NULL if none + */ +EAPI Evas_Object *elm_pager_content_bottom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Return the object at the top of the pager stack - * - * @param obj The pager object - * @return The top object or NULL if none - */ - EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Return the object at the top of the pager stack + * + * @param obj The pager object + * @return The top object or NULL if none + */ +EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_panel.h b/legacy/elementary/src/lib/elm_panel.h index c3e8435798..29378a5858 100644 --- a/legacy/elementary/src/lib/elm_panel.h +++ b/legacy/elementary/src/lib/elm_panel.h @@ -1,130 +1,131 @@ - /** - * @defgroup Panel Panel - * - * @image html img/widget/panel/preview-00.png - * @image latex img/widget/panel/preview-00.eps - * - * @brief A panel is a type of animated container that contains subobjects. - * It can be expanded or contracted by clicking the button on it's edge. - * - * Orientations are as follows: - * @li ELM_PANEL_ORIENT_TOP - * @li ELM_PANEL_ORIENT_LEFT - * @li ELM_PANEL_ORIENT_RIGHT - * - * Default contents parts of the panel widget that you can use for are: - * @li "default" - A content of the panel - * - * @ref tutorial_panel shows one way to use this widget. - * @{ - */ - typedef enum _Elm_Panel_Orient - { - ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */ - ELM_PANEL_ORIENT_BOTTOM, /**< Not implemented */ - ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */ - ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */ - } Elm_Panel_Orient; +/** + * @defgroup Panel Panel + * + * @image html img/widget/panel/preview-00.png + * @image latex img/widget/panel/preview-00.eps + * + * @brief A panel is a type of animated container that contains subobjects. + * It can be expanded or contracted by clicking the button on it's edge. + * + * Orientations are as follows: + * @li ELM_PANEL_ORIENT_TOP + * @li ELM_PANEL_ORIENT_LEFT + * @li ELM_PANEL_ORIENT_RIGHT + * + * Default contents parts of the panel widget that you can use for are: + * @li "default" - A content of the panel + * + * @ref tutorial_panel shows one way to use this widget. + * @{ + */ +typedef enum _Elm_Panel_Orient +{ + ELM_PANEL_ORIENT_TOP, /**< Panel (dis)appears from the top */ + ELM_PANEL_ORIENT_BOTTOM, /**< Not implemented */ + ELM_PANEL_ORIENT_LEFT, /**< Panel (dis)appears from the left */ + ELM_PANEL_ORIENT_RIGHT, /**< Panel (dis)appears from the right */ +} Elm_Panel_Orient; - /** - * @brief Adds a panel object - * - * @param parent The parent object - * - * @return The panel object, or NULL on failure - */ - EAPI Evas_Object *elm_panel_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Adds a panel object + * + * @param parent The parent object + * + * @return The panel object, or NULL on failure + */ +EAPI Evas_Object * + elm_panel_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Sets the orientation of the panel - * - * @param parent The parent object - * @param orient The panel orientation. Can be one of the following: - * @li ELM_PANEL_ORIENT_TOP - * @li ELM_PANEL_ORIENT_LEFT - * @li ELM_PANEL_ORIENT_RIGHT - * - * Sets from where the panel will (dis)appear. - */ - EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient) EINA_ARG_NONNULL(1); +/** + * @brief Sets the orientation of the panel + * + * @param parent The parent object + * @param orient The panel orientation. Can be one of the following: + * @li ELM_PANEL_ORIENT_TOP + * @li ELM_PANEL_ORIENT_LEFT + * @li ELM_PANEL_ORIENT_RIGHT + * + * Sets from where the panel will (dis)appear. + */ +EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient) EINA_ARG_NONNULL(1); - /** - * @brief Get the orientation of the panel. - * - * @param obj The panel object - * @return The Elm_Panel_Orient, or ELM_PANEL_ORIENT_LEFT on failure. - */ - EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the orientation of the panel. + * + * @param obj The panel object + * @return The Elm_Panel_Orient, or ELM_PANEL_ORIENT_LEFT on failure. + */ +EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the content of the panel. - * - * @param obj The panel object - * @param content The panel content - * - * Once the content object is set, a previously set one will be deleted. - * If you want to keep that old content object, use the - * elm_panel_content_unset() function. - * - * @deprecated use elm_object_content_set() instead - * - */ - EINA_DEPRECATED EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * @brief Set the content of the panel. + * + * @param obj The panel object + * @param content The panel content + * + * Once the content object is set, a previously set one will be deleted. + * If you want to keep that old content object, use the + * elm_panel_content_unset() function. + * + * @deprecated use elm_object_content_set() instead + * + */ +EINA_DEPRECATED EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * @brief Get the content of the panel. - * - * @param obj The panel object - * @return The content that is being used - * - * Return the content object which is set for this widget. - * - * @see elm_panel_content_set() - * - * @deprecated use elm_object_content_get() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the content of the panel. + * + * @param obj The panel object + * @return The content that is being used + * + * Return the content object which is set for this widget. + * + * @see elm_panel_content_set() + * + * @deprecated use elm_object_content_get() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the content of the panel. - * - * @param obj The panel object - * @return The content that was being used - * - * Unparent and return the content object which was set for this widget. - * - * @see elm_panel_content_set() - * - * @deprecated use elm_object_content_unset() instead - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the content of the panel. + * + * @param obj The panel object + * @return The content that was being used + * + * Unparent and return the content object which was set for this widget. + * + * @see elm_panel_content_set() + * + * @deprecated use elm_object_content_unset() instead + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panel_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the state of the panel. - * - * @param obj The panel object - * @param hidden If true, the panel will run the animation to contract - */ - EAPI void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden) EINA_ARG_NONNULL(1); +/** + * @brief Set the state of the panel. + * + * @param obj The panel object + * @param hidden If true, the panel will run the animation to contract + */ +EAPI void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden) EINA_ARG_NONNULL(1); - /** - * @brief Get the state of the panel. - * - * @param obj The panel object - * @param hidden If true, the panel is in the "hide" state - */ - EAPI Eina_Bool elm_panel_hidden_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the state of the panel. + * + * @param obj The panel object + * @param hidden If true, the panel is in the "hide" state + */ +EAPI Eina_Bool elm_panel_hidden_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Toggle the hidden state of the panel from code - * - * @param obj The panel object - */ - EAPI void elm_panel_toggle(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Toggle the hidden state of the panel from code + * + * @param obj The panel object + */ +EAPI void elm_panel_toggle(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_panes.h b/legacy/elementary/src/lib/elm_panes.h index e638f6235d..dbb2453281 100644 --- a/legacy/elementary/src/lib/elm_panes.h +++ b/legacy/elementary/src/lib/elm_panes.h @@ -1,240 +1,241 @@ - /** - * @defgroup Panes Panes - * @ingroup Elementary - * - * @image html img/widget/panes/preview-00.png - * @image latex img/widget/panes/preview-00.eps width=\textwidth - * - * @image html img/panes.png - * @image latex img/panes.eps width=\textwidth - * - * The panes adds a dragable bar between two contents. When dragged - * this bar will resize contents size. - * - * Panes can be displayed vertically or horizontally, and contents - * size proportion can be customized (homogeneous by default). - * - * Smart callbacks one can listen to: - * - "press" - The panes has been pressed (button wasn't released yet). - * - "unpressed" - The panes was released after being pressed. - * - "clicked" - The panes has been clicked> - * - "clicked,double" - The panes has been double clicked - * - * Available styles for it: - * - @c "default" - * - * Default contents parts of the panes widget that you can use for are: - * @li "left" - A leftside content of the panes - * @li "right" - A rightside content of the panes - * - * If panes is displayed vertically, left content will be displayed at - * top. - * - * Here is an example on its usage: - * @li @ref panes_example - */ +/** + * @defgroup Panes Panes + * @ingroup Elementary + * + * @image html img/widget/panes/preview-00.png + * @image latex img/widget/panes/preview-00.eps width=\textwidth + * + * @image html img/panes.png + * @image latex img/panes.eps width=\textwidth + * + * The panes adds a dragable bar between two contents. When dragged + * this bar will resize contents size. + * + * Panes can be displayed vertically or horizontally, and contents + * size proportion can be customized (homogeneous by default). + * + * Smart callbacks one can listen to: + * - "press" - The panes has been pressed (button wasn't released yet). + * - "unpressed" - The panes was released after being pressed. + * - "clicked" - The panes has been clicked> + * - "clicked,double" - The panes has been double clicked + * + * Available styles for it: + * - @c "default" + * + * Default contents parts of the panes widget that you can use for are: + * @li "left" - A leftside content of the panes + * @li "right" - A rightside content of the panes + * + * If panes is displayed vertically, left content will be displayed at + * top. + * + * Here is an example on its usage: + * @li @ref panes_example + */ - /** - * @addtogroup Panes - * @{ - */ +/** + * @addtogroup Panes + * @{ + */ - /** - * Add a new panes widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new panes widget handle or @c NULL, on errors. - * - * This function inserts a new panes widget on the canvas. - * - * @ingroup Panes - */ - EAPI Evas_Object *elm_panes_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new panes widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new panes widget handle or @c NULL, on errors. + * + * This function inserts a new panes widget on the canvas. + * + * @ingroup Panes + */ +EAPI Evas_Object * + elm_panes_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the left content of the panes widget. - * - * @param obj The panes object. - * @param content The new left content 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_panes_content_left_unset() function. - * - * If panes is displayed vertically, left content will be displayed at - * top. - * - * @see elm_panes_content_left_get() - * @see elm_panes_content_right_set() to set content on the other side. - * - * @deprecated use elm_object_part_content_set() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the left content of the panes widget. + * + * @param obj The panes object. + * @param content The new left content 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_panes_content_left_unset() function. + * + * If panes is displayed vertically, left content will be displayed at + * top. + * + * @see elm_panes_content_left_get() + * @see elm_panes_content_right_set() to set content on the other side. + * + * @deprecated use elm_object_part_content_set() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Set the right content of the panes widget. - * - * @param obj The panes object. - * @param content The new right content 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_panes_content_right_unset() function. - * - * If panes is displayed vertically, left content will be displayed at - * bottom. - * - * @see elm_panes_content_right_get() - * @see elm_panes_content_left_set() to set content on the other side. - * - * @deprecated use elm_object_part_content_set() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); +/** + * Set the right content of the panes widget. + * + * @param obj The panes object. + * @param content The new right content 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_panes_content_right_unset() function. + * + * If panes is displayed vertically, left content will be displayed at + * bottom. + * + * @see elm_panes_content_right_get() + * @see elm_panes_content_left_set() to set content on the other side. + * + * @deprecated use elm_object_part_content_set() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - /** - * Get the left content of the panes. - * - * @param obj The panes object. - * @return The left content object that is being used. - * - * Return the left content object which is set for this widget. - * - * @see elm_panes_content_left_set() for details. - * - * @deprecated use elm_object_part_content_get() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the left content of the panes. + * + * @param obj The panes object. + * @return The left content object that is being used. + * + * Return the left content object which is set for this widget. + * + * @see elm_panes_content_left_set() for details. + * + * @deprecated use elm_object_part_content_get() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the right content of the panes. - * - * @param obj The panes object - * @return The right content object that is being used - * - * Return the right content object which is set for this widget. - * - * @see elm_panes_content_right_set() for details. - * - * @deprecated use elm_object_part_content_get() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the right content of the panes. + * + * @param obj The panes object + * @return The right content object that is being used + * + * Return the right content object which is set for this widget. + * + * @see elm_panes_content_right_set() for details. + * + * @deprecated use elm_object_part_content_get() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the left content used for the panes. - * - * @param obj The panes object. - * @return The left content object that was being used. - * - * Unparent and return the left content object which was set for this widget. - * - * @see elm_panes_content_left_set() for details. - * @see elm_panes_content_left_get(). - * - * @deprecated use elm_object_part_content_unset() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the left content used for the panes. + * + * @param obj The panes object. + * @return The left content object that was being used. + * + * Unparent and return the left content object which was set for this widget. + * + * @see elm_panes_content_left_set() for details. + * @see elm_panes_content_left_get(). + * + * @deprecated use elm_object_part_content_unset() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_left_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset the right content used for the panes. - * - * @param obj The panes object. - * @return The right content object that was being used. - * - * Unparent and return the right content object which was set for this - * widget. - * - * @see elm_panes_content_right_set() for details. - * @see elm_panes_content_right_get(). - * - * @deprecated use elm_object_part_content_unset() instead - * - * @ingroup Panes - */ - EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset the right content used for the panes. + * + * @param obj The panes object. + * @return The right content object that was being used. + * + * Unparent and return the right content object which was set for this + * widget. + * + * @see elm_panes_content_right_set() for details. + * @see elm_panes_content_right_get(). + * + * @deprecated use elm_object_part_content_unset() instead + * + * @ingroup Panes + */ +EINA_DEPRECATED EAPI Evas_Object *elm_panes_content_right_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the size proportion of panes widget's left side. - * - * @param obj The panes object. - * @return float value between 0.0 and 1.0 representing size proportion - * of left side. - * - * @see elm_panes_content_left_size_set() for more details. - * - * @ingroup Panes - */ - EAPI double elm_panes_content_left_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the size proportion of panes widget's left side. + * + * @param obj The panes object. + * @return float value between 0.0 and 1.0 representing size proportion + * of left side. + * + * @see elm_panes_content_left_size_set() for more details. + * + * @ingroup Panes + */ +EAPI double elm_panes_content_left_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the size proportion of panes widget's left side. - * - * @param obj The panes object. - * @param size Value between 0.0 and 1.0 representing size proportion - * of left side. - * - * By default it's homogeneous, i.e., both sides have the same size. - * - * If something different is required, it can be set with this function. - * For example, if the left content should be displayed over - * 75% of the panes size, @p size should be passed as @c 0.75. - * This way, right content will be resized to 25% of panes size. - * - * If displayed vertically, left content is displayed at top, and - * right content at bottom. - * - * @note This proportion will change when user drags the panes bar. - * - * @see elm_panes_content_left_size_get() - * - * @ingroup Panes - */ - EAPI void elm_panes_content_left_size_set(Evas_Object *obj, double size) EINA_ARG_NONNULL(1); +/** + * Set the size proportion of panes widget's left side. + * + * @param obj The panes object. + * @param size Value between 0.0 and 1.0 representing size proportion + * of left side. + * + * By default it's homogeneous, i.e., both sides have the same size. + * + * If something different is required, it can be set with this function. + * For example, if the left content should be displayed over + * 75% of the panes size, @p size should be passed as @c 0.75. + * This way, right content will be resized to 25% of panes size. + * + * If displayed vertically, left content is displayed at top, and + * right content at bottom. + * + * @note This proportion will change when user drags the panes bar. + * + * @see elm_panes_content_left_size_get() + * + * @ingroup Panes + */ +EAPI void elm_panes_content_left_size_set(Evas_Object *obj, double size) EINA_ARG_NONNULL(1); - /** - * Set the orientation of a given panes widget. - * - * @param obj The panes object. - * @param horizontal Use @c EINA_TRUE to make @p obj to be - * @b horizontal, @c EINA_FALSE to make it @b vertical. - * - * Use this function to change how your panes is to be - * disposed: vertically or horizontally. - * - * By default it's displayed horizontally. - * - * @see elm_panes_horizontal_get() - * - * @ingroup Panes - */ - EAPI void elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * Set the orientation of a given panes widget. + * + * @param obj The panes object. + * @param horizontal Use @c EINA_TRUE to make @p obj to be + * @b horizontal, @c EINA_FALSE to make it @b vertical. + * + * Use this function to change how your panes is to be + * disposed: vertically or horizontally. + * + * By default it's displayed horizontally. + * + * @see elm_panes_horizontal_get() + * + * @ingroup Panes + */ +EAPI void elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * Retrieve the orientation of a given panes widget. - * - * @param obj The panes object. - * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, - * @c EINA_FALSE if it's @b vertical (and on errors). - * - * @see elm_panes_horizontal_set() for more details. - * - * @ingroup Panes - */ - EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed) EINA_ARG_NONNULL(1); - EAPI Eina_Bool elm_panes_fixed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Retrieve the orientation of a given panes widget. + * + * @param obj The panes object. + * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, + * @c EINA_FALSE if it's @b vertical (and on errors). + * + * @see elm_panes_horizontal_set() for more details. + * + * @ingroup Panes + */ +EAPI Eina_Bool elm_panes_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI void elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_panes_fixed_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_password.h b/legacy/elementary/src/lib/elm_password.h index dde3db216a..0d1acfdd61 100644 --- a/legacy/elementary/src/lib/elm_password.h +++ b/legacy/elementary/src/lib/elm_password.h @@ -1,62 +1,61 @@ - /** - * @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. - * - * @{ - */ +/** + * @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); +/** + * 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); +/** + * 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); +/** + * 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); - - /** - * @} - */ +/** + * 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_photo.h b/legacy/elementary/src/lib/elm_photo.h index 3b808aa2f0..bab4f9ab74 100644 --- a/legacy/elementary/src/lib/elm_photo.h +++ b/legacy/elementary/src/lib/elm_photo.h @@ -1,84 +1,85 @@ - /** - * @defgroup Photo Photo - * - * For displaying the photo of a person (contact). Simple, yet - * with a very specific purpose. - * - * Signals that you can add callbacks for are: - * - * "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) - * - * @{ - */ +/** + * @defgroup Photo Photo + * + * For displaying the photo of a person (contact). Simple, yet + * with a very specific purpose. + * + * Signals that you can add callbacks for are: + * + * "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) + * + * @{ + */ - /** - * Add a new photo to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Photo - */ - EAPI Evas_Object *elm_photo_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new photo to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Photo + */ +EAPI Evas_Object * + elm_photo_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the file that will be used as photo - * - * @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 Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1); +/** + * Set the file that will be used as photo + * + * @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 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. - * - * @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. - * - * @ingroup Photo - */ - EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); +/** + * Set the file that will be used as thumbnail in the photo. + * + * @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. + * + * @ingroup Photo + */ +EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2); - /** - * Set the size that will be used on the photo - * - * @param obj The photo object - * @param size The size that the photo will be - * - * @ingroup Photo - */ - EAPI void elm_photo_size_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1); +/** + * Set the size that will be used on the photo + * + * @param obj The photo object + * @param size The size that the photo will be + * + * @ingroup Photo + */ +EAPI void elm_photo_size_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1); - /** - * Set if the photo should be completely visible or not. - * - * @param obj The photo object - * @param fill if true the photo will be completely visible - * - * @ingroup Photo - */ - EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) EINA_ARG_NONNULL(1); +/** + * Set if the photo should be completely visible or not. + * + * @param obj The photo object + * @param fill if true the photo will be completely visible + * + * @ingroup Photo + */ +EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) EINA_ARG_NONNULL(1); - /** - * Set editability of the photo. - * - * 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 photo object. - * @param set To set of clear editablity. - */ - EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Set editability of the photo. + * + * 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 photo object. + * @param set To set of clear editablity. + */ +EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_photocam.h b/legacy/elementary/src/lib/elm_photocam.h index 9f2d85f3e0..dca7051983 100644 --- a/legacy/elementary/src/lib/elm_photocam.h +++ b/legacy/elementary/src/lib/elm_photocam.h @@ -1,260 +1,261 @@ - /** - * @defgroup Photocam Photocam - * - * @image html img/widget/photocam/preview-00.png - * @image latex img/widget/photocam/preview-00.eps - * - * This is a widget specifically for displaying high-resolution digital - * camera photos giving speedy feedback (fast load), low memory footprint - * and zooming and panning as well as fitting logic. It is entirely focused - * on jpeg images, and takes advantage of properties of the jpeg format (via - * evas loader features in the jpeg loader). - * - * Signals that you can add callbacks for are: - * @li "clicked" - This is called when a user has clicked the photo without - * dragging around. - * @li "press" - This is called when a user has pressed down on the photo. - * @li "longpressed" - This is called when a user has pressed down on the - * photo for a long time without dragging around. - * @li "clicked,double" - This is called when a user has double-clicked the - * photo. - * @li "load" - Photo load begins. - * @li "loaded" - This is called when the image file load is complete for the - * first view (low resolution blurry version). - * @li "load,detail" - Photo detailed data load begins. - * @li "loaded,detail" - This is called when the image file load is complete - * for the detailed image data (full resolution needed). - * @li "zoom,start" - Zoom animation started. - * @li "zoom,stop" - Zoom animation stopped. - * @li "zoom,change" - Zoom changed when using an auto zoom mode. - * @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 - * - * @ref tutorial_photocam shows the API in action. - * @{ - */ +/** + * @defgroup Photocam Photocam + * + * @image html img/widget/photocam/preview-00.png + * @image latex img/widget/photocam/preview-00.eps + * + * This is a widget specifically for displaying high-resolution digital + * camera photos giving speedy feedback (fast load), low memory footprint + * and zooming and panning as well as fitting logic. It is entirely focused + * on jpeg images, and takes advantage of properties of the jpeg format (via + * evas loader features in the jpeg loader). + * + * Signals that you can add callbacks for are: + * @li "clicked" - This is called when a user has clicked the photo without + * dragging around. + * @li "press" - This is called when a user has pressed down on the photo. + * @li "longpressed" - This is called when a user has pressed down on the + * photo for a long time without dragging around. + * @li "clicked,double" - This is called when a user has double-clicked the + * photo. + * @li "load" - Photo load begins. + * @li "loaded" - This is called when the image file load is complete for the + * first view (low resolution blurry version). + * @li "load,detail" - Photo detailed data load begins. + * @li "loaded,detail" - This is called when the image file load is complete + * for the detailed image data (full resolution needed). + * @li "zoom,start" - Zoom animation started. + * @li "zoom,stop" - Zoom animation stopped. + * @li "zoom,change" - Zoom changed when using an auto zoom mode. + * @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 + * + * @ref tutorial_photocam shows the API in action. + * @{ + */ - /** - * @brief Types of zoom available. - */ - typedef enum _Elm_Photocam_Zoom_Mode - { - ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_photocam_zoom_set */ - ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, /**< Zoom until photo fits in photocam */ - ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, /**< Zoom until photo fills photocam */ - ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN, /**< Unzoom until photo fits in photocam */ - ELM_PHOTOCAM_ZOOM_MODE_LAST - } Elm_Photocam_Zoom_Mode; +/** + * @brief Types of zoom available. + */ +typedef enum _Elm_Photocam_Zoom_Mode +{ + ELM_PHOTOCAM_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_photocam_zoom_set */ + ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT, /**< Zoom until photo fits in photocam */ + ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL, /**< Zoom until photo fills photocam */ + ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT_IN, /**< Unzoom until photo fits in photocam */ + ELM_PHOTOCAM_ZOOM_MODE_LAST +} Elm_Photocam_Zoom_Mode; - /** - * @brief Add a new Photocam object - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_photocam_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new Photocam object + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_photocam_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Set the photo file to be shown - * - * @param obj The photocam object - * @param file The photo file - * @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.) - * - * This sets (and shows) the specified file (with a relative or absolute - * path) and will return a load error (same error that - * evas_object_image_load_error_get() will return). The image will change and - * adjust its size at this point and begin a background load process for this - * photo that at some time in the future will be displayed at the full - * quality needed. - */ - EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1); +/** + * @brief Set the photo file to be shown + * + * @param obj The photocam object + * @param file The photo file + * @return The return error (see EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_GENERIC etc.) + * + * This sets (and shows) the specified file (with a relative or absolute + * path) and will return a load error (same error that + * evas_object_image_load_error_get() will return). The image will change and + * adjust its size at this point and begin a background load process for this + * photo that at some time in the future will be displayed at the full + * quality needed. + */ +EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file) EINA_ARG_NONNULL(1); - /** - * @brief Returns the path of the current image file - * - * @param obj The photocam object - * @return Returns the path - * - * @see elm_photocam_file_set() - */ - EAPI const char *elm_photocam_file_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Returns the path of the current image file + * + * @param obj The photocam object + * @return Returns the path + * + * @see elm_photocam_file_set() + */ +EAPI const char *elm_photocam_file_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the zoom level of the photo - * - * @param obj The photocam object - * @param zoom The zoom level to set - * - * This sets the zoom level. 1 will be 1:1 pixel for pixel. 2 will be 2:1 - * (that is 2x2 photo pixels will display as 1 on-screen pixel). 4:1 will be - * 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom parameter must - * be greater than 0. It is usggested to stick to powers of 2. (1, 2, 4, 8, - * 16, 32, etc.). - */ - EAPI void elm_photocam_zoom_set(Evas_Object *obj, double zoom) EINA_ARG_NONNULL(1); +/** + * @brief Set the zoom level of the photo + * + * @param obj The photocam object + * @param zoom The zoom level to set + * + * This sets the zoom level. 1 will be 1:1 pixel for pixel. 2 will be 2:1 + * (that is 2x2 photo pixels will display as 1 on-screen pixel). 4:1 will be + * 4x4 photo pixels as 1 screen pixel, and so on. The @p zoom parameter must + * be greater than 0. It is usggested to stick to powers of 2. (1, 2, 4, 8, + * 16, 32, etc.). + */ +EAPI void elm_photocam_zoom_set(Evas_Object *obj, double zoom) EINA_ARG_NONNULL(1); - /** - * @brief Get the zoom level of the photo - * - * @param obj The photocam object - * @return The current zoom level - * - * This returns the current zoom level of the photocam object. Note that if - * you set the fill mode to other than ELM_PHOTOCAM_ZOOM_MODE_MANUAL - * (which is the default), the zoom level may be changed at any time by the - * photocam object itself to account for photo size and photocam viewpoer - * size. - * - * @see elm_photocam_zoom_set() - * @see elm_photocam_zoom_mode_set() - */ - EAPI double elm_photocam_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the zoom level of the photo + * + * @param obj The photocam object + * @return The current zoom level + * + * This returns the current zoom level of the photocam object. Note that if + * you set the fill mode to other than ELM_PHOTOCAM_ZOOM_MODE_MANUAL + * (which is the default), the zoom level may be changed at any time by the + * photocam object itself to account for photo size and photocam viewpoer + * size. + * + * @see elm_photocam_zoom_set() + * @see elm_photocam_zoom_mode_set() + */ +EAPI double elm_photocam_zoom_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the zoom mode - * - * @param obj The photocam object - * @param mode The desired mode - * - * This sets the zoom mode to manual or one of several automatic levels. - * Manual (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by - * elm_photocam_zoom_set() and will stay at that level until changed by code - * or until zoom mode is changed. This is the default mode. The Automatic - * modes will allow the photocam object to automatically adjust zoom mode - * based on properties. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so - * the photo fits EXACTLY inside the scroll frame with no pixels outside this - * area. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no - * pixels within the frame are left unfilled. - */ - EAPI void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode) EINA_ARG_NONNULL(1); +/** + * @brief Set the zoom mode + * + * @param obj The photocam object + * @param mode The desired mode + * + * This sets the zoom mode to manual or one of several automatic levels. + * Manual (ELM_PHOTOCAM_ZOOM_MODE_MANUAL) means that zoom is set manually by + * elm_photocam_zoom_set() and will stay at that level until changed by code + * or until zoom mode is changed. This is the default mode. The Automatic + * modes will allow the photocam object to automatically adjust zoom mode + * based on properties. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT) will adjust zoom so + * the photo fits EXACTLY inside the scroll frame with no pixels outside this + * area. ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL will be similar but ensure no + * pixels within the frame are left unfilled. + */ +EAPI void elm_photocam_zoom_mode_set(Evas_Object *obj, Elm_Photocam_Zoom_Mode mode) EINA_ARG_NONNULL(1); - /** - * @brief Get the zoom mode - * - * @param obj The photocam object - * @return The current zoom mode - * - * This gets the current zoom mode of the photocam object. - * - * @see elm_photocam_zoom_mode_set() - */ - EAPI Elm_Photocam_Zoom_Mode elm_photocam_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the zoom mode + * + * @param obj The photocam object + * @return The current zoom mode + * + * This gets the current zoom mode of the photocam object. + * + * @see elm_photocam_zoom_mode_set() + */ +EAPI Elm_Photocam_Zoom_Mode elm_photocam_zoom_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the current image pixel width and height - * - * @param obj The photocam object - * @param w A pointer to the width return - * @param h A pointer to the height return - * - * This gets the current photo pixel width and height (for the original). - * The size will be returned in the integers @p w and @p h that are pointed - * to. - */ - EAPI void elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); +/** + * @brief Get the current image pixel width and height + * + * @param obj The photocam object + * @param w A pointer to the width return + * @param h A pointer to the height return + * + * This gets the current photo pixel width and height (for the original). + * The size will be returned in the integers @p w and @p h that are pointed + * to. + */ +EAPI void elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); - /** - * @brief Get the area of the image that is currently shown - * - * @param obj - * @param x A pointer to the X-coordinate of region - * @param y A pointer to the Y-coordinate of region - * @param w A pointer to the width - * @param h A pointer to the height - * - * @see elm_photocam_image_region_show() - * @see elm_photocam_image_region_bring_in() - */ - EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); +/** + * @brief Get the area of the image that is currently shown + * + * @param obj + * @param x A pointer to the X-coordinate of region + * @param y A pointer to the Y-coordinate of region + * @param w A pointer to the width + * @param h A pointer to the height + * + * @see elm_photocam_image_region_show() + * @see elm_photocam_image_region_bring_in() + */ +EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); - /** - * @brief Set the viewed portion of the image - * - * @param obj The photocam object - * @param x X-coordinate of region in image original pixels - * @param y Y-coordinate of region in image original pixels - * @param w Width of region in image original pixels - * @param h Height of region in image original pixels - * - * This shows the region of the image without using animation. - */ - EAPI void elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); +/** + * @brief Set the viewed portion of the image + * + * @param obj The photocam object + * @param x X-coordinate of region in image original pixels + * @param y Y-coordinate of region in image original pixels + * @param w Width of region in image original pixels + * @param h Height of region in image original pixels + * + * This shows the region of the image without using animation. + */ +EAPI void elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - /** - * @brief Bring in the viewed portion of the image - * - * @param obj The photocam object - * @param x X-coordinate of region in image original pixels - * @param y Y-coordinate of region in image original pixels - * @param w Width of region in image original pixels - * @param h Height of region in image original pixels - * - * This shows the region of the image using animation. - */ - EAPI void elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); +/** + * @brief Bring in the viewed portion of the image + * + * @param obj The photocam object + * @param x X-coordinate of region in image original pixels + * @param y Y-coordinate of region in image original pixels + * @param w Width of region in image original pixels + * @param h Height of region in image original pixels + * + * This shows the region of the image using animation. + */ +EAPI void elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - /** - * @brief Set the paused state for photocam - * - * @param obj The photocam object - * @param paused The pause state to set - * - * This sets the paused state to on(EINA_TRUE) or off (EINA_FALSE) for - * photocam. The default is off. This will stop zooming using animation on - * zoom levels changes and change instantly. This will stop any existing - * animations that are running. - */ - EAPI void elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); +/** + * @brief Set the paused state for photocam + * + * @param obj The photocam object + * @param paused The pause state to set + * + * This sets the paused state to on(EINA_TRUE) or off (EINA_FALSE) for + * photocam. The default is off. This will stop zooming using animation on + * zoom levels changes and change instantly. This will stop any existing + * animations that are running. + */ +EAPI void elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused) EINA_ARG_NONNULL(1); - /** - * @brief Get the paused state for photocam - * - * @param obj The photocam object - * @return The current paused state - * - * This gets the current paused state for the photocam object. - * - * @see elm_photocam_paused_set() - */ - EAPI Eina_Bool elm_photocam_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the paused state for photocam + * + * @param obj The photocam object + * @return The current paused state + * + * This gets the current paused state for the photocam object. + * + * @see elm_photocam_paused_set() + */ +EAPI Eina_Bool elm_photocam_paused_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Get the internal low-res image used for photocam - * - * @param obj The photocam object - * @return The internal image object handle, or NULL if none exists - * - * This gets the internal image object inside photocam. Do not modify it. It - * is for inspection only, and hooking callbacks to. Nothing else. It may be - * deleted at any time as well. - */ - EAPI Evas_Object *elm_photocam_internal_image_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the internal low-res image used for photocam + * + * @param obj The photocam object + * @return The internal image object handle, or NULL if none exists + * + * This gets the internal image object inside photocam. Do not modify it. It + * is for inspection only, and hooking callbacks to. Nothing else. It may be + * deleted at any time as well. + */ +EAPI Evas_Object *elm_photocam_internal_image_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the photocam scrolling bouncing. - * - * @param obj The photocam object - * @param h_bounce bouncing for horizontal - * @param v_bounce bouncing for vertical - */ - EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); +/** + * @brief Set the photocam scrolling bouncing. + * + * @param obj The photocam object + * @param h_bounce bouncing for horizontal + * @param v_bounce bouncing for vertical + */ +EAPI void elm_photocam_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) EINA_ARG_NONNULL(1); - /** - * @brief Get the photocam scrolling bouncing. - * - * @param obj The photocam object - * @param h_bounce bouncing for horizontal - * @param v_bounce bouncing for vertical - * - * @see elm_photocam_bounce_set() - */ - EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the photocam scrolling bouncing. + * + * @param obj The photocam object + * @param h_bounce bouncing for horizontal + * @param v_bounce bouncing for vertical + * + * @see elm_photocam_bounce_set() + */ +EAPI void elm_photocam_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_priv.h b/legacy/elementary/src/lib/elm_priv.h index 4123bbd134..67497eab51 100644 --- a/legacy/elementary/src/lib/elm_priv.h +++ b/legacy/elementary/src/lib/elm_priv.h @@ -1,16 +1,16 @@ #ifndef ELM_PRIV_H #define ELM_PRIV_H #ifdef HAVE_CONFIG_H -# include "elementary_config.h" +#include "elementary_config.h" #endif #ifdef HAVE_ELEMENTARY_X -# include +#include #endif #ifdef HAVE_ELEMENTARY_FB -# include +#include #endif #ifdef HAVE_ELEMENTARY_WINCE -# include +#include #endif #include "elm_widget.h" @@ -22,27 +22,27 @@ #define DBG(...) EINA_LOG_DOM_DBG (_elm_log_dom, __VA_ARGS__) #ifdef ENABLE_NLS -# include -# define E_(string) _elm_dgettext(string) +#include +#define E_(string) _elm_dgettext(string) #else -# ifndef setlocale -# define setlocale(c, l) -# endif -# ifndef libintl_setlocale -# define libintl_setlocale(c, l) -# endif -# ifndef bindtextdomain -# define bindtextdomain(domain,dir) -# endif -# ifndef libintl_bindtextdomain -# define libintl_bindtextdomain(domain,dir) -# endif -# define E_(string) (string) +#ifndef setlocale +#define setlocale(c, l) +#endif +#ifndef libintl_setlocale +#define libintl_setlocale(c, l) +#endif +#ifndef bindtextdomain +#define bindtextdomain(domain, dir) +#endif +#ifndef libintl_bindtextdomain +#define libintl_bindtextdomain(domain, dir) +#endif +#define E_(string) (string) #endif #define N_(string) (string) -typedef struct _Elm_Config Elm_Config; -typedef struct _Elm_Module Elm_Module; +typedef struct _Elm_Config Elm_Config; +typedef struct _Elm_Module Elm_Module; struct _Elm_Theme { @@ -90,10 +90,10 @@ extern const char *_elm_engines[]; #define ELM_OPENGL_COCOA (_elm_engines[14]) #define ELM_SOFTWARE_PSL1GHT (_elm_engines[15]) -#define ELM_FONT_TOKEN_STYLE ":style=" +#define ELM_FONT_TOKEN_STYLE ":style=" -#define ELM_ACCESS_MODE_OFF 0 -#define ELM_ACCESS_MODE_ON 1 +#define ELM_ACCESS_MODE_OFF 0 +#define ELM_ACCESS_MODE_ON 1 #undef MIN #define MIN(x, y) (((x) < (y)) ? (x) : (y)) @@ -102,70 +102,70 @@ extern const char *_elm_engines[]; struct _Elm_Config { - int config_version; - const char *engine; - unsigned char vsync; - unsigned char thumbscroll_enable; - int thumbscroll_threshold; - double thumbscroll_momentum_threshold; - double thumbscroll_friction; - double thumbscroll_bounce_friction; - double page_scroll_friction; - double bring_in_scroll_friction; - double zoom_friction; - unsigned char thumbscroll_bounce_enable; - double thumbscroll_border_friction; - double thumbscroll_sensitivity_friction; - double scroll_smooth_amount; - double scroll_smooth_history_weight; - double scroll_smooth_future_time; - double scroll_smooth_time_window; - double scale; - int bgpixmap; - int compositing; - Eina_List *font_dirs; - Eina_List *font_overlays; - int font_hinting; - int cache_flush_poll_interval; - unsigned char cache_flush_enable; - int image_cache; - int font_cache; - int edje_cache; - int edje_collection_cache; - int finger_size; - double fps; - const char *theme; - const char *modules; - double tooltip_delay; - unsigned char cursor_engine_only; - unsigned char focus_highlight_enable; - unsigned char focus_highlight_animate; - int toolbar_shrink_mode; - unsigned char fileselector_expand_enable; - unsigned char inwin_dialogs_enable; - int icon_size; - double longpress_timeout; - unsigned char effect_enable; - unsigned char desktop_entry; - Eina_Bool password_show_last; - double password_show_last_timeout; - Eina_Bool glayer_zoom_finger_enable; - double glayer_zoom_finger_factor; - double glayer_zoom_wheel_factor; - double glayer_zoom_distance_tolerance; - double glayer_rotate_finger_enable; - double glayer_rotate_angular_tolerance; - double glayer_line_min_length; - double glayer_line_distance_tolerance; - double glayer_line_angular_tolerance; - unsigned int glayer_flick_time_limit_ms; - double glayer_long_tap_start_timeout; - int access_mode; - Eina_Bool glayer_continues_enable; + int config_version; + const char *engine; + unsigned char vsync; + unsigned char thumbscroll_enable; + int thumbscroll_threshold; + double thumbscroll_momentum_threshold; + double thumbscroll_friction; + double thumbscroll_bounce_friction; + double page_scroll_friction; + double bring_in_scroll_friction; + double zoom_friction; + unsigned char thumbscroll_bounce_enable; + double thumbscroll_border_friction; + double thumbscroll_sensitivity_friction; + double scroll_smooth_amount; + double scroll_smooth_history_weight; + double scroll_smooth_future_time; + double scroll_smooth_time_window; + double scale; + int bgpixmap; + int compositing; + Eina_List *font_dirs; + Eina_List *font_overlays; + int font_hinting; + int cache_flush_poll_interval; + unsigned char cache_flush_enable; + int image_cache; + int font_cache; + int edje_cache; + int edje_collection_cache; + int finger_size; + double fps; + const char *theme; + const char *modules; + double tooltip_delay; + unsigned char cursor_engine_only; + unsigned char focus_highlight_enable; + unsigned char focus_highlight_animate; + int toolbar_shrink_mode; + unsigned char fileselector_expand_enable; + unsigned char inwin_dialogs_enable; + int icon_size; + double longpress_timeout; + unsigned char effect_enable; + unsigned char desktop_entry; + Eina_Bool password_show_last; + double password_show_last_timeout; + Eina_Bool glayer_zoom_finger_enable; + double glayer_zoom_finger_factor; + double glayer_zoom_wheel_factor; + double glayer_zoom_distance_tolerance; + double glayer_rotate_finger_enable; + double glayer_rotate_angular_tolerance; + double glayer_line_min_length; + double glayer_line_distance_tolerance; + double glayer_line_angular_tolerance; + unsigned int glayer_flick_time_limit_ms; + double glayer_long_tap_start_timeout; + int access_mode; + Eina_Bool glayer_continues_enable; /* Not part of the EET file */ - Eina_Bool is_mirrored : 1; - Eina_Bool translate : 1; + Eina_Bool is_mirrored : 1; + Eina_Bool translate : 1; }; struct _Elm_Module @@ -179,70 +179,70 @@ struct _Elm_Module Eina_Module *module; void *data; void *api; - int (*init_func) (Elm_Module *m); - int (*shutdown_func) (Elm_Module *m); + int (*init_func)(Elm_Module *m); + int (*shutdown_func)(Elm_Module *m); int references; }; -int _elm_ews_wm_init(void); -void _elm_ews_wm_shutdown(void); -void _elm_ews_wm_rescale(Elm_Theme *th, Eina_Bool use_theme); +int _elm_ews_wm_init(void); +void _elm_ews_wm_shutdown(void); +void _elm_ews_wm_rescale(Elm_Theme *th, Eina_Bool use_theme); -void _elm_win_shutdown(void); -void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme); -void _elm_win_translate(void); +void _elm_win_shutdown(void); +void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme); +void _elm_win_translate(void); -Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style); -Eina_Bool _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style); -Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style); -Eina_Bool _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style); -Eina_Bool _elm_theme_parse(Elm_Theme *th, const char *theme); -void _elm_theme_shutdown(void); +Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style); +Eina_Bool _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style); +Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style); +Eina_Bool _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style); +Eina_Bool _elm_theme_parse(Elm_Theme *th, const char *theme); +void _elm_theme_shutdown(void); -void _elm_module_init(void); -void _elm_module_shutdown(void); -void _elm_module_parse(const char *s); -Elm_Module *_elm_module_find_as(const char *as); -Elm_Module *_elm_module_add(const char *name, const char *as); -void _elm_module_del(Elm_Module *m); -Eina_Bool _elm_module_load(Elm_Module *m); -void _elm_module_unload(Elm_Module *m); -const void *_elm_module_symbol_get(Elm_Module *m, const char *name); +void _elm_module_init(void); +void _elm_module_shutdown(void); +void _elm_module_parse(const char *s); +Elm_Module *_elm_module_find_as(const char *as); +Elm_Module *_elm_module_add(const char *name, const char *as); +void _elm_module_del(Elm_Module *m); +Eina_Bool _elm_module_load(Elm_Module *m); +void _elm_module_unload(Elm_Module *m); +const void *_elm_module_symbol_get(Elm_Module *m, const char *name); -void _elm_widget_type_clear(void); -void _elm_widget_focus_region_show(const Evas_Object *obj); -void _elm_widget_top_win_focused_set(Evas_Object *obj, Eina_Bool top_win_focused); -Eina_Bool _elm_widget_top_win_focused_get(const Evas_Object *obj); +void _elm_widget_type_clear(void); +void _elm_widget_focus_region_show(const Evas_Object *obj); +void _elm_widget_top_win_focused_set(Evas_Object *obj, Eina_Bool top_win_focused); +Eina_Bool _elm_widget_top_win_focused_get(const Evas_Object *obj); -void _elm_unneed_ethumb(void); -void _elm_unneed_web(void); +void _elm_unneed_ethumb(void); +void _elm_unneed_web(void); -void _elm_rescale(void); -void _elm_widget_mirrored_reload(Evas_Object *obj); +void _elm_rescale(void); +void _elm_widget_mirrored_reload(Evas_Object *obj); -void _elm_config_init(void); -void _elm_config_sub_init(void); -void _elm_config_shutdown(void); -void _elm_config_sub_shutdown(void); -Eina_Bool _elm_config_save(void); -void _elm_config_reload(void); +void _elm_config_init(void); +void _elm_config_sub_init(void); +void _elm_config_shutdown(void); +void _elm_config_sub_shutdown(void); +Eina_Bool _elm_config_save(void); +void _elm_config_reload(void); -void _elm_recache(void); +void _elm_recache(void); -const char *_elm_config_current_profile_get(void); -const char *_elm_config_profile_dir_get(const char *prof, Eina_Bool is_user); -Eina_List *_elm_config_profiles_list(void); -void _elm_config_all_update(void); -void _elm_config_profile_set(const char *profile); +const char *_elm_config_current_profile_get(void); +const char *_elm_config_profile_dir_get(const char *prof, Eina_Bool is_user); +Eina_List *_elm_config_profiles_list(void); +void _elm_config_all_update(void); +void _elm_config_profile_set(const char *profile); -void _elm_config_engine_set(const char *engine); +void _elm_config_engine_set(const char *engine); -Eina_List *_elm_config_font_overlays_list(void); -void _elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size); -void _elm_config_font_overlay_remove(const char *text_class); -void _elm_config_font_overlay_apply(void); -Eina_List *_elm_config_text_classes_get(void); -void _elm_config_text_classes_free(Eina_List *l); +Eina_List *_elm_config_font_overlays_list(void); +void _elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size); +void _elm_config_font_overlay_remove(const char *text_class); +void _elm_config_font_overlay_apply(void); +Eina_List *_elm_config_text_classes_get(void); +void _elm_config_text_classes_free(Eina_List *l); Elm_Font_Properties *_elm_font_properties_get(Eina_Hash **font_hash, const char *font); Eina_Hash *_elm_font_available_hash_add(Eina_Hash *font_hash, const char *full_name); @@ -255,23 +255,22 @@ void elm_object_sub_cursor_set(Evas_Object *eventarea, Evas_Obje void elm_menu_clone(Evas_Object *from_menu, Evas_Object *to_menu, Elm_Object_Item *parent); -Eina_Bool _elm_dangerous_call_check(const char *call); +Eina_Bool _elm_dangerous_call_check(const char *call); -Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj); +Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj); -char *_elm_util_mkup_to_text(const char *mkup); -char *_elm_util_text_to_mkup(const char *text); +char *_elm_util_mkup_to_text(const char *mkup); +char *_elm_util_text_to_mkup(const char *text); -Eina_Bool _elm_video_check(Evas_Object *video); +Eina_Bool _elm_video_check(Evas_Object *video); - -extern char *_elm_appname; -extern Elm_Config *_elm_config; -extern const char *_elm_data_dir; -extern const char *_elm_lib_dir; -extern int _elm_log_dom; -extern Eina_List *_elm_win_list; -extern int _elm_win_deferred_free; +extern char *_elm_appname; +extern Elm_Config *_elm_config; +extern const char *_elm_data_dir; +extern const char *_elm_lib_dir; +extern int _elm_log_dom; +extern Eina_List *_elm_win_list; +extern int _elm_win_deferred_free; #ifdef ENABLE_NLS /* Our gettext wrapper, used to disable translation of elm if the app @@ -286,6 +285,7 @@ _elm_dgettext(const char *string) return dgettext(PACKAGE, string); } + #endif /* Used by the paste handler */ diff --git a/legacy/elementary/src/lib/elm_progressbar.h b/legacy/elementary/src/lib/elm_progressbar.h index dabe972df0..44684106da 100644 --- a/legacy/elementary/src/lib/elm_progressbar.h +++ b/legacy/elementary/src/lib/elm_progressbar.h @@ -1,351 +1,353 @@ - /** - * @defgroup Progressbar Progress bar - * - * The progress bar is a widget for visually representing the - * progress status of a given job/task. - * - * A progress bar may be horizontal or vertical. It may display an - * icon besides it, as well as primary and @b units labels. The - * former is meant to label the widget as a whole, while the - * latter, which is formatted with floating point values (and thus - * accepts a printf-style format string, like "%1.2f - * units"), is meant to label the widget's progress - * value. Label, icon and unit strings/objects are @b optional - * for progress bars. - * - * A progress bar may be @b inverted, in which state it gets its - * values inverted, with high values being on the left or top and - * low values on the right or bottom, as opposed to normally have - * the low values on the former and high values on the latter, - * respectively, for horizontal and vertical modes. - * - * The @b span of the progress, as set by - * elm_progressbar_span_size_set(), is its length (horizontally or - * vertically), unless one puts size hints on the widget to expand - * on desired directions, by any container. That length will be - * scaled by the object or applications scaling factor. At any - * point code can query the progress bar for its value with - * elm_progressbar_value_get(). - * - * Available widget styles for progress bars: - * - @c "default" - * - @c "wheel" (simple style, no text, no progression, only - * "pulse" effect is available) - * - * Default contents parts of the progressbar widget that you can use for are: - * @li "icon" - An icon of the progressbar - * - * Here is an example on its usage: - * @li @ref progressbar_example - */ +/** + * @defgroup Progressbar Progress bar + * + * The progress bar is a widget for visually representing the + * progress status of a given job/task. + * + * A progress bar may be horizontal or vertical. It may display an + * icon besides it, as well as primary and @b units labels. The + * former is meant to label the widget as a whole, while the + * latter, which is formatted with floating point values (and thus + * accepts a printf-style format string, like "%1.2f + * units"), is meant to label the widget's progress + * value. Label, icon and unit strings/objects are @b optional + * for progress bars. + * + * A progress bar may be @b inverted, in which state it gets its + * values inverted, with high values being on the left or top and + * low values on the right or bottom, as opposed to normally have + * the low values on the former and high values on the latter, + * respectively, for horizontal and vertical modes. + * + * The @b span of the progress, as set by + * elm_progressbar_span_size_set(), is its length (horizontally or + * vertically), unless one puts size hints on the widget to expand + * on desired directions, by any container. That length will be + * scaled by the object or applications scaling factor. At any + * point code can query the progress bar for its value with + * elm_progressbar_value_get(). + * + * Available widget styles for progress bars: + * - @c "default" + * - @c "wheel" (simple style, no text, no progression, only + * "pulse" effect is available) + * + * Default contents parts of the progressbar widget that you can use for are: + * @li "icon" - An icon of the progressbar + * + * Here is an example on its usage: + * @li @ref progressbar_example + */ - /** - * Add a new progress bar widget to the given parent Elementary - * (container) object - * - * @param parent The parent object - * @return a new progress bar widget handle or @c NULL, on errors - * - * This function inserts a new progress bar widget on the canvas. - * - * @ingroup Progressbar - */ - EAPI Evas_Object *elm_progressbar_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new progress bar widget to the given parent Elementary + * (container) object + * + * @param parent The parent object + * @return a new progress bar widget handle or @c NULL, on errors + * + * This function inserts a new progress bar widget on the canvas. + * + * @ingroup Progressbar + */ +EAPI Evas_Object * + elm_progressbar_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set whether a given progress bar widget is at "pulsing mode" or - * not. - * - * @param obj The progress bar object - * @param pulse @c EINA_TRUE to put @p obj in pulsing mode, - * @c EINA_FALSE to put it back to its default one - * - * By default, progress bars will display values from the low to - * high value boundaries. There are, though, contexts in which the - * state of progression of a given task is @b unknown. For those, - * one can set a progress bar widget to a "pulsing state", to give - * the user an idea that some computation is being held, but - * without exact progress values. In the default theme it will - * animate its bar with the contents filling in constantly and back - * to non-filled, in a loop. To start and stop this pulsing - * animation, one has to explicitly call elm_progressbar_pulse(). - * - * @see elm_progressbar_pulse_get() - * @see elm_progressbar_pulse() - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_pulse_set(Evas_Object *obj, Eina_Bool pulse) EINA_ARG_NONNULL(1); +/** + * Set whether a given progress bar widget is at "pulsing mode" or + * not. + * + * @param obj The progress bar object + * @param pulse @c EINA_TRUE to put @p obj in pulsing mode, + * @c EINA_FALSE to put it back to its default one + * + * By default, progress bars will display values from the low to + * high value boundaries. There are, though, contexts in which the + * state of progression of a given task is @b unknown. For those, + * one can set a progress bar widget to a "pulsing state", to give + * the user an idea that some computation is being held, but + * without exact progress values. In the default theme it will + * animate its bar with the contents filling in constantly and back + * to non-filled, in a loop. To start and stop this pulsing + * animation, one has to explicitly call elm_progressbar_pulse(). + * + * @see elm_progressbar_pulse_get() + * @see elm_progressbar_pulse() + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_pulse_set(Evas_Object *obj, Eina_Bool pulse) EINA_ARG_NONNULL(1); - /** - * Get whether a given progress bar widget is at "pulsing mode" or - * not. - * - * @param obj The progress bar object - * @return @c EINA_TRUE, if @p obj is in pulsing mode, @c EINA_FALSE - * if it's in the default one (and on errors) - * - * @ingroup Progressbar - */ - EAPI Eina_Bool elm_progressbar_pulse_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether a given progress bar widget is at "pulsing mode" or + * not. + * + * @param obj The progress bar object + * @return @c EINA_TRUE, if @p obj is in pulsing mode, @c EINA_FALSE + * if it's in the default one (and on errors) + * + * @ingroup Progressbar + */ +EAPI Eina_Bool elm_progressbar_pulse_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Start/stop a given progress bar "pulsing" animation, if its - * under that mode - * - * @param obj The progress bar object - * @param state @c EINA_TRUE, to @b start the pulsing animation, - * @c EINA_FALSE to @b stop it - * - * @note This call won't do anything if @p obj is not under "pulsing mode". - * - * @see elm_progressbar_pulse_set() for more details. - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); +/** + * Start/stop a given progress bar "pulsing" animation, if its + * under that mode + * + * @param obj The progress bar object + * @param state @c EINA_TRUE, to @b start the pulsing animation, + * @c EINA_FALSE to @b stop it + * + * @note This call won't do anything if @p obj is not under "pulsing mode". + * + * @see elm_progressbar_pulse_set() for more details. + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state) EINA_ARG_NONNULL(1); - /** - * Set the progress value (in percentage) on a given progress bar - * widget - * - * @param obj The progress bar object - * @param val The progress value (@b must be between @c 0.0 and @c - * 1.0) - * - * Use this call to set progress bar levels. - * - * @note If you passes a value out of the specified range for @p - * val, it will be interpreted as the @b closest of the @b boundary - * values in the range. - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); +/** + * Set the progress value (in percentage) on a given progress bar + * widget + * + * @param obj The progress bar object + * @param val The progress value (@b must be between @c 0.0 and @c + * 1.0) + * + * Use this call to set progress bar levels. + * + * @note If you passes a value out of the specified range for @p + * val, it will be interpreted as the @b closest of the @b boundary + * values in the range. + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); - /** - * Get the progress value (in percentage) on a given progress bar - * widget - * - * @param obj The progress bar object - * @return The value of the progressbar - * - * @see elm_progressbar_value_set() for more details - * - * @ingroup Progressbar - */ - EAPI double elm_progressbar_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the progress value (in percentage) on a given progress bar + * widget + * + * @param obj The progress bar object + * @return The value of the progressbar + * + * @see elm_progressbar_value_set() for more details + * + * @ingroup Progressbar + */ +EAPI double elm_progressbar_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the label of a given progress bar widget - * - * @param obj The progress bar object - * @param label The text label string, in UTF-8 - * - * @ingroup Progressbar - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_progressbar_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label of a given progress bar widget + * + * @param obj The progress bar object + * @param label The text label string, in UTF-8 + * + * @ingroup Progressbar + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_progressbar_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label of a given progress bar widget - * - * @param obj The progressbar object - * @return The text label string, in UTF-8 - * - * @ingroup Progressbar - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI const char *elm_progressbar_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label of a given progress bar widget + * + * @param obj The progressbar object + * @return The text label string, in UTF-8 + * + * @ingroup Progressbar + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI const char *elm_progressbar_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the icon object of a given progress bar widget - * - * @param obj The progress bar object - * @param icon The icon object - * - * Use this call to decorate @p obj with an icon next to it. - * - * @note 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_progressbar_icon_unset() function. - * - * @see elm_progressbar_icon_get() - * @deprecated use elm_object_part_content_set() instead. - * - * @ingroup Progressbar - */ - EINA_DEPRECATED EAPI void elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon object of a given progress bar widget + * + * @param obj The progress bar object + * @param icon The icon object + * + * Use this call to decorate @p obj with an icon next to it. + * + * @note 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_progressbar_icon_unset() function. + * + * @see elm_progressbar_icon_get() + * @deprecated use elm_object_part_content_set() instead. + * + * @ingroup Progressbar + */ +EINA_DEPRECATED EAPI void elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Retrieve the icon object set for a given progress bar widget - * - * @param obj The progress bar object - * @return The icon object's handle, if @p obj had one set, or @c NULL, - * otherwise (and on errors) - * - * @see elm_progressbar_icon_set() for more details - * @deprecated use elm_object_part_content_get() instead. - * - * @ingroup Progressbar - */ - EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the icon object set for a given progress bar widget + * + * @param obj The progress bar object + * @return The icon object's handle, if @p obj had one set, or @c NULL, + * otherwise (and on errors) + * + * @see elm_progressbar_icon_set() for more details + * @deprecated use elm_object_part_content_get() instead. + * + * @ingroup Progressbar + */ +EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Unset an icon set on a given progress bar widget - * - * @param obj The progress bar object - * @return The icon object that was being used, if any was set, or - * @c NULL, otherwise (and on errors) - * - * This call will unparent and return the icon object which was set - * for this widget, previously, on success. - * - * @see elm_progressbar_icon_set() for more details - * @deprecated use elm_object_part_content_unset() instead. - * - * @ingroup Progressbar - */ - EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset an icon set on a given progress bar widget + * + * @param obj The progress bar object + * @return The icon object that was being used, if any was set, or + * @c NULL, otherwise (and on errors) + * + * This call will unparent and return the icon object which was set + * for this widget, previously, on success. + * + * @see elm_progressbar_icon_set() for more details + * @deprecated use elm_object_part_content_unset() instead. + * + * @ingroup Progressbar + */ +EINA_DEPRECATED EAPI Evas_Object *elm_progressbar_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the (exact) length of the bar region of a given progress bar - * widget - * - * @param obj The progress bar object - * @param size The length of the progress bar's bar region - * - * This sets the minimum width (when in horizontal mode) or height - * (when in vertical mode) of the actual bar area of the progress - * bar @p obj. This in turn affects the object's minimum size. Use - * this when you're not setting other size hints expanding on the - * given direction (like weight and alignment hints) and you would - * like it to have a specific size. - * - * @note Icon, label and unit text around @p obj will require their - * own space, which will make @p obj to require more the @p size, - * actually. - * - * @see elm_progressbar_span_size_get() - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size) EINA_ARG_NONNULL(1); +/** + * Set the (exact) length of the bar region of a given progress bar + * widget + * + * @param obj The progress bar object + * @param size The length of the progress bar's bar region + * + * This sets the minimum width (when in horizontal mode) or height + * (when in vertical mode) of the actual bar area of the progress + * bar @p obj. This in turn affects the object's minimum size. Use + * this when you're not setting other size hints expanding on the + * given direction (like weight and alignment hints) and you would + * like it to have a specific size. + * + * @note Icon, label and unit text around @p obj will require their + * own space, which will make @p obj to require more the @p size, + * actually. + * + * @see elm_progressbar_span_size_get() + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_span_size_set(Evas_Object *obj, Evas_Coord size) EINA_ARG_NONNULL(1); - /** - * Get the length set for the bar region of a given progress bar - * widget - * - * @param obj The progress bar object - * @return The length of the progress bar's bar region - * - * If that size was not set previously, with - * elm_progressbar_span_size_set(), this call will return @c 0. - * - * @ingroup Progressbar - */ - EAPI Evas_Coord elm_progressbar_span_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the length set for the bar region of a given progress bar + * widget + * + * @param obj The progress bar object + * @return The length of the progress bar's bar region + * + * If that size was not set previously, with + * elm_progressbar_span_size_set(), this call will return @c 0. + * + * @ingroup Progressbar + */ +EAPI Evas_Coord elm_progressbar_span_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the format string for a given progress bar widget's units - * label - * - * @param obj The progress bar object - * @param format The format string for @p obj's units label - * - * If @c NULL is passed on @p format, it will make @p obj's units - * area to be hidden completely. If not, it'll set the format - * string for the units label's @b text. The units label is - * provided a floating point value, so the units text is up display - * at most one floating point falue. Note that the units label is - * optional. Use a format string such as "%1.2f meters" for - * example. - * - * @note The default format string for a progress bar is an integer - * percentage, as in @c "%.0f %%". - * - * @see elm_progressbar_unit_format_get() - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_unit_format_set(Evas_Object *obj, const char *format) EINA_ARG_NONNULL(1); +/** + * Set the format string for a given progress bar widget's units + * label + * + * @param obj The progress bar object + * @param format The format string for @p obj's units label + * + * If @c NULL is passed on @p format, it will make @p obj's units + * area to be hidden completely. If not, it'll set the format + * string for the units label's @b text. The units label is + * provided a floating point value, so the units text is up display + * at most one floating point falue. Note that the units label is + * optional. Use a format string such as "%1.2f meters" for + * example. + * + * @note The default format string for a progress bar is an integer + * percentage, as in @c "%.0f %%". + * + * @see elm_progressbar_unit_format_get() + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_unit_format_set(Evas_Object *obj, const char *format) EINA_ARG_NONNULL(1); - /** - * Retrieve the format string set for a given progress bar widget's - * units label - * - * @param obj The progress bar object - * @return The format set string for @p obj's units label or - * @c NULL, if none was set (and on errors) - * - * @see elm_progressbar_unit_format_set() for more details - * - * @ingroup Progressbar - */ - EAPI const char *elm_progressbar_unit_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the format string set for a given progress bar widget's + * units label + * + * @param obj The progress bar object + * @return The format set string for @p obj's units label or + * @c NULL, if none was set (and on errors) + * + * @see elm_progressbar_unit_format_set() for more details + * + * @ingroup Progressbar + */ +EAPI const char *elm_progressbar_unit_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the orientation of a given progress bar widget - * - * @param obj The progress bar object - * @param horizontal Use @c EINA_TRUE to make @p obj to be - * @b horizontal, @c EINA_FALSE to make it @b vertical - * - * Use this function to change how your progress bar is to be - * disposed: vertically or horizontally. - * - * @see elm_progressbar_horizontal_get() - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * Set the orientation of a given progress bar widget + * + * @param obj The progress bar object + * @param horizontal Use @c EINA_TRUE to make @p obj to be + * @b horizontal, @c EINA_FALSE to make it @b vertical + * + * Use this function to change how your progress bar is to be + * disposed: vertically or horizontally. + * + * @see elm_progressbar_horizontal_get() + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * Retrieve the orientation of a given progress bar widget - * - * @param obj The progress bar object - * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, - * @c EINA_FALSE if it's @b vertical (and on errors) - * - * @see elm_progressbar_horizontal_set() for more details - * - * @ingroup Progressbar - */ - EAPI Eina_Bool elm_progressbar_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the orientation of a given progress bar widget + * + * @param obj The progress bar object + * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, + * @c EINA_FALSE if it's @b vertical (and on errors) + * + * @see elm_progressbar_horizontal_set() for more details + * + * @ingroup Progressbar + */ +EAPI Eina_Bool elm_progressbar_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Invert a given progress bar widget's displaying values order - * - * @param obj The progress bar object - * @param inverted Use @c EINA_TRUE to make @p obj inverted, - * @c EINA_FALSE to bring it back to default, non-inverted values. - * - * A progress bar may be @b inverted, in which state it gets its - * values inverted, with high values being on the left or top and - * low values on the right or bottom, as opposed to normally have - * the low values on the former and high values on the latter, - * respectively, for horizontal and vertical modes. - * - * @see elm_progressbar_inverted_get() - * - * @ingroup Progressbar - */ - EAPI void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted) EINA_ARG_NONNULL(1); +/** + * Invert a given progress bar widget's displaying values order + * + * @param obj The progress bar object + * @param inverted Use @c EINA_TRUE to make @p obj inverted, + * @c EINA_FALSE to bring it back to default, non-inverted values. + * + * A progress bar may be @b inverted, in which state it gets its + * values inverted, with high values being on the left or top and + * low values on the right or bottom, as opposed to normally have + * the low values on the former and high values on the latter, + * respectively, for horizontal and vertical modes. + * + * @see elm_progressbar_inverted_get() + * + * @ingroup Progressbar + */ +EAPI void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted) EINA_ARG_NONNULL(1); - /** - * Get whether a given progress bar widget's displaying values are - * inverted or not - * - * @param obj The progress bar object - * @return @c EINA_TRUE, if @p obj has inverted values, - * @c EINA_FALSE otherwise (and on errors) - * - * @see elm_progressbar_inverted_set() for more details - * - * @ingroup Progressbar - */ - EAPI Eina_Bool elm_progressbar_inverted_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether a given progress bar widget's displaying values are + * inverted or not + * + * @param obj The progress bar object + * @return @c EINA_TRUE, if @p obj has inverted values, + * @c EINA_FALSE otherwise (and on errors) + * + * @see elm_progressbar_inverted_set() for more details + * + * @ingroup Progressbar + */ +EAPI Eina_Bool elm_progressbar_inverted_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @} - */ +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_radio.h b/legacy/elementary/src/lib/elm_radio.h index b3992167f1..7135307ef0 100644 --- a/legacy/elementary/src/lib/elm_radio.h +++ b/legacy/elementary/src/lib/elm_radio.h @@ -1,178 +1,179 @@ - /** - * @defgroup Radio Radio - * - * @image html img/widget/radio/preview-00.png - * @image latex img/widget/radio/preview-00.eps - * - * @brief Radio is a widget that allows for 1 or more options to be displayed - * and have the user choose only 1 of them. - * - * A radio object contains an indicator, an optional Label and an optional - * icon object. While it's possible to have a group of only one radio they, - * are normally used in groups of 2 or more. To add a radio to a group use - * elm_radio_group_add(). The radio object(s) will select from one of a set - * of integer values, so any value they are configuring needs to be mapped to - * a set of integers. To configure what value that radio object represents, - * use elm_radio_state_value_set() to set the integer it represents. To set - * the value the whole group(which one is currently selected) is to indicate - * use elm_radio_value_set() on any group member, and to get the groups value - * use elm_radio_value_get(). For convenience the radio objects are also able - * to directly set an integer(int) to the value that is selected. To specify - * the pointer to this integer to modify, use elm_radio_value_pointer_set(). - * The radio objects will modify this directly. That implies the pointer must - * point to valid memory for as long as the radio objects exist. - * - * Signals that you can add callbacks for are: - * @li changed - This is called whenever the user changes the state of one of - * the radio objects within the group of radio objects that work together. - * - * Default contents parts of the radio widget that you can use for are: - * @li "icon" - An icon of the radio - * - * @ref tutorial_radio show most of this API in action. - * @{ - */ +/** + * @defgroup Radio Radio + * + * @image html img/widget/radio/preview-00.png + * @image latex img/widget/radio/preview-00.eps + * + * @brief Radio is a widget that allows for 1 or more options to be displayed + * and have the user choose only 1 of them. + * + * A radio object contains an indicator, an optional Label and an optional + * icon object. While it's possible to have a group of only one radio they, + * are normally used in groups of 2 or more. To add a radio to a group use + * elm_radio_group_add(). The radio object(s) will select from one of a set + * of integer values, so any value they are configuring needs to be mapped to + * a set of integers. To configure what value that radio object represents, + * use elm_radio_state_value_set() to set the integer it represents. To set + * the value the whole group(which one is currently selected) is to indicate + * use elm_radio_value_set() on any group member, and to get the groups value + * use elm_radio_value_get(). For convenience the radio objects are also able + * to directly set an integer(int) to the value that is selected. To specify + * the pointer to this integer to modify, use elm_radio_value_pointer_set(). + * The radio objects will modify this directly. That implies the pointer must + * point to valid memory for as long as the radio objects exist. + * + * Signals that you can add callbacks for are: + * @li changed - This is called whenever the user changes the state of one of + * the radio objects within the group of radio objects that work together. + * + * Default contents parts of the radio widget that you can use for are: + * @li "icon" - An icon of the radio + * + * @ref tutorial_radio show most of this API in action. + * @{ + */ - /** - * @brief Add a new radio to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - EAPI Evas_Object *elm_radio_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * @brief Add a new radio to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +EAPI Evas_Object * + elm_radio_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * @brief Set the text label of the radio object - * - * @param obj The radio object - * @param label The text label string in UTF-8 - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_radio_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * @brief Set the text label of the radio object + * + * @param obj The radio object + * @param label The text label string in UTF-8 + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_radio_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * @brief Get the text label of the radio object - * - * @param obj The radio object - * @return The text label string in UTF-8 - * - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI const char *elm_radio_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the text label of the radio object + * + * @param obj The radio object + * @return The text label string in UTF-8 + * + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI const char *elm_radio_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the icon object of the radio object - * - * @param obj The radio object - * @param icon The icon object - * - * 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_radio_icon_unset() - * function. - * - * @deprecated use elm_object_part_content_set() instead. - * - */ - EINA_DEPRECATED EAPI void elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * @brief Set the icon object of the radio object + * + * @param obj The radio object + * @param icon The icon object + * + * 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_radio_icon_unset() + * function. + * + * @deprecated use elm_object_part_content_set() instead. + * + */ +EINA_DEPRECATED EAPI void elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * @brief Get the icon object of the radio object - * - * @param obj The radio object - * @return The icon object - * - * @see elm_radio_icon_set() - * - * @deprecated use elm_object_part_content_get() instead. - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the icon object of the radio object + * + * @param obj The radio object + * @return The icon object + * + * @see elm_radio_icon_set() + * + * @deprecated use elm_object_part_content_get() instead. + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the icon used for the radio object - * - * @param obj The radio object - * @return The icon object that was being used - * - * Unparent and return the icon object which was set for this widget. - * - * @see elm_radio_icon_set() - * @deprecated use elm_object_part_content_unset() instead. - * - */ - EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the icon used for the radio object + * + * @param obj The radio object + * @return The icon object that was being used + * + * Unparent and return the icon object which was set for this widget. + * + * @see elm_radio_icon_set() + * @deprecated use elm_object_part_content_unset() instead. + * + */ +EINA_DEPRECATED EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Add this radio to a group of other radio objects - * - * @param obj The radio object - * @param group Any object whose group the @p obj is to join. - * - * Radio objects work in groups. Each member should have a different integer - * value assigned. In order to have them work as a group, they need to know - * about each other. This adds the given radio object to the group of which - * the group object indicated is a member. - */ - EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group) EINA_ARG_NONNULL(1); +/** + * @brief Add this radio to a group of other radio objects + * + * @param obj The radio object + * @param group Any object whose group the @p obj is to join. + * + * Radio objects work in groups. Each member should have a different integer + * value assigned. In order to have them work as a group, they need to know + * about each other. This adds the given radio object to the group of which + * the group object indicated is a member. + */ +EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group) EINA_ARG_NONNULL(1); - /** - * @brief Set the integer value that this radio object represents - * - * @param obj The radio object - * @param value The value to use if this radio object is selected - * - * This sets the value of the radio. - */ - EAPI void elm_radio_state_value_set(Evas_Object *obj, int value) EINA_ARG_NONNULL(1); +/** + * @brief Set the integer value that this radio object represents + * + * @param obj The radio object + * @param value The value to use if this radio object is selected + * + * This sets the value of the radio. + */ +EAPI void elm_radio_state_value_set(Evas_Object *obj, int value) EINA_ARG_NONNULL(1); - /** - * @brief Get the integer value that this radio object represents - * - * @param obj The radio object - * @return The value used if this radio object is selected - * - * This gets the value of the radio. - * - * @see elm_radio_value_set() - */ - EAPI int elm_radio_state_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the integer value that this radio object represents + * + * @param obj The radio object + * @return The value used if this radio object is selected + * + * This gets the value of the radio. + * + * @see elm_radio_value_set() + */ +EAPI int elm_radio_state_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set the value of the radio. - * - * @param obj The radio object - * @param value The value to use for the group - * - * This sets the value of the radio group and will also set the value if - * pointed to, to the value supplied, but will not call any callbacks. - */ - EAPI void elm_radio_value_set(Evas_Object *obj, int value) EINA_ARG_NONNULL(1); +/** + * @brief Set the value of the radio. + * + * @param obj The radio object + * @param value The value to use for the group + * + * This sets the value of the radio group and will also set the value if + * pointed to, to the value supplied, but will not call any callbacks. + */ +EAPI void elm_radio_value_set(Evas_Object *obj, int value) EINA_ARG_NONNULL(1); - /** - * @brief Get the state of the radio object - * - * @param obj The radio object - * @return The integer state - */ - EAPI int elm_radio_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the state of the radio object + * + * @param obj The radio object + * @return The integer state + */ +EAPI int elm_radio_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set a convenience pointer to a integer to change - * - * @param obj The radio object - * @param valuep Pointer to the integer to modify - * - * This sets a pointer to a integer, that, in addition to the radio objects - * state will also be modified directly. To stop setting the object pointed - * to simply use NULL as the @p valuep argument. If valuep is not NULL, then - * when this is called, the radio objects state will also be modified to - * reflect the value of the integer valuep points to, just like calling - * elm_radio_value_set(). - */ - EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Set a convenience pointer to a integer to change + * + * @param obj The radio object + * @param valuep Pointer to the integer to modify + * + * This sets a pointer to a integer, that, in addition to the radio objects + * state will also be modified directly. To stop setting the object pointed + * to simply use NULL as the @p valuep argument. If valuep is not NULL, then + * when this is called, the radio objects state will also be modified to + * reflect the value of the integer valuep points to, just like calling + * elm_radio_value_set(). + */ +EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_route.h b/legacy/elementary/src/lib/elm_route.h index 4f9cacc631..51a42c89a0 100644 --- a/legacy/elementary/src/lib/elm_route.h +++ b/legacy/elementary/src/lib/elm_route.h @@ -1,8 +1,8 @@ - EAPI Evas_Object *elm_route_add(Evas_Object *parent); +EAPI Evas_Object *elm_route_add(Evas_Object *parent); #ifdef ELM_EMAP - EAPI void elm_route_emap_set(Evas_Object *obj, EMap_Route *emap); +EAPI void elm_route_emap_set(Evas_Object *obj, EMap_Route *emap); #endif - EAPI double elm_route_lon_min_get(Evas_Object *obj); - EAPI double elm_route_lat_min_get(Evas_Object *obj); - EAPI double elm_route_lon_max_get(Evas_Object *obj); - EAPI double elm_route_lat_max_get(Evas_Object *obj); +EAPI double elm_route_lon_min_get(Evas_Object *obj); +EAPI double elm_route_lat_min_get(Evas_Object *obj); +EAPI double elm_route_lon_max_get(Evas_Object *obj); +EAPI double elm_route_lat_max_get(Evas_Object *obj); diff --git a/legacy/elementary/src/lib/elm_scale.h b/legacy/elementary/src/lib/elm_scale.h index c114d386b0..b12dcfd2bd 100644 --- a/legacy/elementary/src/lib/elm_scale.h +++ b/legacy/elementary/src/lib/elm_scale.h @@ -1,69 +1,70 @@ - /** - * @defgroup Scaling Widget Scaling - * - * Different widgets can be scaled independently. These functions - * allow you to manipulate this scaling on a per-widget basis. The - * object and all its children get their scaling factors multiplied - * by the scale factor set. This is multiplicative, in that if a - * child also has a scale size set it is in turn multiplied by its - * parent's scale size. @c 1.0 means “don't scale”, @c 2.0 is - * double size, @c 0.5 is half, etc. - * - * @ref general_functions_example_page "This" example contemplates - * some of these functions. - */ +/** + * @defgroup Scaling Widget Scaling + * + * Different widgets can be scaled independently. These functions + * allow you to manipulate this scaling on a per-widget basis. The + * object and all its children get their scaling factors multiplied + * by the scale factor set. This is multiplicative, in that if a + * child also has a scale size set it is in turn multiplied by its + * parent's scale size. @c 1.0 means “don't scale”, @c 2.0 is + * double size, @c 0.5 is half, etc. + * + * @ref general_functions_example_page "This" example contemplates + * some of these functions. + */ - /** - * 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); +/** + * 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 + * + * 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 - */ - // XXX: deprecate and replace with elm_config_all_flush() - EAPI void elm_scale_all_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 + */ +// XXX: deprecate and replace with elm_config_all_flush() +EAPI void elm_scale_all_set(double scale); - /** - * Set the scaling factor for a given Elementary object - * - * @param obj The Elementary to operate on - * @param scale Scale factor (from @c 0.0 up, with @c 1.0 meaning - * no scaling) - * - * @ingroup Scaling - */ - EAPI void elm_object_scale_set(Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); - - /** - * Get the scaling factor for a given Elementary object - * - * @param obj The object - * @return The scaling factor set by elm_object_scale_set() - * - * @ingroup Scaling - */ - EAPI double elm_object_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Set the scaling factor for a given Elementary object + * + * @param obj The Elementary to operate on + * @param scale Scale factor (from @c 0.0 up, with @c 1.0 meaning + * no scaling) + * + * @ingroup Scaling + */ +EAPI void + elm_object_scale_set(Evas_Object *obj, double scale) +EINA_ARG_NONNULL(1); +/** + * Get the scaling factor for a given Elementary object + * + * @param obj The object + * @return The scaling factor set by elm_object_scale_set() + * + * @ingroup Scaling + */ +EAPI double elm_object_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_scroll.h b/legacy/elementary/src/lib/elm_scroll.h index 54e601d88a..d2b1b5da01 100644 --- a/legacy/elementary/src/lib/elm_scroll.h +++ b/legacy/elementary/src/lib/elm_scroll.h @@ -1,114 +1,115 @@ - /** - * @defgroup Scrollhints Scrollhints - * - * 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. - * - * 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. - * - * @{ - */ +/** + * @defgroup Scrollhints Scrollhints + * + * 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. + * + * 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. + * + * @{ + */ - /** - * Push the scroll hold by 1 - * - * 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. - * - * @param obj The object - * @ingroup Scrollhints - */ - EAPI void elm_object_scroll_hold_push(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Push the scroll hold by 1 + * + * 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. + * + * @param obj The object + * @ingroup Scrollhints + */ +EAPI void + elm_object_scroll_hold_push(Evas_Object *obj) +EINA_ARG_NONNULL(1); - /** - * Pop the scroll hold by 1 - * - * 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 - */ - EAPI void elm_object_scroll_hold_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Pop the scroll hold by 1 + * + * 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 + */ +EAPI void elm_object_scroll_hold_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Push the scroll freeze by 1 - * - * 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 - */ - EAPI void elm_object_scroll_freeze_push(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Push the scroll freeze by 1 + * + * 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 + */ +EAPI void elm_object_scroll_freeze_push(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Pop the scroll freeze by 1 - * - * 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. - * - * @param obj The object - * @ingroup Scrollhints - */ - EAPI void elm_object_scroll_freeze_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Pop the scroll freeze by 1 + * + * 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. + * + * @param obj The object + * @ingroup Scrollhints + */ +EAPI void elm_object_scroll_freeze_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * 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). - * - * @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) + * + * This locks the given object from scrolling in the X axis (and implicitly + * also locks all parent scrollers too from doing the same). + * + * @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) - * - * 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 object - * @param lock The lock state (1 == locked, 0 == unlocked) - * @ingroup Scrollhints - */ - EAPI void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1); +/** + * Lock the scrolling of the given widget (and thus all parents) + * + * 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 object + * @param lock The lock state (1 == locked, 0 == unlocked) + * @ingroup Scrollhints + */ +EAPI void elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock) EINA_ARG_NONNULL(1); - /** - * Get the scrolling lock of the given widget - * - * This gets the lock for X axis scrolling. - * - * @param obj The object - * @ingroup Scrollhints - */ - EAPI Eina_Bool elm_object_scroll_lock_x_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the scrolling lock of the given widget + * + * This gets the lock for X axis scrolling. + * + * @param obj The object + * @ingroup Scrollhints + */ +EAPI Eina_Bool elm_object_scroll_lock_x_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the scrolling lock of the given widget - * - * This gets the lock for X axis scrolling. - * - * @param obj The object - * @ingroup Scrollhints - */ - EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the scrolling lock of the given widget + * + * This gets the lock for X axis scrolling. + * + * @param obj The object + * @ingroup Scrollhints + */ +EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_scroller.h b/legacy/elementary/src/lib/elm_scroller.h index 3daa106f02..c4b92fd747 100644 --- a/legacy/elementary/src/lib/elm_scroller.h +++ b/legacy/elementary/src/lib/elm_scroller.h @@ -1,413 +1,414 @@ - /** - * @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 scroller will always have a small minimum - * size by default as it won't be limited by the contents of the scroller. - * - * 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. - * - * @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. - * - * Default contents parts of the scroller widget that you can use for are: - * @li "default" - A content of the scroller - * - * In @ref tutorial_scroller you'll find an example of how to use most of - * this API. - * @{ - */ +/** + * @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 scroller will always have a small minimum + * size by default as it won't be limited by the contents of the scroller. + * + * 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. + * + * @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. + * + * Default contents parts of the scroller widget that you can use for are: + * @li "default" - A content of the scroller + * + * In @ref tutorial_scroller you'll find an example of how to use most of + * this API. + * @{ + */ - /** - * @brief Type that controls when scrollbars should appear. - * - * @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 Type that controls when scrollbars should appear. + * + * @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 - * - * @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 Add a new scroller to the parent + * + * @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). - * - * @param obj The scroller object - * @param content The new content 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_scroller_content_unset() function. - * @deprecated use elm_object_content_set() instead - */ - EINA_DEPRECATED EAPI void elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1); +/** + * @brief Set the content of the scroller widget (the object to be scrolled around). + * + * @param obj The scroller object + * @param content The new content 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_scroller_content_unset() function. + * @deprecated use elm_object_content_set() instead + */ +EINA_DEPRECATED EAPI void elm_scroller_content_set(Evas_Object *obj, Evas_Object *child) EINA_ARG_NONNULL(1); - /** - * @brief Get the content of the scroller widget - * - * @param obj The slider object - * @return The content that is being used - * - * Return the content object which is set for this widget - * - * @see elm_scroller_content_set() - * @deprecated use elm_object_content_get() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get the content of the scroller widget + * + * @param obj The slider object + * @return The content that is being used + * + * Return the content object which is set for this widget + * + * @see elm_scroller_content_set() + * @deprecated use elm_object_content_get() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Unset the content of the scroller widget - * - * @param obj The slider object - * @return The content that was being used - * - * Unparent and return the content object which was set for this widget - * - * @see elm_scroller_content_set() - * @deprecated use elm_object_content_unset() instead. - */ - EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Unset the content of the scroller widget + * + * @param obj The slider object + * @return The content that was being used + * + * Unparent and return the content object which was set for this widget + * + * @see elm_scroller_content_set() + * @deprecated use elm_object_content_unset() instead. + */ +EINA_DEPRECATED EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set custom theme elements for the scroller - * - * @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 Set custom theme elements for the scroller + * + * @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 - * - * @param obj The scroller object - * @param w Enable limiting minimum size horizontally - * @param h Enable limiting minimum size vertically - * - * 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 void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h) EINA_ARG_NONNULL(1); +/** + * @brief Make the scroller minimum size limited to the minimum size of the content + * + * @param obj The scroller object + * @param w Enable limiting minimum size horizontally + * @param h Enable limiting minimum size vertically + * + * 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 void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h) EINA_ARG_NONNULL(1); - /** - * @brief Show a specific virtual region within the scroller content object - * - * @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 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 Show a specific virtual region within the scroller content object + * + * @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 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 - * - * @param obj The scroller object - * @param policy_h Horizontal scrollbar policy - * @param policy_v Vertical scrollbar policy - * - * 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_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); +/** + * @brief Set the scrollbar visibility policy + * + * @param obj The scroller object + * @param policy_h Horizontal scrollbar policy + * @param policy_v Vertical scrollbar policy + * + * 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_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) EINA_ARG_NONNULL(1); - /** - * @brief Gets scrollbar visibility policy - * - * @param obj The scroller object - * @param policy_h Horizontal scrollbar policy - * @param policy_v Vertical scrollbar policy - * - * @see elm_scroller_policy_set() - */ - EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) EINA_ARG_NONNULL(1); +/** + * @brief Gets scrollbar visibility policy + * + * @param obj The scroller object + * @param policy_h Horizontal scrollbar policy + * @param policy_v Vertical scrollbar policy + * + * @see elm_scroller_policy_set() + */ +EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v) 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. - * - * @note All coordinates are relative to the content. - * - * @see elm_scroller_region_show() - */ - 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); +/** + * @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. + * + * @note All coordinates are relative to the content. + * + * @see elm_scroller_region_show() + */ +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); - /** - * @brief Get the size of the content object - * - * @param obj The scroller object - * @param w Width of the content object. - * @param h Height of the content object. - * - * This gets the size of the content object of the scroller. - */ - EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); +/** + * @brief Get the size of the content object + * + * @param obj The scroller object + * @param w Width of the content object. + * @param h Height of the content object. + * + * This gets the size of the content object of the scroller. + */ +EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); - /** - * @brief Set bouncing behavior - * - * @param obj The scroller object - * @param h_bounce Allow bounce horizontally - * @param v_bounce Allow bounce vertically - * - * 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 API will set if it is enabled - * for the given 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 Set bouncing behavior + * + * @param obj The scroller object + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + * + * 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 API will set if it is enabled + * for the given 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 behaviour - * - * @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 - * - * @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 Get the bounce behaviour + * + * @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 + * + * @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. - * - * @param obj The scroller object - * @param h_pagerel The horizontal page relative size - * @param v_pagerel The vertical page relative size - * - * 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 values 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_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1); +/** + * @brief Set scroll page size relative to viewport size. + * + * @param obj The scroller object + * @param h_pagerel The horizontal page relative size + * @param v_pagerel The vertical page relative size + * + * 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 values 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_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel) EINA_ARG_NONNULL(1); - /** - * @brief Set scroll page size. - * - * @param obj The scroller object - * @param h_pagesize The horizontal page size - * @param v_pagesize The vertical page size - * - * This sets the page size to an absolute fixed value, with 0 turning it off - * for that axis. - * - * @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 Set scroll page size. + * + * @param obj The scroller object + * @param h_pagesize The horizontal page size + * @param v_pagesize The vertical page size + * + * This sets the page size to an absolute fixed value, with 0 turning it off + * for that axis. + * + * @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. - * - * @param obj The scroller 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 meets the top-left of the viewport. - * If there are two or more pages in the viewport, it returns the number of the page - * which meets the top-left of the viewport. - * - * @see elm_scroller_last_page_get() - * @see elm_scroller_page_show() - * @see elm_scroller_page_brint_in() - */ - EAPI void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1); +/** + * @brief Get scroll current page number. + * + * @param obj The scroller 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 meets the top-left of the viewport. + * If there are two or more pages in the viewport, it returns the number of the page + * which meets the top-left of the viewport. + * + * @see elm_scroller_last_page_get() + * @see elm_scroller_page_show() + * @see elm_scroller_page_brint_in() + */ +EAPI void elm_scroller_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 scroller 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_scroller_current_page_get() - * @see elm_scroller_page_show() - * @see elm_scroller_page_brint_in() - */ - EAPI void elm_scroller_last_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 scroller 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_scroller_current_page_get() + * @see elm_scroller_page_show() + * @see elm_scroller_page_brint_in() + */ +EAPI void elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber) EINA_ARG_NONNULL(1); - /** - * Show a specific virtual region within the scroller content object by page number. - * - * @param obj The scroller 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_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 - * - * @see elm_scroller_page_bring_in() - */ - EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1); +/** + * Show a specific virtual region within the scroller content object by page number. + * + * @param obj The scroller 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_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 + * + * @see elm_scroller_page_bring_in() + */ +EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1); - /** - * Show a specific virtual region within the scroller content object by page number. - * - * @param obj The scroller 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_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_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1); +/** + * Show a specific virtual region within the scroller content object by page number. + * + * @param obj The scroller 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_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_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber) EINA_ARG_NONNULL(1); - /** - * @brief Show a specific virtual region within the scroller content object. - * - * @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 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. - * - * @see elm_scroller_region_show() - */ - 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); +/** + * @brief Show a specific virtual region within the scroller content object. + * + * @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 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. + * + * @see elm_scroller_region_show() + */ +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); - /** - * @brief Set event propagation on a scroller - * - * @param obj The scroller object - * @param propagation If propagation is enabled or not - * - * 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) EINA_ARG_NONNULL(1); +/** + * @brief Set event propagation on a scroller + * + * @param obj The scroller object + * @param propagation If propagation is enabled or not + * + * 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) EINA_ARG_NONNULL(1); - /** - * @brief Get event propagation for a scroller - * - * @param obj The scroller object - * @return The propagation state - * - * This gets the event propagation for a scroller. - * - * @see elm_scroller_propagate_events_set() - */ - EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @brief Get event propagation for a scroller + * + * @param obj The scroller object + * @return The propagation state + * + * This gets the event propagation for a scroller. + * + * @see elm_scroller_propagate_events_set() + */ +EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @brief Set scrolling gravity on a scroller - * - * @param obj The scroller object - * @param x The scrolling horizontal gravity - * @param y The scrolling vertical gravity - * - * The gravity, defines how the scroller will adjust its view - * when the size of the scroller contents increase. - * - * The scroller will adjust the view to glue itself as follows. - * - * x=0.0, for showing the left most region of the content. - * x=1.0, for showing the right most region of the content. - * y=0.0, for showing the bottom most region of the content. - * y=1.0, for showing the top most region of the content. - * - * Default values for x and y are 0.0 - */ - EAPI void elm_scroller_gravity_set(Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); +/** + * @brief Set scrolling gravity on a scroller + * + * @param obj The scroller object + * @param x The scrolling horizontal gravity + * @param y The scrolling vertical gravity + * + * The gravity, defines how the scroller will adjust its view + * when the size of the scroller contents increase. + * + * The scroller will adjust the view to glue itself as follows. + * + * x=0.0, for showing the left most region of the content. + * x=1.0, for showing the right most region of the content. + * y=0.0, for showing the bottom most region of the content. + * y=1.0, for showing the top most region of the content. + * + * Default values for x and y are 0.0 + */ +EAPI void elm_scroller_gravity_set(Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); - /** - * @brief Get scrolling gravity values for a scroller - * - * @param obj The scroller object - * @param x The scrolling horizontal gravity - * @param y The scrolling vertical gravity - * - * This gets gravity values for a scroller. - * - * @see elm_scroller_gravity_set() - * - */ - EAPI void elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get scrolling gravity values for a scroller + * + * @param obj The scroller object + * @param x The scrolling horizontal gravity + * @param y The scrolling vertical gravity + * + * This gets gravity values for a scroller. + * + * @see elm_scroller_gravity_set() + * + */ +EAPI void elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_segment_control.h b/legacy/elementary/src/lib/elm_segment_control.h index d2150000da..e190b9df17 100644 --- a/legacy/elementary/src/lib/elm_segment_control.h +++ b/legacy/elementary/src/lib/elm_segment_control.h @@ -1,333 +1,334 @@ - /** - * @defgroup SegmentControl SegmentControl - * @ingroup Elementary - * - * @image html img/widget/segment_control/preview-00.png - * @image latex img/widget/segment_control/preview-00.eps width=\textwidth - * - * @image html img/segment_control.png - * @image latex img/segment_control.eps width=\textwidth - * - * Segment control widget is a horizontal control made of multiple segment - * items, each segment item functioning similar to discrete two state button. - * A segment control groups the items together and provides compact - * single button with multiple equal size segments. - * - * Segment item size is determined by base widget - * size and the number of items added. - * Only one segment item can be at selected state. A segment item can display - * combination of Text and any Evas_Object like Images or other widget. - * - * Smart callbacks one can listen to: - * - "changed" - When the user clicks on a segment item which is not - * previously selected and get selected. The event_info parameter is the - * segment item pointer. - * - * Available styles for it: - * - @c "default" - * - * Here is an example on its usage: - * @li @ref segment_control_example - */ +/** + * @defgroup SegmentControl SegmentControl + * @ingroup Elementary + * + * @image html img/widget/segment_control/preview-00.png + * @image latex img/widget/segment_control/preview-00.eps width=\textwidth + * + * @image html img/segment_control.png + * @image latex img/segment_control.eps width=\textwidth + * + * Segment control widget is a horizontal control made of multiple segment + * items, each segment item functioning similar to discrete two state button. + * A segment control groups the items together and provides compact + * single button with multiple equal size segments. + * + * Segment item size is determined by base widget + * size and the number of items added. + * Only one segment item can be at selected state. A segment item can display + * combination of Text and any Evas_Object like Images or other widget. + * + * Smart callbacks one can listen to: + * - "changed" - When the user clicks on a segment item which is not + * previously selected and get selected. The event_info parameter is the + * segment item pointer. + * + * Available styles for it: + * - @c "default" + * + * Here is an example on its usage: + * @li @ref segment_control_example + */ - /** - * @addtogroup SegmentControl - * @{ - */ +/** + * @addtogroup SegmentControl + * @{ + */ - typedef struct _Elm_Segment_Item Elm_Segment_Item; /**< Item handle for a segment control widget. */ +typedef struct _Elm_Segment_Item Elm_Segment_Item; /**< Item handle for a segment control widget. */ - /** - * Add a new segment control widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new segment control widget handle or @c NULL, on errors. - * - * This function inserts a new segment control widget on the canvas. - * - * @ingroup SegmentControl - */ - EAPI Evas_Object *elm_segment_control_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new segment control widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new segment control widget handle or @c NULL, on errors. + * + * This function inserts a new segment control widget on the canvas. + * + * @ingroup SegmentControl + */ +EAPI Evas_Object * + elm_segment_control_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Append a new item to the segment control object. - * - * @param obj The segment control object. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param label The label of the item. - * Note that, NULL is different from empty string "". - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the segment control, i.e., will - * be set as @b last item. - * - * If it should be inserted at another position, - * elm_segment_control_item_insert_at() should be used instead. - * - * Items created with this function can be deleted with function - * elm_segment_control_item_del() or elm_segment_control_item_del_at(). - * - * @note @p label set to @c NULL is different from empty string "". - * If an item - * only has icon, it will be displayed bigger and centered. If it has - * icon and label, even that an empty string, icon will be smaller and - * positioned at left. - * - * Simple example: - * @code - * sc = elm_segment_control_add(win); - * ic = elm_icon_add(win); - * elm_icon_file_set(ic, "path/to/image", NULL); - * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); - * elm_segment_control_item_add(sc, ic, "label"); - * evas_object_show(sc); - * @endcode - * - * @see elm_segment_control_item_insert_at() - * @see elm_segment_control_item_del() - * - * @ingroup SegmentControl - */ - EAPI Elm_Segment_Item *elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label) EINA_ARG_NONNULL(1); +/** + * Append a new item to the segment control object. + * + * @param obj The segment control object. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param label The label of the item. + * Note that, NULL is different from empty string "". + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the segment control, i.e., will + * be set as @b last item. + * + * If it should be inserted at another position, + * elm_segment_control_item_insert_at() should be used instead. + * + * Items created with this function can be deleted with function + * elm_segment_control_item_del() or elm_segment_control_item_del_at(). + * + * @note @p label set to @c NULL is different from empty string "". + * If an item + * only has icon, it will be displayed bigger and centered. If it has + * icon and label, even that an empty string, icon will be smaller and + * positioned at left. + * + * Simple example: + * @code + * sc = elm_segment_control_add(win); + * ic = elm_icon_add(win); + * elm_icon_file_set(ic, "path/to/image", NULL); + * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE); + * elm_segment_control_item_add(sc, ic, "label"); + * evas_object_show(sc); + * @endcode + * + * @see elm_segment_control_item_insert_at() + * @see elm_segment_control_item_del() + * + * @ingroup SegmentControl + */ +EAPI Elm_Segment_Item *elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label) EINA_ARG_NONNULL(1); - /** - * Insert a new item to the segment control object at specified position. - * - * @param obj The segment control object. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param label The label of the item. - * @param index Item position. Value should be between 0 and items count. - * @return The created item or @c NULL upon failure. +/** + * Insert a new item to the segment control object at specified position. + * + * @param obj The segment control object. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param label The label of the item. + * @param index Item position. Value should be between 0 and items count. + * @return The created item or @c NULL upon failure. - * Index values must be between @c 0, when item will be prepended to - * segment control, and items count, that can be get with - * elm_segment_control_item_count_get(), case when item will be appended - * to segment control, just like elm_segment_control_item_add(). - * - * Items created with this function can be deleted with function - * elm_segment_control_item_del() or elm_segment_control_item_del_at(). - * - * @note @p label set to @c NULL is different from empty string "". - * If an item - * only has icon, it will be displayed bigger and centered. If it has - * icon and label, even that an empty string, icon will be smaller and - * positioned at left. - * - * @see elm_segment_control_item_add() - * @see elm_segment_control_item_count_get() - * @see elm_segment_control_item_del() - * - * @ingroup SegmentControl - */ - EAPI Elm_Segment_Item *elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, int index) EINA_ARG_NONNULL(1); + * Index values must be between @c 0, when item will be prepended to + * segment control, and items count, that can be get with + * elm_segment_control_item_count_get(), case when item will be appended + * to segment control, just like elm_segment_control_item_add(). + * + * Items created with this function can be deleted with function + * elm_segment_control_item_del() or elm_segment_control_item_del_at(). + * + * @note @p label set to @c NULL is different from empty string "". + * If an item + * only has icon, it will be displayed bigger and centered. If it has + * icon and label, even that an empty string, icon will be smaller and + * positioned at left. + * + * @see elm_segment_control_item_add() + * @see elm_segment_control_item_count_get() + * @see elm_segment_control_item_del() + * + * @ingroup SegmentControl + */ +EAPI Elm_Segment_Item *elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, int index) EINA_ARG_NONNULL(1); - /** - * Remove a segment control item from its parent, deleting it. - * - * @param it The item to be removed. - * - * Items can be added with elm_segment_control_item_add() or - * elm_segment_control_item_insert_at(). - * - * @ingroup SegmentControl - */ - EAPI void elm_segment_control_item_del(Elm_Segment_Item *it) EINA_ARG_NONNULL(1); +/** + * Remove a segment control item from its parent, deleting it. + * + * @param it The item to be removed. + * + * Items can be added with elm_segment_control_item_add() or + * elm_segment_control_item_insert_at(). + * + * @ingroup SegmentControl + */ +EAPI void elm_segment_control_item_del(Elm_Segment_Item *it) EINA_ARG_NONNULL(1); - /** - * Remove a segment control item at given index from its parent, - * deleting it. - * - * @param obj The segment control object. - * @param index The position of the segment control item to be deleted. - * - * Items can be added with elm_segment_control_item_add() or - * elm_segment_control_item_insert_at(). - * - * @ingroup SegmentControl - */ - EAPI void elm_segment_control_item_del_at(Evas_Object *obj, int index) EINA_ARG_NONNULL(1); +/** + * Remove a segment control item at given index from its parent, + * deleting it. + * + * @param obj The segment control object. + * @param index The position of the segment control item to be deleted. + * + * Items can be added with elm_segment_control_item_add() or + * elm_segment_control_item_insert_at(). + * + * @ingroup SegmentControl + */ +EAPI void elm_segment_control_item_del_at(Evas_Object *obj, int index) EINA_ARG_NONNULL(1); - /** - * Get the Segment items count from segment control. - * - * @param obj The segment control object. - * @return Segment items count. - * - * It will just return the number of items added to segment control @p obj. - * - * @ingroup SegmentControl - */ - EAPI int elm_segment_control_item_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the Segment items count from segment control. + * + * @param obj The segment control object. + * @return Segment items count. + * + * It will just return the number of items added to segment control @p obj. + * + * @ingroup SegmentControl + */ +EAPI int elm_segment_control_item_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the item placed at specified index. - * - * @param obj The segment control object. - * @param index The index of the segment item. - * @return The segment control item or @c NULL on failure. - * - * Index is the position of an item in segment control widget. Its - * range is from @c 0 to count - 1 . - * Count is the number of items, that can be get with - * elm_segment_control_item_count_get(). - * - * @ingroup SegmentControl - */ - EAPI Elm_Segment_Item *elm_segment_control_item_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); +/** + * Get the item placed at specified index. + * + * @param obj The segment control object. + * @param index The index of the segment item. + * @return The segment control item or @c NULL on failure. + * + * Index is the position of an item in segment control widget. Its + * range is from @c 0 to count - 1 . + * Count is the number of items, that can be get with + * elm_segment_control_item_count_get(). + * + * @ingroup SegmentControl + */ +EAPI Elm_Segment_Item *elm_segment_control_item_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); - /** - * Get the label of item. - * - * @param obj The segment control object. - * @param index The index of the segment item. - * @return The label of the item at @p index. - * - * The return value is a pointer to the label associated to the item when - * it was created, with function elm_segment_control_item_add(), or later - * with function elm_segment_control_item_label_set. If no label - * was passed as argument, it will return @c NULL. - * - * @see elm_segment_control_item_label_set() for more details. - * @see elm_segment_control_item_add() - * - * @ingroup SegmentControl - */ - EAPI const char *elm_segment_control_item_label_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); +/** + * Get the label of item. + * + * @param obj The segment control object. + * @param index The index of the segment item. + * @return The label of the item at @p index. + * + * The return value is a pointer to the label associated to the item when + * it was created, with function elm_segment_control_item_add(), or later + * with function elm_segment_control_item_label_set. If no label + * was passed as argument, it will return @c NULL. + * + * @see elm_segment_control_item_label_set() for more details. + * @see elm_segment_control_item_add() + * + * @ingroup SegmentControl + */ +EAPI const char *elm_segment_control_item_label_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); - /** - * Set the label of item. - * - * @param it The item of segment control. - * @param text The label of item. - * - * The label to be displayed by the item. - * Label will be at right of the icon (if set). - * - * If a label was passed as argument on item creation, with function - * elm_control_segment_item_add(), it will be already - * displayed by the item. - * - * @see elm_segment_control_item_label_get() - * @see elm_segment_control_item_add() - * - * @ingroup SegmentControl - */ - EAPI void elm_segment_control_item_label_set(Elm_Segment_Item* it, const char* label) EINA_ARG_NONNULL(1); +/** + * Set the label of item. + * + * @param it The item of segment control. + * @param text The label of item. + * + * The label to be displayed by the item. + * Label will be at right of the icon (if set). + * + * If a label was passed as argument on item creation, with function + * elm_control_segment_item_add(), it will be already + * displayed by the item. + * + * @see elm_segment_control_item_label_get() + * @see elm_segment_control_item_add() + * + * @ingroup SegmentControl + */ +EAPI void elm_segment_control_item_label_set(Elm_Segment_Item *it, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the icon associated to the item. - * - * @param obj The segment control object. - * @param index The index of the segment item. - * @return The left side icon associated to the item at @p index. - * - * The return value is a pointer to the icon associated to the item when - * it was created, with function elm_segment_control_item_add(), or later - * with function elm_segment_control_item_icon_set(). If no icon - * was passed as argument, it will return @c NULL. - * - * @see elm_segment_control_item_add() - * @see elm_segment_control_item_icon_set() - * - * @ingroup SegmentControl - */ - EAPI Evas_Object *elm_segment_control_item_icon_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); +/** + * Get the icon associated to the item. + * + * @param obj The segment control object. + * @param index The index of the segment item. + * @return The left side icon associated to the item at @p index. + * + * The return value is a pointer to the icon associated to the item when + * it was created, with function elm_segment_control_item_add(), or later + * with function elm_segment_control_item_icon_set(). If no icon + * was passed as argument, it will return @c NULL. + * + * @see elm_segment_control_item_add() + * @see elm_segment_control_item_icon_set() + * + * @ingroup SegmentControl + */ +EAPI Evas_Object *elm_segment_control_item_icon_get(const Evas_Object *obj, int index) EINA_ARG_NONNULL(1); - /** - * Set the icon associated to the item. - * - * @param it The segment control item. - * @param icon The icon object to associate with @p it. - * - * The icon object to use at left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * - * Once the icon object is set, a previously set one will be deleted. - * @warning Setting the same icon for two items will cause the icon to - * dissapear from the first item. - * - * If an icon was passed as argument on item creation, with function - * elm_segment_control_item_add(), it will be already - * associated to the item. - * - * @see elm_segment_control_item_add() - * @see elm_segment_control_item_icon_get() - * - * @ingroup SegmentControl - */ - EAPI void elm_segment_control_item_icon_set(Elm_Segment_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon associated to the item. + * + * @param it The segment control item. + * @param icon The icon object to associate with @p it. + * + * The icon object to use at left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * + * Once the icon object is set, a previously set one will be deleted. + * @warning Setting the same icon for two items will cause the icon to + * dissapear from the first item. + * + * If an icon was passed as argument on item creation, with function + * elm_segment_control_item_add(), it will be already + * associated to the item. + * + * @see elm_segment_control_item_add() + * @see elm_segment_control_item_icon_get() + * + * @ingroup SegmentControl + */ +EAPI void elm_segment_control_item_icon_set(Elm_Segment_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Get the index of an item. - * - * @param it The segment control item. - * @return The position of item in segment control widget. - * - * Index is the position of an item in segment control widget. Its - * range is from @c 0 to count - 1 . - * Count is the number of items, that can be get with - * elm_segment_control_item_count_get(). - * - * @ingroup SegmentControl - */ - EAPI int elm_segment_control_item_index_get(const Elm_Segment_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the index of an item. + * + * @param it The segment control item. + * @return The position of item in segment control widget. + * + * Index is the position of an item in segment control widget. Its + * range is from @c 0 to count - 1 . + * Count is the number of items, that can be get with + * elm_segment_control_item_count_get(). + * + * @ingroup SegmentControl + */ +EAPI int elm_segment_control_item_index_get(const Elm_Segment_Item *it) EINA_ARG_NONNULL(1); - /** - * Get the base object of the item. - * - * @param it The segment control item. - * @return The base object associated with @p it. - * - * Base object is the @c Evas_Object that represents that item. - * - * @ingroup SegmentControl - */ - EAPI Evas_Object *elm_segment_control_item_object_get(const Elm_Segment_Item *it) EINA_ARG_NONNULL(1); +/** + * Get the base object of the item. + * + * @param it The segment control item. + * @return The base object associated with @p it. + * + * Base object is the @c Evas_Object that represents that item. + * + * @ingroup SegmentControl + */ +EAPI Evas_Object *elm_segment_control_item_object_get(const Elm_Segment_Item *it) EINA_ARG_NONNULL(1); - /** - * Get the selected item. - * - * @param obj The segment control object. - * @return The selected item or @c NULL if none of segment items is - * selected. - * - * The selected item can be unselected with function - * elm_segment_control_item_selected_set(). - * - * The selected item always will be highlighted on segment control. - * - * @ingroup SegmentControl - */ - EAPI Elm_Segment_Item *elm_segment_control_item_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the selected item. + * + * @param obj The segment control object. + * @return The selected item or @c NULL if none of segment items is + * selected. + * + * The selected item can be unselected with function + * elm_segment_control_item_selected_set(). + * + * The selected item always will be highlighted on segment control. + * + * @ingroup SegmentControl + */ +EAPI Elm_Segment_Item *elm_segment_control_item_selected_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the selected state of an item. - * - * @param it The segment control item - * @param select The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previosly selected will be unselected. - * Previoulsy selected item can be get with function - * elm_segment_control_item_selected_get(). - * - * The selected item always will be highlighted on segment control. - * - * @see elm_segment_control_item_selected_get() - * - * @ingroup SegmentControl - */ - EAPI void elm_segment_control_item_selected_set(Elm_Segment_Item *it, Eina_Bool select) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Set the selected state of an item. + * + * @param it The segment control item + * @param select The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previosly selected will be unselected. + * Previoulsy selected item can be get with function + * elm_segment_control_item_selected_get(). + * + * The selected item always will be highlighted on segment control. + * + * @see elm_segment_control_item_selected_get() + * + * @ingroup SegmentControl + */ +EAPI void elm_segment_control_item_selected_set(Elm_Segment_Item *it, Eina_Bool select) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_separator.h b/legacy/elementary/src/lib/elm_separator.h index dd9003e68c..5f5204d7d5 100644 --- a/legacy/elementary/src/lib/elm_separator.h +++ b/legacy/elementary/src/lib/elm_separator.h @@ -1,38 +1,39 @@ - /** - * @defgroup Separator Separator - * - * @brief Separator is a very thin object used to separate other objects. - * - * A separator can be vertical or horizontal. - * - * @ref tutorial_separator is a good example of how to use a separator. - * @{ - */ - /** - * @brief Add a separator object to @p parent - * - * @param parent The parent object - * - * @return The separator object, or NULL upon failure - */ - EAPI Evas_Object *elm_separator_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - /** - * @brief Set the horizontal mode of a separator object - * - * @param obj The separator object - * @param horizontal If true, the separator is horizontal - */ - EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * @brief Get the horizontal mode of a separator object - * - * @param obj The separator object - * @return If true, the separator is horizontal - * - * @see elm_separator_horizontal_set() - */ - EAPI Eina_Bool elm_separator_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * @} - */ - +/** + * @defgroup Separator Separator + * + * @brief Separator is a very thin object used to separate other objects. + * + * A separator can be vertical or horizontal. + * + * @ref tutorial_separator is a good example of how to use a separator. + * @{ + */ +/** + * @brief Add a separator object to @p parent + * + * @param parent The parent object + * + * @return The separator object, or NULL upon failure + */ +EAPI Evas_Object * + elm_separator_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); +/** + * @brief Set the horizontal mode of a separator object + * + * @param obj The separator object + * @param horizontal If true, the separator is horizontal + */ +EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * @brief Get the horizontal mode of a separator object + * + * @param obj The separator object + * @return If true, the separator is horizontal + * + * @see elm_separator_horizontal_set() + */ +EAPI Eina_Bool elm_separator_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_slider.h b/legacy/elementary/src/lib/elm_slider.h index b20b108f40..9d2e1d8c49 100644 --- a/legacy/elementary/src/lib/elm_slider.h +++ b/legacy/elementary/src/lib/elm_slider.h @@ -1,540 +1,541 @@ - /** - * @defgroup Slider Slider - * @ingroup Elementary - * - * @image html img/widget/slider/preview-00.png - * @image latex img/widget/slider/preview-00.eps width=\textwidth - * - * The slider adds a dragable “slider” widget for selecting the value of - * something within a range. - * - * A slider can be horizontal or vertical. It can contain an Icon and has a - * primary label as well as a units label (that is formatted with floating - * point values and thus accepts a printf-style format string, like - * “%1.2f units”. There is also an indicator string that may be somewhere - * else (like on the slider itself) that also accepts a format string like - * units. Label, Icon Unit and Indicator strings/objects are optional. - * - * A slider may be inverted which means values invert, with high vales being - * on the left or top and low values on the right or bottom (as opposed to - * normally being low on the left or top and high on the bottom and right). - * - * The slider should have its minimum and maximum values set by the - * application with elm_slider_min_max_set() and value should also be set by - * the application before use with elm_slider_value_set(). The span of the - * slider is its length (horizontally or vertically). This will be scaled by - * the object or applications scaling factor. At any point code can query the - * slider for its value with elm_slider_value_get(). - * - * Smart callbacks one can listen to: - * - "changed" - Whenever the slider value is changed by the user. - * - "slider,drag,start" - dragging the slider indicator around has started. - * - "slider,drag,stop" - dragging the slider indicator around has stopped. - * - "delay,changed" - A short time after the value is changed by the user. - * This will be called only when the user stops dragging for - * a very short period or when they release their - * finger/mouse, so it avoids possibly expensive reactions to - * the value change. - * - * Available styles for it: - * - @c "default" - * - * Default contents parts of the slider widget that you can use for are: - * @li "icon" - An icon of the slider - * @li "end" - A end part content of the slider - * - * Default text parts of the silder widget that you can use for are: - * @li "default" - Label of the silder - * Here is an example on its usage: - * @li @ref slider_example - */ +/** + * @defgroup Slider Slider + * @ingroup Elementary + * + * @image html img/widget/slider/preview-00.png + * @image latex img/widget/slider/preview-00.eps width=\textwidth + * + * The slider adds a dragable “slider” widget for selecting the value of + * something within a range. + * + * A slider can be horizontal or vertical. It can contain an Icon and has a + * primary label as well as a units label (that is formatted with floating + * point values and thus accepts a printf-style format string, like + * “%1.2f units”. There is also an indicator string that may be somewhere + * else (like on the slider itself) that also accepts a format string like + * units. Label, Icon Unit and Indicator strings/objects are optional. + * + * A slider may be inverted which means values invert, with high vales being + * on the left or top and low values on the right or bottom (as opposed to + * normally being low on the left or top and high on the bottom and right). + * + * The slider should have its minimum and maximum values set by the + * application with elm_slider_min_max_set() and value should also be set by + * the application before use with elm_slider_value_set(). The span of the + * slider is its length (horizontally or vertically). This will be scaled by + * the object or applications scaling factor. At any point code can query the + * slider for its value with elm_slider_value_get(). + * + * Smart callbacks one can listen to: + * - "changed" - Whenever the slider value is changed by the user. + * - "slider,drag,start" - dragging the slider indicator around has started. + * - "slider,drag,stop" - dragging the slider indicator around has stopped. + * - "delay,changed" - A short time after the value is changed by the user. + * This will be called only when the user stops dragging for + * a very short period or when they release their + * finger/mouse, so it avoids possibly expensive reactions to + * the value change. + * + * Available styles for it: + * - @c "default" + * + * Default contents parts of the slider widget that you can use for are: + * @li "icon" - An icon of the slider + * @li "end" - A end part content of the slider + * + * Default text parts of the silder widget that you can use for are: + * @li "default" - Label of the silder + * Here is an example on its usage: + * @li @ref slider_example + */ - /** - * @addtogroup Slider - * @{ - */ +/** + * @addtogroup Slider + * @{ + */ - /** - * Add a new slider widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new slider widget handle or @c NULL, on errors. - * - * This function inserts a new slider widget on the canvas. - * - * @ingroup Slider - */ - EAPI Evas_Object *elm_slider_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new slider widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new slider widget handle or @c NULL, on errors. + * + * This function inserts a new slider widget on the canvas. + * + * @ingroup Slider + */ +EAPI Evas_Object * + elm_slider_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the label of a given slider widget - * - * @param obj The progress bar object - * @param label The text label string, in UTF-8 - * - * @ingroup Slider - * @deprecated use elm_object_text_set() instead. - */ - EINA_DEPRECATED EAPI void elm_slider_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); +/** + * Set the label of a given slider widget + * + * @param obj The progress bar object + * @param label The text label string, in UTF-8 + * + * @ingroup Slider + * @deprecated use elm_object_text_set() instead. + */ +EINA_DEPRECATED EAPI void elm_slider_label_set(Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - /** - * Get the label of a given slider widget - * - * @param obj The progressbar object - * @return The text label string, in UTF-8 - * - * @ingroup Slider - * @deprecated use elm_object_text_get() instead. - */ - EINA_DEPRECATED EAPI const char *elm_slider_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label of a given slider widget + * + * @param obj The progressbar object + * @return The text label string, in UTF-8 + * + * @ingroup Slider + * @deprecated use elm_object_text_get() instead. + */ +EINA_DEPRECATED EAPI const char *elm_slider_label_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the icon object of the slider object. - * - * @param obj The slider object. - * @param icon The icon object. - * - * On horizontal mode, icon is placed at left, and on vertical mode, - * placed at top. - * - * @note 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_slider_icon_unset() function. - * - * @warning If the object being set does not have minimum size hints set, - * it won't get properly displayed. - * - * @ingroup Slider - * @deprecated use elm_object_part_content_set() instead. - */ - EINA_DEPRECATED EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); +/** + * Set the icon object of the slider object. + * + * @param obj The slider object. + * @param icon The icon object. + * + * On horizontal mode, icon is placed at left, and on vertical mode, + * placed at top. + * + * @note 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_slider_icon_unset() function. + * + * @warning If the object being set does not have minimum size hints set, + * it won't get properly displayed. + * + * @ingroup Slider + * @deprecated use elm_object_part_content_set() instead. + */ +EINA_DEPRECATED EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1); - /** - * Unset an icon set on a given slider widget. - * - * @param obj The slider object. - * @return The icon object that was being used, if any was set, or - * @c NULL, otherwise (and on errors). - * - * On horizontal mode, icon is placed at left, and on vertical mode, - * placed at top. - * - * This call will unparent and return the icon object which was set - * for this widget, previously, on success. - * - * @see elm_slider_icon_set() for more details - * @see elm_slider_icon_get() - * @deprecated use elm_object_part_content_unset() instead. - * - * @ingroup Slider - */ - EINA_DEPRECATED EAPI Evas_Object *elm_slider_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset an icon set on a given slider widget. + * + * @param obj The slider object. + * @return The icon object that was being used, if any was set, or + * @c NULL, otherwise (and on errors). + * + * On horizontal mode, icon is placed at left, and on vertical mode, + * placed at top. + * + * This call will unparent and return the icon object which was set + * for this widget, previously, on success. + * + * @see elm_slider_icon_set() for more details + * @see elm_slider_icon_get() + * @deprecated use elm_object_part_content_unset() instead. + * + * @ingroup Slider + */ +EINA_DEPRECATED EAPI Evas_Object *elm_slider_icon_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Retrieve the icon object set for a given slider widget. - * - * @param obj The slider object. - * @return The icon object's handle, if @p obj had one set, or @c NULL, - * otherwise (and on errors). - * - * On horizontal mode, icon is placed at left, and on vertical mode, - * placed at top. - * - * @see elm_slider_icon_set() for more details - * @see elm_slider_icon_unset() - * - * @deprecated use elm_object_part_content_get() instead. - * - * @ingroup Slider - */ - EINA_DEPRECATED EAPI Evas_Object *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the icon object set for a given slider widget. + * + * @param obj The slider object. + * @return The icon object's handle, if @p obj had one set, or @c NULL, + * otherwise (and on errors). + * + * On horizontal mode, icon is placed at left, and on vertical mode, + * placed at top. + * + * @see elm_slider_icon_set() for more details + * @see elm_slider_icon_unset() + * + * @deprecated use elm_object_part_content_get() instead. + * + * @ingroup Slider + */ +EINA_DEPRECATED EAPI Evas_Object *elm_slider_icon_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the end object of the slider object. - * - * @param obj The slider object. - * @param end The end object. - * - * On horizontal mode, end is placed at left, and on vertical mode, - * placed at bottom. - * - * @note 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_slider_end_unset() function. - * - * @warning If the object being set does not have minimum size hints set, - * it won't get properly displayed. - * - * @deprecated use elm_object_part_content_set() instead. - * - * @ingroup Slider - */ - EINA_DEPRECATED EAPI void elm_slider_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1); +/** + * Set the end object of the slider object. + * + * @param obj The slider object. + * @param end The end object. + * + * On horizontal mode, end is placed at left, and on vertical mode, + * placed at bottom. + * + * @note 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_slider_end_unset() function. + * + * @warning If the object being set does not have minimum size hints set, + * it won't get properly displayed. + * + * @deprecated use elm_object_part_content_set() instead. + * + * @ingroup Slider + */ +EINA_DEPRECATED EAPI void elm_slider_end_set(Evas_Object *obj, Evas_Object *end) EINA_ARG_NONNULL(1); - /** - * Unset an end object set on a given slider widget. - * - * @param obj The slider object. - * @return The end object that was being used, if any was set, or - * @c NULL, otherwise (and on errors). - * - * On horizontal mode, end is placed at left, and on vertical mode, - * placed at bottom. - * - * This call will unparent and return the icon object which was set - * for this widget, previously, on success. - * - * @see elm_slider_end_set() for more details. - * @see elm_slider_end_get() - * - * @deprecated use elm_object_part_content_unset() instead - * instead. - * - * @ingroup Slider - */ - EINA_DEPRECATED EAPI Evas_Object *elm_slider_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Unset an end object set on a given slider widget. + * + * @param obj The slider object. + * @return The end object that was being used, if any was set, or + * @c NULL, otherwise (and on errors). + * + * On horizontal mode, end is placed at left, and on vertical mode, + * placed at bottom. + * + * This call will unparent and return the icon object which was set + * for this widget, previously, on success. + * + * @see elm_slider_end_set() for more details. + * @see elm_slider_end_get() + * + * @deprecated use elm_object_part_content_unset() instead + * instead. + * + * @ingroup Slider + */ +EINA_DEPRECATED EAPI Evas_Object *elm_slider_end_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Retrieve the end object set for a given slider widget. - * - * @param obj The slider object. - * @return The end object's handle, if @p obj had one set, or @c NULL, - * otherwise (and on errors). - * - * On horizontal mode, icon is placed at right, and on vertical mode, - * placed at bottom. - * - * @see elm_slider_end_set() for more details. - * @see elm_slider_end_unset() - * - * - * @deprecated use elm_object_part_content_get() instead - * instead. - * - * @ingroup Slider - */ - EINA_DEPRECATED EAPI Evas_Object *elm_slider_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the end object set for a given slider widget. + * + * @param obj The slider object. + * @return The end object's handle, if @p obj had one set, or @c NULL, + * otherwise (and on errors). + * + * On horizontal mode, icon is placed at right, and on vertical mode, + * placed at bottom. + * + * @see elm_slider_end_set() for more details. + * @see elm_slider_end_unset() + * + * + * @deprecated use elm_object_part_content_get() instead + * instead. + * + * @ingroup Slider + */ +EINA_DEPRECATED EAPI Evas_Object *elm_slider_end_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the (exact) length of the bar region of a given slider widget. - * - * @param obj The slider object. - * @param size The length of the slider's bar region. - * - * This sets the minimum width (when in horizontal mode) or height - * (when in vertical mode) of the actual bar area of the slider - * @p obj. This in turn affects the object's minimum size. Use - * this when you're not setting other size hints expanding on the - * given direction (like weight and alignment hints) and you would - * like it to have a specific size. - * - * @note Icon, end, label, indicator and unit text around @p obj - * will require their - * own space, which will make @p obj to require more the @p size, - * actually. - * - * @see elm_slider_span_size_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size) EINA_ARG_NONNULL(1); +/** + * Set the (exact) length of the bar region of a given slider widget. + * + * @param obj The slider object. + * @param size The length of the slider's bar region. + * + * This sets the minimum width (when in horizontal mode) or height + * (when in vertical mode) of the actual bar area of the slider + * @p obj. This in turn affects the object's minimum size. Use + * this when you're not setting other size hints expanding on the + * given direction (like weight and alignment hints) and you would + * like it to have a specific size. + * + * @note Icon, end, label, indicator and unit text around @p obj + * will require their + * own space, which will make @p obj to require more the @p size, + * actually. + * + * @see elm_slider_span_size_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size) EINA_ARG_NONNULL(1); - /** - * Get the length set for the bar region of a given slider widget - * - * @param obj The slider object. - * @return The length of the slider's bar region. - * - * If that size was not set previously, with - * elm_slider_span_size_set(), this call will return @c 0. - * - * @ingroup Slider - */ - EAPI Evas_Coord elm_slider_span_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the length set for the bar region of a given slider widget + * + * @param obj The slider object. + * @return The length of the slider's bar region. + * + * If that size was not set previously, with + * elm_slider_span_size_set(), this call will return @c 0. + * + * @ingroup Slider + */ +EAPI Evas_Coord elm_slider_span_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the format string for the unit label. - * - * @param obj The slider object. - * @param format The format string for the unit display. - * - * Unit label is displayed all the time, if set, after slider's bar. - * In horizontal mode, at right and in vertical mode, at bottom. - * - * If @c NULL, unit label won't be visible. If not it sets the format - * string for the label text. To the label text is provided a floating point - * value, so the label text can display up to 1 floating point value. - * Note that this is optional. - * - * Use a format string such as "%1.2f meters" for example, and it will - * display values like: "3.14 meters" for a value equal to 3.14159. - * - * Default is unit label disabled. - * - * @see elm_slider_indicator_format_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_unit_format_set(Evas_Object *obj, const char *format) EINA_ARG_NONNULL(1); +/** + * Set the format string for the unit label. + * + * @param obj The slider object. + * @param format The format string for the unit display. + * + * Unit label is displayed all the time, if set, after slider's bar. + * In horizontal mode, at right and in vertical mode, at bottom. + * + * If @c NULL, unit label won't be visible. If not it sets the format + * string for the label text. To the label text is provided a floating point + * value, so the label text can display up to 1 floating point value. + * Note that this is optional. + * + * Use a format string such as "%1.2f meters" for example, and it will + * display values like: "3.14 meters" for a value equal to 3.14159. + * + * Default is unit label disabled. + * + * @see elm_slider_indicator_format_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_unit_format_set(Evas_Object *obj, const char *format) EINA_ARG_NONNULL(1); - /** - * Get the unit label format of the slider. - * - * @param obj The slider object. - * @return The unit label format string in UTF-8. - * - * Unit label is displayed all the time, if set, after slider's bar. - * In horizontal mode, at right and in vertical mode, at bottom. - * - * @see elm_slider_unit_format_set() for more - * information on how this works. - * - * @ingroup Slider - */ - EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the unit label format of the slider. + * + * @param obj The slider object. + * @return The unit label format string in UTF-8. + * + * Unit label is displayed all the time, if set, after slider's bar. + * In horizontal mode, at right and in vertical mode, at bottom. + * + * @see elm_slider_unit_format_set() for more + * information on how this works. + * + * @ingroup Slider + */ +EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the format string for the indicator label. - * - * @param obj The slider object. - * @param indicator The format string for the indicator display. - * - * The slider may display its value somewhere else then unit label, - * for example, above the slider knob that is dragged around. This function - * sets the format string used for this. - * - * If @c NULL, indicator label won't be visible. If not it sets the format - * string for the label text. To the label text is provided a floating point - * value, so the label text can display up to 1 floating point value. - * Note that this is optional. - * - * Use a format string such as "%1.2f meters" for example, and it will - * display values like: "3.14 meters" for a value equal to 3.14159. - * - * Default is indicator label disabled. - * - * @see elm_slider_indicator_format_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator) EINA_ARG_NONNULL(1); +/** + * Set the format string for the indicator label. + * + * @param obj The slider object. + * @param indicator The format string for the indicator display. + * + * The slider may display its value somewhere else then unit label, + * for example, above the slider knob that is dragged around. This function + * sets the format string used for this. + * + * If @c NULL, indicator label won't be visible. If not it sets the format + * string for the label text. To the label text is provided a floating point + * value, so the label text can display up to 1 floating point value. + * Note that this is optional. + * + * Use a format string such as "%1.2f meters" for example, and it will + * display values like: "3.14 meters" for a value equal to 3.14159. + * + * Default is indicator label disabled. + * + * @see elm_slider_indicator_format_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_indicator_format_set(Evas_Object *obj, const char *indicator) EINA_ARG_NONNULL(1); - /** - * Get the indicator label format of the slider. - * - * @param obj The slider object. - * @return The indicator label format string in UTF-8. - * - * The slider may display its value somewhere else then unit label, - * for example, above the slider knob that is dragged around. This function - * gets the format string used for this. - * - * @see elm_slider_indicator_format_set() for more - * information on how this works. - * - * @ingroup Slider - */ - EAPI const char *elm_slider_indicator_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the indicator label format of the slider. + * + * @param obj The slider object. + * @return The indicator label format string in UTF-8. + * + * The slider may display its value somewhere else then unit label, + * for example, above the slider knob that is dragged around. This function + * gets the format string used for this. + * + * @see elm_slider_indicator_format_set() for more + * information on how this works. + * + * @ingroup Slider + */ +EAPI const char *elm_slider_indicator_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the format function pointer for the indicator label - * - * @param obj The slider object. - * @param func The indicator format function. - * @param free_func The freeing function for the format string. - * - * Set the callback function to format the indicator string. - * - * @see elm_slider_indicator_format_set() for more info on how this works. - * - * @ingroup Slider - */ - EAPI void elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) EINA_ARG_NONNULL(1); +/** + * Set the format function pointer for the indicator label + * + * @param obj The slider object. + * @param func The indicator format function. + * @param free_func The freeing function for the format string. + * + * Set the callback function to format the indicator string. + * + * @see elm_slider_indicator_format_set() for more info on how this works. + * + * @ingroup Slider + */ +EAPI void elm_slider_indicator_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) EINA_ARG_NONNULL(1); - /** - * Set the format function pointer for the units label - * - * @param obj The slider object. - * @param func The units format function. - * @param free_func The freeing function for the format string. - * - * Set the callback function to format the indicator string. - * - * @see elm_slider_units_format_set() for more info on how this works. - * - * @ingroup Slider - */ - EAPI void elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) EINA_ARG_NONNULL(1); +/** + * Set the format function pointer for the units label + * + * @param obj The slider object. + * @param func The units format function. + * @param free_func The freeing function for the format string. + * + * Set the callback function to format the indicator string. + * + * @see elm_slider_units_format_set() for more info on how this works. + * + * @ingroup Slider + */ +EAPI void elm_slider_units_format_function_set(Evas_Object *obj, const char *(*func)(double val), void (*free_func)(const char *str)) EINA_ARG_NONNULL(1); - /** - * Set the orientation of a given slider widget. - * - * @param obj The slider object. - * @param horizontal Use @c EINA_TRUE to make @p obj to be - * @b horizontal, @c EINA_FALSE to make it @b vertical. - * - * Use this function to change how your slider is to be - * disposed: vertically or horizontally. - * - * By default it's displayed horizontally. - * - * @see elm_slider_horizontal_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); +/** + * Set the orientation of a given slider widget. + * + * @param obj The slider object. + * @param horizontal Use @c EINA_TRUE to make @p obj to be + * @b horizontal, @c EINA_FALSE to make it @b vertical. + * + * Use this function to change how your slider is to be + * disposed: vertically or horizontally. + * + * By default it's displayed horizontally. + * + * @see elm_slider_horizontal_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - /** - * Retrieve the orientation of a given slider widget - * - * @param obj The slider object. - * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, - * @c EINA_FALSE if it's @b vertical (and on errors). - * - * @see elm_slider_horizontal_set() for more details. - * - * @ingroup Slider - */ - EAPI Eina_Bool elm_slider_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the orientation of a given slider widget + * + * @param obj The slider object. + * @return @c EINA_TRUE, if @p obj is set to be @b horizontal, + * @c EINA_FALSE if it's @b vertical (and on errors). + * + * @see elm_slider_horizontal_set() for more details. + * + * @ingroup Slider + */ +EAPI Eina_Bool elm_slider_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the minimum and maximum values for the slider. - * - * @param obj The slider object. - * @param min The minimum value. - * @param max The maximum value. - * - * Define the allowed range of values to be selected by the user. - * - * If actual value is less than @p min, it will be updated to @p min. If it - * is bigger then @p max, will be updated to @p max. Actual value can be - * get with elm_slider_value_get(). - * - * By default, min is equal to 0.0, and max is equal to 1.0. - * - * @warning Maximum must be greater than minimum, otherwise behavior - * is undefined. - * - * @see elm_slider_min_max_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_min_max_set(Evas_Object *obj, double min, double max) EINA_ARG_NONNULL(1); +/** + * Set the minimum and maximum values for the slider. + * + * @param obj The slider object. + * @param min The minimum value. + * @param max The maximum value. + * + * Define the allowed range of values to be selected by the user. + * + * If actual value is less than @p min, it will be updated to @p min. If it + * is bigger then @p max, will be updated to @p max. Actual value can be + * get with elm_slider_value_get(). + * + * By default, min is equal to 0.0, and max is equal to 1.0. + * + * @warning Maximum must be greater than minimum, otherwise behavior + * is undefined. + * + * @see elm_slider_min_max_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_min_max_set(Evas_Object *obj, double min, double max) EINA_ARG_NONNULL(1); - /** - * Get the minimum and maximum values of the slider. - * - * @param obj The slider object. - * @param min Pointer where to store the minimum value. - * @param max Pointer where to store the maximum value. - * - * @note If only one value is needed, the other pointer can be passed - * as @c NULL. - * - * @see elm_slider_min_max_set() for details. - * - * @ingroup Slider - */ - EAPI void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max) EINA_ARG_NONNULL(1); +/** + * Get the minimum and maximum values of the slider. + * + * @param obj The slider object. + * @param min Pointer where to store the minimum value. + * @param max Pointer where to store the maximum value. + * + * @note If only one value is needed, the other pointer can be passed + * as @c NULL. + * + * @see elm_slider_min_max_set() for details. + * + * @ingroup Slider + */ +EAPI void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max) EINA_ARG_NONNULL(1); - /** - * Set the value the slider displays. - * - * @param obj The slider object. - * @param val The value to be displayed. - * - * Value will be presented on the unit label following format specified with - * elm_slider_unit_format_set() and on indicator with - * elm_slider_indicator_format_set(). - * - * @warning The value must to be between min and max values. This values - * are set by elm_slider_min_max_set(). - * - * @see elm_slider_value_get() - * @see elm_slider_unit_format_set() - * @see elm_slider_indicator_format_set() - * @see elm_slider_min_max_set() - * - * @ingroup Slider - */ - EAPI void elm_slider_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); +/** + * Set the value the slider displays. + * + * @param obj The slider object. + * @param val The value to be displayed. + * + * Value will be presented on the unit label following format specified with + * elm_slider_unit_format_set() and on indicator with + * elm_slider_indicator_format_set(). + * + * @warning The value must to be between min and max values. This values + * are set by elm_slider_min_max_set(). + * + * @see elm_slider_value_get() + * @see elm_slider_unit_format_set() + * @see elm_slider_indicator_format_set() + * @see elm_slider_min_max_set() + * + * @ingroup Slider + */ +EAPI void elm_slider_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); - /** - * Get the value displayed by the spinner. - * - * @param obj The spinner object. - * @return The value displayed. - * - * @see elm_spinner_value_set() for details. - * - * @ingroup Slider - */ - EAPI double elm_slider_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the value displayed by the spinner. + * + * @param obj The spinner object. + * @return The value displayed. + * + * @see elm_spinner_value_set() for details. + * + * @ingroup Slider + */ +EAPI double elm_slider_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Invert a given slider widget's displaying values order - * - * @param obj The slider object. - * @param inverted Use @c EINA_TRUE to make @p obj inverted, - * @c EINA_FALSE to bring it back to default, non-inverted values. - * - * A slider may be @b inverted, in which state it gets its - * values inverted, with high vales being on the left or top and - * low values on the right or bottom, as opposed to normally have - * the low values on the former and high values on the latter, - * respectively, for horizontal and vertical modes. - * - * @see elm_slider_inverted_get() - * - * @ingroup Slider - */ - EAPI void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted) EINA_ARG_NONNULL(1); +/** + * Invert a given slider widget's displaying values order + * + * @param obj The slider object. + * @param inverted Use @c EINA_TRUE to make @p obj inverted, + * @c EINA_FALSE to bring it back to default, non-inverted values. + * + * A slider may be @b inverted, in which state it gets its + * values inverted, with high vales being on the left or top and + * low values on the right or bottom, as opposed to normally have + * the low values on the former and high values on the latter, + * respectively, for horizontal and vertical modes. + * + * @see elm_slider_inverted_get() + * + * @ingroup Slider + */ +EAPI void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted) EINA_ARG_NONNULL(1); - /** - * Get whether a given slider widget's displaying values are - * inverted or not. - * - * @param obj The slider object. - * @return @c EINA_TRUE, if @p obj has inverted values, - * @c EINA_FALSE otherwise (and on errors). - * - * @see elm_slider_inverted_set() for more details. - * - * @ingroup Slider - */ - EAPI Eina_Bool elm_slider_inverted_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether a given slider widget's displaying values are + * inverted or not. + * + * @param obj The slider object. + * @return @c EINA_TRUE, if @p obj has inverted values, + * @c EINA_FALSE otherwise (and on errors). + * + * @see elm_slider_inverted_set() for more details. + * + * @ingroup Slider + */ +EAPI Eina_Bool elm_slider_inverted_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set whether to enlarge slider indicator (augmented knob) or not. - * - * @param obj The slider object. - * @param show @c EINA_TRUE will make it enlarge, @c EINA_FALSE will - * let the knob always at default size. - * - * By default, indicator will be bigger while dragged by the user. - * - * @warning It won't display values set with - * elm_slider_indicator_format_set() if you disable indicator. - * - * @ingroup Slider - */ - EAPI void elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show) EINA_ARG_NONNULL(1); +/** + * Set whether to enlarge slider indicator (augmented knob) or not. + * + * @param obj The slider object. + * @param show @c EINA_TRUE will make it enlarge, @c EINA_FALSE will + * let the knob always at default size. + * + * By default, indicator will be bigger while dragged by the user. + * + * @warning It won't display values set with + * elm_slider_indicator_format_set() if you disable indicator. + * + * @ingroup Slider + */ +EAPI void elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show) EINA_ARG_NONNULL(1); - /** - * Get whether a given slider widget's enlarging indicator or not. - * - * @param obj The slider object. - * @return @c EINA_TRUE, if @p obj is enlarging indicator, or - * @c EINA_FALSE otherwise (and on errors). - * - * @see elm_slider_indicator_show_set() for details. - * - * @ingroup Slider - */ - EAPI Eina_Bool elm_slider_indicator_show_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get whether a given slider widget's enlarging indicator or not. + * + * @param obj The slider object. + * @return @c EINA_TRUE, if @p obj is enlarging indicator, or + * @c EINA_FALSE otherwise (and on errors). + * + * @see elm_slider_indicator_show_set() for details. + * + * @ingroup Slider + */ +EAPI Eina_Bool elm_slider_indicator_show_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_slideshow.h b/legacy/elementary/src/lib/elm_slideshow.h index 523fe83327..26f9b3e49b 100644 --- a/legacy/elementary/src/lib/elm_slideshow.h +++ b/legacy/elementary/src/lib/elm_slideshow.h @@ -1,563 +1,564 @@ - /** - * @defgroup Slideshow Slideshow - * - * @image html img/widget/slideshow/preview-00.png - * @image latex img/widget/slideshow/preview-00.eps - * - * This widget, as the name indicates, is a pre-made image - * slideshow panel, with API functions acting on (child) image - * items presentation. Between those actions, are: - * - advance to next/previous image - * - select the style of image transition animation - * - set the exhibition time for each image - * - start/stop the slideshow - * - * The transition animations are defined in the widget's theme, - * consequently new animations can be added without having to - * update the widget's code. - * - * @section Slideshow_Items Slideshow items - * - * For slideshow items, just like for @ref Genlist "genlist" ones, - * the user defines a @b classes, specifying functions that will be - * called on the item's creation and deletion times. - * - * The #Elm_Slideshow_Item_Class structure contains the following - * members: - * - * - @c func.get - When an item is displayed, this function is - * called, and it's where one should create the item object, de - * facto. For example, the object can be a pure Evas image object - * or an Elementary @ref Photocam "photocam" widget. See - * #SlideshowItemGetFunc. - * - @c func.del - When an item is no more displayed, this function - * is called, where the user must delete any data associated to - * the item. See #SlideshowItemDelFunc. - * - * @section Slideshow_Caching Slideshow caching - * - * The slideshow provides facilities to have items adjacent to the - * one being displayed already "realized" (i.e. loaded) for - * you, so that the system does not have to decode image data - * anymore at the time it has to actually switch images on its - * viewport. The user is able to set the numbers of items to be - * cached @b before and @b after the current item, in the widget's - * item list. - * - * Smart events one can add callbacks for are: - * - * - @c "changed" - when the slideshow switches its view to a new - * item. event_info parameter in callback contains the current visible item - * - @c "transition,end" - when a slide transition ends. event_info parameter - * in callback contains the current visible item - * - * List of examples for the slideshow widget: - * @li @ref slideshow_example - */ +/** + * @defgroup Slideshow Slideshow + * + * @image html img/widget/slideshow/preview-00.png + * @image latex img/widget/slideshow/preview-00.eps + * + * This widget, as the name indicates, is a pre-made image + * slideshow panel, with API functions acting on (child) image + * items presentation. Between those actions, are: + * - advance to next/previous image + * - select the style of image transition animation + * - set the exhibition time for each image + * - start/stop the slideshow + * + * The transition animations are defined in the widget's theme, + * consequently new animations can be added without having to + * update the widget's code. + * + * @section Slideshow_Items Slideshow items + * + * For slideshow items, just like for @ref Genlist "genlist" ones, + * the user defines a @b classes, specifying functions that will be + * called on the item's creation and deletion times. + * + * The #Elm_Slideshow_Item_Class structure contains the following + * members: + * + * - @c func.get - When an item is displayed, this function is + * called, and it's where one should create the item object, de + * facto. For example, the object can be a pure Evas image object + * or an Elementary @ref Photocam "photocam" widget. See + * #SlideshowItemGetFunc. + * - @c func.del - When an item is no more displayed, this function + * is called, where the user must delete any data associated to + * the item. See #SlideshowItemDelFunc. + * + * @section Slideshow_Caching Slideshow caching + * + * The slideshow provides facilities to have items adjacent to the + * one being displayed already "realized" (i.e. loaded) for + * you, so that the system does not have to decode image data + * anymore at the time it has to actually switch images on its + * viewport. The user is able to set the numbers of items to be + * cached @b before and @b after the current item, in the widget's + * item list. + * + * Smart events one can add callbacks for are: + * + * - @c "changed" - when the slideshow switches its view to a new + * item. event_info parameter in callback contains the current visible item + * - @c "transition,end" - when a slide transition ends. event_info parameter + * in callback contains the current visible item + * + * List of examples for the slideshow widget: + * @li @ref slideshow_example + */ - /** - * @addtogroup Slideshow - * @{ - */ +/** + * @addtogroup Slideshow + * @{ + */ - typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class; /**< Slideshow item class definition struct */ - typedef struct _Elm_Slideshow_Item_Class_Func Elm_Slideshow_Item_Class_Func; /**< Class functions for slideshow item classes. */ - typedef Evas_Object *(*SlideshowItemGetFunc) (void *data, Evas_Object *obj); /**< Image fetching class function for slideshow item classes. */ - typedef void (*SlideshowItemDelFunc) (void *data, Evas_Object *obj); /**< Deletion class function for slideshow item classes. */ +typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class; /**< Slideshow item class definition struct */ +typedef struct _Elm_Slideshow_Item_Class_Func Elm_Slideshow_Item_Class_Func; /**< Class functions for slideshow item classes. */ +typedef Evas_Object *(*SlideshowItemGetFunc)(void *data, Evas_Object *obj); /**< Image fetching class function for slideshow item classes. */ +typedef void (*SlideshowItemDelFunc)(void *data, Evas_Object *obj); /**< Deletion class function for slideshow item classes. */ - /** - * @struct _Elm_Slideshow_Item_Class - * - * Slideshow item class definition. See @ref Slideshow_Items for - * field details. - */ - struct _Elm_Slideshow_Item_Class - { - struct _Elm_Slideshow_Item_Class_Func - { - SlideshowItemGetFunc get; - SlideshowItemDelFunc del; - } func; - }; /**< #Elm_Slideshow_Item_Class member definitions */ +/** + * @struct _Elm_Slideshow_Item_Class + * + * Slideshow item class definition. See @ref Slideshow_Items for + * field details. + */ +struct _Elm_Slideshow_Item_Class +{ + struct _Elm_Slideshow_Item_Class_Func + { + SlideshowItemGetFunc get; + SlideshowItemDelFunc del; + } func; +}; /**< #Elm_Slideshow_Item_Class member definitions */ - /** - * Add a new slideshow widget to the given parent Elementary - * (container) object - * - * @param parent The parent object - * @return A new slideshow widget handle or @c NULL, on errors - * - * This function inserts a new slideshow widget on the canvas. - * - * @ingroup Slideshow - */ - EAPI Evas_Object *elm_slideshow_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new slideshow widget to the given parent Elementary + * (container) object + * + * @param parent The parent object + * @return A new slideshow widget handle or @c NULL, on errors + * + * This function inserts a new slideshow widget on the canvas. + * + * @ingroup Slideshow + */ +EAPI Evas_Object * + elm_slideshow_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Add (append) a new item in a given slideshow widget. - * - * @param obj The slideshow object - * @param itc The item class for the item - * @param data The item's data - * @return A handle to the item added or @c NULL, on errors - * - * Add a new item to @p obj's internal list of items, appending it. - * The item's class must contain the function really fetching the - * image object to show for this item, which could be an Evas image - * object or an Elementary photo, for example. The @p data - * parameter is going to be passed to both class functions of the - * item. - * - * @see #Elm_Slideshow_Item_Class - * @see elm_slideshow_item_sorted_insert() - * @see elm_object_item_data_set() - * - * @ingroup Slideshow - */ - EAPI Elm_Object_Item *elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data) EINA_ARG_NONNULL(1); +/** + * Add (append) a new item in a given slideshow widget. + * + * @param obj The slideshow object + * @param itc The item class for the item + * @param data The item's data + * @return A handle to the item added or @c NULL, on errors + * + * Add a new item to @p obj's internal list of items, appending it. + * The item's class must contain the function really fetching the + * image object to show for this item, which could be an Evas image + * object or an Elementary photo, for example. The @p data + * parameter is going to be passed to both class functions of the + * item. + * + * @see #Elm_Slideshow_Item_Class + * @see elm_slideshow_item_sorted_insert() + * @see elm_object_item_data_set() + * + * @ingroup Slideshow + */ +EAPI Elm_Object_Item *elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data) EINA_ARG_NONNULL(1); - /** - * Insert a new item into the given slideshow widget, using the @p func - * function to sort items (by item handles). - * - * @param obj The slideshow object - * @param itc The item class for the item - * @param data The item's data - * @param func The comparing function to be used to sort slideshow - * items by #Elm_Slideshow_Item item handles - * @return Returns The slideshow item handle, on success, or - * @c NULL, on errors - * - * Add a new item to @p obj's internal list of items, in a position - * determined by the @p func comparing function. The item's class - * must contain the function really fetching the image object to - * show for this item, which could be an Evas image object or an - * Elementary photo, for example. The @p data parameter is going to - * be passed to both class functions of the item. - * - * @see #Elm_Slideshow_Item_Class - * @see elm_slideshow_item_add() - * - * @ingroup Slideshow - */ - EAPI Elm_Object_Item *elm_slideshow_item_sorted_insert(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data, Eina_Compare_Cb func) EINA_ARG_NONNULL(1); +/** + * Insert a new item into the given slideshow widget, using the @p func + * function to sort items (by item handles). + * + * @param obj The slideshow object + * @param itc The item class for the item + * @param data The item's data + * @param func The comparing function to be used to sort slideshow + * items by #Elm_Slideshow_Item item handles + * @return Returns The slideshow item handle, on success, or + * @c NULL, on errors + * + * Add a new item to @p obj's internal list of items, in a position + * determined by the @p func comparing function. The item's class + * must contain the function really fetching the image object to + * show for this item, which could be an Evas image object or an + * Elementary photo, for example. The @p data parameter is going to + * be passed to both class functions of the item. + * + * @see #Elm_Slideshow_Item_Class + * @see elm_slideshow_item_add() + * + * @ingroup Slideshow + */ +EAPI Elm_Object_Item *elm_slideshow_item_sorted_insert(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data, Eina_Compare_Cb func) EINA_ARG_NONNULL(1); - /** - * Display a given slideshow widget's item, programmatically. - * - * @param it The item to display on @p obj's viewport - * - * The change between the current item and @p item will use the - * transition @p obj is set to use (@see - * elm_slideshow_transition_set()). - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_show(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Display a given slideshow widget's item, programmatically. + * + * @param it The item to display on @p obj's viewport + * + * The change between the current item and @p item will use the + * transition @p obj is set to use (@see + * elm_slideshow_transition_set()). + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_show(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Slide to the @b next item, in a given slideshow widget - * - * @param obj The slideshow object - * - * The sliding animation @p obj is set to use will be the - * transition effect used, after this call is issued. - * - * @note If the end of the slideshow's internal list of items is - * reached, it'll wrap around to the list's beginning, again. - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_next(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Slide to the @b next item, in a given slideshow widget + * + * @param obj The slideshow object + * + * The sliding animation @p obj is set to use will be the + * transition effect used, after this call is issued. + * + * @note If the end of the slideshow's internal list of items is + * reached, it'll wrap around to the list's beginning, again. + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_next(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Slide to the @b previous item, in a given slideshow widget - * - * @param obj The slideshow object - * - * The sliding animation @p obj is set to use will be the - * transition effect used, after this call is issued. - * - * @note If the beginning of the slideshow's internal list of items - * is reached, it'll wrap around to the list's end, again. - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_previous(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Slide to the @b previous item, in a given slideshow widget + * + * @param obj The slideshow object + * + * The sliding animation @p obj is set to use will be the + * transition effect used, after this call is issued. + * + * @note If the beginning of the slideshow's internal list of items + * is reached, it'll wrap around to the list's end, again. + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_previous(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Returns the list of sliding transition/effect names available, for a - * given slideshow widget. - * - * @param obj The slideshow object - * @return The list of transitions (list of @b stringshared strings - * as data) - * - * The transitions, which come from @p obj's theme, must be an EDC - * data item named @c "transitions" on the theme file, with (prefix) - * names of EDC programs actually implementing them. - * - * The available transitions for slideshows on the default theme are: - * - @c "fade" - the current item fades out, while the new one - * fades in to the slideshow's viewport. - * - @c "black_fade" - the current item fades to black, and just - * then, the new item will fade in. - * - @c "horizontal" - the current item slides horizontally, until - * it gets out of the slideshow's viewport, while the new item - * comes from the left to take its place. - * - @c "vertical" - the current item slides vertically, until it - * gets out of the slideshow's viewport, while the new item comes - * from the bottom to take its place. - * - @c "square" - the new item starts to appear from the middle of - * the current one, but with a tiny size, growing until its - * target (full) size and covering the old one. - * - * @warning The stringshared strings get no new references - * exclusive to the user grabbing the list, here, so if you'd like - * to use them out of this call's context, you'd better @c - * eina_stringshare_ref() them. - * - * @see elm_slideshow_transition_set() - * - * @ingroup Slideshow - */ - EAPI const Eina_List *elm_slideshow_transitions_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Returns the list of sliding transition/effect names available, for a + * given slideshow widget. + * + * @param obj The slideshow object + * @return The list of transitions (list of @b stringshared strings + * as data) + * + * The transitions, which come from @p obj's theme, must be an EDC + * data item named @c "transitions" on the theme file, with (prefix) + * names of EDC programs actually implementing them. + * + * The available transitions for slideshows on the default theme are: + * - @c "fade" - the current item fades out, while the new one + * fades in to the slideshow's viewport. + * - @c "black_fade" - the current item fades to black, and just + * then, the new item will fade in. + * - @c "horizontal" - the current item slides horizontally, until + * it gets out of the slideshow's viewport, while the new item + * comes from the left to take its place. + * - @c "vertical" - the current item slides vertically, until it + * gets out of the slideshow's viewport, while the new item comes + * from the bottom to take its place. + * - @c "square" - the new item starts to appear from the middle of + * the current one, but with a tiny size, growing until its + * target (full) size and covering the old one. + * + * @warning The stringshared strings get no new references + * exclusive to the user grabbing the list, here, so if you'd like + * to use them out of this call's context, you'd better @c + * eina_stringshare_ref() them. + * + * @see elm_slideshow_transition_set() + * + * @ingroup Slideshow + */ +EAPI const Eina_List *elm_slideshow_transitions_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the current slide transition/effect in use for a given - * slideshow widget - * - * @param obj The slideshow object - * @param transition The new transition's name string - * - * If @p transition is implemented in @p obj's theme (i.e., is - * contained in the list returned by - * elm_slideshow_transitions_get()), this new sliding effect will - * be used on the widget. - * - * @see elm_slideshow_transitions_get() for more details - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_transition_set(Evas_Object *obj, const char *transition) EINA_ARG_NONNULL(1); +/** + * Set the current slide transition/effect in use for a given + * slideshow widget + * + * @param obj The slideshow object + * @param transition The new transition's name string + * + * If @p transition is implemented in @p obj's theme (i.e., is + * contained in the list returned by + * elm_slideshow_transitions_get()), this new sliding effect will + * be used on the widget. + * + * @see elm_slideshow_transitions_get() for more details + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_transition_set(Evas_Object *obj, const char *transition) EINA_ARG_NONNULL(1); - /** - * Get the current slide transition/effect in use for a given - * slideshow widget - * - * @param obj The slideshow object - * @return The current transition's name - * - * @see elm_slideshow_transition_set() for more details - * - * @ingroup Slideshow - */ - EAPI const char *elm_slideshow_transition_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the current slide transition/effect in use for a given + * slideshow widget + * + * @param obj The slideshow object + * @return The current transition's name + * + * @see elm_slideshow_transition_set() for more details + * + * @ingroup Slideshow + */ +EAPI const char *elm_slideshow_transition_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the interval between each image transition on a given - * slideshow widget, and start the slideshow, itself - * - * @param obj The slideshow object - * @param timeout The new displaying timeout for images - * - * After this call, the slideshow widget will start cycling its - * view, sequentially and automatically, with the images of the - * items it has. The time between each new image displayed is going - * to be @p timeout, in @b seconds. If a different timeout was set - * previously and an slideshow was in progress, it will continue - * with the new time between transitions, after this call. - * - * @note A value less than or equal to 0 on @p timeout will disable - * the widget's internal timer, thus halting any slideshow which - * could be happening on @p obj. - * - * @see elm_slideshow_timeout_get() - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1); +/** + * Set the interval between each image transition on a given + * slideshow widget, and start the slideshow, itself + * + * @param obj The slideshow object + * @param timeout The new displaying timeout for images + * + * After this call, the slideshow widget will start cycling its + * view, sequentially and automatically, with the images of the + * items it has. The time between each new image displayed is going + * to be @p timeout, in @b seconds. If a different timeout was set + * previously and an slideshow was in progress, it will continue + * with the new time between transitions, after this call. + * + * @note A value less than or equal to 0 on @p timeout will disable + * the widget's internal timer, thus halting any slideshow which + * could be happening on @p obj. + * + * @see elm_slideshow_timeout_get() + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_timeout_set(Evas_Object *obj, double timeout) EINA_ARG_NONNULL(1); - /** - * Get the interval set for image transitions on a given slideshow - * widget. - * - * @param obj The slideshow object - * @return Returns the timeout set on it - * - * @see elm_slideshow_timeout_set() for more details - * - * @ingroup Slideshow - */ - EAPI double elm_slideshow_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the interval set for image transitions on a given slideshow + * widget. + * + * @param obj The slideshow object + * @return Returns the timeout set on it + * + * @see elm_slideshow_timeout_set() for more details + * + * @ingroup Slideshow + */ +EAPI double elm_slideshow_timeout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set if, after a slideshow is started, for a given slideshow - * widget, its items should be displayed cyclically or not. - * - * @param obj The slideshow object - * @param loop Use @c EINA_TRUE to make it cycle through items or - * @c EINA_FALSE for it to stop at the end of @p obj's internal - * list of items - * - * @note elm_slideshow_next() and elm_slideshow_previous() will @b - * ignore what is set by this functions, i.e., they'll @b always - * cycle through items. This affects only the "automatic" - * slideshow, as set by elm_slideshow_timeout_set(). - * - * @see elm_slideshow_loop_get() - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop) EINA_ARG_NONNULL(1); +/** + * Set if, after a slideshow is started, for a given slideshow + * widget, its items should be displayed cyclically or not. + * + * @param obj The slideshow object + * @param loop Use @c EINA_TRUE to make it cycle through items or + * @c EINA_FALSE for it to stop at the end of @p obj's internal + * list of items + * + * @note elm_slideshow_next() and elm_slideshow_previous() will @b + * ignore what is set by this functions, i.e., they'll @b always + * cycle through items. This affects only the "automatic" + * slideshow, as set by elm_slideshow_timeout_set(). + * + * @see elm_slideshow_loop_get() + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop) EINA_ARG_NONNULL(1); - /** - * Get if, after a slideshow is started, for a given slideshow - * widget, its items are to be displayed cyclically or not. - * - * @param obj The slideshow object - * @return @c EINA_TRUE, if the items in @p obj will be cycled - * through or @c EINA_FALSE, otherwise - * - * @see elm_slideshow_loop_set() for more details - * - * @ingroup Slideshow - */ - EAPI Eina_Bool elm_slideshow_loop_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get if, after a slideshow is started, for a given slideshow + * widget, its items are to be displayed cyclically or not. + * + * @param obj The slideshow object + * @return @c EINA_TRUE, if the items in @p obj will be cycled + * through or @c EINA_FALSE, otherwise + * + * @see elm_slideshow_loop_set() for more details + * + * @ingroup Slideshow + */ +EAPI Eina_Bool elm_slideshow_loop_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Remove all items from a given slideshow widget - * - * @param obj The slideshow object - * - * This removes (and deletes) all items in @p obj, leaving it - * empty. - * - * @see elm_slideshow_item_del(), to remove just one item. - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Remove all items from a given slideshow widget + * + * @param obj The slideshow object + * + * This removes (and deletes) all items in @p obj, leaving it + * empty. + * + * @see elm_slideshow_item_del(), to remove just one item. + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the internal list of items in a given slideshow widget. - * - * @param obj The slideshow object - * @return The list of items (#Elm_Object_Item as data) or - * @c NULL on errors. - * - * This list is @b not to be modified in any way and must not be - * freed. Use the list members with functions like - * elm_slideshow_item_del(), elm_slideshow_item_data_get(). - * - * @warning This list is only valid until @p obj object's internal - * items list is changed. It should be fetched again with another - * call to this function when changes happen. - * - * @ingroup Slideshow - */ - EAPI const Eina_List *elm_slideshow_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the internal list of items in a given slideshow widget. + * + * @param obj The slideshow object + * @return The list of items (#Elm_Object_Item as data) or + * @c NULL on errors. + * + * This list is @b not to be modified in any way and must not be + * freed. Use the list members with functions like + * elm_slideshow_item_del(), elm_slideshow_item_data_get(). + * + * @warning This list is only valid until @p obj object's internal + * items list is changed. It should be fetched again with another + * call to this function when changes happen. + * + * @ingroup Slideshow + */ +EAPI const Eina_List *elm_slideshow_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Delete a given item from a slideshow widget. - * - * @param it The slideshow item - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Delete a given item from a slideshow widget. + * + * @param it The slideshow item + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Return the data associated with a given slideshow item - * - * @param it The slideshow item - * @return Returns the data associated to this item - * - * @deprecated use elm_object_item_data_get() instead - * @ingroup Slideshow - */ - EINA_DEPRECATED EAPI void *elm_slideshow_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); +/** + * Return the data associated with a given slideshow item + * + * @param it The slideshow item + * @return Returns the data associated to this item + * + * @deprecated use elm_object_item_data_get() instead + * @ingroup Slideshow + */ +EINA_DEPRECATED EAPI void *elm_slideshow_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Returns the currently displayed item, in a given slideshow widget - * - * @param obj The slideshow object - * @return A handle to the item being displayed in @p obj or - * @c NULL, if none is (and on errors) - * - * @ingroup Slideshow - */ - EAPI Elm_Object_Item *elm_slideshow_item_current_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Returns the currently displayed item, in a given slideshow widget + * + * @param obj The slideshow object + * @return A handle to the item being displayed in @p obj or + * @c NULL, if none is (and on errors) + * + * @ingroup Slideshow + */ +EAPI Elm_Object_Item *elm_slideshow_item_current_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the real Evas object created to implement the view of a - * given slideshow item - * - * @param item The slideshow item. - * @return the Evas object implementing this item's view. - * - * This returns the actual Evas object used to implement the - * specified slideshow 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 slideshow. Do not modify this object (move, resize, - * show, hide, etc.), as the slideshow 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_slideshow_item_data_get() - * - * @ingroup Slideshow - */ - EAPI Evas_Object* elm_slideshow_item_object_get(const Elm_Object_Item* it) EINA_ARG_NONNULL(1); +/** + * Get the real Evas object created to implement the view of a + * given slideshow item + * + * @param item The slideshow item. + * @return the Evas object implementing this item's view. + * + * This returns the actual Evas object used to implement the + * specified slideshow 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 slideshow. Do not modify this object (move, resize, + * show, hide, etc.), as the slideshow 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_slideshow_item_data_get() + * + * @ingroup Slideshow + */ +EAPI Evas_Object *elm_slideshow_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - /** - * Get the the item, in a given slideshow widget, placed at - * position @p nth, in its internal items list - * - * @param obj The slideshow object - * @param nth The number of the item to grab a handle to (0 being - * the first) - * @return The item stored in @p obj at position @p nth or @c NULL, - * if there's no item with that index (and on errors) - * - * @ingroup Slideshow - */ - EAPI Elm_Object_Item *elm_slideshow_item_nth_get(const Evas_Object *obj, unsigned int nth) EINA_ARG_NONNULL(1); +/** + * Get the the item, in a given slideshow widget, placed at + * position @p nth, in its internal items list + * + * @param obj The slideshow object + * @param nth The number of the item to grab a handle to (0 being + * the first) + * @return The item stored in @p obj at position @p nth or @c NULL, + * if there's no item with that index (and on errors) + * + * @ingroup Slideshow + */ +EAPI Elm_Object_Item *elm_slideshow_item_nth_get(const Evas_Object *obj, unsigned int nth) EINA_ARG_NONNULL(1); - /** - * Set the current slide layout in use for a given slideshow widget - * - * @param obj The slideshow object - * @param layout The new layout's name string - * - * If @p layout is implemented in @p obj's theme (i.e., is contained - * in the list returned by elm_slideshow_layouts_get()), this new - * images layout will be used on the widget. - * - * @see elm_slideshow_layouts_get() for more details - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_layout_set(Evas_Object *obj, const char *layout) EINA_ARG_NONNULL(1); +/** + * Set the current slide layout in use for a given slideshow widget + * + * @param obj The slideshow object + * @param layout The new layout's name string + * + * If @p layout is implemented in @p obj's theme (i.e., is contained + * in the list returned by elm_slideshow_layouts_get()), this new + * images layout will be used on the widget. + * + * @see elm_slideshow_layouts_get() for more details + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_layout_set(Evas_Object *obj, const char *layout) EINA_ARG_NONNULL(1); - /** - * Get the current slide layout in use for a given slideshow widget - * - * @param obj The slideshow object - * @return The current layout's name - * - * @see elm_slideshow_layout_set() for more details - * - * @ingroup Slideshow - */ - EAPI const char *elm_slideshow_layout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the current slide layout in use for a given slideshow widget + * + * @param obj The slideshow object + * @return The current layout's name + * + * @see elm_slideshow_layout_set() for more details + * + * @ingroup Slideshow + */ +EAPI const char *elm_slideshow_layout_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Returns the list of @b layout names available, for a given - * slideshow widget. - * - * @param obj The slideshow object - * @return The list of layouts (list of @b stringshared strings - * as data) - * - * Slideshow layouts will change how the widget is to dispose each - * image item in its viewport, with regard to cropping, scaling, - * etc. - * - * The layouts, which come from @p obj's theme, must be an EDC - * data item name @c "layouts" on the theme file, with (prefix) - * names of EDC programs actually implementing them. - * - * The available layouts for slideshows on the default theme are: - * - @c "fullscreen" - item images with original aspect, scaled to - * touch top and down slideshow borders or, if the image's heigh - * is not enough, left and right slideshow borders. - * - @c "not_fullscreen" - the same behavior as the @c "fullscreen" - * one, but always leaving 10% of the slideshow's dimensions of - * distance between the item image's borders and the slideshow - * borders, for each axis. - * - * @warning The stringshared strings get no new references - * exclusive to the user grabbing the list, here, so if you'd like - * to use them out of this call's context, you'd better @c - * eina_stringshare_ref() them. - * - * @see elm_slideshow_layout_set() - * - * @ingroup Slideshow - */ - EAPI const Eina_List *elm_slideshow_layouts_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Returns the list of @b layout names available, for a given + * slideshow widget. + * + * @param obj The slideshow object + * @return The list of layouts (list of @b stringshared strings + * as data) + * + * Slideshow layouts will change how the widget is to dispose each + * image item in its viewport, with regard to cropping, scaling, + * etc. + * + * The layouts, which come from @p obj's theme, must be an EDC + * data item name @c "layouts" on the theme file, with (prefix) + * names of EDC programs actually implementing them. + * + * The available layouts for slideshows on the default theme are: + * - @c "fullscreen" - item images with original aspect, scaled to + * touch top and down slideshow borders or, if the image's heigh + * is not enough, left and right slideshow borders. + * - @c "not_fullscreen" - the same behavior as the @c "fullscreen" + * one, but always leaving 10% of the slideshow's dimensions of + * distance between the item image's borders and the slideshow + * borders, for each axis. + * + * @warning The stringshared strings get no new references + * exclusive to the user grabbing the list, here, so if you'd like + * to use them out of this call's context, you'd better @c + * eina_stringshare_ref() them. + * + * @see elm_slideshow_layout_set() + * + * @ingroup Slideshow + */ +EAPI const Eina_List *elm_slideshow_layouts_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the number of items to cache, on a given slideshow widget, - * before the current item - * - * @param obj The slideshow object - * @param count Number of items to cache before the current one - * - * The default value for this property is @c 2. See - * @ref Slideshow_Caching "slideshow caching" for more details. - * - * @see elm_slideshow_cache_before_get() - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_cache_before_set(Evas_Object *obj, int count) EINA_ARG_NONNULL(1); +/** + * Set the number of items to cache, on a given slideshow widget, + * before the current item + * + * @param obj The slideshow object + * @param count Number of items to cache before the current one + * + * The default value for this property is @c 2. See + * @ref Slideshow_Caching "slideshow caching" for more details. + * + * @see elm_slideshow_cache_before_get() + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_cache_before_set(Evas_Object *obj, int count) EINA_ARG_NONNULL(1); - /** - * Retrieve the number of items to cache, on a given slideshow widget, - * before the current item - * - * @param obj The slideshow object - * @return The number of items set to be cached before the current one - * - * @see elm_slideshow_cache_before_set() for more details - * - * @ingroup Slideshow - */ - EAPI int elm_slideshow_cache_before_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the number of items to cache, on a given slideshow widget, + * before the current item + * + * @param obj The slideshow object + * @return The number of items set to be cached before the current one + * + * @see elm_slideshow_cache_before_set() for more details + * + * @ingroup Slideshow + */ +EAPI int elm_slideshow_cache_before_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the number of items to cache, on a given slideshow widget, - * after the current item - * - * @param obj The slideshow object - * @param count Number of items to cache after the current one - * - * The default value for this property is @c 2. See - * @ref Slideshow_Caching "slideshow caching" for more details. - * - * @see elm_slideshow_cache_after_get() - * - * @ingroup Slideshow - */ - EAPI void elm_slideshow_cache_after_set(Evas_Object *obj, int count) EINA_ARG_NONNULL(1); +/** + * Set the number of items to cache, on a given slideshow widget, + * after the current item + * + * @param obj The slideshow object + * @param count Number of items to cache after the current one + * + * The default value for this property is @c 2. See + * @ref Slideshow_Caching "slideshow caching" for more details. + * + * @see elm_slideshow_cache_after_get() + * + * @ingroup Slideshow + */ +EAPI void elm_slideshow_cache_after_set(Evas_Object *obj, int count) EINA_ARG_NONNULL(1); - /** - * Retrieve the number of items to cache, on a given slideshow widget, - * after the current item - * - * @param obj The slideshow object - * @return The number of items set to be cached after the current one - * - * @see elm_slideshow_cache_after_set() for more details - * - * @ingroup Slideshow - */ - EAPI int elm_slideshow_cache_after_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Retrieve the number of items to cache, on a given slideshow widget, + * after the current item + * + * @param obj The slideshow object + * @return The number of items set to be cached after the current one + * + * @see elm_slideshow_cache_after_set() for more details + * + * @ingroup Slideshow + */ +EAPI int elm_slideshow_cache_after_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the number of items stored in a given slideshow widget - * - * @param obj The slideshow object - * @return The number of items on @p obj, at the moment of this call - * - * @ingroup Slideshow - */ - EAPI unsigned int elm_slideshow_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the number of items stored in a given slideshow widget + * + * @param obj The slideshow object + * @return The number of items on @p obj, at the moment of this call + * + * @ingroup Slideshow + */ +EAPI unsigned int elm_slideshow_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_spinner.h b/legacy/elementary/src/lib/elm_spinner.h index 4275fb06c4..1d34578868 100644 --- a/legacy/elementary/src/lib/elm_spinner.h +++ b/legacy/elementary/src/lib/elm_spinner.h @@ -1,347 +1,348 @@ - /** - * @defgroup Spinner Spinner - * @ingroup Elementary - * - * @image html img/widget/spinner/preview-00.png - * @image latex img/widget/spinner/preview-00.eps - * - * A spinner is a widget which allows the user to increase or decrease - * numeric values using arrow buttons, or edit values directly, clicking - * over it and typing the new value. - * - * By default the spinner will not wrap and has a label - * of "%.0f" (just showing the integer value of the double). - * - * A spinner has a label that is formatted with floating - * point values and thus accepts a printf-style format string, like - * “%1.2f units”. - * - * It also allows specific values to be replaced by pre-defined labels. - * - * Smart callbacks one can register to: - * - * - "changed" - Whenever the spinner value is changed. - * - "delay,changed" - A short time after the value is changed by the user. - * This will be called only when the user stops dragging for a very short - * period or when they release their finger/mouse, so it avoids possibly - * expensive reactions to the value change. - * - * Available styles for it: - * - @c "default"; - * - @c "vertical": up/down buttons at the right side and text left aligned. - * - * Here is an example on its usage: - * @ref spinner_example - */ +/** + * @defgroup Spinner Spinner + * @ingroup Elementary + * + * @image html img/widget/spinner/preview-00.png + * @image latex img/widget/spinner/preview-00.eps + * + * A spinner is a widget which allows the user to increase or decrease + * numeric values using arrow buttons, or edit values directly, clicking + * over it and typing the new value. + * + * By default the spinner will not wrap and has a label + * of "%.0f" (just showing the integer value of the double). + * + * A spinner has a label that is formatted with floating + * point values and thus accepts a printf-style format string, like + * “%1.2f units”. + * + * It also allows specific values to be replaced by pre-defined labels. + * + * Smart callbacks one can register to: + * + * - "changed" - Whenever the spinner value is changed. + * - "delay,changed" - A short time after the value is changed by the user. + * This will be called only when the user stops dragging for a very short + * period or when they release their finger/mouse, so it avoids possibly + * expensive reactions to the value change. + * + * Available styles for it: + * - @c "default"; + * - @c "vertical": up/down buttons at the right side and text left aligned. + * + * Here is an example on its usage: + * @ref spinner_example + */ - /** - * @addtogroup Spinner - * @{ - */ +/** + * @addtogroup Spinner + * @{ + */ - /** - * Add a new spinner widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new spinner widget handle or @c NULL, on errors. - * - * This function inserts a new spinner widget on the canvas. - * - * @ingroup Spinner - * - */ - EAPI Evas_Object *elm_spinner_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * Add a new spinner widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new spinner widget handle or @c NULL, on errors. + * + * This function inserts a new spinner widget on the canvas. + * + * @ingroup Spinner + * + */ +EAPI Evas_Object * + elm_spinner_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Set the format string of the displayed label. - * - * @param obj The spinner object. - * @param fmt The format string for the label display. - * - * If @c NULL, this sets the format to "%.0f". If not it sets the format - * string for the label text. The label text is provided a floating point - * value, so the label text can display up to 1 floating point value. - * Note that this is optional. - * - * Use a format string such as "%1.2f meters" for example, and it will - * display values like: "3.14 meters" for a value equal to 3.14159. - * - * Default is "%0.f". - * - * @see elm_spinner_label_format_get() - * - * @ingroup Spinner - */ - EAPI void elm_spinner_label_format_set(Evas_Object *obj, const char *fmt) EINA_ARG_NONNULL(1); +/** + * Set the format string of the displayed label. + * + * @param obj The spinner object. + * @param fmt The format string for the label display. + * + * If @c NULL, this sets the format to "%.0f". If not it sets the format + * string for the label text. The label text is provided a floating point + * value, so the label text can display up to 1 floating point value. + * Note that this is optional. + * + * Use a format string such as "%1.2f meters" for example, and it will + * display values like: "3.14 meters" for a value equal to 3.14159. + * + * Default is "%0.f". + * + * @see elm_spinner_label_format_get() + * + * @ingroup Spinner + */ +EAPI void elm_spinner_label_format_set(Evas_Object *obj, const char *fmt) EINA_ARG_NONNULL(1); - /** - * Get the label format of the spinner. - * - * @param obj The spinner object. - * @return The text label format string in UTF-8. - * - * @see elm_spinner_label_format_set() for details. - * - * @ingroup Spinner - */ - EAPI const char *elm_spinner_label_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the label format of the spinner. + * + * @param obj The spinner object. + * @return The text label format string in UTF-8. + * + * @see elm_spinner_label_format_set() for details. + * + * @ingroup Spinner + */ +EAPI const char *elm_spinner_label_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the minimum and maximum values for the spinner. - * - * @param obj The spinner object. - * @param min The minimum value. - * @param max The maximum value. - * - * Define the allowed range of values to be selected by the user. - * - * If actual value is less than @p min, it will be updated to @p min. If it - * is bigger then @p max, will be updated to @p max. Actual value can be - * get with elm_spinner_value_get(). - * - * By default, min is equal to 0, and max is equal to 100. - * - * @warning Maximum must be greater than minimum. - * - * @see elm_spinner_min_max_get() - * - * @ingroup Spinner - */ - EAPI void elm_spinner_min_max_set(Evas_Object *obj, double min, double max) EINA_ARG_NONNULL(1); +/** + * Set the minimum and maximum values for the spinner. + * + * @param obj The spinner object. + * @param min The minimum value. + * @param max The maximum value. + * + * Define the allowed range of values to be selected by the user. + * + * If actual value is less than @p min, it will be updated to @p min. If it + * is bigger then @p max, will be updated to @p max. Actual value can be + * get with elm_spinner_value_get(). + * + * By default, min is equal to 0, and max is equal to 100. + * + * @warning Maximum must be greater than minimum. + * + * @see elm_spinner_min_max_get() + * + * @ingroup Spinner + */ +EAPI void elm_spinner_min_max_set(Evas_Object *obj, double min, double max) EINA_ARG_NONNULL(1); - /** - * Get the minimum and maximum values of the spinner. - * - * @param obj The spinner object. - * @param min Pointer where to store the minimum value. - * @param max Pointer where to store the maximum value. - * - * @note If only one value is needed, the other pointer can be passed - * as @c NULL. - * - * @see elm_spinner_min_max_set() for details. - * - * @ingroup Spinner - */ - EAPI void elm_spinner_min_max_get(const Evas_Object *obj, double *min, double *max) EINA_ARG_NONNULL(1); +/** + * Get the minimum and maximum values of the spinner. + * + * @param obj The spinner object. + * @param min Pointer where to store the minimum value. + * @param max Pointer where to store the maximum value. + * + * @note If only one value is needed, the other pointer can be passed + * as @c NULL. + * + * @see elm_spinner_min_max_set() for details. + * + * @ingroup Spinner + */ +EAPI void elm_spinner_min_max_get(const Evas_Object *obj, double *min, double *max) EINA_ARG_NONNULL(1); - /** - * Set the step used to increment or decrement the spinner value. - * - * @param obj The spinner object. - * @param step The step value. - * - * This value will be incremented or decremented to the displayed value. - * It will be incremented while the user keep right or top arrow pressed, - * and will be decremented while the user keep left or bottom arrow pressed. - * - * The interval to increment / decrement can be set with - * elm_spinner_interval_set(). - * - * By default step value is equal to 1. - * - * @see elm_spinner_step_get() - * - * @ingroup Spinner - */ - EAPI void elm_spinner_step_set(Evas_Object *obj, double step) EINA_ARG_NONNULL(1); +/** + * Set the step used to increment or decrement the spinner value. + * + * @param obj The spinner object. + * @param step The step value. + * + * This value will be incremented or decremented to the displayed value. + * It will be incremented while the user keep right or top arrow pressed, + * and will be decremented while the user keep left or bottom arrow pressed. + * + * The interval to increment / decrement can be set with + * elm_spinner_interval_set(). + * + * By default step value is equal to 1. + * + * @see elm_spinner_step_get() + * + * @ingroup Spinner + */ +EAPI void elm_spinner_step_set(Evas_Object *obj, double step) EINA_ARG_NONNULL(1); - /** - * Get the step used to increment or decrement the spinner value. - * - * @param obj The spinner object. - * @return The step value. - * - * @see elm_spinner_step_get() for more details. - * - * @ingroup Spinner - */ - EAPI double elm_spinner_step_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the step used to increment or decrement the spinner value. + * + * @param obj The spinner object. + * @return The step value. + * + * @see elm_spinner_step_get() for more details. + * + * @ingroup Spinner + */ +EAPI double elm_spinner_step_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the value the spinner displays. - * - * @param obj The spinner object. - * @param val The value to be displayed. - * - * Value will be presented on the label following format specified with - * elm_spinner_format_set(). - * - * @warning The value must to be between min and max values. This values - * are set by elm_spinner_min_max_set(). - * - * @see elm_spinner_value_get(). - * @see elm_spinner_format_set(). - * @see elm_spinner_min_max_set(). - * - * @ingroup Spinner - */ - EAPI void elm_spinner_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); +/** + * Set the value the spinner displays. + * + * @param obj The spinner object. + * @param val The value to be displayed. + * + * Value will be presented on the label following format specified with + * elm_spinner_format_set(). + * + * @warning The value must to be between min and max values. This values + * are set by elm_spinner_min_max_set(). + * + * @see elm_spinner_value_get(). + * @see elm_spinner_format_set(). + * @see elm_spinner_min_max_set(). + * + * @ingroup Spinner + */ +EAPI void elm_spinner_value_set(Evas_Object *obj, double val) EINA_ARG_NONNULL(1); - /** - * Get the value displayed by the spinner. - * - * @param obj The spinner object. - * @return The value displayed. - * - * @see elm_spinner_value_set() for details. - * - * @ingroup Spinner - */ - EAPI double elm_spinner_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the value displayed by the spinner. + * + * @param obj The spinner object. + * @return The value displayed. + * + * @see elm_spinner_value_set() for details. + * + * @ingroup Spinner + */ +EAPI double elm_spinner_value_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set whether the spinner should wrap when it reaches its - * minimum or maximum value. - * - * @param obj The spinner object. - * @param wrap @c EINA_TRUE to enable wrap or @c EINA_FALSE to - * disable it. - * - * Disabled by default. If disabled, when the user tries to increment the - * value, - * but displayed value plus step value is bigger than maximum value, - * the spinner - * won't allow it. The same happens when the user tries to decrement it, - * but the value less step is less than minimum value. - * - * When wrap is enabled, in such situations it will allow these changes, - * but will get the value that would be less than minimum and subtracts - * from maximum. Or add the value that would be more than maximum to - * the minimum. - * - * E.g.: - * @li min value = 10 - * @li max value = 50 - * @li step value = 20 - * @li displayed value = 20 - * - * When the user decrement value (using left or bottom arrow), it will - * displays @c 40, because max - (min - (displayed - step)) is - * @c 50 - (@c 10 - (@c 20 - @c 20)) = @c 40. - * - * @see elm_spinner_wrap_get(). - * - * @ingroup Spinner - */ - EAPI void elm_spinner_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1); +/** + * Set whether the spinner should wrap when it reaches its + * minimum or maximum value. + * + * @param obj The spinner object. + * @param wrap @c EINA_TRUE to enable wrap or @c EINA_FALSE to + * disable it. + * + * Disabled by default. If disabled, when the user tries to increment the + * value, + * but displayed value plus step value is bigger than maximum value, + * the spinner + * won't allow it. The same happens when the user tries to decrement it, + * but the value less step is less than minimum value. + * + * When wrap is enabled, in such situations it will allow these changes, + * but will get the value that would be less than minimum and subtracts + * from maximum. Or add the value that would be more than maximum to + * the minimum. + * + * E.g.: + * @li min value = 10 + * @li max value = 50 + * @li step value = 20 + * @li displayed value = 20 + * + * When the user decrement value (using left or bottom arrow), it will + * displays @c 40, because max - (min - (displayed - step)) is + * @c 50 - (@c 10 - (@c 20 - @c 20)) = @c 40. + * + * @see elm_spinner_wrap_get(). + * + * @ingroup Spinner + */ +EAPI void elm_spinner_wrap_set(Evas_Object *obj, Eina_Bool wrap) EINA_ARG_NONNULL(1); - /** - * Get whether the spinner should wrap when it reaches its - * minimum or maximum value. - * - * @param obj The spinner object - * @return @c EINA_TRUE means wrap is enabled. @c EINA_FALSE indicates - * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_spinner_wrap_set() for details. - * - * @ingroup Spinner - */ - EAPI Eina_Bool elm_spinner_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether the spinner should wrap when it reaches its + * minimum or maximum value. + * + * @param obj The spinner object + * @return @c EINA_TRUE means wrap is enabled. @c EINA_FALSE indicates + * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_spinner_wrap_set() for details. + * + * @ingroup Spinner + */ +EAPI Eina_Bool elm_spinner_wrap_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set whether the spinner can be directly edited by the user or not. - * - * @param obj The spinner object. - * @param editable @c EINA_TRUE to allow users to edit it or @c EINA_FALSE to - * don't allow users to edit it directly. - * - * Spinner objects can have edition @b disabled, in which state they will - * be changed only by arrows. - * Useful for contexts - * where you don't want your users to interact with it writting the value. - * Specially - * when using special values, the user can see real value instead - * of special label on edition. - * - * It's enabled by default. - * - * @see elm_spinner_editable_get() - * - * @ingroup Spinner - */ - EAPI void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1); +/** + * Set whether the spinner can be directly edited by the user or not. + * + * @param obj The spinner object. + * @param editable @c EINA_TRUE to allow users to edit it or @c EINA_FALSE to + * don't allow users to edit it directly. + * + * Spinner objects can have edition @b disabled, in which state they will + * be changed only by arrows. + * Useful for contexts + * where you don't want your users to interact with it writting the value. + * Specially + * when using special values, the user can see real value instead + * of special label on edition. + * + * It's enabled by default. + * + * @see elm_spinner_editable_get() + * + * @ingroup Spinner + */ +EAPI void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable) EINA_ARG_NONNULL(1); - /** - * Get whether the spinner can be directly edited by the user or not. - * - * @param obj The spinner object. - * @return @c EINA_TRUE means edition is enabled. @c EINA_FALSE indicates - * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_spinner_editable_set() for details. - * - * @ingroup Spinner - */ - EAPI Eina_Bool elm_spinner_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get whether the spinner can be directly edited by the user or not. + * + * @param obj The spinner object. + * @return @c EINA_TRUE means edition is enabled. @c EINA_FALSE indicates + * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_spinner_editable_set() for details. + * + * @ingroup Spinner + */ +EAPI Eina_Bool elm_spinner_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set a special string to display in the place of the numerical value. - * - * @param obj The spinner object. - * @param value The value to be replaced. - * @param label The label to be used. - * - * It's useful for cases when a user should select an item that is - * better indicated by a label than a value. For example, weekdays or months. - * - * E.g.: - * @code - * sp = elm_spinner_add(win); - * elm_spinner_min_max_set(sp, 1, 3); - * elm_spinner_special_value_add(sp, 1, "January"); - * elm_spinner_special_value_add(sp, 2, "February"); - * elm_spinner_special_value_add(sp, 3, "March"); - * evas_object_show(sp); - * @endcode - * - * @ingroup Spinner - */ - EAPI void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label) EINA_ARG_NONNULL(1); +/** + * Set a special string to display in the place of the numerical value. + * + * @param obj The spinner object. + * @param value The value to be replaced. + * @param label The label to be used. + * + * It's useful for cases when a user should select an item that is + * better indicated by a label than a value. For example, weekdays or months. + * + * E.g.: + * @code + * sp = elm_spinner_add(win); + * elm_spinner_min_max_set(sp, 1, 3); + * elm_spinner_special_value_add(sp, 1, "January"); + * elm_spinner_special_value_add(sp, 2, "February"); + * elm_spinner_special_value_add(sp, 3, "March"); + * evas_object_show(sp); + * @endcode + * + * @ingroup Spinner + */ +EAPI void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label) EINA_ARG_NONNULL(1); - /** - * Set the interval on time updates for an user mouse button hold - * on spinner widgets' arrows. - * - * @param obj The spinner 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 spinner's value. - * - * This helps the user to get to a given value distant from the - * current one easier/faster, as it will start to change quicker and - * quicker on mouse button holds. - * - * The calculation for the next change interval value, starting from - * the one set with this call, is the previous interval divided by - * @c 1.05, so it decreases a little bit. - * - * The default starting interval value for automatic changes is - * @c 0.85 seconds. - * - * @see elm_spinner_interval_get() - * - * @ingroup Spinner - */ - EAPI void elm_spinner_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); +/** + * Set the interval on time updates for an user mouse button hold + * on spinner widgets' arrows. + * + * @param obj The spinner 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 spinner's value. + * + * This helps the user to get to a given value distant from the + * current one easier/faster, as it will start to change quicker and + * quicker on mouse button holds. + * + * The calculation for the next change interval value, starting from + * the one set with this call, is the previous interval divided by + * @c 1.05, so it decreases a little bit. + * + * The default starting interval value for automatic changes is + * @c 0.85 seconds. + * + * @see elm_spinner_interval_get() + * + * @ingroup Spinner + */ +EAPI void elm_spinner_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); - /** - * Get the interval on time updates for an user mouse button hold - * on spinner widgets' arrows. - * - * @param obj The spinner object. - * @return The (first) interval value, in seconds, set on it. - * - * @see elm_spinner_interval_set() for more details. - * - * @ingroup Spinner - */ - EAPI double elm_spinner_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Get the interval on time updates for an user mouse button hold + * on spinner widgets' arrows. + * + * @param obj The spinner object. + * @return The (first) interval value, in seconds, set on it. + * + * @see elm_spinner_interval_set() for more details. + * + * @ingroup Spinner + */ +EAPI double elm_spinner_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_store.h b/legacy/elementary/src/lib/elm_store.h index c99135739e..cb1e091b02 100644 --- a/legacy/elementary/src/lib/elm_store.h +++ b/legacy/elementary/src/lib/elm_store.h @@ -1,112 +1,113 @@ - typedef struct _Elm_Store Elm_Store; - typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem; - typedef struct _Elm_Store_Item Elm_Store_Item; - typedef struct _Elm_Store_Item_Filesystem Elm_Store_Item_Filesystem; - typedef struct _Elm_Store_Item_Info Elm_Store_Item_Info; - typedef struct _Elm_Store_Item_Info_Filesystem Elm_Store_Item_Info_Filesystem; - typedef struct _Elm_Store_Item_Mapping Elm_Store_Item_Mapping; - typedef struct _Elm_Store_Item_Mapping_Empty Elm_Store_Item_Mapping_Empty; - typedef struct _Elm_Store_Item_Mapping_Icon Elm_Store_Item_Mapping_Icon; - typedef struct _Elm_Store_Item_Mapping_Photo Elm_Store_Item_Mapping_Photo; - typedef struct _Elm_Store_Item_Mapping_Custom Elm_Store_Item_Mapping_Custom; +typedef struct _Elm_Store Elm_Store; +typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem; +typedef struct _Elm_Store_Item Elm_Store_Item; +typedef struct _Elm_Store_Item_Filesystem Elm_Store_Item_Filesystem; +typedef struct _Elm_Store_Item_Info Elm_Store_Item_Info; +typedef struct _Elm_Store_Item_Info_Filesystem Elm_Store_Item_Info_Filesystem; +typedef struct _Elm_Store_Item_Mapping Elm_Store_Item_Mapping; +typedef struct _Elm_Store_Item_Mapping_Empty Elm_Store_Item_Mapping_Empty; +typedef struct _Elm_Store_Item_Mapping_Icon Elm_Store_Item_Mapping_Icon; +typedef struct _Elm_Store_Item_Mapping_Photo Elm_Store_Item_Mapping_Photo; +typedef struct _Elm_Store_Item_Mapping_Custom Elm_Store_Item_Mapping_Custom; - typedef Eina_Bool (*Elm_Store_Item_List_Cb) (void *data, Elm_Store_Item_Info *info); - typedef void (*Elm_Store_Item_Fetch_Cb) (void *data, Elm_Store_Item *sti); - typedef void (*Elm_Store_Item_Unfetch_Cb) (void *data, Elm_Store_Item *sti); - typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part); +typedef Eina_Bool (*Elm_Store_Item_List_Cb)(void *data, Elm_Store_Item_Info *info); +typedef void (*Elm_Store_Item_Fetch_Cb)(void *data, Elm_Store_Item *sti); +typedef void (*Elm_Store_Item_Unfetch_Cb)(void *data, Elm_Store_Item *sti); +typedef void *(*Elm_Store_Item_Mapping_Cb)(void *data, Elm_Store_Item *sti, const char *part); - typedef enum - { - ELM_STORE_ITEM_MAPPING_NONE = 0, - ELM_STORE_ITEM_MAPPING_LABEL, // const char * -> label - ELM_STORE_ITEM_MAPPING_STATE, // Eina_Bool -> state - ELM_STORE_ITEM_MAPPING_ICON, // char * -> icon path - ELM_STORE_ITEM_MAPPING_PHOTO, // char * -> photo path - ELM_STORE_ITEM_MAPPING_CUSTOM, // item->custom(it->data, it, part) -> void * (-> any) - // can add more here as needed by common apps - ELM_STORE_ITEM_MAPPING_LAST - } Elm_Store_Item_Mapping_Type; +typedef enum +{ + ELM_STORE_ITEM_MAPPING_NONE = 0, + ELM_STORE_ITEM_MAPPING_LABEL, // const char * -> label + ELM_STORE_ITEM_MAPPING_STATE, // Eina_Bool -> state + ELM_STORE_ITEM_MAPPING_ICON, // char * -> icon path + ELM_STORE_ITEM_MAPPING_PHOTO, // char * -> photo path + ELM_STORE_ITEM_MAPPING_CUSTOM, // item->custom(it->data, it, part) -> void * (-> any) + // can add more here as needed by common apps + ELM_STORE_ITEM_MAPPING_LAST +} Elm_Store_Item_Mapping_Type; - struct _Elm_Store_Item_Mapping_Icon - { - // FIXME: allow edje file icons - int w, h; - Elm_Icon_Lookup_Order lookup_order; - Eina_Bool standard_name : 1; - Eina_Bool no_scale : 1; - Eina_Bool smooth : 1; - Eina_Bool scale_up : 1; - Eina_Bool scale_down : 1; - }; +struct _Elm_Store_Item_Mapping_Icon +{ + // FIXME: allow edje file icons + int w, h; + Elm_Icon_Lookup_Order lookup_order; + Eina_Bool standard_name : 1; + Eina_Bool no_scale : 1; + Eina_Bool smooth : 1; + Eina_Bool scale_up : 1; + Eina_Bool scale_down : 1; +}; - struct _Elm_Store_Item_Mapping_Empty - { - Eina_Bool dummy; - }; +struct _Elm_Store_Item_Mapping_Empty +{ + Eina_Bool dummy; +}; - struct _Elm_Store_Item_Mapping_Photo - { - int size; - }; +struct _Elm_Store_Item_Mapping_Photo +{ + int size; +}; - struct _Elm_Store_Item_Mapping_Custom - { - Elm_Store_Item_Mapping_Cb func; - }; +struct _Elm_Store_Item_Mapping_Custom +{ + Elm_Store_Item_Mapping_Cb func; +}; - struct _Elm_Store_Item_Mapping - { - Elm_Store_Item_Mapping_Type type; - const char *part; - int offset; - union - { - Elm_Store_Item_Mapping_Empty empty; - Elm_Store_Item_Mapping_Icon icon; - Elm_Store_Item_Mapping_Photo photo; - Elm_Store_Item_Mapping_Custom custom; - // add more types here - } details; - }; +struct _Elm_Store_Item_Mapping +{ + Elm_Store_Item_Mapping_Type type; + const char *part; + int offset; + union + { + Elm_Store_Item_Mapping_Empty empty; + Elm_Store_Item_Mapping_Icon icon; + Elm_Store_Item_Mapping_Photo photo; + Elm_Store_Item_Mapping_Custom custom; + // add more types here + } details; +}; - struct _Elm_Store_Item_Info - { - Elm_Genlist_Item_Class *item_class; - const Elm_Store_Item_Mapping *mapping; - void *data; - char *sort_id; - }; +struct _Elm_Store_Item_Info +{ + Elm_Genlist_Item_Class *item_class; + const Elm_Store_Item_Mapping *mapping; + void *data; + char *sort_id; +}; - struct _Elm_Store_Item_Info_Filesystem - { - Elm_Store_Item_Info base; - char *path; - }; +struct _Elm_Store_Item_Info_Filesystem +{ + Elm_Store_Item_Info base; + char *path; +}; #define ELM_STORE_ITEM_MAPPING_END { ELM_STORE_ITEM_MAPPING_NONE, NULL, 0, { .empty = { EINA_TRUE } } } #define ELM_STORE_ITEM_MAPPING_OFFSET(st, it) offsetof(st, it) - EAPI void elm_store_free(Elm_Store *st); +EAPI void elm_store_free(Elm_Store *st); - EAPI Elm_Store *elm_store_filesystem_new(void); - EAPI void elm_store_filesystem_directory_set(Elm_Store *st, const char *dir) EINA_ARG_NONNULL(1); - EAPI const char *elm_store_filesystem_directory_get(const Elm_Store *st) EINA_ARG_NONNULL(1); - EAPI const char *elm_store_item_filesystem_path_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); +EAPI Elm_Store *elm_store_filesystem_new(void); +EAPI void + elm_store_filesystem_directory_set(Elm_Store *st, const char *dir) +EINA_ARG_NONNULL(1); +EAPI const char *elm_store_filesystem_directory_get(const Elm_Store *st) EINA_ARG_NONNULL(1); +EAPI const char *elm_store_item_filesystem_path_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); - EAPI void elm_store_target_genlist_set(Elm_Store *st, Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI void elm_store_target_genlist_set(Elm_Store *st, Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void elm_store_cache_set(Elm_Store *st, int max) EINA_ARG_NONNULL(1); - EAPI int elm_store_cache_get(const Elm_Store *st) EINA_ARG_NONNULL(1); - EAPI void elm_store_list_func_set(Elm_Store *st, Elm_Store_Item_List_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void elm_store_fetch_func_set(Elm_Store *st, Elm_Store_Item_Fetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void elm_store_fetch_thread_set(Elm_Store *st, Eina_Bool use_thread) EINA_ARG_NONNULL(1); - EAPI Eina_Bool elm_store_fetch_thread_get(const Elm_Store *st) EINA_ARG_NONNULL(1); - - EAPI void elm_store_unfetch_func_set(Elm_Store *st, Elm_Store_Item_Unfetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); - EAPI void elm_store_sorted_set(Elm_Store *st, Eina_Bool sorted) EINA_ARG_NONNULL(1); - EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st) EINA_ARG_NONNULL(1); - EAPI void elm_store_item_data_set(Elm_Store_Item *sti, void *data) EINA_ARG_NONNULL(1); - EAPI void *elm_store_item_data_get(Elm_Store_Item *sti) EINA_ARG_NONNULL(1); - EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); - EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); +EAPI void elm_store_cache_set(Elm_Store *st, int max) EINA_ARG_NONNULL(1); +EAPI int elm_store_cache_get(const Elm_Store *st) EINA_ARG_NONNULL(1); +EAPI void elm_store_list_func_set(Elm_Store *st, Elm_Store_Item_List_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +EAPI void elm_store_fetch_func_set(Elm_Store *st, Elm_Store_Item_Fetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +EAPI void elm_store_fetch_thread_set(Elm_Store *st, Eina_Bool use_thread) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_store_fetch_thread_get(const Elm_Store *st) EINA_ARG_NONNULL(1); +EAPI void elm_store_unfetch_func_set(Elm_Store *st, Elm_Store_Item_Unfetch_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); +EAPI void elm_store_sorted_set(Elm_Store *st, Eina_Bool sorted) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_store_sorted_get(const Elm_Store *st) EINA_ARG_NONNULL(1); +EAPI void elm_store_item_data_set(Elm_Store_Item *sti, void *data) EINA_ARG_NONNULL(1); +EAPI void *elm_store_item_data_get(Elm_Store_Item *sti) EINA_ARG_NONNULL(1); +EAPI const Elm_Store *elm_store_item_store_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); +EAPI const Elm_Genlist_Item *elm_store_item_genlist_item_get(const Elm_Store_Item *sti) EINA_ARG_NONNULL(1); diff --git a/legacy/elementary/src/lib/elm_table.h b/legacy/elementary/src/lib/elm_table.h index d804254141..bbee7f15fb 100644 --- a/legacy/elementary/src/lib/elm_table.h +++ b/legacy/elementary/src/lib/elm_table.h @@ -1,129 +1,130 @@ - /** - * @defgroup Table Table - * - * 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). - * - * For a Table widget the row/column count is not fixed. - * The table widget adjusts itself when subobjects are added to it dynamically. - * - * The followin are examples of how to use a table: - * @li @ref tutorial_table_01 - * @li @ref tutorial_table_02 - * - * @{ - */ +/** + * @defgroup Table Table + * + * 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). + * + * For a Table widget the row/column count is not fixed. + * The table widget adjusts itself when subobjects are added to it dynamically. + * + * The followin are examples of how to use a table: + * @li @ref tutorial_table_01 + * @li @ref tutorial_table_02 + * + * @{ + */ - /** - * @brief Add a new table to the parent - * - * @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 Add a new table to the parent + * + * @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 - * - * @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 Set the homogeneous layout in the table + * + * @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 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); +/** + * @brief Get the current table homogeneous mode. + * + * @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); - /** - * @brief Set padding between cells. - * - * @param obj The layout object. - * @param horizontal set the horizontal padding. - * @param vertical set the vertical padding. - * - * Default value is 0. - */ - EAPI void elm_table_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); +/** + * @brief Set padding between cells. + * + * @param obj The layout object. + * @param horizontal set the horizontal padding. + * @param vertical set the vertical padding. + * + * 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. - * - * @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 Get padding between cells. + * + * @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 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 - * - * @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 Add a subobject on the table with the coordinates passed + * + * @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 + * + * @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. - * - * @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 Remove child from table. + * + * @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 table object - * @param clear If true, will delete children, else just remove from table. - */ - EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1); +/** + * @brief Faster way to remove all child objects from a table object. + * + * @param obj The table object + * @param clear If true, will delete children, else just remove from table. + */ +EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1); - /** - * @brief Set the packing location of an existing child of the table - * - * @param subobj The subobject to be modified in the table - * @param x Row number - * @param y Column number - * @param w rowspan - * @param h colspan - * - * Modifies the position of an object already in the table. - * - * @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_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); +/** + * @brief Set the packing location of an existing child of the table + * + * @param subobj The subobject to be modified in the table + * @param x Row number + * @param y Column number + * @param w rowspan + * @param h colspan + * + * Modifies the position of an object already in the table. + * + * @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_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); - /** - * @brief Get the packing location of an existing child of the table - * - * @param subobj The subobject to be modified in the table - * @param x Row number - * @param y Column number - * @param w rowspan - * @param h colspan - * - * @see elm_table_pack_set() - */ - EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * @brief Get the packing location of an existing child of the table + * + * @param subobj The subobject to be modified in the table + * @param x Row number + * @param y Column number + * @param w rowspan + * @param h colspan + * + * @see elm_table_pack_set() + */ +EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_theme.h b/legacy/elementary/src/lib/elm_theme.h index 7640cf339c..8c05b3592d 100644 --- a/legacy/elementary/src/lib/elm_theme.h +++ b/legacy/elementary/src/lib/elm_theme.h @@ -1,378 +1,379 @@ - /** - * @defgroup Theme Theme - * - * 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. - * - * 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. - * - * There are three concepts you need to know to understand how Elementary - * theming works: default theme, extensions and overlays. - * - * 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. - * - * 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. - * - * 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(). - * - * 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" - * - * @{ - */ - /** - * @typedef Elm_Theme - * - * Opaque handler for the list of themes Elementary looks for when - * rendering widgets. - * - * 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; +/** + * @defgroup Theme Theme + * + * 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. + * + * 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. + * + * There are three concepts you need to know to understand how Elementary + * theming works: default theme, extensions and overlays. + * + * 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. + * + * 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. + * + * 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(). + * + * 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" + * + * @{ + */ +/** + * @typedef Elm_Theme + * + * Opaque handler for the list of themes Elementary looks for when + * rendering widgets. + * + * 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 - * - * 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 Elm_Theme *elm_theme_new(void); +/** + * Create a new specific theme + * + * 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 Elm_Theme *elm_theme_new(void); - /** - * Free a specific theme - * - * @param th The theme to free - * - * This frees a theme created with elm_theme_new(). - */ - EAPI void elm_theme_free(Elm_Theme *th); +/** + * Free a specific theme + * + * @param th The theme to free + * + * This frees a theme created with elm_theme_new(). + */ +EAPI void elm_theme_free(Elm_Theme *th); - /** - * Copy the theme fom the source to the destination theme - * - * @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_theme_copy(Elm_Theme *th, Elm_Theme *thdst); +/** + * Copy the theme fom the source to the destination theme + * + * @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_theme_copy(Elm_Theme *th, Elm_Theme *thdst); - /** - * Tell the source theme to reference the ref theme - * - * @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 void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref); +/** + * Tell the source theme to reference the ref theme + * + * @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 void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref); - /** - * Return the theme referred to - * - * @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 Elm_Theme *elm_theme_ref_get(Elm_Theme *th); +/** + * Return the theme referred to + * + * @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 Elm_Theme *elm_theme_ref_get(Elm_Theme *th); - /** - * Return the default theme - * - * @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 Elm_Theme *elm_theme_default_get(void); +/** + * Return the default theme + * + * @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 Elm_Theme *elm_theme_default_get(void); - /** - * Prepends a theme overlay to the list of overlays - * - * @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. - * - * @see elm_theme_extension_add() - */ - EAPI void elm_theme_overlay_add(Elm_Theme *th, const char *item); +/** + * Prepends a theme overlay to the list of overlays + * + * @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. + * + * @see elm_theme_extension_add() + */ +EAPI void elm_theme_overlay_add(Elm_Theme *th, const char *item); - /** - * Delete a theme overlay from the list of overlays - * - * @param th The theme to delete from, or if NULL, the default theme - * @param item The name of the theme overlay - * - * @see elm_theme_overlay_add() - */ - EAPI void elm_theme_overlay_del(Elm_Theme *th, const char *item); +/** + * Delete a theme overlay from the list of overlays + * + * @param th The theme to delete from, or if NULL, the default theme + * @param item The name of the theme overlay + * + * @see elm_theme_overlay_add() + */ +EAPI void elm_theme_overlay_del(Elm_Theme *th, const char *item); - /** - * Appends a theme extension to the list of extensions. - * - * @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. - * - * @see elm_object_style_set() - */ - EAPI void elm_theme_extension_add(Elm_Theme *th, const char *item); +/** + * Appends a theme extension to the list of extensions. + * + * @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. + * + * @see elm_object_style_set() + */ +EAPI void elm_theme_extension_add(Elm_Theme *th, const char *item); - /** - * Deletes a theme extension from the list of extensions. - * - * @param th The theme to delete from, or if NULL, the default theme - * @param item The name of the theme extension - * - * @see elm_theme_extension_add() - */ - EAPI void elm_theme_extension_del(Elm_Theme *th, const char *item); +/** + * Deletes a theme extension from the list of extensions. + * + * @param th The theme to delete from, or if NULL, the default theme + * @param item The name of the theme extension + * + * @see elm_theme_extension_add() + */ +EAPI void elm_theme_extension_del(Elm_Theme *th, const char *item); - /** - * Set the theme search order for the given theme - * - * @param th The theme to set the search order, or if NULL, the default theme - * @param theme Theme search string - * - * This sets the search string for the theme in path-notation from first - * theme to search, to last, delimited by the : character. Example: - * - * "shiny:/path/to/file.edj:default" - * - * See the ELM_THEME environment variable for more information. - * - * @see elm_theme_get() - * @see elm_theme_list_get() - */ - EAPI void elm_theme_set(Elm_Theme *th, const char *theme); +/** + * Set the theme search order for the given theme + * + * @param th The theme to set the search order, or if NULL, the default theme + * @param theme Theme search string + * + * This sets the search string for the theme in path-notation from first + * theme to search, to last, delimited by the : character. Example: + * + * "shiny:/path/to/file.edj:default" + * + * See the ELM_THEME environment variable for more information. + * + * @see elm_theme_get() + * @see elm_theme_list_get() + */ +EAPI void elm_theme_set(Elm_Theme *th, const char *theme); - /** - * Return the theme search order - * - * @param th The theme to get the search order, or if NULL, the default theme - * @return The internal search order path - * - * This function returns a colon separated string of theme elements as - * returned by elm_theme_list_get(). - * - * @see elm_theme_set() - * @see elm_theme_list_get() - */ - EAPI const char *elm_theme_get(Elm_Theme *th); +/** + * Return the theme search order + * + * @param th The theme to get the search order, or if NULL, the default theme + * @return The internal search order path + * + * This function returns a colon separated string of theme elements as + * returned by elm_theme_list_get(). + * + * @see elm_theme_set() + * @see elm_theme_list_get() + */ +EAPI const char *elm_theme_get(Elm_Theme *th); - /** - * Return a list of theme elements to be used in a theme. - * - * @param th Theme to get the list of theme elements from. - * @return The internal list of theme elements - * - * 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. - * - * 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. - * - * @see elm_theme_set() - * @see elm_theme_get() - */ - EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th); +/** + * Return a list of theme elements to be used in a theme. + * + * @param th Theme to get the list of theme elements from. + * @return The internal list of theme elements + * + * 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. + * + * 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. + * + * @see elm_theme_set() + * @see elm_theme_get() + */ +EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th); - /** - * Return the full patrh for a theme element - * - * @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. - * - * 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 char *elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path); +/** + * Return the full patrh for a theme element + * + * @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. + * + * 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 char *elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path); - /** - * Flush the current theme. - * - * @param th Theme to flush - * - * 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 void elm_theme_flush(Elm_Theme *th); +/** + * Flush the current theme. + * + * @param th Theme to flush + * + * 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 void elm_theme_flush(Elm_Theme *th); - /** - * This flushes all themes (default and specific ones). - * - * This will flush all themes in the current application context, by calling - * elm_theme_flush() on each of them. - */ - EAPI void elm_theme_full_flush(void); +/** + * This flushes all themes (default and specific ones). + * + * This will flush all themes in the current application context, by calling + * elm_theme_flush() on each of them. + */ +EAPI void elm_theme_full_flush(void); - /** - * Set the theme for all elementary using applications on the current display - * - * @param theme The name of the theme to use. Format same as the ELM_THEME - * environment variable. - */ - EAPI void elm_theme_all_set(const char *theme); +/** + * Set the theme for all elementary using applications on the current display + * + * @param theme The name of the theme to use. Format same as the ELM_THEME + * environment variable. + */ +EAPI void elm_theme_all_set(const char *theme); - /** - * Return a list of theme elements in the theme search path - * - * @return A list of strings that are the theme element names. - * - * 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 Eina_List *elm_theme_name_available_list_new(void); +/** + * Return a list of theme elements in the theme search path + * + * @return A list of strings that are the theme element names. + * + * 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 Eina_List *elm_theme_name_available_list_new(void); - /** - * Free the list returned by elm_theme_name_available_list_new() - * - * 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_theme_name_available_list_free(Eina_List *list); +/** + * Free the list returned by elm_theme_name_available_list_new() + * + * 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_theme_name_available_list_free(Eina_List *list); - /** - * Set a specific theme to be used for this object and its children - * - * @param obj The object to set the theme on - * @param th The theme to set - * - * 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 void elm_object_theme_set(Evas_Object *obj, Elm_Theme *th) EINA_ARG_NONNULL(1); +/** + * Set a specific theme to be used for this object and its children + * + * @param obj The object to set the theme on + * @param th The theme to set + * + * 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 void + elm_object_theme_set(Evas_Object *obj, Elm_Theme *th) +EINA_ARG_NONNULL(1); - /** - * Get the specific theme to be used - * - * @param obj The object to get the specific theme from - * @return The specifc theme set. - * - * 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 Elm_Theme *elm_object_theme_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the specific theme to be used + * + * @param obj The object to get the specific theme from + * @return The specifc theme set. + * + * 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 Elm_Theme *elm_object_theme_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get a data item from a theme - * - * @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 - * - * 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 const char *elm_theme_data_get(Elm_Theme *th, const char *key) EINA_ARG_NONNULL(2); - - /** - * @} - */ +/** + * Get a data item from a theme + * + * @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 + * + * 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 const char *elm_theme_data_get(Elm_Theme *th, const char *key) EINA_ARG_NONNULL(2); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_thumb.h b/legacy/elementary/src/lib/elm_thumb.h index ca539b3cc7..dc4717a2ba 100644 --- a/legacy/elementary/src/lib/elm_thumb.h +++ b/legacy/elementary/src/lib/elm_thumb.h @@ -1,263 +1,264 @@ - /** - * @defgroup Thumb Thumb - * - * @image html img/widget/thumb/preview-00.png - * @image latex img/widget/thumb/preview-00.eps - * - * 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. - * - * 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. - * - * Different config settings will cause different thumbnails to be generated - * even on the same file. - * - * Generated thumbnails are stored under @c $HOME/.thumbnails/. Check the - * Ethumb documentation to change this path, and to see other configuration - * options. - * - * Signals that you can add callbacks for are: - * - * - "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. - * - * available styles: - * - default - * - noframe - * - * An example of use of thumbnail: - * - * - @ref thumb_example_01 - */ +/** + * @defgroup Thumb Thumb + * + * @image html img/widget/thumb/preview-00.png + * @image latex img/widget/thumb/preview-00.eps + * + * 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. + * + * 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. + * + * Different config settings will cause different thumbnails to be generated + * even on the same file. + * + * Generated thumbnails are stored under @c $HOME/.thumbnails/. Check the + * Ethumb documentation to change this path, and to see other configuration + * options. + * + * Signals that you can add callbacks for are: + * + * - "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. + * + * available styles: + * - default + * - noframe + * + * An example of use of thumbnail: + * + * - @ref thumb_example_01 + */ - /** - * @addtogroup Thumb - * @{ - */ +/** + * @addtogroup Thumb + * @{ + */ - /** - * @enum _Elm_Thumb_Animation_Setting - * @typedef Elm_Thumb_Animation_Setting - * - * Used to set if a video thumbnail is animating or not. - * - * @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; +/** + * @enum _Elm_Thumb_Animation_Setting + * @typedef Elm_Thumb_Animation_Setting + * + * Used to set if a video thumbnail is animating or not. + * + * @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. - * - * @param parent The parent object. - * @return The new object or NULL if it cannot be created. - * - * @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); +/** + * Add a new thumb object to the parent. + * + * @param parent The parent object. + * @return The new object or NULL if it cannot be created. + * + * @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(). - * - * If the options didn't change, the thumbnail won't be generated again, but - * the old one will still be used. - * - * @see elm_thumb_file_set() - * - * @ingroup Thumb - */ - EAPI void elm_thumb_reload(Evas_Object *obj) 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(). + * + * If the options didn't change, the thumbnail won't be generated again, but + * the old one will still be used. + * + * @see elm_thumb_file_set() + * + * @ingroup Thumb + */ +EAPI void elm_thumb_reload(Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Set the file that will be used as thumbnail. - * - * @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. - * - * 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(). - * - * @see elm_thumb_file_get() - * @see elm_thumb_reload() - * @see elm_thumb_animate() - * - * @ingroup Thumb - */ - EAPI void elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); +/** + * Set the file that will be used as thumbnail. + * + * @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. + * + * 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(). + * + * @see elm_thumb_file_get() + * @see elm_thumb_reload() + * @see elm_thumb_animate() + * + * @ingroup Thumb + */ +EAPI void elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); - /** - * Get the image or video path and key used to generate the thumbnail. - * - * @param obj The thumb object. - * @param file Pointer to filename. - * @param key Pointer to key. - * - * @see elm_thumb_file_set() - * @see elm_thumb_path_get() - * - * @ingroup Thumb - */ - EAPI void elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1); +/** + * Get the image or video path and key used to generate the thumbnail. + * + * @param obj The thumb object. + * @param file Pointer to filename. + * @param key Pointer to key. + * + * @see elm_thumb_file_set() + * @see elm_thumb_path_get() + * + * @ingroup Thumb + */ +EAPI void elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1); - /** - * Get the path and key to the image or video generated by ethumb. - * - * 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 thumb object. - * @param file Pointer to thumb path. - * @param key Pointer to thumb key. - * - * @see elm_thumb_file_get() - * - * @ingroup Thumb - */ - EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1); +/** + * Get the path and key to the image or video generated by ethumb. + * + * 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 thumb object. + * @param file Pointer to thumb path. + * @param key Pointer to thumb key. + * + * @see elm_thumb_file_get() + * + * @ingroup Thumb + */ +EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1); - /** - * 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 thumb object. - * @param setting The animation setting. - * - * @see elm_thumb_file_set() - * - * @ingroup Thumb - */ - EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s) EINA_ARG_NONNULL(1); +/** + * 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 thumb object. + * @param setting The animation setting. + * + * @see elm_thumb_file_set() + * + * @ingroup Thumb + */ +EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s) EINA_ARG_NONNULL(1); - /** - * Get the animation state for the thumb object. - * - * @param obj The thumb object. - * @return getting The animation setting or @c ELM_THUMB_ANIMATION_LAST, - * on errors. - * - * @see elm_thumb_animate_set() - * - * @ingroup Thumb - */ - EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get the animation state for the thumb object. + * + * @param obj The thumb object. + * @return getting The animation setting or @c ELM_THUMB_ANIMATION_LAST, + * on errors. + * + * @see elm_thumb_animate_set() + * + * @ingroup Thumb + */ +EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Get the ethumb_client handle so custom configuration can be made. - * - * @return Ethumb_Client instance or NULL. - * - * This must be called before the objects are created to be sure no object is - * visible and no generation started. - * - * Example of usage: - * - * @code - * #include - * #ifndef ELM_LIB_QUICKLAUNCH - * EAPI_MAIN int - * elm_main(int argc, char **argv) - * { - * Ethumb_Client *client; - * - * elm_need_ethumb(); - * - * // ... your code - * - * 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 - * - * // 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 void *elm_thumb_ethumb_client_get(void); +/** + * Get the ethumb_client handle so custom configuration can be made. + * + * @return Ethumb_Client instance or NULL. + * + * This must be called before the objects are created to be sure no object is + * visible and no generation started. + * + * Example of usage: + * + * @code + * #include + * #ifndef ELM_LIB_QUICKLAUNCH + * EAPI_MAIN int + * elm_main(int argc, char **argv) + * { + * Ethumb_Client *client; + * + * elm_need_ethumb(); + * + * // ... your code + * + * 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 + * + * // 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 void *elm_thumb_ethumb_client_get(void); - /** - * Get the ethumb_client connection state. - * - * @return EINA_TRUE if the client is connected to the server or EINA_FALSE - * otherwise. - */ - EAPI Eina_Bool elm_thumb_ethumb_client_connected(void); +/** + * Get the ethumb_client connection state. + * + * @return EINA_TRUE if the client is connected to the server or EINA_FALSE + * otherwise. + */ +EAPI Eina_Bool elm_thumb_ethumb_client_connected(void); - /** - * Make the thumbnail 'editable'. - * - * @param obj Thumb object. - * @param set Turn on or off editability. Default is @c EINA_FALSE. - * - * This means the thumbnail is a valid drag target for drag and drop, and can be - * cut or pasted too. - * - * @see elm_thumb_editable_get() - * - * @ingroup Thumb - */ - EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1); +/** + * Make the thumbnail 'editable'. + * + * @param obj Thumb object. + * @param set Turn on or off editability. Default is @c EINA_FALSE. + * + * This means the thumbnail is a valid drag target for drag and drop, and can be + * cut or pasted too. + * + * @see elm_thumb_editable_get() + * + * @ingroup Thumb + */ +EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1); - /** - * Make the thumbnail 'editable'. - * - * @param obj Thumb object. - * @return Editability. - * - * 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 Eina_Bool elm_thumb_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +/** + * Make the thumbnail 'editable'. + * + * @param obj Thumb object. + * @return Editability. + * + * 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 Eina_Bool elm_thumb_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_toolbar.h b/legacy/elementary/src/lib/elm_toolbar.h index 2840403b67..a788a52f3d 100644 --- a/legacy/elementary/src/lib/elm_toolbar.h +++ b/legacy/elementary/src/lib/elm_toolbar.h @@ -1,1310 +1,1311 @@ - /** - * @defgroup Toolbar Toolbar - * @ingroup Elementary - * - * @image html img/widget/toolbar/preview-00.png - * @image latex img/widget/toolbar/preview-00.eps width=\textwidth - * - * @image html img/toolbar.png - * @image latex img/toolbar.eps width=\textwidth - * - * A toolbar is a widget that displays a list of items inside - * a box. It can be scrollable, show a menu with items that don't fit - * to toolbar size or even crop them. - * - * Only one item can be selected at a time. - * - * Items can have multiple states, or show menus when selected by the user. - * - * Smart callbacks one can listen to: - * - "clicked" - when the user clicks on a toolbar item and becomes selected. - * - "language,changed" - when the program language changes - * - * Available styles for it: - * - @c "default" - * - @c "transparent" - no background or shadow, just show the content - * - * Default text parts of the toolbar items that you can use for are: - * @li "default" - label of the toolbar item - * - * Supported elm_object_item common APIs. - * @li elm_object_item_disabled_set - * @li elm_object_item_text_set - * @li elm_object_item_part_text_set - * @li elm_object_item_text_get - * @li elm_object_item_part_text_get - * - * List of examples: - * @li @ref toolbar_example_01 - * @li @ref toolbar_example_02 - * @li @ref toolbar_example_03 - */ - - /** - * @addtogroup Toolbar - * @{ - */ - - /** - * @enum _Elm_Toolbar_Shrink_Mode - * @typedef Elm_Toolbar_Shrink_Mode - * - * Set toolbar's items display behavior, it can be scrollabel, - * show a menu with exceeding items, or simply hide them. - * - * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value - * from elm config. - * - * Values don't work as bitmask, only one can be choosen. - * - * @see elm_toolbar_mode_shrink_set() - * @see elm_toolbar_mode_shrink_get() - * - * @ingroup Toolbar - */ - typedef enum _Elm_Toolbar_Shrink_Mode - { - ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimun size to fit all the items. */ - ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */ - ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */ - ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */ - ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */ - } Elm_Toolbar_Shrink_Mode; - - typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State; /**< State of a Elm_Toolbar_Item. Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del(). */ - - /** - * Add a new toolbar widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new toolbar widget handle or @c NULL, on errors. - * - * This function inserts a new toolbar widget on the canvas. - * - * @ingroup Toolbar - */ - EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent) EINA_ARG_NONNULL(1); - - /** - * Set the icon size, in pixels, to be used by toolbar items. - * - * @param obj The toolbar object - * @param icon_size The icon size in pixels - * - * @note Default value is @c 32. It reads value from elm config. - * - * @see elm_toolbar_icon_size_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size) EINA_ARG_NONNULL(1); - - /** - * Get the icon size, in pixels, to be used by toolbar items. - * - * @param obj The toolbar object. - * @return The icon size in pixels. - * - * @see elm_toolbar_icon_size_set() for details. - * - * @ingroup Toolbar - */ - EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Sets icon lookup order, for toolbar items' icons. - * - * @param obj The toolbar object. - * @param order The icon lookup order. - * - * Icons added before calling this function will not be affected. - * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO. - * - * @see elm_toolbar_icon_order_lookup_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) EINA_ARG_NONNULL(1); - - /** - * Gets the icon lookup order. - * - * @param obj The toolbar object. - * @return The icon lookup order. - * - * @see elm_toolbar_icon_order_lookup_set() for details. - * - * @ingroup Toolbar - */ - 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. - * @param wrap @c EINA_TRUE to disable selection or @c EINA_FALSE to - * enable it. - * - * This will turn off the ability to select items entirely and they will - * neither appear selected nor emit selected signals. The clicked - * callback function will still be called. - * - * Selection is enabled by default. - * - * @see elm_toolbar_no_select_mode_get(). - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1); - - /** - * Set whether the toolbar items' should be selected by the user or not. - * - * @param obj The toolbar object. - * @return @c EINA_TRUE means items can be selected. @c EINA_FALSE indicates - * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_toolbar_no_select_mode_set() for details. - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Append item to the toolbar. - * - * @param obj The toolbar object. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the toolbar, i.e., will - * be set as @b last item. - * - * Items created with this method can be deleted with - * elm_toolbar_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_toolbar_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @see elm_toolbar_item_icon_set() - * @see elm_toolbar_item_del() - * @see elm_toolbar_item_del_cb_set() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - - /** - * Prepend item to the toolbar. - * - * @param obj The toolbar object. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and prepended to the toolbar, i.e., will - * be set as @b first item. - * - * Items created with this method can be deleted with - * elm_toolbar_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_toolbar_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @see elm_toolbar_item_icon_set() - * @see elm_toolbar_item_del() - * @see elm_toolbar_item_del_cb_set() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - - /** - * Insert a new item into the toolbar object before item @p before. - * - * @param obj The toolbar object. - * @param before The toolbar item to insert before. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the toolbar. Its position in - * this toolbar will be just before item @p before. - * - * Items created with this method can be deleted with - * elm_toolbar_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_toolbar_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @see elm_toolbar_item_icon_set() - * @see elm_toolbar_item_del() - * @see elm_toolbar_item_del_cb_set() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - - /** - * Insert a new item into the toolbar object after item @p after. - * - * @param obj The toolbar object. - * @param after The toolbar item to insert after. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the toolbar. Its position in - * this toolbar will be just after item @p after. - * - * Items created with this method can be deleted with - * elm_toolbar_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_toolbar_item_del_cb_set(). - * - * If a function is passed as argument, it will be called everytime this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @see elm_toolbar_item_icon_set() - * @see elm_toolbar_item_del() - * @see elm_toolbar_item_del_cb_set() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - - /** - * Get the first item in the given toolbar widget's list of - * items. - * - * @param obj The toolbar object - * @return The first item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_toolbar_item_append() - * @see elm_toolbar_last_item_get() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the last item in the given toolbar widget's list of - * items. - * - * @param obj The toolbar object - * @return The last item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_toolbar_item_prepend() - * @see elm_toolbar_first_item_get() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the item after @p item in toolbar. - * - * @param it The toolbar item. - * @return The item after @p item, or @c NULL if none or on failure. - * - * @note If it is the last item, @c NULL will be returned. - * - * @see elm_toolbar_item_append() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the item before @p item in toolbar. - * - * @param item The toolbar item. - * @return The item before @p item, or @c NULL if none or on failure. - * - * @note If it is the first item, @c NULL will be returned. - * - * @see elm_toolbar_item_prepend() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the toolbar object from an item. - * - * @param it The item. - * @return The toolbar object. - * - * This returns the toolbar object itself that an item belongs to. - * - * @deprecated use elm_object_item_object_get() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI Evas_Object *elm_toolbar_item_toolbar_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the priority of a toolbar item. - * - * @param it The toolbar item. - * @param priority The item priority. The default is zero. - * - * This is used only when the toolbar shrink mode is set to - * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. - * When space is less than required, items with low priority - * will be removed from the toolbar and added to a dynamically-created menu, - * while items with higher priority will remain on the toolbar, - * with the same order they were added. - * - * @see elm_toolbar_item_priority_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority) EINA_ARG_NONNULL(1); - - /** - * Get the priority of a toolbar item. - * - * @param it The toolbar item. - * @return The @p item priority, or @c 0 on failure. - * - * @see elm_toolbar_item_priority_set() for details. - * - * @ingroup Toolbar - */ - EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the label of item. - * - * @param it The item of toolbar. - * @return The label of item. - * - * The return value is a pointer to the label associated to @p item when - * it was created, with function elm_toolbar_item_append() or similar, - * or later, - * with function elm_toolbar_item_label_set. If no label - * was passed as argument, it will return @c NULL. - * - * @see elm_toolbar_item_label_set() for more details. - * @see elm_toolbar_item_append() - * - * @deprecated use elm_object_item_text_get() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI const char *elm_toolbar_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the label of item. - * - * @param it The item of toolbar. - * @param text The label of item. - * - * The label to be displayed by the item. - * Label will be placed at icons bottom (if set). - * - * If a label was passed as argument on item creation, with function - * elm_toolbar_item_append() or similar, it will be already - * displayed by the item. - * - * @see elm_toolbar_item_label_get() - * @see elm_toolbar_item_append() - * - * @deprecated use elm_object_item_text_set() instead - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI void elm_toolbar_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); - - /** - * Return the data associated with a given toolbar widget item. - * - * @param it The toolbar widget item handle. - * @return The data associated with @p item. - * - * @see elm_toolbar_item_data_set() - * - * @deprecated use elm_object_item_data_get() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI void *elm_toolbar_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the data associated with a given toolbar widget item. - * - * @param it The toolbar widget item handle - * @param data The new data pointer to set to @p item. - * - * This sets new item data on @p item. - * - * @warning The old data pointer won't be touched by this function, so - * the user had better to free that old data himself/herself. - * - * @deprecated use elm_object_item_data_set() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI void elm_toolbar_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); - - /** - * Returns a pointer to a toolbar item by its label. - * - * @param obj The toolbar object. - * @param label The label of the item to find. - * - * @return The pointer to the toolbar item matching @p label or @c NULL - * on failure. - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); - - /* - * Get whether the @p item is selected or not. - * - * @param it The toolbar item. - * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates - * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_toolbar_selected_item_set() for details. - * @see elm_toolbar_item_selected_get() - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the selected state of an item. - * - * @param it The toolbar item - * @param selected The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previosly selected will be unselected. - * Previoulsy selected item can be get with function - * elm_toolbar_selected_item_get(). - * - * Selected items will be highlighted. - * - * @see elm_toolbar_item_selected_get() - * @see elm_toolbar_selected_item_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); - - /** - * Get the selected item. - * - * @param obj The toolbar object. - * @return The selected toolbar item. - * - * The selected item can be unselected with function - * elm_toolbar_item_selected_set(). - * - * The selected item always will be highlighted on toolbar. - * - * @see elm_toolbar_selected_items_get() - * - * @ingroup Toolbar - */ - EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the icon associated with @p item. - * - * @param obj The parent of this item. - * @param it The toolbar item. - * @param icon A string with icon name or the absolute path of an image file. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @see elm_toolbar_icon_order_lookup_set() - * @see elm_toolbar_icon_order_lookup_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon) EINA_ARG_NONNULL(1); - - /** - * Get the string used to set the icon of @p item. - * - * @param it The toolbar item. - * @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_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the object of @p item. - * - * @param it The toolbar item. - * @return The object - * - * @ingroup Toolbar - */ - EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the icon object of @p item. - * - * @param it The toolbar item. - * @return The icon object - * - * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(), - * or elm_toolbar_item_icon_memfile_set() for details. - * - * @ingroup Toolbar - */ - EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the icon associated with @p item to an image in a binary buffer. - * - * @param it 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) - * - * @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 Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key) EINA_ARG_NONNULL(1); - - /** - * Set the icon associated with @p item to an image in a binary buffer. - * - * @param it The toolbar item. - * @param file The file that contains the image - * @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) - * - * @note The icon image set by this function can be changed by - * elm_toolbar_item_icon_set(). - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key) EINA_ARG_NONNULL(1); - - /** - * Delete them item from the toolbar. - * - * @param it The item of toolbar to be deleted. - * - * @see elm_toolbar_item_append() - * @see elm_toolbar_item_del_cb_set() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the function called when a toolbar item is freed. - * - * @param it The item to set the callback on. - * @param func The function called. - * - * If there is a @p func, then it will be called prior item's memory release. - * That will be called with the following arguments: - * @li item's data; - * @li item's Evas object; - * @li item itself; - * - * This way, a data associated to a toolbar item could be properly freed. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); - - /** - * Get a value whether toolbar item is disabled or not. - * - * @param it The item. - * @return The disabled state. - * - * @see elm_toolbar_item_disabled_set() for more details. - * - * @deprecated use elm_object_item_disabled_get() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Sets the disabled/enabled state of a toolbar item. - * - * @param it The item. - * @param disabled The disabled state. - * - * A disabled item cannot be selected or unselected. It will also - * change its appearance (generally greyed out). This sets the - * disabled state (@c EINA_TRUE for disabled, @c EINA_FALSE for - * enabled). - * - * @deprecated use elm_object_item_disabled_set() instead. - * @ingroup Toolbar - */ - EINA_DEPRECATED EAPI void elm_toolbar_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); - - /** - * Set or unset item as a separator. - * - * @param it The toolbar item. - * @param setting @c EINA_TRUE to set item @p item as separator or - * @c EINA_FALSE to unset, i.e., item will be used as a regular item. - * - * Items aren't set as separator by default. - * - * If set as separator it will display separator theme, so won't display - * icons or label. - * - * @see elm_toolbar_item_separator_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator) EINA_ARG_NONNULL(1); - - /** - * Get a value whether item is a separator or not. - * - * @param it The toolbar item. - * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE - * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_toolbar_item_separator_set() for details. - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the shrink state of toolbar @p obj. - * - * @param obj The toolbar object. - * @param shrink_mode Toolbar's items display behavior. - * - * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE, - * but will enforce a minimun size so all the items will fit, won't scroll - * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE, - * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to - * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_mode_shrink_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode) EINA_ARG_NONNULL(1); - - /** - * Get the shrink mode of toolbar @p obj. - * - * @param obj The toolbar object. - * @return Toolbar's items display behavior. - * - * @see elm_toolbar_mode_shrink_set() for details. - * - * @ingroup Toolbar - */ - EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_mode_shrink_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Enable/disable homogeneous mode. - * - * @param obj The toolbar object - * @param homogeneous Assume the items within the toolbar are of the - * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE. - * - * This will enable the homogeneous mode where items are of the same size. - * @see elm_toolbar_homogeneous_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); - - /** - * Get whether the homogeneous mode is enabled. - * - * @param obj The toolbar object. - * @return Assume the items within the toolbar are of the same height - * and width (EINA_TRUE = on, EINA_FALSE = off). - * - * @see elm_toolbar_homogeneous_set() - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the parent object of the toolbar items' menus. - * - * @param obj The toolbar object. - * @param parent The parent of the menu objects. - * - * Each item can be set as item menu, with elm_toolbar_item_menu_set(). - * - * For more details about setting the parent for toolbar menus, see - * elm_menu_parent_set(). - * - * @see elm_menu_parent_set() for details. - * @see elm_toolbar_item_menu_set() for details. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); - - /** - * Get the parent object of the toolbar items' menus. - * - * @param obj The toolbar object. - * @return The parent of the menu objects. - * - * @see elm_toolbar_menu_parent_set() for details. - * - * @ingroup Toolbar - */ - EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the alignment of the items. - * - * @param obj The toolbar object. - * @param align The new alignment, a float between 0.0 - * and 1.0 . - * - * Alignment of toolbar items, from 0.0 to indicates to align - * left, to 1.0 , to align to right. 0.5 centralize - * items. - * - * Centered items by default. - * - * @see elm_toolbar_align_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_align_set(Evas_Object *obj, double align) EINA_ARG_NONNULL(1); - - /** - * Get the alignment of the items. - * - * @param obj The toolbar object. - * @return toolbar items alignment, a float between 0.0 and - * 1.0 . - * - * @see elm_toolbar_align_set() for details. - * - * @ingroup Toolbar - */ - EAPI double elm_toolbar_align_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set whether the toolbar item opens a menu. - * - * @param it The toolbar item. - * @param menu If @c EINA_TRUE, @p item will opens a menu when selected. - * - * A toolbar item can be set to be a menu, using this function. - * - * Once it is set to be a menu, it can be manipulated through the - * menu-like function elm_toolbar_menu_parent_set() and the other - * elm_menu functions, using the Evas_Object @c menu returned by - * elm_toolbar_item_menu_get(). - * - * So, items to be displayed in this item's menu should be added with - * elm_menu_item_add(). - * - * The following code exemplifies the most basic usage: - * @code - * tb = elm_toolbar_add(win) - * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL); - * elm_toolbar_item_menu_set(item, EINA_TRUE); - * elm_toolbar_menu_parent_set(tb, win); - * menu = elm_toolbar_item_menu_get(item); - * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL); - * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL, - * NULL); - * @endcode - * - * @see elm_toolbar_item_menu_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu) EINA_ARG_NONNULL(1); - - /** - * Get toolbar item's menu. - * - * @param it The toolbar item. - * @return Item's menu object or @c NULL on failure. - * - * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(), - * this function will set it. - * - * @see elm_toolbar_item_menu_set() for details. - * - * @ingroup Toolbar - */ - EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Add a new state to @p item. - * - * @param it The toolbar item. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the new state. - * @param func The function to call when the item is clicked when this - * state is selected. - * @param data The data to associate with the state. - * @return The toolbar item state, or @c NULL upon failure. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * States created with this function can be removed with - * elm_toolbar_item_state_del(). - * - * @see elm_toolbar_item_state_del() - * @see elm_toolbar_item_state_sel() - * @see elm_toolbar_item_state_get() - * - * @ingroup Toolbar - */ - EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_add(Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - - /** - * Delete a previoulsy added state to @p item. - * - * @param it The toolbar item. - * @param state The state to be deleted. - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. - * - * @see elm_toolbar_item_state_add() - */ - EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state) EINA_ARG_NONNULL(1); - - /** - * Set @p state as the current state of @p it. - * - * @param it The toolbar item. - * @param state The state to use. - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. - * - * If @p state is @c NULL, it won't select any state and the default item's - * icon and label will be used. It's the same behaviour than - * elm_toolbar_item_state_unser(). - * - * @see elm_toolbar_item_state_unset() - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state) EINA_ARG_NONNULL(1); - - /** - * Unset the state of @p it. - * - * @param it The toolbar item. - * - * The default icon and label from this item will be displayed. - * - * @see elm_toolbar_item_state_set() for more details. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the current state of @p it. - * - * @param it The toolbar item. - * @return The selected state or @c NULL if none is selected or on failure. - * - * @see elm_toolbar_item_state_set() for details. - * @see elm_toolbar_item_state_unset() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ - EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the state after selected state in toolbar's @p item. - * - * @param it The toolbar item to change state. - * @return The state after current state, or @c NULL on failure. - * - * If last state is selected, this function will return first state. - * - * @see elm_toolbar_item_state_set() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ - EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Get the state before selected state in toolbar's @p item. - * - * @param it The toolbar item to change state. - * @return The state before current state, or @c NULL on failure. - * - * If first state is selected, this function will return last state. - * - * @see elm_toolbar_item_state_set() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ - EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the text to be shown in a given toolbar item's tooltips. - * - * @param it toolbar item. - * @param text The text to set in the content. - * - * Setup the text as tooltip to object. The item can have only one tooltip, - * so any previous tooltip data - set with this function or - * elm_toolbar_item_tooltip_content_cb_set() - is removed. - * - * @see elm_object_tooltip_text_set() for more details. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_tooltip_text_set(Elm_Object_Item *it, const char *text) EINA_ARG_NONNULL(1); - - /** - * Set the content to be shown in the tooltip item. - * - * Setup the tooltip to item. The item can have only one tooltip, - * so any previous tooltip data is removed. @p func(with @p data) will - * be called every time that need show the tooltip and it should - * return a valid Evas_Object. This object is then managed fully by - * tooltip system and is deleted when the tooltip is gone. - * - * @param it the toolbar item being attached a tooltip. - * @param func the function used to create 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 @a func, the tooltip is unset with - * elm_toolbar_item_tooltip_unset() or the owner @a item - * dies. This callback receives as the first parameter the - * given @a data, and @c event_info is the item. - * - * @see elm_object_tooltip_content_cb_set() for more details. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); - - /** - * Unset tooltip from item. - * - * @param it toolbar item to remove previously set tooltip. - * - * Remove tooltip from item. The callback provided as del_cb to - * elm_toolbar_item_tooltip_content_cb_set() will be called to notify - * it is not used anymore. - * - * @see elm_object_tooltip_unset() for more details. - * @see elm_toolbar_item_tooltip_content_cb_set() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_tooltip_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Sets a different style for this item tooltip. - * - * @note before you set a style you should define a tooltip with - * elm_toolbar_item_tooltip_content_cb_set() or - * elm_toolbar_item_tooltip_text_set() - * - * @param it toolbar item with tooltip already set. - * @param style the theme style to use (default, transparent, ...) - * - * @see elm_object_tooltip_style_set() for more details. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_tooltip_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get the style for this item tooltip. - * - * @param it toolbar item with tooltip already set. - * @return style the theme style in use, defaults to "default". If the - * object does not have a tooltip set, then NULL is returned. - * - * @see elm_object_tooltip_style_get() for more details. - * @see elm_toolbar_item_tooltip_style_set() - * - * @ingroup Toolbar - */ - EAPI const char *elm_toolbar_item_tooltip_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set the type of mouse pointer/cursor decoration to be shown, - * when the mouse pointer is over the given toolbar widget item - * - * @param it toolbar 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 an - * item with custom cursor set will always show @b that cursor. - * - * 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_toolbar_item_cursor_get() - * @see elm_toolbar_item_cursor_unset() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_cursor_set(Elm_Object_Item *it, 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 toolbar widget item - * - * @param it toolbar 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_toolbar_item_cursor_set() - * @see elm_toolbar_item_cursor_unset() - * - * @ingroup Toolbar - */ - EAPI const char *elm_toolbar_item_cursor_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Unset any custom mouse pointer/cursor decoration set to be - * shown, when the mouse pointer is over the given toolbar widget - * item, thus making it show the @b default cursor again. - * - * @param it a toolbar 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_toolbar_item_cursor_set() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_cursor_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set a different @b style for a given custom cursor set for a - * toolbar item. - * - * @param it toolbar item with custom cursor set - * @param style the theme style to use (e.g. @c "default", - * @c "transparent", etc) - * - * This function only makes sense when one is using custom mouse - * cursor decorations defined in a theme file, which can have, - * given a cursor name/type, alternate styles on it. It - * works analogously as elm_object_cursor_style_set(), but here - * applyed only to toolbar item objects. - * - * @warning Before you set a cursor style you should have definen a - * custom cursor previously on the item, with - * elm_toolbar_item_cursor_set() - * - * @see elm_toolbar_item_cursor_engine_only_set() - * @see elm_toolbar_item_cursor_style_get() - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_cursor_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); - - /** - * Get the current @b style set for a given toolbar item's custom - * cursor - * - * @param it toolbar 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_toolbar_item_cursor_style_set() for more details - * - * @ingroup Toolbar - */ - EAPI const char *elm_toolbar_item_cursor_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Set if the (custom)cursor for a given toolbar item should be - * searched in its theme, also, or should only rely on the - * rendering engine. - * - * @param it 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 toolbar items, with elm_toolbar_item_cursor_set(). - * - * @note By default, cursors will only be looked for between those - * provided by the rendering engine. - * - * @ingroup Toolbar - */ - EAPI void elm_toolbar_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) EINA_ARG_NONNULL(1); - - /** - * Get if the (custom) cursor for a given toolbar item is being - * searched in its theme, also, or is only relying on the rendering - * engine. - * - * @param it a toolbar 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_toolbar_item_cursor_engine_only_set(), for more details - * - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_item_cursor_engine_only_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); - - /** - * Change a toolbar's orientation - * @param obj The toolbar object - * @param vertical If @c EINA_TRUE, the toolbar is vertical - * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. - * @ingroup Toolbar - * @deprecated use elm_toolbar_horizontal_set() instead. - */ - EINA_DEPRECATED EAPI void elm_toolbar_orientation_set(Evas_Object *obj, Eina_Bool vertical) EINA_ARG_NONNULL(1); - - /** - * Change a toolbar's orientation - * @param obj The toolbar object - * @param horizontal If @c EINA_TRUE, the toolbar is horizontal - * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. - * @ingroup Toolbar - */ - EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); - - /** - * Get a toolbar's orientation - * @param obj The toolbar object - * @return If @c EINA_TRUE, the toolbar is vertical - * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. - * @ingroup Toolbar - * @deprecated use elm_toolbar_horizontal_get() instead. - */ - EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_orientation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get a toolbar's orientation - * @param obj The toolbar object - * @return If @c EINA_TRUE, the toolbar is horizontal - * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. - * @ingroup Toolbar - */ - EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the number of items in a toolbar - * @param obj The toolbar object - * @return The number of items in @p obj toolbar - * @ingroup Toolbar - */ - EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_PURE; - /** - * @} - */ - +/** + * @defgroup Toolbar Toolbar + * @ingroup Elementary + * + * @image html img/widget/toolbar/preview-00.png + * @image latex img/widget/toolbar/preview-00.eps width=\textwidth + * + * @image html img/toolbar.png + * @image latex img/toolbar.eps width=\textwidth + * + * A toolbar is a widget that displays a list of items inside + * a box. It can be scrollable, show a menu with items that don't fit + * to toolbar size or even crop them. + * + * Only one item can be selected at a time. + * + * Items can have multiple states, or show menus when selected by the user. + * + * Smart callbacks one can listen to: + * - "clicked" - when the user clicks on a toolbar item and becomes selected. + * - "language,changed" - when the program language changes + * + * Available styles for it: + * - @c "default" + * - @c "transparent" - no background or shadow, just show the content + * + * Default text parts of the toolbar items that you can use for are: + * @li "default" - label of the toolbar item + * + * Supported elm_object_item common APIs. + * @li elm_object_item_disabled_set + * @li elm_object_item_text_set + * @li elm_object_item_part_text_set + * @li elm_object_item_text_get + * @li elm_object_item_part_text_get + * + * List of examples: + * @li @ref toolbar_example_01 + * @li @ref toolbar_example_02 + * @li @ref toolbar_example_03 + */ + +/** + * @addtogroup Toolbar + * @{ + */ + +/** + * @enum _Elm_Toolbar_Shrink_Mode + * @typedef Elm_Toolbar_Shrink_Mode + * + * Set toolbar's items display behavior, it can be scrollabel, + * show a menu with exceeding items, or simply hide them. + * + * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value + * from elm config. + * + * Values don't work as bitmask, only one can be choosen. + * + * @see elm_toolbar_mode_shrink_set() + * @see elm_toolbar_mode_shrink_get() + * + * @ingroup Toolbar + */ +typedef enum _Elm_Toolbar_Shrink_Mode +{ + ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimun size to fit all the items. */ + ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */ + ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */ + ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */ + ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */ +} Elm_Toolbar_Shrink_Mode; + +typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State; /**< State of a Elm_Toolbar_Item. Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del(). */ + +/** + * Add a new toolbar widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new toolbar widget handle or @c NULL, on errors. + * + * This function inserts a new toolbar widget on the canvas. + * + * @ingroup Toolbar + */ +EAPI Evas_Object * + elm_toolbar_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); + +/** + * Set the icon size, in pixels, to be used by toolbar items. + * + * @param obj The toolbar object + * @param icon_size The icon size in pixels + * + * @note Default value is @c 32. It reads value from elm config. + * + * @see elm_toolbar_icon_size_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size) EINA_ARG_NONNULL(1); + +/** + * Get the icon size, in pixels, to be used by toolbar items. + * + * @param obj The toolbar object. + * @return The icon size in pixels. + * + * @see elm_toolbar_icon_size_set() for details. + * + * @ingroup Toolbar + */ +EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Sets icon lookup order, for toolbar items' icons. + * + * @param obj The toolbar object. + * @param order The icon lookup order. + * + * Icons added before calling this function will not be affected. + * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO. + * + * @see elm_toolbar_icon_order_lookup_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order) EINA_ARG_NONNULL(1); + +/** + * Gets the icon lookup order. + * + * @param obj The toolbar object. + * @return The icon lookup order. + * + * @see elm_toolbar_icon_order_lookup_set() for details. + * + * @ingroup Toolbar + */ +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. + * @param wrap @c EINA_TRUE to disable selection or @c EINA_FALSE to + * enable it. + * + * This will turn off the ability to select items entirely and they will + * neither appear selected nor emit selected signals. The clicked + * callback function will still be called. + * + * Selection is enabled by default. + * + * @see elm_toolbar_no_select_mode_get(). + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) EINA_ARG_NONNULL(1); + +/** + * Set whether the toolbar items' should be selected by the user or not. + * + * @param obj The toolbar object. + * @return @c EINA_TRUE means items can be selected. @c EINA_FALSE indicates + * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_toolbar_no_select_mode_set() for details. + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_no_select_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Append item to the toolbar. + * + * @param obj The toolbar object. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the toolbar, i.e., will + * be set as @b last item. + * + * Items created with this method can be deleted with + * elm_toolbar_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_toolbar_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @see elm_toolbar_item_icon_set() + * @see elm_toolbar_item_del() + * @see elm_toolbar_item_del_cb_set() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + +/** + * Prepend item to the toolbar. + * + * @param obj The toolbar object. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and prepended to the toolbar, i.e., will + * be set as @b first item. + * + * Items created with this method can be deleted with + * elm_toolbar_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_toolbar_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @see elm_toolbar_item_icon_set() + * @see elm_toolbar_item_del() + * @see elm_toolbar_item_del_cb_set() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + +/** + * Insert a new item into the toolbar object before item @p before. + * + * @param obj The toolbar object. + * @param before The toolbar item to insert before. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the toolbar. Its position in + * this toolbar will be just before item @p before. + * + * Items created with this method can be deleted with + * elm_toolbar_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_toolbar_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @see elm_toolbar_item_icon_set() + * @see elm_toolbar_item_del() + * @see elm_toolbar_item_del_cb_set() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + +/** + * Insert a new item into the toolbar object after item @p after. + * + * @param obj The toolbar object. + * @param after The toolbar item to insert after. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the toolbar. Its position in + * this toolbar will be just after item @p after. + * + * Items created with this method can be deleted with + * elm_toolbar_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_toolbar_item_del_cb_set(). + * + * If a function is passed as argument, it will be called everytime this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @see elm_toolbar_item_icon_set() + * @see elm_toolbar_item_del() + * @see elm_toolbar_item_del_cb_set() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + +/** + * Get the first item in the given toolbar widget's list of + * items. + * + * @param obj The toolbar object + * @return The first item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_toolbar_item_append() + * @see elm_toolbar_last_item_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the last item in the given toolbar widget's list of + * items. + * + * @param obj The toolbar object + * @return The last item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_toolbar_item_prepend() + * @see elm_toolbar_first_item_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the item after @p item in toolbar. + * + * @param it The toolbar item. + * @return The item after @p item, or @c NULL if none or on failure. + * + * @note If it is the last item, @c NULL will be returned. + * + * @see elm_toolbar_item_append() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the item before @p item in toolbar. + * + * @param item The toolbar item. + * @return The item before @p item, or @c NULL if none or on failure. + * + * @note If it is the first item, @c NULL will be returned. + * + * @see elm_toolbar_item_prepend() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the toolbar object from an item. + * + * @param it The item. + * @return The toolbar object. + * + * This returns the toolbar object itself that an item belongs to. + * + * @deprecated use elm_object_item_object_get() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI Evas_Object *elm_toolbar_item_toolbar_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the priority of a toolbar item. + * + * @param it The toolbar item. + * @param priority The item priority. The default is zero. + * + * This is used only when the toolbar shrink mode is set to + * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. + * When space is less than required, items with low priority + * will be removed from the toolbar and added to a dynamically-created menu, + * while items with higher priority will remain on the toolbar, + * with the same order they were added. + * + * @see elm_toolbar_item_priority_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority) EINA_ARG_NONNULL(1); + +/** + * Get the priority of a toolbar item. + * + * @param it The toolbar item. + * @return The @p item priority, or @c 0 on failure. + * + * @see elm_toolbar_item_priority_set() for details. + * + * @ingroup Toolbar + */ +EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the label of item. + * + * @param it The item of toolbar. + * @return The label of item. + * + * The return value is a pointer to the label associated to @p item when + * it was created, with function elm_toolbar_item_append() or similar, + * or later, + * with function elm_toolbar_item_label_set. If no label + * was passed as argument, it will return @c NULL. + * + * @see elm_toolbar_item_label_set() for more details. + * @see elm_toolbar_item_append() + * + * @deprecated use elm_object_item_text_get() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI const char *elm_toolbar_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the label of item. + * + * @param it The item of toolbar. + * @param text The label of item. + * + * The label to be displayed by the item. + * Label will be placed at icons bottom (if set). + * + * If a label was passed as argument on item creation, with function + * elm_toolbar_item_append() or similar, it will be already + * displayed by the item. + * + * @see elm_toolbar_item_label_get() + * @see elm_toolbar_item_append() + * + * @deprecated use elm_object_item_text_set() instead + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI void elm_toolbar_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); + +/** + * Return the data associated with a given toolbar widget item. + * + * @param it The toolbar widget item handle. + * @return The data associated with @p item. + * + * @see elm_toolbar_item_data_set() + * + * @deprecated use elm_object_item_data_get() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI void *elm_toolbar_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the data associated with a given toolbar widget item. + * + * @param it The toolbar widget item handle + * @param data The new data pointer to set to @p item. + * + * This sets new item data on @p item. + * + * @warning The old data pointer won't be touched by this function, so + * the user had better to free that old data himself/herself. + * + * @deprecated use elm_object_item_data_set() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI void elm_toolbar_item_data_set(Elm_Object_Item *it, const void *data) EINA_ARG_NONNULL(1); + +/** + * Returns a pointer to a toolbar item by its label. + * + * @param obj The toolbar object. + * @param label The label of the item to find. + * + * @return The pointer to the toolbar item matching @p label or @c NULL + * on failure. + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1); + +/* + * Get whether the @p item is selected or not. + * + * @param it The toolbar item. + * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates + * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_toolbar_selected_item_set() for details. + * @see elm_toolbar_item_selected_get() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the selected state of an item. + * + * @param it The toolbar item + * @param selected The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previosly selected will be unselected. + * Previoulsy selected item can be get with function + * elm_toolbar_selected_item_get(). + * + * Selected items will be highlighted. + * + * @see elm_toolbar_item_selected_get() + * @see elm_toolbar_selected_item_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); + +/** + * Get the selected item. + * + * @param obj The toolbar object. + * @return The selected toolbar item. + * + * The selected item can be unselected with function + * elm_toolbar_item_selected_set(). + * + * The selected item always will be highlighted on toolbar. + * + * @see elm_toolbar_selected_items_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the icon associated with @p item. + * + * @param obj The parent of this item. + * @param it The toolbar item. + * @param icon A string with icon name or the absolute path of an image file. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @see elm_toolbar_icon_order_lookup_set() + * @see elm_toolbar_icon_order_lookup_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon) EINA_ARG_NONNULL(1); + +/** + * Get the string used to set the icon of @p item. + * + * @param it The toolbar item. + * @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_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the object of @p item. + * + * @param it The toolbar item. + * @return The object + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the icon object of @p item. + * + * @param it The toolbar item. + * @return The icon object + * + * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(), + * or elm_toolbar_item_icon_memfile_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the icon associated with @p item to an image in a binary buffer. + * + * @param it 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) + * + * @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 Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key) EINA_ARG_NONNULL(1); + +/** + * Set the icon associated with @p item to an image in a binary buffer. + * + * @param it The toolbar item. + * @param file The file that contains the image + * @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) + * + * @note The icon image set by this function can be changed by + * elm_toolbar_item_icon_set(). + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key) EINA_ARG_NONNULL(1); + +/** + * Delete them item from the toolbar. + * + * @param it The item of toolbar to be deleted. + * + * @see elm_toolbar_item_append() + * @see elm_toolbar_item_del_cb_set() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the function called when a toolbar item is freed. + * + * @param it The item to set the callback on. + * @param func The function called. + * + * If there is a @p func, then it will be called prior item's memory release. + * That will be called with the following arguments: + * @li item's data; + * @li item's Evas object; + * @li item itself; + * + * This way, a data associated to a toolbar item could be properly freed. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); + +/** + * Get a value whether toolbar item is disabled or not. + * + * @param it The item. + * @return The disabled state. + * + * @see elm_toolbar_item_disabled_set() for more details. + * + * @deprecated use elm_object_item_disabled_get() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_item_disabled_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Sets the disabled/enabled state of a toolbar item. + * + * @param it The item. + * @param disabled The disabled state. + * + * A disabled item cannot be selected or unselected. It will also + * change its appearance (generally greyed out). This sets the + * disabled state (@c EINA_TRUE for disabled, @c EINA_FALSE for + * enabled). + * + * @deprecated use elm_object_item_disabled_set() instead. + * @ingroup Toolbar + */ +EINA_DEPRECATED EAPI void elm_toolbar_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled) EINA_ARG_NONNULL(1); + +/** + * Set or unset item as a separator. + * + * @param it The toolbar item. + * @param setting @c EINA_TRUE to set item @p item as separator or + * @c EINA_FALSE to unset, i.e., item will be used as a regular item. + * + * Items aren't set as separator by default. + * + * If set as separator it will display separator theme, so won't display + * icons or label. + * + * @see elm_toolbar_item_separator_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator) EINA_ARG_NONNULL(1); + +/** + * Get a value whether item is a separator or not. + * + * @param it The toolbar item. + * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE + * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_toolbar_item_separator_set() for details. + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the shrink state of toolbar @p obj. + * + * @param obj The toolbar object. + * @param shrink_mode Toolbar's items display behavior. + * + * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE, + * but will enforce a minimun size so all the items will fit, won't scroll + * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE, + * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to + * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_mode_shrink_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode) EINA_ARG_NONNULL(1); + +/** + * Get the shrink mode of toolbar @p obj. + * + * @param obj The toolbar object. + * @return Toolbar's items display behavior. + * + * @see elm_toolbar_mode_shrink_set() for details. + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_mode_shrink_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Enable/disable homogeneous mode. + * + * @param obj The toolbar object + * @param homogeneous Assume the items within the toolbar are of the + * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE. + * + * This will enable the homogeneous mode where items are of the same size. + * @see elm_toolbar_homogeneous_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) EINA_ARG_NONNULL(1); + +/** + * Get whether the homogeneous mode is enabled. + * + * @param obj The toolbar object. + * @return Assume the items within the toolbar are of the same height + * and width (EINA_TRUE = on, EINA_FALSE = off). + * + * @see elm_toolbar_homogeneous_set() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the parent object of the toolbar items' menus. + * + * @param obj The toolbar object. + * @param parent The parent of the menu objects. + * + * Each item can be set as item menu, with elm_toolbar_item_menu_set(). + * + * For more details about setting the parent for toolbar menus, see + * elm_menu_parent_set(). + * + * @see elm_menu_parent_set() for details. + * @see elm_toolbar_item_menu_set() for details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1); + +/** + * Get the parent object of the toolbar items' menus. + * + * @param obj The toolbar object. + * @return The parent of the menu objects. + * + * @see elm_toolbar_menu_parent_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the alignment of the items. + * + * @param obj The toolbar object. + * @param align The new alignment, a float between 0.0 + * and 1.0 . + * + * Alignment of toolbar items, from 0.0 to indicates to align + * left, to 1.0 , to align to right. 0.5 centralize + * items. + * + * Centered items by default. + * + * @see elm_toolbar_align_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_align_set(Evas_Object *obj, double align) EINA_ARG_NONNULL(1); + +/** + * Get the alignment of the items. + * + * @param obj The toolbar object. + * @return toolbar items alignment, a float between 0.0 and + * 1.0 . + * + * @see elm_toolbar_align_set() for details. + * + * @ingroup Toolbar + */ +EAPI double elm_toolbar_align_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set whether the toolbar item opens a menu. + * + * @param it The toolbar item. + * @param menu If @c EINA_TRUE, @p item will opens a menu when selected. + * + * A toolbar item can be set to be a menu, using this function. + * + * Once it is set to be a menu, it can be manipulated through the + * menu-like function elm_toolbar_menu_parent_set() and the other + * elm_menu functions, using the Evas_Object @c menu returned by + * elm_toolbar_item_menu_get(). + * + * So, items to be displayed in this item's menu should be added with + * elm_menu_item_add(). + * + * The following code exemplifies the most basic usage: + * @code + * tb = elm_toolbar_add(win) + * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL); + * elm_toolbar_item_menu_set(item, EINA_TRUE); + * elm_toolbar_menu_parent_set(tb, win); + * menu = elm_toolbar_item_menu_get(item); + * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL); + * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL, + * NULL); + * @endcode + * + * @see elm_toolbar_item_menu_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu) EINA_ARG_NONNULL(1); + +/** + * Get toolbar item's menu. + * + * @param it The toolbar item. + * @return Item's menu object or @c NULL on failure. + * + * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(), + * this function will set it. + * + * @see elm_toolbar_item_menu_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Add a new state to @p item. + * + * @param it The toolbar item. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the new state. + * @param func The function to call when the item is clicked when this + * state is selected. + * @param data The data to associate with the state. + * @return The toolbar item state, or @c NULL upon failure. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * States created with this function can be removed with + * elm_toolbar_item_state_del(). + * + * @see elm_toolbar_item_state_del() + * @see elm_toolbar_item_state_sel() + * @see elm_toolbar_item_state_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_add(Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + +/** + * Delete a previoulsy added state to @p item. + * + * @param it The toolbar item. + * @param state The state to be deleted. + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. + * + * @see elm_toolbar_item_state_add() + */ +EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state) EINA_ARG_NONNULL(1); + +/** + * Set @p state as the current state of @p it. + * + * @param it The toolbar item. + * @param state The state to use. + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. + * + * If @p state is @c NULL, it won't select any state and the default item's + * icon and label will be used. It's the same behaviour than + * elm_toolbar_item_state_unser(). + * + * @see elm_toolbar_item_state_unset() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state) EINA_ARG_NONNULL(1); + +/** + * Unset the state of @p it. + * + * @param it The toolbar item. + * + * The default icon and label from this item will be displayed. + * + * @see elm_toolbar_item_state_set() for more details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the current state of @p it. + * + * @param it The toolbar item. + * @return The selected state or @c NULL if none is selected or on failure. + * + * @see elm_toolbar_item_state_set() for details. + * @see elm_toolbar_item_state_unset() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the state after selected state in toolbar's @p item. + * + * @param it The toolbar item to change state. + * @return The state after current state, or @c NULL on failure. + * + * If last state is selected, this function will return first state. + * + * @see elm_toolbar_item_state_set() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Get the state before selected state in toolbar's @p item. + * + * @param it The toolbar item to change state. + * @return The state before current state, or @c NULL on failure. + * + * If first state is selected, this function will return last state. + * + * @see elm_toolbar_item_state_set() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the text to be shown in a given toolbar item's tooltips. + * + * @param it toolbar item. + * @param text The text to set in the content. + * + * Setup the text as tooltip to object. The item can have only one tooltip, + * so any previous tooltip data - set with this function or + * elm_toolbar_item_tooltip_content_cb_set() - is removed. + * + * @see elm_object_tooltip_text_set() for more details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_tooltip_text_set(Elm_Object_Item *it, const char *text) EINA_ARG_NONNULL(1); + +/** + * Set the content to be shown in the tooltip item. + * + * Setup the tooltip to item. The item can have only one tooltip, + * so any previous tooltip data is removed. @p func(with @p data) will + * be called every time that need show the tooltip and it should + * return a valid Evas_Object. This object is then managed fully by + * tooltip system and is deleted when the tooltip is gone. + * + * @param it the toolbar item being attached a tooltip. + * @param func the function used to create 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 @a func, the tooltip is unset with + * elm_toolbar_item_tooltip_unset() or the owner @a item + * dies. This callback receives as the first parameter the + * given @a data, and @c event_info is the item. + * + * @see elm_object_tooltip_content_cb_set() for more details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); + +/** + * Unset tooltip from item. + * + * @param it toolbar item to remove previously set tooltip. + * + * Remove tooltip from item. The callback provided as del_cb to + * elm_toolbar_item_tooltip_content_cb_set() will be called to notify + * it is not used anymore. + * + * @see elm_object_tooltip_unset() for more details. + * @see elm_toolbar_item_tooltip_content_cb_set() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_tooltip_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Sets a different style for this item tooltip. + * + * @note before you set a style you should define a tooltip with + * elm_toolbar_item_tooltip_content_cb_set() or + * elm_toolbar_item_tooltip_text_set() + * + * @param it toolbar item with tooltip already set. + * @param style the theme style to use (default, transparent, ...) + * + * @see elm_object_tooltip_style_set() for more details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_tooltip_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); + +/** + * Get the style for this item tooltip. + * + * @param it toolbar item with tooltip already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a tooltip set, then NULL is returned. + * + * @see elm_object_tooltip_style_get() for more details. + * @see elm_toolbar_item_tooltip_style_set() + * + * @ingroup Toolbar + */ +EAPI const char *elm_toolbar_item_tooltip_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set the type of mouse pointer/cursor decoration to be shown, + * when the mouse pointer is over the given toolbar widget item + * + * @param it toolbar 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 an + * item with custom cursor set will always show @b that cursor. + * + * 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_toolbar_item_cursor_get() + * @see elm_toolbar_item_cursor_unset() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_cursor_set(Elm_Object_Item *it, 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 toolbar widget item + * + * @param it toolbar 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_toolbar_item_cursor_set() + * @see elm_toolbar_item_cursor_unset() + * + * @ingroup Toolbar + */ +EAPI const char *elm_toolbar_item_cursor_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Unset any custom mouse pointer/cursor decoration set to be + * shown, when the mouse pointer is over the given toolbar widget + * item, thus making it show the @b default cursor again. + * + * @param it a toolbar 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_toolbar_item_cursor_set() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_cursor_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set a different @b style for a given custom cursor set for a + * toolbar item. + * + * @param it toolbar item with custom cursor set + * @param style the theme style to use (e.g. @c "default", + * @c "transparent", etc) + * + * This function only makes sense when one is using custom mouse + * cursor decorations defined in a theme file, which can have, + * given a cursor name/type, alternate styles on it. It + * works analogously as elm_object_cursor_style_set(), but here + * applyed only to toolbar item objects. + * + * @warning Before you set a cursor style you should have definen a + * custom cursor previously on the item, with + * elm_toolbar_item_cursor_set() + * + * @see elm_toolbar_item_cursor_engine_only_set() + * @see elm_toolbar_item_cursor_style_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_cursor_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); + +/** + * Get the current @b style set for a given toolbar item's custom + * cursor + * + * @param it toolbar 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_toolbar_item_cursor_style_set() for more details + * + * @ingroup Toolbar + */ +EAPI const char *elm_toolbar_item_cursor_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Set if the (custom)cursor for a given toolbar item should be + * searched in its theme, also, or should only rely on the + * rendering engine. + * + * @param it 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 toolbar items, with elm_toolbar_item_cursor_set(). + * + * @note By default, cursors will only be looked for between those + * provided by the rendering engine. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) EINA_ARG_NONNULL(1); + +/** + * Get if the (custom) cursor for a given toolbar item is being + * searched in its theme, also, or is only relying on the rendering + * engine. + * + * @param it a toolbar 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_toolbar_item_cursor_engine_only_set(), for more details + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_cursor_engine_only_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + +/** + * Change a toolbar's orientation + * @param obj The toolbar object + * @param vertical If @c EINA_TRUE, the toolbar is vertical + * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. + * @ingroup Toolbar + * @deprecated use elm_toolbar_horizontal_set() instead. + */ +EINA_DEPRECATED EAPI void elm_toolbar_orientation_set(Evas_Object *obj, Eina_Bool vertical) EINA_ARG_NONNULL(1); + +/** + * Change a toolbar's orientation + * @param obj The toolbar object + * @param horizontal If @c EINA_TRUE, the toolbar is horizontal + * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. + * @ingroup Toolbar + */ +EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1); + +/** + * Get a toolbar's orientation + * @param obj The toolbar object + * @return If @c EINA_TRUE, the toolbar is vertical + * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. + * @ingroup Toolbar + * @deprecated use elm_toolbar_horizontal_get() instead. + */ +EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_orientation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get a toolbar's orientation + * @param obj The toolbar object + * @return If @c EINA_TRUE, the toolbar is horizontal + * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the number of items in a toolbar + * @param obj The toolbar object + * @return The number of items in @p obj toolbar + * @ingroup Toolbar + */ +EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_PURE; +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_tooltip.h b/legacy/elementary/src/lib/elm_tooltip.h index 0725b5315f..667dba2deb 100644 --- a/legacy/elementary/src/lib/elm_tooltip.h +++ b/legacy/elementary/src/lib/elm_tooltip.h @@ -1,46 +1,47 @@ - /** - * @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. - * - * @{ - */ +/** + * @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. + * + * @{ + */ - /** - * Called back when a widget's tooltip is activated and needs content. - * @param data user-data given to elm_object_tooltip_content_cb_set() - * @param obj owner widget. - * @param tooltip The tooltip object (affix content to this!) - */ - typedef Evas_Object *(*Elm_Tooltip_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip); - - /** - * Called back when a widget's item tooltip is activated and needs content. - * @param data user-data given to elm_object_tooltip_content_cb_set() - * @param obj owner widget. - * @param tooltip The tooltip object (affix content to this!) - * @param item context dependent item. As an example, if tooltip was - * set on Elm_List_Item, then it is of this type. - */ - typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item); +/** + * Called back when a widget's tooltip is activated and needs content. + * @param data user-data given to elm_object_tooltip_content_cb_set() + * @param obj owner widget. + * @param tooltip The tooltip object (affix content to this!) + */ +typedef Evas_Object *(*Elm_Tooltip_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip); - 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_hide(Evas_Object *obj) EINA_ARG_NONNULL(1); - EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1, 2); - EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text) EINA_ARG_NONNULL(1, 3); +/** + * Called back when a widget's item tooltip is activated and needs content. + * @param data user-data given to elm_object_tooltip_content_cb_set() + * @param obj owner widget. + * @param tooltip The tooltip object (affix content to this!) + * @param item context dependent item. As an example, if tooltip was + * set on Elm_List_Item, then it is of this type. + */ +typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item); + +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_hide(Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1, 2); +EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text) EINA_ARG_NONNULL(1, 3); #define elm_object_tooltip_translatable_text_set(obj, text) elm_object_tooltip_domain_translatable_text_set((obj), NULL, (text)) - EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) 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_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable) EINA_ARG_NONNULL(1); - EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * @} - */ +EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) 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_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_transit.h b/legacy/elementary/src/lib/elm_transit.h index 2fc54a8680..2cf325ec96 100644 --- a/legacy/elementary/src/lib/elm_transit.h +++ b/legacy/elementary/src/lib/elm_transit.h @@ -1,828 +1,829 @@ - /** - * - * @defgroup Transit Transit - * @ingroup Elementary - * - * Transit is designed to apply various animated transition effects to @c - * Evas_Object, such like translation, rotation, etc. For using these - * effects, create an @ref Elm_Transit and add the desired transition effects. - * - * Once the effects are added into transit, they will be automatically - * managed (their callback will be called until the duration is ended, and - * they will be deleted on completion). - * - * Example: - * @code - * Elm_Transit *trans = elm_transit_add(); - * elm_transit_object_add(trans, obj); - * elm_transit_effect_translation_add(trans, 0, 0, 280, 280 - * elm_transit_duration_set(transit, 1); - * elm_transit_auto_reverse_set(transit, EINA_TRUE); - * elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); - * elm_transit_repeat_times_set(transit, 3); - * @endcode - * - * Some transition effects are used to change the properties of objects. They - * are: - * @li @ref elm_transit_effect_translation_add - * @li @ref elm_transit_effect_color_add - * @li @ref elm_transit_effect_rotation_add - * @li @ref elm_transit_effect_wipe_add - * @li @ref elm_transit_effect_zoom_add - * @li @ref elm_transit_effect_resizing_add - * - * Other transition effects are used to make one object disappear and another - * object appear on its old place. These effects are: - * - * @li @ref elm_transit_effect_flip_add - * @li @ref elm_transit_effect_resizable_flip_add - * @li @ref elm_transit_effect_fade_add - * @li @ref elm_transit_effect_blend_add - * - * It's also possible to make a transition chain with @ref - * elm_transit_chain_transit_add. - * - * @warning We strongly recommend to use elm_transit just when edje can not do - * the trick. Edje has more advantage than Elm_Transit, it has more flexibility and - * animations can be manipulated inside the theme. - * - * List of examples: - * @li @ref transit_example_01_explained - * @li @ref transit_example_02_explained - * @li @ref transit_example_03_c - * @li @ref transit_example_04_c - * - * @{ - */ +/** + * + * @defgroup Transit Transit + * @ingroup Elementary + * + * Transit is designed to apply various animated transition effects to @c + * Evas_Object, such like translation, rotation, etc. For using these + * effects, create an @ref Elm_Transit and add the desired transition effects. + * + * Once the effects are added into transit, they will be automatically + * managed (their callback will be called until the duration is ended, and + * they will be deleted on completion). + * + * Example: + * @code + * Elm_Transit *trans = elm_transit_add(); + * elm_transit_object_add(trans, obj); + * elm_transit_effect_translation_add(trans, 0, 0, 280, 280 + * elm_transit_duration_set(transit, 1); + * elm_transit_auto_reverse_set(transit, EINA_TRUE); + * elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); + * elm_transit_repeat_times_set(transit, 3); + * @endcode + * + * Some transition effects are used to change the properties of objects. They + * are: + * @li @ref elm_transit_effect_translation_add + * @li @ref elm_transit_effect_color_add + * @li @ref elm_transit_effect_rotation_add + * @li @ref elm_transit_effect_wipe_add + * @li @ref elm_transit_effect_zoom_add + * @li @ref elm_transit_effect_resizing_add + * + * Other transition effects are used to make one object disappear and another + * object appear on its old place. These effects are: + * + * @li @ref elm_transit_effect_flip_add + * @li @ref elm_transit_effect_resizable_flip_add + * @li @ref elm_transit_effect_fade_add + * @li @ref elm_transit_effect_blend_add + * + * It's also possible to make a transition chain with @ref + * elm_transit_chain_transit_add. + * + * @warning We strongly recommend to use elm_transit just when edje can not do + * the trick. Edje has more advantage than Elm_Transit, it has more flexibility and + * animations can be manipulated inside the theme. + * + * List of examples: + * @li @ref transit_example_01_explained + * @li @ref transit_example_02_explained + * @li @ref transit_example_03_c + * @li @ref transit_example_04_c + * + * @{ + */ - /** - * @enum Elm_Transit_Tween_Mode - * - * The type of acceleration used in the transition. - */ - typedef enum - { - ELM_TRANSIT_TWEEN_MODE_LINEAR, /**< Constant speed */ - ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL, /**< Starts slow, increase speed - over time, then decrease again - and stop slowly */ - ELM_TRANSIT_TWEEN_MODE_DECELERATE, /**< Starts fast and decrease - speed over time */ - ELM_TRANSIT_TWEEN_MODE_ACCELERATE /**< Starts slow and increase speed - over time */ - } Elm_Transit_Tween_Mode; +/** + * @enum Elm_Transit_Tween_Mode + * + * The type of acceleration used in the transition. + */ +typedef enum +{ + ELM_TRANSIT_TWEEN_MODE_LINEAR, /**< Constant speed */ + ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL, /**< Starts slow, increase speed + over time, then decrease again + and stop slowly */ + ELM_TRANSIT_TWEEN_MODE_DECELERATE, /**< Starts fast and decrease + speed over time */ + ELM_TRANSIT_TWEEN_MODE_ACCELERATE /**< Starts slow and increase speed + over time */ +} Elm_Transit_Tween_Mode; - /** - * @enum Elm_Transit_Effect_Flip_Axis - * - * The axis where flip effect should be applied. - */ - typedef enum - { - ELM_TRANSIT_EFFECT_FLIP_AXIS_X, /**< Flip on X axis */ - ELM_TRANSIT_EFFECT_FLIP_AXIS_Y /**< Flip on Y axis */ - } Elm_Transit_Effect_Flip_Axis; +/** + * @enum Elm_Transit_Effect_Flip_Axis + * + * The axis where flip effect should be applied. + */ +typedef enum +{ + ELM_TRANSIT_EFFECT_FLIP_AXIS_X, /**< Flip on X axis */ + ELM_TRANSIT_EFFECT_FLIP_AXIS_Y /**< Flip on Y axis */ +} Elm_Transit_Effect_Flip_Axis; - /** - * @enum Elm_Transit_Effect_Wipe_Dir - * - * The direction where the wipe effect should occur. - */ - typedef enum - { - ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT, /**< Wipe to the left */ - ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT, /**< Wipe to the right */ - ELM_TRANSIT_EFFECT_WIPE_DIR_UP, /**< Wipe up */ - ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN /**< Wipe down */ - } Elm_Transit_Effect_Wipe_Dir; +/** + * @enum Elm_Transit_Effect_Wipe_Dir + * + * The direction where the wipe effect should occur. + */ +typedef enum +{ + ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT, /**< Wipe to the left */ + ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT, /**< Wipe to the right */ + ELM_TRANSIT_EFFECT_WIPE_DIR_UP, /**< Wipe up */ + ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN /**< Wipe down */ +} Elm_Transit_Effect_Wipe_Dir; - /** @enum Elm_Transit_Effect_Wipe_Type - * - * Whether the wipe effect should show or hide the object. - */ - typedef enum - { - ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, /**< Hide the object during the - animation */ - ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW /**< Show the object during the - animation */ - } Elm_Transit_Effect_Wipe_Type; +/** @enum Elm_Transit_Effect_Wipe_Type + * + * Whether the wipe effect should show or hide the object. + */ +typedef enum +{ + ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, /**< Hide the object during the + animation */ + ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW /**< Show the object during the + animation */ +} Elm_Transit_Effect_Wipe_Type; - /** - * @typedef Elm_Transit - * - * The Transit created with elm_transit_add(). This type has the information - * about the objects which the transition will be applied, and the - * transition effects that will be used. It also contains info about - * duration, number of repetitions, auto-reverse, etc. - */ - typedef struct _Elm_Transit Elm_Transit; - typedef void Elm_Transit_Effect; +/** + * @typedef Elm_Transit + * + * The Transit created with elm_transit_add(). This type has the information + * about the objects which the transition will be applied, and the + * transition effects that will be used. It also contains info about + * duration, number of repetitions, auto-reverse, etc. + */ +typedef struct _Elm_Transit Elm_Transit; +typedef void Elm_Transit_Effect; - /** - * @typedef Elm_Transit_Effect_Transition_Cb - * - * Transition callback called for this effect on each transition iteration. - */ - typedef void (*Elm_Transit_Effect_Transition_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit, double progress); +/** + * @typedef Elm_Transit_Effect_Transition_Cb + * + * Transition callback called for this effect on each transition iteration. + */ +typedef void (*Elm_Transit_Effect_Transition_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress); - /** - * Elm_Transit_Effect_End_Cb - * - * Transition callback called for this effect when the transition is over. - */ - typedef void (*Elm_Transit_Effect_End_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit); +/** + * Elm_Transit_Effect_End_Cb + * + * Transition callback called for this effect when the transition is over. + */ +typedef void (*Elm_Transit_Effect_End_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit); - /** - * Elm_Transit_Del_Cb - * - * A callback called when the transit is deleted. - */ - typedef void (*Elm_Transit_Del_Cb) (void *data, Elm_Transit *transit); +/** + * Elm_Transit_Del_Cb + * + * A callback called when the transit is deleted. + */ +typedef void (*Elm_Transit_Del_Cb)(void *data, Elm_Transit *transit); - /** - * Add new transit. - * - * @note Is not necessary to delete the transit object, it will be deleted at - * the end of its operation. - * @note The transit will start playing when the program enter in the main loop, is not - * necessary to give a start to the transit. - * - * @return The transit object. - * - * @ingroup Transit - */ - EAPI Elm_Transit *elm_transit_add(void); +/** + * Add new transit. + * + * @note Is not necessary to delete the transit object, it will be deleted at + * the end of its operation. + * @note The transit will start playing when the program enter in the main loop, is not + * necessary to give a start to the transit. + * + * @return The transit object. + * + * @ingroup Transit + */ +EAPI Elm_Transit *elm_transit_add(void); - /** - * Stops the animation and delete the @p transit object. - * - * Call this function if you wants to stop the animation before the duration - * time. Make sure the @p transit object is still alive with - * elm_transit_del_cb_set() function. - * All added effects will be deleted, calling its repective data_free_cb - * functions. The function setted by elm_transit_del_cb_set() will be called. - * - * @see elm_transit_del_cb_set() - * - * @param transit The transit object to be deleted. - * - * @ingroup Transit - * @warning Just call this function if you are sure the transit is alive. - */ - EAPI void elm_transit_del(Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Stops the animation and delete the @p transit object. + * + * Call this function if you wants to stop the animation before the duration + * time. Make sure the @p transit object is still alive with + * elm_transit_del_cb_set() function. + * All added effects will be deleted, calling its repective data_free_cb + * functions. The function setted by elm_transit_del_cb_set() will be called. + * + * @see elm_transit_del_cb_set() + * + * @param transit The transit object to be deleted. + * + * @ingroup Transit + * @warning Just call this function if you are sure the transit is alive. + */ +EAPI void + elm_transit_del(Elm_Transit *transit) +EINA_ARG_NONNULL(1); - /** - * Add a new effect to the transit. - * - * @note The cb function and the data are the key to the effect. If you try to - * add an already added effect, nothing is done. - * @note After the first addition of an effect in @p transit, if its - * effect list become empty again, the @p transit will be killed by - * elm_transit_del(transit) function. - * - * Exemple: - * @code - * Elm_Transit *transit = elm_transit_add(); - * elm_transit_effect_add(transit, - * elm_transit_effect_blend_op, - * elm_transit_effect_blend_context_new(), - * elm_transit_effect_blend_context_free); - * @endcode - * - * @param transit The transit object. - * @param transition_cb The operation function. It is called when the - * animation begins, it is the function that actually performs the animation. - * It is called with the @p data, @p transit and the time progression of the - * animation (a double value between 0.0 and 1.0). - * @param effect The context data of the effect. - * @param end_cb The function to free the context data, it will be called - * at the end of the effect, it must finalize the animation and free the - * @p data. - * - * @ingroup Transit - * @warning The transit free the context data at the and of the transition with - * the data_free_cb function, do not use the context data in another transit. - */ - EAPI void elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb) EINA_ARG_NONNULL(1, 2); +/** + * Add a new effect to the transit. + * + * @note The cb function and the data are the key to the effect. If you try to + * add an already added effect, nothing is done. + * @note After the first addition of an effect in @p transit, if its + * effect list become empty again, the @p transit will be killed by + * elm_transit_del(transit) function. + * + * Exemple: + * @code + * Elm_Transit *transit = elm_transit_add(); + * elm_transit_effect_add(transit, + * elm_transit_effect_blend_op, + * elm_transit_effect_blend_context_new(), + * elm_transit_effect_blend_context_free); + * @endcode + * + * @param transit The transit object. + * @param transition_cb The operation function. It is called when the + * animation begins, it is the function that actually performs the animation. + * It is called with the @p data, @p transit and the time progression of the + * animation (a double value between 0.0 and 1.0). + * @param effect The context data of the effect. + * @param end_cb The function to free the context data, it will be called + * at the end of the effect, it must finalize the animation and free the + * @p data. + * + * @ingroup Transit + * @warning The transit free the context data at the and of the transition with + * the data_free_cb function, do not use the context data in another transit. + */ +EAPI void elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb) EINA_ARG_NONNULL(1, 2); - /** - * Delete an added effect. - * - * This function will remove the effect from the @p transit, calling the - * data_free_cb to free the @p data. - * - * @see elm_transit_effect_add() - * - * @note If the effect is not found, nothing is done. - * @note If the effect list become empty, this function will call - * elm_transit_del(transit), that is, it will kill the @p transit. - * - * @param transit The transit object. - * @param transition_cb The operation function. - * @param effect The context data of the effect. - * - * @ingroup Transit - */ - EAPI void elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect) EINA_ARG_NONNULL(1, 2); +/** + * Delete an added effect. + * + * This function will remove the effect from the @p transit, calling the + * data_free_cb to free the @p data. + * + * @see elm_transit_effect_add() + * + * @note If the effect is not found, nothing is done. + * @note If the effect list become empty, this function will call + * elm_transit_del(transit), that is, it will kill the @p transit. + * + * @param transit The transit object. + * @param transition_cb The operation function. + * @param effect The context data of the effect. + * + * @ingroup Transit + */ +EAPI void elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect) EINA_ARG_NONNULL(1, 2); - /** - * Add new object to apply the effects. - * - * @note After the first addition of an object in @p transit, if its - * object list become empty again, the @p transit will be killed by - * elm_transit_del(transit) function. - * @note If the @p obj belongs to another transit, the @p obj will be - * removed from it and it will only belong to the @p transit. If the old - * transit stays without objects, it will die. - * @note When you add an object into the @p transit, its state from - * evas_object_pass_events_get(obj) is saved, and it is applied when the - * transit ends, if you change this state whith evas_object_pass_events_set() - * after add the object, this state will change again when @p transit stops to - * run. - * - * @param transit The transit object. - * @param obj Object to be animated. - * - * @ingroup Transit - * @warning It is not allowed to add a new object after transit begins to go. - */ - EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2); +/** + * Add new object to apply the effects. + * + * @note After the first addition of an object in @p transit, if its + * object list become empty again, the @p transit will be killed by + * elm_transit_del(transit) function. + * @note If the @p obj belongs to another transit, the @p obj will be + * removed from it and it will only belong to the @p transit. If the old + * transit stays without objects, it will die. + * @note When you add an object into the @p transit, its state from + * evas_object_pass_events_get(obj) is saved, and it is applied when the + * transit ends, if you change this state whith evas_object_pass_events_set() + * after add the object, this state will change again when @p transit stops to + * run. + * + * @param transit The transit object. + * @param obj Object to be animated. + * + * @ingroup Transit + * @warning It is not allowed to add a new object after transit begins to go. + */ +EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2); - /** - * Removes an added object from the transit. - * - * @note If the @p obj is not in the @p transit, nothing is done. - * @note If the list become empty, this function will call - * elm_transit_del(transit), that is, it will kill the @p transit. - * - * @param transit The transit object. - * @param obj Object to be removed from @p transit. - * - * @ingroup Transit - * @warning It is not allowed to remove objects after transit begins to go. - */ - EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2); +/** + * Removes an added object from the transit. + * + * @note If the @p obj is not in the @p transit, nothing is done. + * @note If the list become empty, this function will call + * elm_transit_del(transit), that is, it will kill the @p transit. + * + * @param transit The transit object. + * @param obj Object to be removed from @p transit. + * + * @ingroup Transit + * @warning It is not allowed to remove objects after transit begins to go. + */ +EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2); - /** - * Get the objects of the transit. - * - * @param transit The transit object. - * @return a Eina_List with the objects from the transit. - * - * @ingroup Transit - */ - EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the objects of the transit. + * + * @param transit The transit object. + * @return a Eina_List with the objects from the transit. + * + * @ingroup Transit + */ +EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Enable/disable keeping up the objects states. - * If it is not kept, the objects states will be reset when transition ends. - * - * @note @p transit can not be NULL. - * @note One state includes geometry, color, map data. - * - * @param transit The transit object. - * @param state_keep Keeping or Non Keeping. - * - * @ingroup Transit - */ - EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1); +/** + * Enable/disable keeping up the objects states. + * If it is not kept, the objects states will be reset when transition ends. + * + * @note @p transit can not be NULL. + * @note One state includes geometry, color, map data. + * + * @param transit The transit object. + * @param state_keep Keeping or Non Keeping. + * + * @ingroup Transit + */ +EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1); - /** - * Get a value whether the objects states will be reset or not. - * - * @note @p transit can not be NULL - * - * @see elm_transit_objects_final_state_keep_set() - * - * @param transit The transit object. - * @return EINA_TRUE means the states of the objects will be reset. - * If @p transit is NULL, EINA_FALSE is returned - * - * @ingroup Transit - */ - EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get a value whether the objects states will be reset or not. + * + * @note @p transit can not be NULL + * + * @see elm_transit_objects_final_state_keep_set() + * + * @param transit The transit object. + * @return EINA_TRUE means the states of the objects will be reset. + * If @p transit is NULL, EINA_FALSE is returned + * + * @ingroup Transit + */ +EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Set the event enabled when transit is operating. - * - * If @p enabled is EINA_TRUE, the objects of the transit will receives - * events from mouse and keyboard during the animation. - * @note When you add an object with elm_transit_object_add(), its state from - * evas_object_pass_events_get(obj) is saved, and it is applied when the - * transit ends, if you change this state with evas_object_pass_events_set() - * after adding the object, this state will change again when @p transit stops - * to run. - * - * @param transit The transit object. - * @param enabled Events are received when enabled is @c EINA_TRUE, and - * ignored otherwise. - * - * @ingroup Transit - */ - EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1); +/** + * Set the event enabled when transit is operating. + * + * If @p enabled is EINA_TRUE, the objects of the transit will receives + * events from mouse and keyboard during the animation. + * @note When you add an object with elm_transit_object_add(), its state from + * evas_object_pass_events_get(obj) is saved, and it is applied when the + * transit ends, if you change this state with evas_object_pass_events_set() + * after adding the object, this state will change again when @p transit stops + * to run. + * + * @param transit The transit object. + * @param enabled Events are received when enabled is @c EINA_TRUE, and + * ignored otherwise. + * + * @ingroup Transit + */ +EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1); - /** - * Get the value of event enabled status. - * - * @see elm_transit_event_enabled_set() - * - * @param transit The Transit object - * @return EINA_TRUE, when event is enabled. If @p transit is NULL - * EINA_FALSE is returned - * - * @ingroup Transit - */ - EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the value of event enabled status. + * + * @see elm_transit_event_enabled_set() + * + * @param transit The Transit object + * @return EINA_TRUE, when event is enabled. If @p transit is NULL + * EINA_FALSE is returned + * + * @ingroup Transit + */ +EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Set the user-callback function when the transit is deleted. - * - * @note Using this function twice will overwrite the first function setted. - * @note the @p transit object will be deleted after call @p cb function. - * - * @param transit The transit object. - * @param cb Callback function pointer. This function will be called before - * the deletion of the transit. - * @param data Callback funtion user data. It is the @p op parameter. - * - * @ingroup Transit - */ - EAPI void elm_transit_del_cb_set(Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data) EINA_ARG_NONNULL(1); +/** + * Set the user-callback function when the transit is deleted. + * + * @note Using this function twice will overwrite the first function setted. + * @note the @p transit object will be deleted after call @p cb function. + * + * @param transit The transit object. + * @param cb Callback function pointer. This function will be called before + * the deletion of the transit. + * @param data Callback funtion user data. It is the @p op parameter. + * + * @ingroup Transit + */ +EAPI void elm_transit_del_cb_set(Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data) EINA_ARG_NONNULL(1); - /** - * Set reverse effect automatically. - * - * If auto reverse is setted, after running the effects with the progress - * parameter from 0 to 1, it will call the effecs again with the progress - * from 1 to 0. The transit will last for a time iqual to (2 * duration * repeat), - * where the duration was setted with the function elm_transit_add and - * the repeat with the function elm_transit_repeat_times_set(). - * - * @param transit The transit object. - * @param reverse EINA_TRUE means the auto_reverse is on. - * - * @ingroup Transit - */ - EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1); +/** + * Set reverse effect automatically. + * + * If auto reverse is setted, after running the effects with the progress + * parameter from 0 to 1, it will call the effecs again with the progress + * from 1 to 0. The transit will last for a time iqual to (2 * duration * repeat), + * where the duration was setted with the function elm_transit_add and + * the repeat with the function elm_transit_repeat_times_set(). + * + * @param transit The transit object. + * @param reverse EINA_TRUE means the auto_reverse is on. + * + * @ingroup Transit + */ +EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1); - /** - * Get if the auto reverse is on. - * - * @see elm_transit_auto_reverse_set() - * - * @param transit The transit object. - * @return EINA_TRUE means auto reverse is on. If @p transit is NULL - * EINA_FALSE is returned - * - * @ingroup Transit - */ - EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get if the auto reverse is on. + * + * @see elm_transit_auto_reverse_set() + * + * @param transit The transit object. + * @return EINA_TRUE means auto reverse is on. If @p transit is NULL + * EINA_FALSE is returned + * + * @ingroup Transit + */ +EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Set the transit repeat count. Effect will be repeated by repeat count. - * - * This function sets the number of repetition the transit will run after - * the first one, that is, if @p repeat is 1, the transit will run 2 times. - * If the @p repeat is a negative number, it will repeat infinite times. - * - * @note If this function is called during the transit execution, the transit - * will run @p repeat times, ignoring the times it already performed. - * - * @param transit The transit object - * @param repeat Repeat count - * - * @ingroup Transit - */ - EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1); +/** + * Set the transit repeat count. Effect will be repeated by repeat count. + * + * This function sets the number of repetition the transit will run after + * the first one, that is, if @p repeat is 1, the transit will run 2 times. + * If the @p repeat is a negative number, it will repeat infinite times. + * + * @note If this function is called during the transit execution, the transit + * will run @p repeat times, ignoring the times it already performed. + * + * @param transit The transit object + * @param repeat Repeat count + * + * @ingroup Transit + */ +EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1); - /** - * Get the transit repeat count. - * - * @see elm_transit_repeat_times_set() - * - * @param transit The Transit object. - * @return The repeat count. If @p transit is NULL - * 0 is returned - * - * @ingroup Transit - */ - EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the transit repeat count. + * + * @see elm_transit_repeat_times_set() + * + * @param transit The Transit object. + * @return The repeat count. If @p transit is NULL + * 0 is returned + * + * @ingroup Transit + */ +EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Set the transit animation acceleration type. - * - * This function sets the tween mode of the transit that can be: - * ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode. - * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in accelerate mode and ends decelerating. - * ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation will be slowed over time. - * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation will accelerate over time. - * - * @param transit The transit object. - * @param tween_mode The tween type. - * - * @ingroup Transit - */ - EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1); +/** + * Set the transit animation acceleration type. + * + * This function sets the tween mode of the transit that can be: + * ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode. + * ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in accelerate mode and ends decelerating. + * ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation will be slowed over time. + * ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation will accelerate over time. + * + * @param transit The transit object. + * @param tween_mode The tween type. + * + * @ingroup Transit + */ +EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1); - /** - * Get the transit animation acceleration type. - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * @return The tween type. If @p transit is NULL - * ELM_TRANSIT_TWEEN_MODE_LINEAR is returned. - * - * @ingroup Transit - */ - EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the transit animation acceleration type. + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * @return The tween type. If @p transit is NULL + * ELM_TRANSIT_TWEEN_MODE_LINEAR is returned. + * + * @ingroup Transit + */ +EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Set the transit animation time - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * @param duration The animation time. - * - * @ingroup Transit - */ - EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1); +/** + * Set the transit animation time + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * @param duration The animation time. + * + * @ingroup Transit + */ +EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1); - /** - * Get the transit animation time - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * - * @return The transit animation time. - * - * @ingroup Transit - */ - EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the transit animation time + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * + * @return The transit animation time. + * + * @ingroup Transit + */ +EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Starts the transition. - * Once this API is called, the transit begins to measure the time. - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * - * @ingroup Transit - */ - EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Starts the transition. + * Once this API is called, the transit begins to measure the time. + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * + * @ingroup Transit + */ +EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Pause/Resume the transition. - * - * If you call elm_transit_go again, the transit will be started from the - * beginning, and will be unpaused. - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * @param paused Whether the transition should be paused or not. - * - * @ingroup Transit - */ - EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1); +/** + * Pause/Resume the transition. + * + * If you call elm_transit_go again, the transit will be started from the + * beginning, and will be unpaused. + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * @param paused Whether the transition should be paused or not. + * + * @ingroup Transit + */ +EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1); - /** - * Get the value of paused status. - * - * @see elm_transit_paused_set() - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * @return EINA_TRUE means transition is paused. If @p transit is NULL - * EINA_FALSE is returned - * - * @ingroup Transit - */ - EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the value of paused status. + * + * @see elm_transit_paused_set() + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * @return EINA_TRUE means transition is paused. If @p transit is NULL + * EINA_FALSE is returned + * + * @ingroup Transit + */ +EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Get the time progression of the animation (a double value between 0.0 and 1.0). - * - * The value returned is a fraction (current time / total time). It - * represents the progression position relative to the total. - * - * @note @p transit can not be NULL - * - * @param transit The transit object. - * - * @return The time progression value. If @p transit is NULL - * 0 is returned - * - * @ingroup Transit - */ - EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); +/** + * Get the time progression of the animation (a double value between 0.0 and 1.0). + * + * The value returned is a fraction (current time / total time). It + * represents the progression position relative to the total. + * + * @note @p transit can not be NULL + * + * @param transit The transit object. + * + * @return The time progression value. If @p transit is NULL + * 0 is returned + * + * @ingroup Transit + */ +EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1); - /** - * Makes the chain relationship between two transits. - * - * @note @p transit can not be NULL. Transit would have multiple chain transits. - * @note @p chain_transit can not be NULL. Chain transits could be chained to the only one transit. - * - * @param transit The transit object. - * @param chain_transit The chain transit object. This transit will be operated - * after transit is done. - * - * This function adds @p chain_transit transition to a chain after the @p - * transit, and will be started as soon as @p transit ends. See @ref - * transit_example_02_explained for a full example. - * - * @ingroup Transit - */ - EAPI void elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1, 2); +/** + * Makes the chain relationship between two transits. + * + * @note @p transit can not be NULL. Transit would have multiple chain transits. + * @note @p chain_transit can not be NULL. Chain transits could be chained to the only one transit. + * + * @param transit The transit object. + * @param chain_transit The chain transit object. This transit will be operated + * after transit is done. + * + * This function adds @p chain_transit transition to a chain after the @p + * transit, and will be started as soon as @p transit ends. See @ref + * transit_example_02_explained for a full example. + * + * @ingroup Transit + */ +EAPI void elm_transit_chain_transit_add(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1, 2); - /** - * Cut off the chain relationship between two transits. - * - * @note @p transit can not be NULL. Transit would have the chain relationship with @p chain transit. - * @note @p chain_transit can not be NULL. Chain transits should be chained to the @p transit. - * - * @param transit The transit object. - * @param chain_transit The chain transit object. - * - * This function remove the @p chain_transit transition from the @p transit. - * - * @ingroup Transit - */ - EAPI void elm_transit_chain_transit_del(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1,2); +/** + * Cut off the chain relationship between two transits. + * + * @note @p transit can not be NULL. Transit would have the chain relationship with @p chain transit. + * @note @p chain_transit can not be NULL. Chain transits should be chained to the @p transit. + * + * @param transit The transit object. + * @param chain_transit The chain transit object. + * + * This function remove the @p chain_transit transition from the @p transit. + * + * @ingroup Transit + */ +EAPI void elm_transit_chain_transit_del(Elm_Transit *transit, Elm_Transit *chain_transit) EINA_ARG_NONNULL(1, 2); - /** - * Get the current chain transit list. - * - * @note @p transit can not be NULL. - * - * @param transit The transit object. - * @return chain transit list. - * - * @ingroup Transit - */ - EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit); +/** + * Get the current chain transit list. + * + * @note @p transit can not be NULL. + * + * @param transit The transit object. + * @return chain transit list. + * + * @ingroup Transit + */ +EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit); - /** - * Add the Resizing Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates resizing effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param from_w Object width size when effect begins. - * @param from_h Object height size when effect begins. - * @param to_w Object width size when effect ends. - * @param to_h Object height size when effect ends. - * @return Resizing effect context data. - * - * @ingroup Transit - */ - EAPI Elm_Transit_Effect *elm_transit_effect_resizing_add(Elm_Transit* transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h); +/** + * Add the Resizing Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates resizing effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param from_w Object width size when effect begins. + * @param from_h Object height size when effect begins. + * @param to_w Object width size when effect ends. + * @param to_h Object height size when effect ends. + * @return Resizing effect context data. + * + * @ingroup Transit + */ +EAPI Elm_Transit_Effect *elm_transit_effect_resizing_add(Elm_Transit *transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h); - /** - * Add the Translation Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates translation effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param from_dx X Position variation when effect begins. - * @param from_dy Y Position variation when effect begins. - * @param to_dx X Position variation when effect ends. - * @param to_dy Y Position variation when effect ends. - * @return Translation effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_translation_add(Elm_Transit* transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy); +/** + * Add the Translation Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates translation effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param from_dx X Position variation when effect begins. + * @param from_dy Y Position variation when effect begins. + * @param to_dx X Position variation when effect ends. + * @param to_dy Y Position variation when effect ends. + * @return Translation effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_translation_add(Elm_Transit *transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy); - /** - * Add the Zoom Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates zoom effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param from_rate Scale rate when effect begins (1 is current rate). - * @param to_rate Scale rate when effect ends. - * @return Zoom effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate); +/** + * Add the Zoom Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates zoom effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param from_rate Scale rate when effect begins (1 is current rate). + * @param to_rate Scale rate when effect ends. + * @return Zoom effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate); - /** - * Add the Flip Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates flip effect context - * and add it's required APIs to elm_transit_effect_add. - * @note This effect is applied to each pair of objects in the order they are listed - * in the transit list of objects. The first object in the pair will be the - * "front" object and the second will be the "back" object. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param axis Flipping Axis(X or Y). - * @param cw Flipping Direction. EINA_TRUE is clock-wise. - * @return Flip effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw); +/** + * Add the Flip Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates flip effect context + * and add it's required APIs to elm_transit_effect_add. + * @note This effect is applied to each pair of objects in the order they are listed + * in the transit list of objects. The first object in the pair will be the + * "front" object and the second will be the "back" object. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param axis Flipping Axis(X or Y). + * @param cw Flipping Direction. EINA_TRUE is clock-wise. + * @return Flip effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw); - /** - * Add the Resizable Flip Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates resizable flip effect context - * and add it's required APIs to elm_transit_effect_add. - * @note This effect is applied to each pair of objects in the order they are listed - * in the transit list of objects. The first object in the pair will be the - * "front" object and the second will be the "back" object. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param axis Flipping Axis(X or Y). - * @param cw Flipping Direction. EINA_TRUE is clock-wise. - * @return Resizable flip effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw); +/** + * Add the Resizable Flip Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates resizable flip effect context + * and add it's required APIs to elm_transit_effect_add. + * @note This effect is applied to each pair of objects in the order they are listed + * in the transit list of objects. The first object in the pair will be the + * "front" object and the second will be the "back" object. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param axis Flipping Axis(X or Y). + * @param cw Flipping Direction. EINA_TRUE is clock-wise. + * @return Resizable flip effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw); - /** - * Add the Wipe Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates wipe effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param type Wipe type. Hide or show. - * @param dir Wipe Direction. - * @return Wipe effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir); +/** + * Add the Wipe Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates wipe effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param type Wipe type. Hide or show. + * @param dir Wipe Direction. + * @return Wipe effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir); - /** - * Add the Color Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates color effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param from_r RGB R when effect begins. - * @param from_g RGB G when effect begins. - * @param from_b RGB B when effect begins. - * @param from_a RGB A when effect begins. - * @param to_r RGB R when effect ends. - * @param to_g RGB G when effect ends. - * @param to_b RGB B when effect ends. - * @param to_a RGB A when effect ends. - * @return Color effect context data. - * - * @ingroup Transit - */ - EAPI Elm_Transit_Effect *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a); +/** + * Add the Color Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates color effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param from_r RGB R when effect begins. + * @param from_g RGB G when effect begins. + * @param from_b RGB B when effect begins. + * @param from_a RGB A when effect begins. + * @param to_r RGB R when effect ends. + * @param to_g RGB G when effect ends. + * @param to_b RGB B when effect ends. + * @param to_a RGB A when effect ends. + * @return Color effect context data. + * + * @ingroup Transit + */ +EAPI Elm_Transit_Effect *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a); - /** - * Add the Fade Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates fade effect context - * and add it's required APIs to elm_transit_effect_add. - * @note This effect is applied to each pair of objects in the order they are listed - * in the transit list of objects. The first object in the pair will be the - * "before" object and the second will be the "after" object. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @return Fade effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the color information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit); +/** + * Add the Fade Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates fade effect context + * and add it's required APIs to elm_transit_effect_add. + * @note This effect is applied to each pair of objects in the order they are listed + * in the transit list of objects. The first object in the pair will be the + * "before" object and the second will be the "after" object. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @return Fade effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the color information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit); - /** - * Add the Blend Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates blend effect context - * and add it's required APIs to elm_transit_effect_add. - * @note This effect is applied to each pair of objects in the order they are listed - * in the transit list of objects. The first object in the pair will be the - * "before" object and the second will be the "after" object. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @return Blend effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the color information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit); +/** + * Add the Blend Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates blend effect context + * and add it's required APIs to elm_transit_effect_add. + * @note This effect is applied to each pair of objects in the order they are listed + * in the transit list of objects. The first object in the pair will be the + * "before" object and the second will be the "after" object. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @return Blend effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the color information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit); - /** - * Add the Rotation Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates rotation effect context - * and add it's required APIs to elm_transit_effect_add. - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param from_degree Degree when effect begins. - * @param to_degree Degree when effect is ends. - * @return Rotation effect context data. - * - * @ingroup Transit - * @warning It is highly recommended just create a transit with this effect when - * the window that the objects of the transit belongs has already been created. - * This is because this effect needs the geometry information about the objects, - * and if the window was not created yet, it can get a wrong information. - */ - EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree); - - /** - * Add the ImageAnimation Effect to Elm_Transit. - * - * @note This API is one of the facades. It creates image animation effect context - * and add it's required APIs to elm_transit_effect_add. - * The @p images parameter is a list images paths. This list and - * its contents will be deleted at the end of the effect by - * elm_transit_effect_image_animation_context_free() function. - * - * Example: - * @code - * char buf[PATH_MAX]; - * Eina_List *images = NULL; - * Elm_Transit *transi = elm_transit_add(); - * - * snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR); - * images = eina_list_append(images, eina_stringshare_add(buf)); - * - * snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR); - * images = eina_list_append(images, eina_stringshare_add(buf)); - * elm_transit_effect_image_animation_add(transi, images); - * - * @endcode - * - * @see elm_transit_effect_add() - * - * @param transit Transit object. - * @param images Eina_List of images file paths. This list and - * its contents will be deleted at the end of the effect by - * elm_transit_effect_image_animation_context_free() function. - * @return Image Animation effect context data. - * - * @ingroup Transit - */ - EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images); - /** - * @} - */ +/** + * Add the Rotation Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates rotation effect context + * and add it's required APIs to elm_transit_effect_add. + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param from_degree Degree when effect begins. + * @param to_degree Degree when effect is ends. + * @return Rotation effect context data. + * + * @ingroup Transit + * @warning It is highly recommended just create a transit with this effect when + * the window that the objects of the transit belongs has already been created. + * This is because this effect needs the geometry information about the objects, + * and if the window was not created yet, it can get a wrong information. + */ +EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree); +/** + * Add the ImageAnimation Effect to Elm_Transit. + * + * @note This API is one of the facades. It creates image animation effect context + * and add it's required APIs to elm_transit_effect_add. + * The @p images parameter is a list images paths. This list and + * its contents will be deleted at the end of the effect by + * elm_transit_effect_image_animation_context_free() function. + * + * Example: + * @code + * char buf[PATH_MAX]; + * Eina_List *images = NULL; + * Elm_Transit *transi = elm_transit_add(); + * + * snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR); + * images = eina_list_append(images, eina_stringshare_add(buf)); + * + * snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR); + * images = eina_list_append(images, eina_stringshare_add(buf)); + * elm_transit_effect_image_animation_add(transi, images); + * + * @endcode + * + * @see elm_transit_effect_add() + * + * @param transit Transit object. + * @param images Eina_List of images file paths. This list and + * its contents will be deleted at the end of the effect by + * elm_transit_effect_image_animation_context_free() function. + * @return Image Animation effect context data. + * + * @ingroup Transit + */ +EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_video.h b/legacy/elementary/src/lib/elm_video.h index 59e2ac69ea..4ce78ddd49 100644 --- a/legacy/elementary/src/lib/elm_video.h +++ b/legacy/elementary/src/lib/elm_video.h @@ -1,233 +1,232 @@ - /** - * @defgroup Video Video - * - * @addtogroup Video - * @{ - * - * Elementary comes with two object that help design application that need - * to display video. The main one, Elm_Video, display a video by using Emotion. - * It does embedded the video inside an Edje object, so you can do some - * animation depending on the video state change. It does also implement a - * ressource management policy to remove this burden from the application writer. - * - * The second one, Elm_Player is a video player that need to be linked with and Elm_Video. - * It take care of updating its content according to Emotion event and provide a - * way to theme itself. It also does automatically raise the priority of the - * linked Elm_Video so it will use the video decoder if available. It also 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. - * - * Default contents parts of the player widget that you can use for are: - * @li "video" - A video of the player - * - */ +/** + * @defgroup Video Video + * + * @addtogroup Video + * @{ + * + * Elementary comes with two object that help design application that need + * to display video. The main one, Elm_Video, display a video by using Emotion. + * It does embedded the video inside an Edje object, so you can do some + * animation depending on the video state change. It does also implement a + * ressource management policy to remove this burden from the application writer. + * + * The second one, Elm_Player is a video player that need to be linked with and Elm_Video. + * It take care of updating its content according to Emotion event and provide a + * way to theme itself. It also does automatically raise the priority of the + * linked Elm_Video so it will use the video decoder if available. It also 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. + * + * Default contents parts of the player widget that you can use for are: + * @li "video" - A video of the player + * + */ - /** - * @brief Add a new Elm_Player object to the given parent Elementary (container) object. - * - * @param parent The parent object - * @return a new player widget handle or @c NULL, on errors. - * - * This function inserts a new player widget on the canvas. - * - * @see elm_object_part_content_set() - * - * @ingroup Video - */ - EAPI Evas_Object *elm_player_add(Evas_Object *parent); +/** + * @brief Add a new Elm_Player object to the given parent Elementary (container) object. + * + * @param parent The parent object + * @return a new player widget handle or @c NULL, on errors. + * + * This function inserts a new player widget on the canvas. + * + * @see elm_object_part_content_set() + * + * @ingroup Video + */ +EAPI Evas_Object *elm_player_add(Evas_Object *parent); - /** - * @brief Link a Elm_Payer with an Elm_Video object. - * - * @param player the Elm_Player object. - * @param video The Elm_Video object. - * - * This mean that action on the player widget will affect the - * video object and the state of the video will be reflected in - * the player itself. - * - * @see elm_player_add() - * @see elm_video_add() - * @deprecated use elm_object_part_content_set() instead - * - * @ingroup Video - */ - EINA_DEPRECATED EAPI void elm_player_video_set(Evas_Object *player, Evas_Object *video); +/** + * @brief Link a Elm_Payer with an Elm_Video object. + * + * @param player the Elm_Player object. + * @param video The Elm_Video object. + * + * This mean that action on the player widget will affect the + * video object and the state of the video will be reflected in + * the player itself. + * + * @see elm_player_add() + * @see elm_video_add() + * @deprecated use elm_object_part_content_set() instead + * + * @ingroup Video + */ +EINA_DEPRECATED EAPI void elm_player_video_set(Evas_Object *player, Evas_Object *video); - /** - * @brief Add a new Elm_Video object to the given parent Elementary (container) object. - * - * @param parent The parent object - * @return a new video widget handle or @c NULL, on errors. - * - * This function inserts a new video widget on the canvas. - * - * @seeelm_video_file_set() - * @see elm_video_uri_set() - * - * @ingroup Video - */ - EAPI Evas_Object *elm_video_add(Evas_Object *parent); +/** + * @brief Add a new Elm_Video object to the given parent Elementary (container) object. + * + * @param parent The parent object + * @return a new video widget handle or @c NULL, on errors. + * + * This function inserts a new video widget on the canvas. + * + * @see elm_video_file_set() + * @see elm_video_uri_set() + * + * @ingroup Video + */ +EAPI Evas_Object *elm_video_add(Evas_Object *parent); - /** - * @brief Define the file that will be the video source. - * - * @param video The video object to define the file for. - * @param filename The file to target. - * - * This function will explicitly define a filename as a source - * for the video of the Elm_Video object. - * - * @see elm_video_uri_set() - * @see elm_video_add() - * @see elm_player_add() - * - * @ingroup Video - */ - EAPI void elm_video_file_set(Evas_Object *video, const char *filename); +/** + * @brief Define the file that will be the video source. + * + * @param video The video object to define the file for. + * @param filename The file to target. + * + * This function will explicitly define a filename as a source + * for the video of the Elm_Video object. + * + * @see elm_video_uri_set() + * @see elm_video_add() + * @see elm_player_add() + * + * @ingroup Video + */ +EAPI void elm_video_file_set(Evas_Object *video, const char *filename); - /** - * @brief Define the uri that will be the video source. - * - * @param video The video object to define the file for. - * @param uri The uri to target. - * - * This function will define an uri as a source for the video of the - * Elm_Video object. URI could be remote source of video, like http:// or local source - * like for example WebCam who are most of the time v4l2:// (but that depend and - * you should use Emotion API to request and list the available Webcam on your system). - * - * @see elm_video_file_set() - * @see elm_video_add() - * @see elm_player_add() - * - * @ingroup Video - */ - EAPI void elm_video_uri_set(Evas_Object *video, const char *uri); +/** + * @brief Define the uri that will be the video source. + * + * @param video The video object to define the file for. + * @param uri The uri to target. + * + * This function will define an uri as a source for the video of the + * Elm_Video object. URI could be remote source of video, like http:// or local source + * like for example WebCam who are most of the time v4l2:// (but that depend and + * you should use Emotion API to request and list the available Webcam on your system). + * + * @see elm_video_file_set() + * @see elm_video_add() + * @see elm_player_add() + * + * @ingroup Video + */ +EAPI void elm_video_uri_set(Evas_Object *video, const char *uri); - /** - * @brief Get the underlying Emotion object. - * - * @param video The video object to proceed the request on. - * @return the underlying Emotion object. - * - * @ingroup Video - */ - EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video); +/** + * @brief Get the underlying Emotion object. + * + * @param video The video object to proceed the request on. + * @return the underlying Emotion object. + * + * @ingroup Video + */ +EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video); - /** - * @brief Start to play the video - * - * @param video The video object to proceed the request on. - * - * Start to play the video and cancel all suspend state. - * - * @ingroup Video - */ - EAPI void elm_video_play(Evas_Object *video); +/** + * @brief Start to play the video + * + * @param video The video object to proceed the request on. + * + * Start to play the video and cancel all suspend state. + * + * @ingroup Video + */ +EAPI void elm_video_play(Evas_Object *video); - /** - * @brief Pause the video - * - * @param video The video object to proceed the request on. - * - * Pause the video and start a timer to trigger suspend mode. - * - * @ingroup Video - */ - EAPI void elm_video_pause(Evas_Object *video); +/** + * @brief Pause the video + * + * @param video The video object to proceed the request on. + * + * Pause the video and start a timer to trigger suspend mode. + * + * @ingroup Video + */ +EAPI void elm_video_pause(Evas_Object *video); - /** - * @brief Stop the video - * - * @param video The video object to proceed the request on. - * - * Stop the video and put the emotion in deep sleep mode. - * - * @ingroup Video - */ - EAPI void elm_video_stop(Evas_Object *video); +/** + * @brief Stop the video + * + * @param video The video object to proceed the request on. + * + * Stop the video and put the emotion in deep sleep mode. + * + * @ingroup Video + */ +EAPI void elm_video_stop(Evas_Object *video); - /** - * @brief Is the video actually playing. - * - * @param video The video object to proceed the request on. - * @return EINA_TRUE if the video is actually playing. - * - * You should consider watching event on the object instead of polling - * the object state. - * - * @ingroup Video - */ - EAPI Eina_Bool elm_video_is_playing(const Evas_Object *video); +/** + * @brief Is the video actually playing. + * + * @param video The video object to proceed the request on. + * @return EINA_TRUE if the video is actually playing. + * + * You should consider watching event on the object instead of polling + * the object state. + * + * @ingroup Video + */ +EAPI Eina_Bool elm_video_is_playing(const Evas_Object *video); - /** - * @brief Is it possible to seek inside the video. - * - * @param video The video object to proceed the request on. - * @return EINA_TRUE if is possible to seek inside the video. - * - * @ingroup Video - */ - EAPI Eina_Bool elm_video_is_seekable(const Evas_Object *video); +/** + * @brief Is it possible to seek inside the video. + * + * @param video The video object to proceed the request on. + * @return EINA_TRUE if is possible to seek inside the video. + * + * @ingroup Video + */ +EAPI Eina_Bool elm_video_is_seekable(const Evas_Object *video); - /** - * @brief Is the audio muted. - * - * @param video The video object to proceed the request on. - * @return EINA_TRUE if the audio is muted. - * - * @ingroup Video - */ - EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video); +/** + * @brief Is the audio muted. + * + * @param video The video object to proceed the request on. + * @return EINA_TRUE if the audio is muted. + * + * @ingroup Video + */ +EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video); - /** - * @brief Change the mute state of the Elm_Video object. - * - * @param video The video object to proceed the request on. - * @param mute The new mute state. - * - * @ingroup Video - */ - EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute); +/** + * @brief Change the mute state of the Elm_Video object. + * + * @param video The video object to proceed the request on. + * @param mute The new mute state. + * + * @ingroup Video + */ +EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute); - /** - * @brief Get the audio level of the current video. - * - * @param video The video object to proceed the request on. - * @return the current audio level. - * - * @ingroup Video - */ - EAPI double elm_video_audio_level_get(const Evas_Object *video); +/** + * @brief Get the audio level of the current video. + * + * @param video The video object to proceed the request on. + * @return the current audio level. + * + * @ingroup Video + */ +EAPI double elm_video_audio_level_get(const Evas_Object *video); - /** - * @brief Set the audio level of anElm_Video object. - * - * @param video The video object to proceed the request on. - * @param volume The new audio volume. - * - * @ingroup Video - */ - EAPI void elm_video_audio_level_set(Evas_Object *video, double volume); - - EAPI double elm_video_play_position_get(const Evas_Object *video); - EAPI void elm_video_play_position_set(Evas_Object *video, double position); - EAPI double elm_video_play_length_get(const Evas_Object *video); - EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember); - EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video); - EAPI const char *elm_video_title_get(const Evas_Object *video); - /** - * @} - */ +/** + * @brief Set the audio level of anElm_Video object. + * + * @param video The video object to proceed the request on. + * @param volume The new audio volume. + * + * @ingroup Video + */ +EAPI void elm_video_audio_level_set(Evas_Object *video, double volume); +EAPI double elm_video_play_position_get(const Evas_Object *video); +EAPI void elm_video_play_position_set(Evas_Object *video, double position); +EAPI double elm_video_play_length_get(const Evas_Object *video); +EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember); +EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video); +EAPI const char *elm_video_title_get(const Evas_Object *video); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_web.h b/legacy/elementary/src/lib/elm_web.h index 74acce598b..d5d44ef0de 100644 --- a/legacy/elementary/src/lib/elm_web.h +++ b/legacy/elementary/src/lib/elm_web.h @@ -1,902 +1,903 @@ - /** - * @defgroup Web Web - * - * @image html img/widget/web/preview-00.png - * @image latex img/widget/web/preview-00.eps - * - * A web object is used for displaying web pages (HTML/CSS/JS) - * using WebKit-EFL. You must have compiled Elementary with - * ewebkit support. - * - * 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 - * - * available styles: - * - default - * - * An example of use of web: - * - * - @ref web_example_01 TBD - */ +/** + * @defgroup Web Web + * + * @image html img/widget/web/preview-00.png + * @image latex img/widget/web/preview-00.eps + * + * A web object is used for displaying web pages (HTML/CSS/JS) + * using WebKit-EFL. You must have compiled Elementary with + * ewebkit support. + * + * 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 + * + * available styles: + * - default + * + * An example of use of web: + * + * - @ref web_example_01 TBD + */ - /** - * @addtogroup Web - * @{ - */ +/** + * @addtogroup Web + * @{ + */ - /** - * 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()). + */ +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 */ - }; +/** + * 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 */ +}; - /** - * The possibles types that the items in a menu can be - */ - typedef enum _Elm_Web_Menu_Item_Type - { - ELM_WEB_MENU_SEPARATOR, - ELM_WEB_MENU_GROUP, - ELM_WEB_MENU_OPTION - } Elm_Web_Menu_Item_Type; +/** + * The possibles types that the items in a menu can be + */ +typedef enum _Elm_Web_Menu_Item_Type +{ + ELM_WEB_MENU_SEPARATOR, + ELM_WEB_MENU_GROUP, + ELM_WEB_MENU_OPTION +} Elm_Web_Menu_Item_Type; - /** - * Structure describing the items in a menu - */ - typedef struct _Elm_Web_Menu_Item Elm_Web_Menu_Item; +/** + * Structure describing the items in a menu + */ +typedef struct _Elm_Web_Menu_Item Elm_Web_Menu_Item; - /** - * Structure describing the items in a menu - */ - struct _Elm_Web_Menu_Item - { - const char *text; /**< The text for the item */ - Elm_Web_Menu_Item_Type type; /**< The type of the item */ - }; +/** + * Structure describing the items in a menu + */ +struct _Elm_Web_Menu_Item +{ + const char *text; /**< The text for the item */ + Elm_Web_Menu_Item_Type type; /**< The type of the item */ +}; - /** - * 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_Web_Menu Elm_Web_Menu; +/** + * 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_Web_Menu Elm_Web_Menu; - /** - * 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_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 */ +/** + * 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_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 */ - 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. */ - }; + 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. */ +}; - typedef struct _Elm_Web_Download Elm_Web_Download; - struct _Elm_Web_Download - { - const char *url; - }; +typedef struct _Elm_Web_Download Elm_Web_Download; +struct _Elm_Web_Download +{ + const char *url; +}; - /** - * Types of zoom available. - */ - typedef enum _Elm_Web_Zoom_Mode - { - ELM_WEB_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_web_zoom_set */ - ELM_WEB_ZOOM_MODE_AUTO_FIT, /**< Zoom until content fits in web object */ - ELM_WEB_ZOOM_MODE_AUTO_FILL, /**< Zoom until content fills web object */ - ELM_WEB_ZOOM_MODE_LAST - } Elm_Web_Zoom_Mode; +/** + * Types of zoom available. + */ +typedef enum _Elm_Web_Zoom_Mode +{ + ELM_WEB_ZOOM_MODE_MANUAL = 0, /**< Zoom controlled normally by elm_web_zoom_set */ + ELM_WEB_ZOOM_MODE_AUTO_FIT, /**< Zoom until content fits in web object */ + ELM_WEB_ZOOM_MODE_AUTO_FILL, /**< Zoom until content fills web object */ + ELM_WEB_ZOOM_MODE_LAST +} Elm_Web_Zoom_Mode; - /** - * Opaque handler containing the features (such as statusbar, menubar, etc) - * that are to be set on a newly requested window. - */ - typedef struct _Elm_Web_Window_Features Elm_Web_Window_Features; +/** + * Opaque handler containing the features (such as statusbar, menubar, etc) + * that are to be set on a newly requested window. + */ +typedef struct _Elm_Web_Window_Features Elm_Web_Window_Features; - /** - * 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 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() - */ - typedef Evas_Object *(*Elm_Web_Dialog_Alert)(void *data, Evas_Object *obj, const char *message); +/** + * 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() + */ +typedef Evas_Object *(*Elm_Web_Dialog_Alert)(void *data, Evas_Object *obj, const char *message); - /** - * 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 Evas_Object *(*Elm_Web_Dialog_Confirm)(void *data, Evas_Object *obj, const char *message, Eina_Bool *ret); +/** + * 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 Evas_Object *(*Elm_Web_Dialog_Confirm)(void *data, Evas_Object *obj, const char *message, Eina_Bool *ret); - /** - * 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() - */ - typedef Evas_Object *(*Elm_Web_Dialog_Prompt)(void *data, Evas_Object *obj, const char *message, const char *def_value, char **value, Eina_Bool *ret); +/** + * 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() + */ +typedef Evas_Object *(*Elm_Web_Dialog_Prompt)(void *data, Evas_Object *obj, const char *message, const char *def_value, char **value, Eina_Bool *ret); - /** - * 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 Evas_Object *(*Elm_Web_Dialog_File_Selector)(void *data, Evas_Object *obj, Eina_Bool allows_multiple, Eina_List *accept_types, Eina_List **selected, Eina_Bool *ret); +/** + * 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 Evas_Object *(*Elm_Web_Dialog_File_Selector)(void *data, Evas_Object *obj, Eina_Bool allows_multiple, Eina_List *accept_types, Eina_List **selected, Eina_Bool *ret); - /** - * 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() - */ - typedef void (*Elm_Web_Console_Message)(void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id); +/** + * 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() + */ +typedef void (*Elm_Web_Console_Message)(void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id); - /** - * 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() - */ - EAPI Evas_Object *elm_web_add(Evas_Object *parent) EINA_ARG_NONNULL(1); +/** + * 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() + */ +EAPI Evas_Object * + elm_web_add(Evas_Object *parent) +EINA_ARG_NONNULL(1); - /** - * Get internal ewk_view object from web object. - * - * 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() - */ - EAPI Evas_Object *elm_web_webkit_view_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +/** + * Get internal ewk_view object from web object. + * + * 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() + */ +EAPI Evas_Object *elm_web_webkit_view_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - /** - * Sets the function to call when a new window is requested - * - * 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 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 a new window is requested + * + * 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 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 - * - * 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_web_dialog_alert_hook_set(Evas_Object *obj, Elm_Web_Dialog_Alert func, void *data); +/** + * Sets the function to call when an alert dialog + * + * 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_web_dialog_alert_hook_set(Evas_Object *obj, Elm_Web_Dialog_Alert func, void *data); - /** - * Sets the function to call when an confirm dialog - * - * 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. - * - * @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_web_dialog_confirm_hook_set(Evas_Object *obj, Elm_Web_Dialog_Confirm func, void *data); +/** + * Sets the function to call when an confirm dialog + * + * 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. + * + * @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_web_dialog_confirm_hook_set(Evas_Object *obj, Elm_Web_Dialog_Confirm func, void *data); - /** - * Sets the function to call when an prompt dialog - * - * 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. - * - * @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_web_dialog_prompt_hook_set(Evas_Object *obj, Elm_Web_Dialog_Prompt func, void *data); +/** + * Sets the function to call when an prompt dialog + * + * 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. + * + * @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_web_dialog_prompt_hook_set(Evas_Object *obj, Elm_Web_Dialog_Prompt func, void *data); - /** - * Sets the function to call when an file selector dialog - * - * 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. - * - * @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_web_dialog_file_selector_hook_set(Evas_Object *obj, Elm_Web_Dialog_File_Selector func, void *data); +/** + * Sets the function to call when an file selector dialog + * + * 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. + * + * @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_web_dialog_file_selector_hook_set(Evas_Object *obj, Elm_Web_Dialog_File_Selector func, void *data); - /** - * Sets the function to call when a console message is emitted from JS - * - * This hook will be called when a console message is emitted from - * JavaScript. There is no default implementation for this feature. - * - * @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_web_console_message_hook_set(Evas_Object *obj, Elm_Web_Console_Message func, void *data); +/** + * Sets the function to call when a console message is emitted from JS + * + * This hook will be called when a console message is emitted from + * JavaScript. There is no default implementation for this feature. + * + * @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_web_console_message_hook_set(Evas_Object *obj, Elm_Web_Console_Message func, void *data); - /** - * Gets the status of the tab propagation - * - * @param obj The web object to query - * @return EINA_TRUE if tab propagation is enabled, EINA_FALSE otherwise - * - * @see elm_web_tab_propagate_set() - */ - EAPI Eina_Bool elm_web_tab_propagate_get(const Evas_Object *obj); +/** + * Gets the status of the tab propagation + * + * @param obj The web object to query + * @return EINA_TRUE if tab propagation is enabled, EINA_FALSE otherwise + * + * @see elm_web_tab_propagate_set() + */ +EAPI Eina_Bool elm_web_tab_propagate_get(const Evas_Object *obj); - /** - * Sets whether to use tab propagation - * - * 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 whether to use tab propagation + * + * 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 - * - * It must be a full URI, with resource included, in the form - * http://www.enlightenment.org or file:///tmp/something.html - * - * @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 Eina_Bool elm_web_uri_set(Evas_Object *obj, const char *uri); +/** + * Sets the URI for the web object + * + * It must be a full URI, with resource included, in the form + * http://www.enlightenment.org or file:///tmp/something.html + * + * @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 Eina_Bool elm_web_uri_set(Evas_Object *obj, const char *uri); - /** - * Gets the current URI for the object - * - * The returned string must not be freed and is guaranteed to be - * stringshared. - * - * @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 URI for the object + * + * The returned string must not be freed and is guaranteed to be + * stringshared. + * + * @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 - * - * The returned string must not be freed and is guaranteed to be - * stringshared. - * - * @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); +/** + * Gets the current title + * + * The returned string must not be freed and is guaranteed to be + * stringshared. + * + * @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 - * - * 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. - * - * @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); +/** + * Sets the background color to be used by the web object + * + * 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. + * + * @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 - * - * 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. - * - * @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 the background color to be used by the web object + * + * 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. + * + * @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 - * - * The string returned must be freed by the user when it's done with it. - * - * @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); +/** + * Gets a copy of the currently selected text + * + * The string returned must be freed by the user when it's done with it. + * + * @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); - /** - * 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); +/** + * 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); - /** - * Dismisses an open dropdown popup - * - * 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. - * - * @param obj The web object - * @return EINA_TRUE if the menu was successfully destroyed, or EINA_FALSE - * if there was no menu to destroy - */ - EAPI Eina_Bool elm_web_popup_destroy(Evas_Object *obj); +/** + * Dismisses an open dropdown popup + * + * 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. + * + * @param obj The web object + * @return EINA_TRUE if the menu was successfully destroyed, or EINA_FALSE + * if there was no menu to destroy + */ +EAPI Eina_Bool elm_web_popup_destroy(Evas_Object *obj); - /** - * Searches the given string in a document. - * - * @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 - * - * @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); +/** + * Searches the given string in a document. + * + * @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 + * + * @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. - * - * @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 unsigned int elm_web_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit); +/** + * Marks matches of the given string in a document. + * + * @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 unsigned int elm_web_text_matches_mark(Evas_Object *obj, const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit); - /** - * Clears all marked matches in the document - * - * @param obj The web object - * - * @return EINA_TRUE on success, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_text_matches_unmark_all(Evas_Object *obj); +/** + * Clears all marked matches in the document + * + * @param obj The web object + * + * @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 enabled, marks set with elm_web_text_matches_mark() will be - * highlighted. - * - * @param obj The web object - * @param highlight Whether to highlight the marks or not - * - * @return EINA_TRUE on success, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight); +/** + * Sets whether to highlight the matched marks + * + * If enabled, marks set with elm_web_text_matches_mark() will be + * highlighted. + * + * @param obj The web object + * @param highlight Whether to highlight the marks or not + * + * @return EINA_TRUE on success, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_web_text_matches_highlight_set(Evas_Object *obj, Eina_Bool highlight); - /** - * Gets whether highlighting marks is enabled - * - * @param The web object - * - * @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 whether highlighting marks is enabled + * + * @param The web object + * + * @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 - * - * 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. - * - * @param The web object - * - * @return A value between 0.0 and 1.0 indicating the progress, or -1.0 on - * failure - */ - EAPI double elm_web_load_progress_get(const Evas_Object *obj); +/** + * Gets the overall loading progress of the page + * + * 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. + * + * @param The web object + * + * @return A value between 0.0 and 1.0 indicating the progress, or -1.0 on + * failure + */ +EAPI double elm_web_load_progress_get(const Evas_Object *obj); - /** - * Stops loading the current page - * - * 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. - * - * @param obj The web object - * - * @return EINA_TRUE if the cancel was successful, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_stop(Evas_Object *obj); +/** + * Stops loading the current page + * + * 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. + * + * @param obj The web object + * + * @return EINA_TRUE if the cancel was successful, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_web_stop(Evas_Object *obj); - /** - * Requests a reload of the current document in the object - * - * @param obj The web object - * - * @return EINA_TRUE on success, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_reload(Evas_Object *obj); +/** + * Requests a reload of the current document in the object + * + * @param obj The web object + * + * @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 - * - * @param obj The web object - * - * @return EINA_TRUE on success, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_reload_full(Evas_Object *obj); +/** + * Requests a reload of the current document, avoiding any existing caches + * + * @param obj The web object + * + * @return EINA_TRUE on success, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_web_reload_full(Evas_Object *obj); - /** - * Goes back one step in the browsing history - * - * This is equivalent to calling elm_web_object_navigate(obj, -1); - * - * @param obj The web object - * - * @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 Eina_Bool elm_web_back(Evas_Object *obj); +/** + * Goes back one step in the browsing history + * + * This is equivalent to calling elm_web_object_navigate(obj, -1); + * + * @param obj The web object + * + * @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 Eina_Bool elm_web_back(Evas_Object *obj); - /** - * Goes forward one step in the browsing history - * - * This is equivalent to calling elm_web_object_navigate(obj, 1); - * - * @param obj The web object - * - * @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 Eina_Bool elm_web_forward(Evas_Object *obj); +/** + * Goes forward one step in the browsing history + * + * This is equivalent to calling elm_web_object_navigate(obj, 1); + * + * @param obj The web object + * + * @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 Eina_Bool elm_web_forward(Evas_Object *obj); - /** - * Jumps the given number of steps in the browsing history - * - * The @p steps value can be a negative integer to back in history, or a - * positive to move forward. - * - * @param obj The web object - * @param steps The number of steps to jump - * - * @return EINA_TRUE on success, EINA_FALSE on error or if not enough - * history exists to jump the given number of steps - * - * @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); +/** + * Jumps the given number of steps in the browsing history + * + * The @p steps value can be a negative integer to back in history, or a + * positive to move forward. + * + * @param obj The web object + * @param steps The number of steps to jump + * + * @return EINA_TRUE on success, EINA_FALSE on error or if not enough + * history exists to jump the given number of steps + * + * @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 - * - * @param obj The web object - * - * @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 back in history + * + * @param obj The web object + * + * @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 - * - * @param obj The web object - * - * @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 go forward in history + * + * @param obj The web object + * + * @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 - * - * The @p steps value can be a negative integer to back in history, or a - * positive to move forward. - * - * @param obj The web object - * @param steps The number of steps to check for - * - * @return EINA_TRUE if enough history exists to perform the given jump, - * EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_navigate_possible(Evas_Object *obj, int steps); +/** + * Queries whether it's possible to jump the given number of steps + * + * The @p steps value can be a negative integer to back in history, or a + * positive to move forward. + * + * @param obj The web object + * @param steps The number of steps to check for + * + * @return EINA_TRUE if enough history exists to perform the given jump, + * EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_web_navigate_possible(Evas_Object *obj, int steps); - /** - * Gets whether browsing history is enabled for the given object - * - * @param obj The web object - * - * @return EINA_TRUE if history is enabled, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_web_history_enable_get(const Evas_Object *obj); +/** + * Gets whether browsing history is enabled for the given object + * + * @param obj The web object + * + * @return EINA_TRUE if history is enabled, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_web_history_enable_get(const Evas_Object *obj); - /** - * Enables or disables the browsing history - * - * @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); +/** + * Enables or disables the browsing history + * + * @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); - /** - * Sets the zoom level of the web object - * - * Zoom level matches the Webkit API, so 1.0 means normal zoom, with higher - * values meaning zoom in and lower meaning zoom out. This function will - * only affect the zoom level if the mode set with elm_web_zoom_mode_set() - * is ::ELM_WEB_ZOOM_MODE_MANUAL. - * - * @param obj The web object - * @param zoom The zoom level to set - */ - EAPI void elm_web_zoom_set(Evas_Object *obj, double zoom); +/** + * Sets the zoom level of the web object + * + * Zoom level matches the Webkit API, so 1.0 means normal zoom, with higher + * values meaning zoom in and lower meaning zoom out. This function will + * only affect the zoom level if the mode set with elm_web_zoom_mode_set() + * is ::ELM_WEB_ZOOM_MODE_MANUAL. + * + * @param obj The web object + * @param zoom The zoom level to set + */ +EAPI void elm_web_zoom_set(Evas_Object *obj, double zoom); - /** - * Gets the current zoom level set on the web object - * - * Note that this is the zoom level set on the web object and not that - * of the underlying Webkit one. In the ::ELM_WEB_ZOOM_MODE_MANUAL mode, - * the two zoom levels should match, but for the other two modes the - * Webkit zoom is calculated internally to match the chosen mode without - * changing the zoom level set for the web object. - * - * @param obj The web object - * - * @return The zoom level set on the object - */ - EAPI double elm_web_zoom_get(const Evas_Object *obj); +/** + * Gets the current zoom level set on the web object + * + * Note that this is the zoom level set on the web object and not that + * of the underlying Webkit one. In the ::ELM_WEB_ZOOM_MODE_MANUAL mode, + * the two zoom levels should match, but for the other two modes the + * Webkit zoom is calculated internally to match the chosen mode without + * changing the zoom level set for the web object. + * + * @param obj The web object + * + * @return The zoom level set on the object + */ +EAPI double elm_web_zoom_get(const Evas_Object *obj); - /** - * Sets the zoom mode to use - * - * The modes can be any of those defined in ::Elm_Web_Zoom_Mode, except - * ::ELM_WEB_ZOOM_MODE_LAST. The default is ::ELM_WEB_ZOOM_MODE_MANUAL. - * - * ::ELM_WEB_ZOOM_MODE_MANUAL means the zoom level will be controlled - * with the elm_web_zoom_set() function. - * ::ELM_WEB_ZOOM_MODE_AUTO_FIT will calculate the needed zoom level to - * make sure the entirety of the web object's contents are shown. - * ::ELM_WEB_ZOOM_MODE_AUTO_FILL will calculate the needed zoom level to - * fit the contents in the web object's size, without leaving any space - * unused. - * - * @param obj The web object - * @param mode The mode to set - */ - EAPI void elm_web_zoom_mode_set(Evas_Object *obj, Elm_Web_Zoom_Mode mode); +/** + * Sets the zoom mode to use + * + * The modes can be any of those defined in ::Elm_Web_Zoom_Mode, except + * ::ELM_WEB_ZOOM_MODE_LAST. The default is ::ELM_WEB_ZOOM_MODE_MANUAL. + * + * ::ELM_WEB_ZOOM_MODE_MANUAL means the zoom level will be controlled + * with the elm_web_zoom_set() function. + * ::ELM_WEB_ZOOM_MODE_AUTO_FIT will calculate the needed zoom level to + * make sure the entirety of the web object's contents are shown. + * ::ELM_WEB_ZOOM_MODE_AUTO_FILL will calculate the needed zoom level to + * fit the contents in the web object's size, without leaving any space + * unused. + * + * @param obj The web object + * @param mode The mode to set + */ +EAPI void elm_web_zoom_mode_set(Evas_Object *obj, Elm_Web_Zoom_Mode mode); - /** - * Gets the currently set zoom mode - * - * @param obj The web object - * - * @return The current zoom mode set for the object, or - * ::ELM_WEB_ZOOM_MODE_LAST on error - */ - EAPI Elm_Web_Zoom_Mode elm_web_zoom_mode_get(const Evas_Object *obj); +/** + * Gets the currently set zoom mode + * + * @param obj The web object + * + * @return The current zoom mode set for the object, or + * ::ELM_WEB_ZOOM_MODE_LAST on error + */ +EAPI Elm_Web_Zoom_Mode elm_web_zoom_mode_get(const Evas_Object *obj); - /** - * Shows the given region in the web object - * - * @param obj The web object - * @param x The x coordinate of the region to show - * @param y The y coordinate of the region to show - * @param w The width of the region to show - * @param h The height of the region to show - */ - EAPI void elm_web_region_show(Evas_Object *obj, int x, int y, int w, int h); +/** + * Shows the given region in the web object + * + * @param obj The web object + * @param x The x coordinate of the region to show + * @param y The y coordinate of the region to show + * @param w The width of the region to show + * @param h The height of the region to show + */ +EAPI void elm_web_region_show(Evas_Object *obj, int x, int y, int w, int h); - /** - * Brings in the region to the visible area - * - * Like elm_web_region_show(), but it animates the scrolling of the object - * to show the area - * - * @param obj The web object - * @param x The x coordinate of the region to show - * @param y The y coordinate of the region to show - * @param w The width of the region to show - * @param h The height of the region to show - */ - EAPI void elm_web_region_bring_in(Evas_Object *obj, int x, int y, int w, int h); +/** + * Brings in the region to the visible area + * + * Like elm_web_region_show(), but it animates the scrolling of the object + * to show the area + * + * @param obj The web object + * @param x The x coordinate of the region to show + * @param y The y coordinate of the region to show + * @param w The width of the region to show + * @param h The height of the region to show + */ +EAPI void elm_web_region_bring_in(Evas_Object *obj, int x, int y, int w, int h); - /** - * Sets the default dialogs to use an Inwin instead of a normal window - * - * 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. - * - * @param obj The web object - * @param value EINA_TRUE to use Inwin, EINA_FALSE to use a normal window - */ - EAPI void elm_web_inwin_mode_set(Evas_Object *obj, Eina_Bool value); +/** + * Sets the default dialogs to use an Inwin instead of a normal window + * + * 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. + * + * @param obj The web object + * @param value EINA_TRUE to use Inwin, EINA_FALSE to use a normal window + */ +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); +/** + * 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 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); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index edfbacf117..ff48025287 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -174,63 +174,62 @@ */ #ifndef ELM_INTERNAL_API_ARGESFSDFEFC -# warning "You are using an internal elementary API. This API is not stable" -# warning "and is subject to change. You use this at your own risk." -# warning "Remember to call elm_widget_api_check(ELM_INTERNAL_API_VERSION);" -# warning "in your widgets before you call any other elm_widget calls to do" -# warning "a correct runtime version check. Also remember - you don't NEED" -# warning "to make an Elementary widget is almost ALL cases. You can easily" -# warning "make a smart object with Evas's API and do everything you need" -# warning "there. You only need a widget if you want to seamlessly be part" -# warning "of the focus tree and want to transparently become a container" -# warning "for any number of child Elementary widgets" -# error "ERROR. Compile aborted." +#warning "You are using an internal elementary API. This API is not stable" +#warning "and is subject to change. You use this at your own risk." +#warning "Remember to call elm_widget_api_check(ELM_INTERNAL_API_VERSION);" +#warning "in your widgets before you call any other elm_widget calls to do" +#warning "a correct runtime version check. Also remember - you don't NEED" +#warning "to make an Elementary widget is almost ALL cases. You can easily" +#warning "make a smart object with Evas's API and do everything you need" +#warning "there. You only need a widget if you want to seamlessly be part" +#warning "of the focus tree and want to transparently become a container" +#warning "for any number of child Elementary widgets" +#error "ERROR. Compile aborted." #endif #define ELM_INTERNAL_API_VERSION 7000 -typedef struct _Elm_Tooltip Elm_Tooltip; -typedef struct _Elm_Cursor Elm_Cursor; +typedef struct _Elm_Tooltip Elm_Tooltip; +typedef struct _Elm_Cursor Elm_Cursor; typedef struct _Elm_Widget_Item Elm_Widget_Item; /**< base structure for all widget items that are not Elm_Widget themselves */ typedef struct _Elm_Access_Info Elm_Access_Info; /**< accessibility information to be able to set and get from the access API */ typedef struct _Elm_Access_Item Elm_Access_Item; /**< accessibility info item */ -typedef void (*Elm_Widget_On_Text_Set_Cb)(void *data, const char *part, const char *text); -typedef void (*Elm_Widget_On_Content_Set_Cb)(void *data, const char *part, Evas_Object *content); -typedef const char *(*Elm_Widget_On_Text_Get_Cb)(const void *data, const char *part); -typedef Evas_Object *(*Elm_Widget_On_Content_Get_Cb)(const void *data, const char *part); -typedef Evas_Object *(*Elm_Widget_On_Content_Unset_Cb)(const void *data, const char *part); -typedef void (*Elm_Widget_On_Signal_Emit_Cb)(void *data, const char *emission, const char *source); -typedef void (*Elm_Widget_On_Disable_Set_Cb)(void *data); +typedef void (*Elm_Widget_On_Text_Set_Cb)(void *data, const char *part, const char *text); +typedef void (*Elm_Widget_On_Content_Set_Cb)(void *data, const char *part, Evas_Object *content); +typedef const char *(*Elm_Widget_On_Text_Get_Cb)(const void *data, const char *part); +typedef Evas_Object *(*Elm_Widget_On_Content_Get_Cb)(const void *data, const char *part); +typedef Evas_Object *(*Elm_Widget_On_Content_Unset_Cb)(const void *data, const char *part); +typedef void (*Elm_Widget_On_Signal_Emit_Cb)(void *data, const char *emission, const char *source); +typedef void (*Elm_Widget_On_Disable_Set_Cb)(void *data); +#define ELM_ACCESS_TYPE 0 // when reading out widget or item this is read first +#define ELM_ACCESS_INFO 1 // next read is info - this is normally label +#define ELM_ACCESS_STATE 2 // if there is a state (eg checkbox) then read state out +#define ELM_ACCESS_CONTENT 3 // read ful content - eg all of the label, not a shortened version -#define ELM_ACCESS_TYPE 0 // when reading out widget or item this is read first -#define ELM_ACCESS_INFO 1 // next read is info - this is normally label -#define ELM_ACCESS_STATE 2 // if there is a state (eg checkbox) then read state out -#define ELM_ACCESS_CONTENT 3 // read ful content - eg all of the label, not a shortened version - -#define ELM_ACCESS_DONE -1 // sentence done - send done event here -#define ELM_ACCESS_CANCEL -2 // stop reading immediately +#define ELM_ACCESS_DONE -1 // sentence done - send done event here +#define ELM_ACCESS_CANCEL -2 // stop reading immediately typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj, Elm_Widget_Item *item); struct _Elm_Access_Item { - int type; - const void *data; + int type; + const void *data; Elm_Access_Content_Cb func; }; struct _Elm_Access_Info { - Eina_List *items; + Eina_List *items; Ecore_Timer *delay_timer; }; EAPI void _elm_access_clear(Elm_Access_Info *ac); EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text); EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data); -EAPI char *_elm_access_text_get(Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item); +EAPI char *_elm_access_text_get(Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item); EAPI void _elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item); EAPI void _elm_access_say(const char *txt); EAPI Elm_Access_Info *_elm_access_object_get(Evas_Object *obj); @@ -242,7 +241,7 @@ EAPI void _elm_access_object_register(Evas_Object *obj, Evas_Object EAPI void _elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj); EAPI Eina_Bool _elm_access_2nd_click_timeout(Evas_Object *obj); -#define ELM_WIDGET_ITEM Elm_Widget_Item base /**< put this as the first member in your widget item struct */ +#define ELM_WIDGET_ITEM Elm_Widget_Item base /**< put this as the first member in your widget item struct */ struct _Elm_Widget_Item { /* ef1 ~~ efl, el3 ~~ elm */ @@ -250,22 +249,22 @@ struct _Elm_Widget_Item EINA_MAGIC; /* simple accessor macros */ -#define VIEW(X) X->base.view +#define VIEW(X) X->base.view #define WIDGET(X) X->base.widget - Evas_Object *widget; /**< the owner widget that owns this item */ - Evas_Object *view; /**< the base view object */ - const void *data; /**< item specific data */ - Evas_Smart_Cb del_cb; /**< used to notify the item is being deleted */ - Elm_Widget_On_Content_Set_Cb on_content_set_func; - Elm_Widget_On_Content_Get_Cb on_content_get_func; + Evas_Object *widget; /**< the owner widget that owns this item */ + Evas_Object *view; /**< the base view object */ + const void *data; /**< item specific data */ + Evas_Smart_Cb del_cb; /**< used to notify the item is being deleted */ + Elm_Widget_On_Content_Set_Cb on_content_set_func; + Elm_Widget_On_Content_Get_Cb on_content_get_func; Elm_Widget_On_Content_Unset_Cb on_content_unset_func; - Elm_Widget_On_Text_Set_Cb on_text_set_func; - Elm_Widget_On_Text_Get_Cb on_text_get_func; - Elm_Widget_On_Signal_Emit_Cb on_signal_emit_func; - Elm_Widget_On_Disable_Set_Cb disable_func; - Elm_Access_Info *access; - const char *access_info; - Eina_Bool disabled: 1; + Elm_Widget_On_Text_Set_Cb on_text_set_func; + Elm_Widget_On_Text_Get_Cb on_text_get_func; + Elm_Widget_On_Signal_Emit_Cb on_signal_emit_func; + Elm_Widget_On_Disable_Set_Cb disable_func; + Elm_Access_Info *access; + const char *access_info; + Eina_Bool disabled : 1; /* widget variations should have data from here and on */ /* @todo: TODO check if this is enough for 1.0 release, maybe add padding! */ }; @@ -277,43 +276,43 @@ struct _Elm_Object_Item #define ELM_NEW(t) calloc(1, sizeof(t)) -#define ELM_OBJ_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *) (it), __VA_ARGS__); \ - ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__; +#define ELM_OBJ_ITEM_CHECK_OR_RETURN(it, ...) \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)(it), __VA_ARGS__); \ + ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__; EAPI Eina_Bool elm_widget_api_check(int ver); EAPI Evas_Object *elm_widget_add(Evas *evas); -EAPI void elm_widget_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_del_pre_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_translate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_event_hook_set(Evas_Object *obj, Eina_Bool (*func) (Evas_Object *obj, Evas_Object *source, Evas_Callback_Type type, void *event_info)); -EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj)); -EAPI void elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source)); -EAPI void elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)); -EAPI void elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)); +EAPI void elm_widget_del_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_del_pre_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_translate_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_event_hook_set(Evas_Object *obj, Eina_Bool (*func)(Evas_Object *obj, Evas_Object *source, Evas_Callback_Type type, void *event_info)); +EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj)); +EAPI void elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source)); +EAPI void elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)); +EAPI void elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)); EAPI void elm_widget_theme(Evas_Object *obj); EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force); EAPI void elm_widget_translate(Evas_Object *obj); -EAPI void elm_widget_focus_next_hook_set(Evas_Object *obj, Eina_Bool (*func) (const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)); -EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data); -EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data); -EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data); -EAPI void elm_widget_focus_region_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)); +EAPI void elm_widget_focus_next_hook_set(Evas_Object *obj, Eina_Bool (*func)(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)); +EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Object *obj), void *data); +EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Object *obj), void *data); +EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func)(void *data, Evas_Object *obj), void *data); +EAPI void elm_widget_focus_region_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)); EAPI void elm_widget_text_set_hook_set(Evas_Object *obj, Elm_Widget_On_Text_Set_Cb func); -#define elm_widget_text_set_hook_set(obj, func) elm_widget_text_set_hook_set(obj, (Elm_Widget_On_Text_Set_Cb)(func)) +#define elm_widget_text_set_hook_set(obj, func) elm_widget_text_set_hook_set(obj, (Elm_Widget_On_Text_Set_Cb)(func)) EAPI void elm_widget_text_get_hook_set(Evas_Object *obj, Elm_Widget_On_Text_Get_Cb func); -#define elm_widget_text_get_hook_set(obj, func) elm_widget_text_get_hook_set(obj, (Elm_Widget_On_Text_Get_Cb)(func)) +#define elm_widget_text_get_hook_set(obj, func) elm_widget_text_get_hook_set(obj, (Elm_Widget_On_Text_Get_Cb)(func)) EAPI void elm_widget_content_set_hook_set(Evas_Object *obj, Elm_Widget_On_Content_Set_Cb func); -#define elm_widget_content_set_hook_set(obj, func) elm_widget_content_set_hook_set(obj, (Elm_Widget_On_Content_Set_Cb)(func)) +#define elm_widget_content_set_hook_set(obj, func) elm_widget_content_set_hook_set(obj, (Elm_Widget_On_Content_Set_Cb)(func)) EAPI void elm_widget_content_get_hook_set(Evas_Object *obj, Elm_Widget_On_Content_Get_Cb func); -#define elm_widget_content_get_hook_set(obj, func) elm_widget_content_get_hook_set(obj, (Elm_Widget_On_Content_Get_Cb)(func)) +#define elm_widget_content_get_hook_set(obj, func) elm_widget_content_get_hook_set(obj, (Elm_Widget_On_Content_Get_Cb)(func)) EAPI void elm_widget_content_unset_hook_set(Evas_Object *obj, Elm_Widget_On_Content_Unset_Cb func); #define elm_widget_content_unset_hook_set(obj, func) elm_widget_content_unset_hook_set(obj, (Elm_Widget_On_Content_Unset_Cb)(func)) -EAPI void elm_widget_on_focus_region_hook_set(Evas_Object *obj, void (*func) (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)); +EAPI void elm_widget_on_focus_region_hook_set(Evas_Object *obj, void (*func)(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)); EAPI void elm_widget_data_set(Evas_Object *obj, void *data); EAPI void *elm_widget_data_get(const Evas_Object *obj); EAPI void elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj); @@ -349,7 +348,7 @@ EAPI void elm_widget_focus_custom_chain_prepend(Evas_Object *obj, Ev EAPI void elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir); EAPI void elm_widget_focus_direction_go(Evas_Object *obj, int x, int y); EAPI Eina_Bool elm_widget_focus_next_get(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next); -EAPI Eina_Bool elm_widget_focus_list_next_get(const Evas_Object *obj, const Eina_List *items, void *(*list_data_get) (const Eina_List *list), Elm_Focus_Direction dir, Evas_Object **next); +EAPI Eina_Bool elm_widget_focus_list_next_get(const Evas_Object *obj, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), Elm_Focus_Direction dir, Evas_Object **next); EAPI void elm_widget_focus_set(Evas_Object *obj, int first); EAPI void elm_widget_focused_object_clear(Evas_Object *obj); EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj); @@ -387,7 +386,9 @@ EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj); EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj); EAPI void elm_widget_scale_set(Evas_Object *obj, double scale); EAPI double elm_widget_scale_get(const Evas_Object *obj); -EAPI Eina_Bool elm_widget_mirrored_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI Eina_Bool + elm_widget_mirrored_get(const Evas_Object *obj) +EINA_ARG_NONNULL(1); EAPI void elm_widget_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_widget_mirrored_automatic_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI void elm_widget_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic) EINA_ARG_NONNULL(1); @@ -528,7 +529,7 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out * @see _elm_widget_item_tooltip_content_cb_set() */ #define elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb) \ - _elm_widget_item_tooltip_content_cb_set((Elm_Widget_Item *)item, \ + _elm_widget_item_tooltip_content_cb_set((Elm_Widget_Item *)item, \ func, data, del_cb) /** * Convenience function to unset widget item tooltip. @@ -639,68 +640,68 @@ EAPI void elm_widget_tree_dot_dump(const Evas_Object *top, FILE *out #define elm_widget_item_disabled_get(item) \ _elm_widget_item_disabled_get((Elm_Widget_Item *)item) -EAPI Eina_Bool _elm_widget_item_disabled_get(const Elm_Widget_Item *item); +EAPI Eina_Bool _elm_widget_item_disabled_get(const Elm_Widget_Item *item); /** * Convenience function to query disable set hook. * @see _elm_widget_item_disable_set_hook_set() */ #define elm_widget_item_disable_set_hook_set(item, func) \ - _elm_widget_item_disable_set_hook_set((Elm_Widget_Item *) item, (Elm_Widget_On_Disable_Set_Cb)func) + _elm_widget_item_disable_set_hook_set((Elm_Widget_Item *)item, (Elm_Widget_On_Disable_Set_Cb)func) -#define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \ - do { \ - if (!item) { \ - CRITICAL("Elm_Widget_Item " # item " is NULL!"); \ - return __VA_ARGS__; \ - } \ - if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ - EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ - return __VA_ARGS__; \ - } \ - } while (0) +#define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \ + do { \ + if (!item) { \ + CRITICAL("Elm_Widget_Item " # item " is NULL!"); \ + return __VA_ARGS__; \ + } \ + if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ + EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ + return __VA_ARGS__; \ + } \ + } while (0) -#define ELM_WIDGET_ITEM_CHECK_OR_GOTO(item, label) \ - do { \ - if (!item) { \ - CRITICAL("Elm_Widget_Item " # item " is NULL!"); \ - goto label; \ - } \ - if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ - EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ - goto label; \ - } \ - } while (0) +#define ELM_WIDGET_ITEM_CHECK_OR_GOTO(item, label) \ + do { \ + if (!item) { \ + CRITICAL("Elm_Widget_Item " # item " is NULL!"); \ + goto label; \ + } \ + if (!EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) { \ + EINA_MAGIC_FAIL(item, ELM_WIDGET_ITEM_MAGIC); \ + goto label; \ + } \ + } while (0) -#define ELM_SET_WIDTYPE(widtype, type) \ - do { \ - if (!widtype) { \ - widtype = eina_stringshare_add(type); \ - elm_widget_type_register(&widtype); \ - } \ - } while (0) +#define ELM_SET_WIDTYPE(widtype, type) \ + do { \ + if (!widtype) { \ + widtype = eina_stringshare_add(type); \ + elm_widget_type_register(&widtype); \ + } \ + } while (0) #define ELM_CHECK_WID_IS(obj) \ - if (!elm_widget_is_check(obj)) return + if (!elm_widget_is_check(obj)) return #define ELM_CHECK_WIDTYPE(obj, widtype) \ - if (!obj || !elm_widget_type_check((obj), (widtype), __func__)) return + if (!obj || !elm_widget_type_check((obj), (widtype), __func__)) return -#define ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ - ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__; +#define ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, ...) \ + ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ + ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__; -#define ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_GOTO(it, label) \ - ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ - if (!elm_widget_type_check((it->base.widget), (widtype), __func__)) goto label; +#define ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_GOTO(it, label) \ + ELM_WIDGET_ITEM_CHECK_OR_GOTO((Elm_Widget_Item *)it, label); \ + if (!elm_widget_type_check((it->base.widget), (widtype), __func__)) goto label; -#define ELM_WIDGET_STANDARD_SETUP(wdat, wdtype, par, evas, ob, ret) \ - do { \ - EINA_SAFETY_ON_NULL_RETURN_VAL((par), (ret)); \ - evas = evas_object_evas_get(par); if (!(evas)) return (ret); \ - wdat = ELM_NEW(wdtype); if (!(wdat)) return (ret); \ - ob = elm_widget_add(evas); if (!(ob)) { free(wdat); return (ret); } \ - } while (0) +#define ELM_WIDGET_STANDARD_SETUP(wdat, wdtype, par, evas, ob, ret) \ + do { \ + EINA_SAFETY_ON_NULL_RETURN_VAL((par), (ret)); \ + evas = evas_object_evas_get(par); if (!(evas)) return (ret); \ + wdat = ELM_NEW(wdtype); if (!(wdat)) return (ret); \ + ob = elm_widget_add(evas); if (!(ob)) { free(wdat); return (ret); } \ + } while (0) /** * The drag and drop API. @@ -712,9 +713,9 @@ EAPI Eina_Bool _elm_widget_item_disabled_get(const Elm_Widget_Item *item) * And yes, elm_widget, should probably be elm_experimental... * Complaints about this code should go to /dev/null, or failing that nash. */ -Eina_Bool elm_selection_selection_has_owner(void); -Eina_Bool elm_drop_target_add(Evas_Object *widget, Elm_Sel_Type, Elm_Drop_Cb, void *); -Eina_Bool elm_drop_target_del(Evas_Object *widget); -Eina_Bool elm_drag_start(Evas_Object *, Elm_Sel_Format, const char *, void (*)(void *,Evas_Object*),void*); +Eina_Bool elm_selection_selection_has_owner(void); +Eina_Bool elm_drop_target_add(Evas_Object *widget, Elm_Sel_Type, Elm_Drop_Cb, void *); +Eina_Bool elm_drop_target_del(Evas_Object *widget); +Eina_Bool elm_drag_start(Evas_Object *, Elm_Sel_Format, const char *, void (*)(void *, Evas_Object *), void *); #endif diff --git a/legacy/elementary/src/lib/elm_win.h b/legacy/elementary/src/lib/elm_win.h index 8b2d1e4cd5..c80c866f32 100644 --- a/legacy/elementary/src/lib/elm_win.h +++ b/legacy/elementary/src/lib/elm_win.h @@ -1,1017 +1,1018 @@ - /* win */ - /** @defgroup Win Win - * - * @image html img/widget/win/preview-00.png - * @image latex img/widget/win/preview-00.eps - * - * 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). - * - * @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) - * @li "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System) - * @li "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in Cocoa) - * @li "psl1ght" (PS3 rendering using PSL1GHT) - * - * 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: - * - * "shot:[delay=XX][:][repeat=DDD][:][file=XX]" - * - * 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: - * - * 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 - * - * Signals that you can add callbacks for are: - * - * @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 - * - * Examples: - * @li @ref win_example_01 - * - * @{ - */ - /** - * Defines the types of window that can be created - * - * 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. - */ - 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; - - /** - * The differents layouts that can be requested for the virtual keyboard. - * - * When the application window is being managed by Illume, it may request - * any of the following layouts for the virtual keyboard. - */ - // XXX: remove this as it conflicts with input panel - 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; - - /** - * 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. - * - * 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. - * - * @return The created object, or NULL on failure - */ - EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type); - - /** - * Adds a window object with standard setup - * - * @param name The name of the window - * @param title The title for the window - * - * This creates a window like elm_win_add() but also puts in a standard - * background with elm_bg_add(), as well as setting the window title to - * @p title. The window type created is of type ELM_WIN_BASIC, with NULL - * as the parent widget. - * - * @return The created object, or NULL on failure - * - * @see elm_win_add() - */ - EAPI Evas_Object *elm_win_util_standard_add(const char *name, const char *title); - - /** - * Add @p subobj as a resize object of window @p obj. - * - * - * 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. - * - * Also notice that the window can get resized to the current size of the - * object if the EVAS_HINT_EXPAND is set @b after the call to - * elm_win_resize_object_add(). So if the object should get resized to the - * size of the window, set this hint @b before adding it as a resize object - * (this happens because the size of the window and the object are evaluated - * as soon as the object is added to the window). - * - * @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); - - /** - * Delete @p subobj as a resize object of window @p obj. - * - * 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 obj The window object - * @param subobj The resize object to add - */ - EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); - - /** - * Set the title of the window - * - * @param obj The window object - * @param title The title to set - */ - EAPI void elm_win_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1); - - /** - * Get the title of the window - * - * 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 window object - * @return The title - */ - EAPI const char *elm_win_title_get(const Evas_Object *obj) 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. - * - * 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 window object - * @param autodel If true, the window will automatically delete itself when - * closed - */ - EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) EINA_ARG_NONNULL(1); - - /** - * Get the window's autodel state. - * - * @param obj The window object - * @return If the window will automatically delete itself when closed - * - * @see elm_win_autodel_set() - */ - EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Activate a window 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 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. - * - * @param obj The window object - */ - EAPI void elm_win_activate(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Lower a window object. - * - * 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. - * - * @param obj The window object - */ - EAPI void elm_win_lower(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Raise a window object. - * - * Places the window pointed by @p obj at the top of the stack, so that it's - * not covered by any other window. - * - * If elm_win_override_set() is not set, the Window Manager may ignore this - * request. - * - * @param obj The window object - */ - EAPI void elm_win_raise(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Center a window on its screen - * - * This function centers window @p obj horizontally and/or vertically based on the values - * of @p h and @v. - * @param obj The window object - * @param h If true, center horizontally. If false, do not change horizontal location. - * @param v If true, center vertically. If false, do not change vertical location. - */ - EAPI void elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v) EINA_ARG_NONNULL(1); - - /** - * Set the borderless state of a window. - * - * This function requests the Window Manager to not draw any decoration - * around the window. - * - * @param obj The window object - * @param borderless If true, the window is borderless - */ - EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless) EINA_ARG_NONNULL(1); - - /** - * Get the borderless state of a window. - * - * @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. - * - * 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 - * - * @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 - * - * @see elm_win_shaped_set() - */ - EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * 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(). - * - * @param obj The window object - * @param alpha If true, the window has an alpha channel - * - * @see elm_win_alpha_set() - */ - EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1); - - /** - * Get the transparency state of a window. - * - * @param obj The window object - * @return If true, the window is transparent - * - * @see elm_win_transparent_set() - */ - // XXX: deprecate this - EAPI Eina_Bool elm_win_transparent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the transparency state of a window. - * - * Use elm_win_alpha_set() instead. - * - * @param obj The window object - * @param transparent If true, the window is transparent - * - * @see elm_win_alpha_set() - */ - // XXX: deprecate this - EAPI void elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent) EINA_ARG_NONNULL(1); - - /** - * Get the alpha channel state of a window. - * - * @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. - * - * 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. - * - * 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. - * - * @param obj The window object - * @param override If true, the window is overridden - */ - EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override) EINA_ARG_NONNULL(1); - - /** - * Get the override state of a window. - * - * @param obj The window object - * @return If true, the window is overridden - * - * @see elm_win_override_set() - */ - EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the fullscreen state of a window. - * - * @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. - * - * @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. - * - * @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); - - /** - * Get the maximized state of a window. - * - * @param obj The window object - * @return If true, the window is maximized - */ - EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the iconified state of a window. - * - * @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. - * - * @param obj The window object - * @return If true, the window is iconified - */ - EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the layer of the window. - * - * What this means exactly will depend on the underlying engine 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. - * - * @param obj The window object - * @param layer The layer of the window - */ - EAPI void elm_win_layer_set(Evas_Object *obj, int layer) EINA_ARG_NONNULL(1); - - /** - * Get the layer of the window. - * - * @param obj The window object - * @return The layer of the window - * - * @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. - * - * Most engines only work with multiples of 90. - * - * 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(). - * - * @param obj The window object - * @param rotation The rotation of the window, in degrees (0-360), - * counter-clockwise. - */ - EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1); - - /** - * Rotates the window and resizes it. - * - * Like elm_win_rotation_set(), but it also resizes the window's contents so - * that they fit inside the current window geometry. - * - * @param obj The window object - * @param layer The rotation of the window in degrees (0-360), - * counter-clockwise. - */ - EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1); - - /** - * Get the rotation of the window. - * - * @param obj The window object - * @return The rotation of the window in degrees (0-360) - * - * @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. - * - * 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. - * - * @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. - * - * @param obj The window object - * @return If true, the window's sticky state is enabled - * - * @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 - * - * @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 - * - * @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 - * - * By default window objects are not quickpanel windows. - * - * @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 - * - * @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 - * - * @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 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 - * - * @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 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 - * - * @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 - * - * @param obj The window object - * @return The requested zone for this quickpanel - */ - EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * 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. - * - * 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. - * - * @param obj The window object - * @param skip The skip flag state (EINA_TRUE if it is to be skipped) - */ - EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip) EINA_ARG_NONNULL(1); - - /** - * 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). - * - * @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 void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params) EINA_ARG_NONNULL(1); - - /** - * Get the inlined image object handle - * - * 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 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); - - /** - * Determine whether a window has focus - * @param obj The window to query - * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE - */ - EAPI Eina_Bool elm_win_focus_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Constrain the maximum width and height of a window to the width and height of its screen - * - * When @p constrain is true, @p obj will never resize larger than the screen. - * @param obj The window object - * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction - */ - EAPI void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain) EINA_ARG_NONNULL(1); - - /** - * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen - * - * When this function returns true, @p obj will never resize larger than the screen. - * @param obj The window object - * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction - */ - EAPI Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get screen geometry details for the screen that a window is on - * @param obj The window to query - * @param x where to return the horizontal offset value. May be NULL. - * @param y where to return the vertical offset value. May be NULL. - * @param w where to return the width value. May be NULL. - * @param h where to return the height value. May be NULL. - */ - EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); - - /** - * Set the enabled status for the focus highlight in a window - * - * This function will enable or disable the focus highlight only for the - * given window, regardless of the global setting for it - * - * @param obj The window where to enable the highlight - * @param enabled The enabled value for the highlight - */ - EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); - - /** - * Get the enabled value of the focus highlight for this window - * - * @param obj The window in which to check if the focus highlight is enabled - * - * @return EINA_TRUE if enabled, EINA_FALSE otherwise - */ - EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the style for the focus highlight on this window - * - * 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. - * - * @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 - * - * Gets the style set for this windows highilght object, or NULL if none - * is set. - * - * @param obj The window to retrieve the highlights style from - * - * @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) - * - * (add to ecore_x) set netwm argb icon! (add to ecore_evas) - * (blank mouse, private mouse obj, defaultmouse) - * - */ - - /** - * Sets the keyboard mode of the window. - * - * @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. - * - * @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. - * - * @param obj The window object - * @param is_keyboard If true, the window is a virtual keyboard - */ - 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. - * - * @param obj The window object - * @return If the window is a virtual keyboard - */ - EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Get the screen position of a window. - * - * @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 void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1); - - /** - * @} - */ - - /** - * @defgroup Inwin Inwin - * - * @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 - * - * An inwin is a window inside a window that is useful for a quick popup. - * It does not hover. - * - * 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. - * - * 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 - * - * @{ - */ - - /** - * Adds an inwin to the current window - * - * The @p obj used as parent @b MUST be an @ref Win "Elementary Window". - * Never call this function with anything other than the top-most window - * as its parameter, unless you are fond of undefined behavior. - * - * After creating the object, the widget will set itself as resize object - * for the window with elm_win_resize_object_add(), so when shown it will - * appear to cover almost the entire window (how much of it depends on its - * content and the style used). It must not be added into other container - * objects and it needs not be moved or resized manually. - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - */ - // XXX: deprecate this - EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj) 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". - * - * @param obj The inwin to activate - */ - // XXX: deprecate this - EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Set the content of an inwin object. - * - * Once the content object is set, a previously set one will be deleted. - * If you want to keep that old content object, use the - * elm_win_inwin_content_unset() function. - * - * @param obj The inwin object - * @param content The object to set as content - */ - // XXX: deprecate this - EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); - - /** - * Get the content of an inwin object. - * - * Return the content object which is set for this widget. - * - * The returned object is valid as long as the inwin is still alive and no - * other content is set on it. Deleting the object will notify the inwin - * about it and this one will be left empty. - * - * If you need to remove an inwin's content to be reused somewhere else, - * see elm_win_inwin_content_unset(). - * - * @param obj The inwin object - * @return The content that is being used - */ - // XXX: deprecate this - EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); - - /** - * Unset the content of an inwin object. - * - * Unparent and return the content object which was set for this widget. - * - * @param obj The inwin object - * @return The content that was being used - */ - // XXX: deprecate this - 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) */ - - /** - * Get the Ecore_X_Window of an Evas_Object - * - * @param obj The object - * - * @return The Ecore_X_Window of @p obj - * - * @ingroup Win - */ - 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 - */ - +/* win */ +/** @defgroup Win Win + * + * @image html img/widget/win/preview-00.png + * @image latex img/widget/win/preview-00.eps + * + * 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). + * + * @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) + * @li "ews" (rendering to EWS - Ecore + Evas Single Process Windowing System) + * @li "gl-cocoa", "gl_cocoa", "opengl-cocoa", "opengl_cocoa" (OpenGL rendering in Cocoa) + * @li "psl1ght" (PS3 rendering using PSL1GHT) + * + * 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: + * + * "shot:[delay=XX][:][repeat=DDD][:][file=XX]" + * + * 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: + * + * 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 + * + * Signals that you can add callbacks for are: + * + * @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 + * + * Examples: + * @li @ref win_example_01 + * + * @{ + */ +/** + * Defines the types of window that can be created + * + * 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. + */ +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; + +/** + * The differents layouts that can be requested for the virtual keyboard. + * + * When the application window is being managed by Illume, it may request + * any of the following layouts for the virtual keyboard. + */ +// XXX: remove this as it conflicts with input panel +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; + +/** + * 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. + * + * 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. + * + * @return The created object, or NULL on failure + */ +EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type); + +/** + * Adds a window object with standard setup + * + * @param name The name of the window + * @param title The title for the window + * + * This creates a window like elm_win_add() but also puts in a standard + * background with elm_bg_add(), as well as setting the window title to + * @p title. The window type created is of type ELM_WIN_BASIC, with NULL + * as the parent widget. + * + * @return The created object, or NULL on failure + * + * @see elm_win_add() + */ +EAPI Evas_Object *elm_win_util_standard_add(const char *name, const char *title); + +/** + * Add @p subobj as a resize object of window @p obj. + * + * + * 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. + * + * Also notice that the window can get resized to the current size of the + * object if the EVAS_HINT_EXPAND is set @b after the call to + * elm_win_resize_object_add(). So if the object should get resized to the + * size of the window, set this hint @b before adding it as a resize object + * (this happens because the size of the window and the object are evaluated + * as soon as the object is added to the window). + * + * @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); + +/** + * Delete @p subobj as a resize object of window @p obj. + * + * 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 obj The window object + * @param subobj The resize object to add + */ +EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1); + +/** + * Set the title of the window + * + * @param obj The window object + * @param title The title to set + */ +EAPI void elm_win_title_set(Evas_Object *obj, const char *title) EINA_ARG_NONNULL(1); + +/** + * Get the title of the window + * + * 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 window object + * @return The title + */ +EAPI const char *elm_win_title_get(const Evas_Object *obj) 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. + * + * 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 window object + * @param autodel If true, the window will automatically delete itself when + * closed + */ +EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) EINA_ARG_NONNULL(1); + +/** + * Get the window's autodel state. + * + * @param obj The window object + * @return If the window will automatically delete itself when closed + * + * @see elm_win_autodel_set() + */ +EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Activate a window 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 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. + * + * @param obj The window object + */ +EAPI void elm_win_activate(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Lower a window object. + * + * 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. + * + * @param obj The window object + */ +EAPI void elm_win_lower(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Raise a window object. + * + * Places the window pointed by @p obj at the top of the stack, so that it's + * not covered by any other window. + * + * If elm_win_override_set() is not set, the Window Manager may ignore this + * request. + * + * @param obj The window object + */ +EAPI void elm_win_raise(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Center a window on its screen + * + * This function centers window @p obj horizontally and/or vertically based on the values + * of @p h and @v. + * @param obj The window object + * @param h If true, center horizontally. If false, do not change horizontal location. + * @param v If true, center vertically. If false, do not change vertical location. + */ +EAPI void elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v) EINA_ARG_NONNULL(1); + +/** + * Set the borderless state of a window. + * + * This function requests the Window Manager to not draw any decoration + * around the window. + * + * @param obj The window object + * @param borderless If true, the window is borderless + */ +EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless) EINA_ARG_NONNULL(1); + +/** + * Get the borderless state of a window. + * + * @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. + * + * 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 + * + * @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 + * + * @see elm_win_shaped_set() + */ +EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * 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(). + * + * @param obj The window object + * @param alpha If true, the window has an alpha channel + * + * @see elm_win_alpha_set() + */ +EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha) EINA_ARG_NONNULL(1); + +/** + * Get the transparency state of a window. + * + * @param obj The window object + * @return If true, the window is transparent + * + * @see elm_win_transparent_set() + */ +// XXX: deprecate this +EAPI Eina_Bool elm_win_transparent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the transparency state of a window. + * + * Use elm_win_alpha_set() instead. + * + * @param obj The window object + * @param transparent If true, the window is transparent + * + * @see elm_win_alpha_set() + */ +// XXX: deprecate this +EAPI void elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent) EINA_ARG_NONNULL(1); + +/** + * Get the alpha channel state of a window. + * + * @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. + * + * 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. + * + * 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. + * + * @param obj The window object + * @param override If true, the window is overridden + */ +EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override) EINA_ARG_NONNULL(1); + +/** + * Get the override state of a window. + * + * @param obj The window object + * @return If true, the window is overridden + * + * @see elm_win_override_set() + */ +EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the fullscreen state of a window. + * + * @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. + * + * @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. + * + * @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); + +/** + * Get the maximized state of a window. + * + * @param obj The window object + * @return If true, the window is maximized + */ +EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the iconified state of a window. + * + * @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. + * + * @param obj The window object + * @return If true, the window is iconified + */ +EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the layer of the window. + * + * What this means exactly will depend on the underlying engine 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. + * + * @param obj The window object + * @param layer The layer of the window + */ +EAPI void elm_win_layer_set(Evas_Object *obj, int layer) EINA_ARG_NONNULL(1); + +/** + * Get the layer of the window. + * + * @param obj The window object + * @return The layer of the window + * + * @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. + * + * Most engines only work with multiples of 90. + * + * 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(). + * + * @param obj The window object + * @param rotation The rotation of the window, in degrees (0-360), + * counter-clockwise. + */ +EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1); + +/** + * Rotates the window and resizes it. + * + * Like elm_win_rotation_set(), but it also resizes the window's contents so + * that they fit inside the current window geometry. + * + * @param obj The window object + * @param rotation The rotation of the window in degrees (0-360), + * counter-clockwise. + */ +EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation) EINA_ARG_NONNULL(1); + +/** + * Get the rotation of the window. + * + * @param obj The window object + * @return The rotation of the window in degrees (0-360) + * + * @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. + * + * 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. + * + * @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. + * + * @param obj The window object + * @return If true, the window's sticky state is enabled + * + * @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 + * + * @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 + * + * @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 + * + * By default window objects are not quickpanel windows. + * + * @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 + * + * @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 + * + * @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 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 + * + * @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 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 + * + * @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 + * + * @param obj The window object + * @return The requested zone for this quickpanel + */ +EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * 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. + * + * 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. + * + * @param obj The window object + * @param skip The skip flag state (EINA_TRUE if it is to be skipped) + */ +EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip) EINA_ARG_NONNULL(1); + +/** + * 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). + * + * @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 void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params) EINA_ARG_NONNULL(1); + +/** + * Get the inlined image object handle + * + * 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 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); + +/** + * Determine whether a window has focus + * @param obj The window to query + * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE + */ +EAPI Eina_Bool elm_win_focus_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Constrain the maximum width and height of a window to the width and height of its screen + * + * When @p constrain is true, @p obj will never resize larger than the screen. + * @param obj The window object + * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction + */ +EAPI void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain) EINA_ARG_NONNULL(1); + +/** + * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen + * + * When this function returns true, @p obj will never resize larger than the screen. + * @param obj The window object + * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction + */ +EAPI Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get screen geometry details for the screen that a window is on + * @param obj The window to query + * @param x where to return the horizontal offset value. May be NULL. + * @param y where to return the vertical offset value. May be NULL. + * @param w where to return the width value. May be NULL. + * @param h where to return the height value. May be NULL. + */ +EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); + +/** + * Set the enabled status for the focus highlight in a window + * + * This function will enable or disable the focus highlight only for the + * given window, regardless of the global setting for it + * + * @param obj The window where to enable the highlight + * @param enabled The enabled value for the highlight + */ +EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled) EINA_ARG_NONNULL(1); + +/** + * Get the enabled value of the focus highlight for this window + * + * @param obj The window in which to check if the focus highlight is enabled + * + * @return EINA_TRUE if enabled, EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the style for the focus highlight on this window + * + * 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. + * + * @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 + * + * Gets the style set for this windows highilght object, or NULL if none + * is set. + * + * @param obj The window to retrieve the highlights style from + * + * @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) + * + * (add to ecore_x) set netwm argb icon! (add to ecore_evas) + * (blank mouse, private mouse obj, defaultmouse) + * + */ + +/** + * Sets the keyboard mode of the window. + * + * @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. + * + * @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. + * + * @param obj The window object + * @param is_keyboard If true, the window is a virtual keyboard + */ +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. + * + * @param obj The window object + * @return If the window is a virtual keyboard + */ +EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Get the screen position of a window. + * + * @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 void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Inwin Inwin + * + * @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 + * + * An inwin is a window inside a window that is useful for a quick popup. + * It does not hover. + * + * 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. + * + * 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 + * + * @{ + */ + +/** + * Adds an inwin to the current window + * + * The @p obj used as parent @b MUST be an @ref Win "Elementary Window". + * Never call this function with anything other than the top-most window + * as its parameter, unless you are fond of undefined behavior. + * + * After creating the object, the widget will set itself as resize object + * for the window with elm_win_resize_object_add(), so when shown it will + * appear to cover almost the entire window (how much of it depends on its + * content and the style used). It must not be added into other container + * objects and it needs not be moved or resized manually. + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + */ +// XXX: deprecate this +EAPI Evas_Object *elm_win_inwin_add(Evas_Object *parent) 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". + * + * @param obj The inwin to activate + */ +// XXX: deprecate this +EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Set the content of an inwin object. + * + * Once the content object is set, a previously set one will be deleted. + * If you want to keep that old content object, use the + * elm_win_inwin_content_unset() function. + * + * @param obj The inwin object + * @param content The object to set as content + */ +// XXX: deprecate this +EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); + +/** + * Get the content of an inwin object. + * + * Return the content object which is set for this widget. + * + * The returned object is valid as long as the inwin is still alive and no + * other content is set on it. Deleting the object will notify the inwin + * about it and this one will be left empty. + * + * If you need to remove an inwin's content to be reused somewhere else, + * see elm_win_inwin_content_unset(). + * + * @param obj The inwin object + * @return The content that is being used + */ +// XXX: deprecate this +EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + +/** + * Unset the content of an inwin object. + * + * Unparent and return the content object which was set for this widget. + * + * @param obj The inwin object + * @return The content that was being used + */ +// XXX: deprecate this +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) */ + +/** + * Get the Ecore_X_Window of an Evas_Object + * + * @param obj The object + * + * @return The Ecore_X_Window of @p obj + * + * @ingroup Win + */ +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 + */ diff --git a/legacy/elementary/src/lib/els_icon.h b/legacy/elementary/src/lib/els_icon.h index 641aa3d218..27baff1fcb 100644 --- a/legacy/elementary/src/lib/els_icon.h +++ b/legacy/elementary/src/lib/els_icon.h @@ -1,27 +1,27 @@ -Evas_Object *_els_smart_icon_add (Evas *evas); -Eina_Bool _els_smart_icon_memfile_set (Evas_Object *obj, const void *file, size_t size, const char *format, const char *key); -Eina_Bool _els_smart_icon_file_key_set (Evas_Object *obj, const char *file, const char *key); -Eina_Bool _els_smart_icon_file_edje_set (Evas_Object *obj, const char *file, const char *part); -void _els_smart_icon_file_get (const Evas_Object *obj, const char **file, const char **key); -void _els_smart_icon_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth); -Eina_Bool _els_smart_icon_smooth_scale_get (const Evas_Object *obj); -Evas_Object *_els_smart_icon_object_get (const Evas_Object *obj); -void _els_smart_icon_size_get (const Evas_Object *obj, int *w, int *h); -void _els_smart_icon_fill_inside_set (Evas_Object *obj, Eina_Bool fill_inside); -Eina_Bool _els_smart_icon_fill_inside_get (const Evas_Object *obj); -void _els_smart_icon_scale_up_set (Evas_Object *obj, Eina_Bool scale_up); -Eina_Bool _els_smart_icon_scale_up_get (const Evas_Object *obj); -void _els_smart_icon_scale_down_set (Evas_Object *obj, Eina_Bool scale_down); -Eina_Bool _els_smart_icon_scale_down_get (const Evas_Object *obj); -void _els_smart_icon_scale_size_set (Evas_Object *obj, int size); -int _els_smart_icon_scale_size_get (const Evas_Object *obj); -void _els_smart_icon_scale_set (Evas_Object *obj, double scale); -double _els_smart_icon_scale_get (const Evas_Object *obj); -void _els_smart_icon_orient_set (Evas_Object *obj, Elm_Image_Orient orient); -Elm_Image_Orient _els_smart_icon_orient_get (const Evas_Object *obj); -void _els_smart_icon_edit_set (Evas_Object *obj, Eina_Bool, Evas_Object *parent); -Eina_Bool _els_smart_icon_edit_get (const Evas_Object *obj); -Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj); -void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained); -Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj); -void _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable); +Evas_Object *_els_smart_icon_add(Evas *evas); +Eina_Bool _els_smart_icon_memfile_set(Evas_Object *obj, const void *file, size_t size, const char *format, const char *key); +Eina_Bool _els_smart_icon_file_key_set(Evas_Object *obj, const char *file, const char *key); +Eina_Bool _els_smart_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part); +void _els_smart_icon_file_get(const Evas_Object *obj, const char **file, const char **key); +void _els_smart_icon_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth); +Eina_Bool _els_smart_icon_smooth_scale_get(const Evas_Object *obj); +Evas_Object *_els_smart_icon_object_get(const Evas_Object *obj); +void _els_smart_icon_size_get(const Evas_Object *obj, int *w, int *h); +void _els_smart_icon_fill_inside_set(Evas_Object *obj, Eina_Bool fill_inside); +Eina_Bool _els_smart_icon_fill_inside_get(const Evas_Object *obj); +void _els_smart_icon_scale_up_set(Evas_Object *obj, Eina_Bool scale_up); +Eina_Bool _els_smart_icon_scale_up_get(const Evas_Object *obj); +void _els_smart_icon_scale_down_set(Evas_Object *obj, Eina_Bool scale_down); +Eina_Bool _els_smart_icon_scale_down_get(const Evas_Object *obj); +void _els_smart_icon_scale_size_set(Evas_Object *obj, int size); +int _els_smart_icon_scale_size_get(const Evas_Object *obj); +void _els_smart_icon_scale_set(Evas_Object *obj, double scale); +double _els_smart_icon_scale_get(const Evas_Object *obj); +void _els_smart_icon_orient_set(Evas_Object *obj, Elm_Image_Orient orient); +Elm_Image_Orient _els_smart_icon_orient_get(const Evas_Object *obj); +void _els_smart_icon_edit_set(Evas_Object *obj, Eina_Bool, Evas_Object *parent); +Eina_Bool _els_smart_icon_edit_get(const Evas_Object *obj); +Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj); +void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained); +Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj); +void _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable); diff --git a/legacy/elementary/src/lib/els_pan.h b/legacy/elementary/src/lib/els_pan.h index a00ef2bec4..568e74f488 100644 --- a/legacy/elementary/src/lib/els_pan.h +++ b/legacy/elementary/src/lib/els_pan.h @@ -1,11 +1,10 @@ -Evas_Object *_elm_smart_pan_add (Evas *evas); -void _elm_smart_pan_child_set (Evas_Object *obj, Evas_Object *child); -Evas_Object *_elm_smart_pan_child_get (Evas_Object *obj); -void _elm_smart_pan_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y); -void _elm_smart_pan_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void _elm_smart_pan_max_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void _elm_smart_pan_min_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void _elm_smart_pan_child_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); -void _elm_smart_pan_gravity_set (Evas_Object *obj, double x, double y); -void _elm_smart_pan_gravity_get (Evas_Object *obj, double *x, double *y); - +Evas_Object *_elm_smart_pan_add(Evas *evas); +void _elm_smart_pan_child_set(Evas_Object *obj, Evas_Object *child); +Evas_Object *_elm_smart_pan_child_get(Evas_Object *obj); +void _elm_smart_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +void _elm_smart_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void _elm_smart_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void _elm_smart_pan_min_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void _elm_smart_pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); +void _elm_smart_pan_gravity_set(Evas_Object *obj, double x, double y); +void _elm_smart_pan_gravity_get(Evas_Object *obj, double *x, double *y); diff --git a/legacy/elementary/src/lib/els_scroller.h b/legacy/elementary/src/lib/els_scroller.h index 91ddf6ab5f..d919be06a5 100644 --- a/legacy/elementary/src/lib/els_scroller.h +++ b/legacy/elementary/src/lib/els_scroller.h @@ -6,43 +6,43 @@ typedef enum _Elm_Smart_Scroller_Policy } Elm_Smart_Scroller_Policy; -Evas_Object *elm_smart_scroller_add (Evas *evas); -void elm_smart_scroller_child_set (Evas_Object *obj, Evas_Object *child); -void elm_smart_scroller_extern_pan_set (Evas_Object *obj, Evas_Object *pan, void (*pan_set) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_min_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)); -void elm_smart_scroller_custom_edje_file_set (Evas_Object *obj, char *file, char *group); -void elm_smart_scroller_child_pos_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y); -void elm_smart_scroller_child_pos_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void elm_smart_scroller_child_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); -void elm_smart_scroller_child_region_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); -void elm_smart_scroller_child_viewport_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); -void elm_smart_scroller_step_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y); -void elm_smart_scroller_step_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void elm_smart_scroller_page_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y); -void elm_smart_scroller_page_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); -void elm_smart_scroller_policy_set (Evas_Object *obj, Elm_Smart_Scroller_Policy hbar, Elm_Smart_Scroller_Policy vbar); -void elm_smart_scroller_policy_get (Evas_Object *obj, Elm_Smart_Scroller_Policy *hbar, Elm_Smart_Scroller_Policy *vbar); -Evas_Object *elm_smart_scroller_edje_object_get (Evas_Object *obj); -void elm_smart_scroller_single_dir_set (Evas_Object *obj, Eina_Bool single_dir); -Eina_Bool elm_smart_scroller_single_dir_get (Evas_Object *obj); -void elm_smart_scroller_object_theme_set (Evas_Object *parent, Evas_Object *obj, const char *clas, const char *group, const char *style); -void elm_smart_scroller_mirrored_set (Evas_Object *obj, Eina_Bool mirrored); -void elm_smart_scroller_hold_set (Evas_Object *obj, Eina_Bool hold); -void elm_smart_scroller_freeze_set (Evas_Object *obj, Eina_Bool freeze); -void elm_smart_scroller_bounce_allow_set (Evas_Object *obj, Eina_Bool horiz, Eina_Bool vert); -void elm_smart_scroller_bounce_allow_get (const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert); -void elm_smart_scroller_paging_set (Evas_Object *obj, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v); -void elm_smart_scroller_paging_get (Evas_Object *obj, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v); -void elm_smart_scroller_current_page_get (Evas_Object *obj, int *pagenumber_h, int *pagenumber_v); -void elm_smart_scroller_last_page_get (Evas_Object *obj, int *pagenumber_h, int *pagenumber_v); -void elm_smart_scroller_page_show (Evas_Object *obj, int pagenumber_h, int pagenumber_v); -void elm_smart_scroller_page_bring_in (Evas_Object *obj, int pagenumber_h, int pagenumber_v); -void elm_smart_scroller_region_bring_in (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); -void elm_smart_scroller_widget_set (Evas_Object *obj, Evas_Object *wid); -void elm_smart_scroller_gravity_set (Evas_Object *obj, double x, double y); -void elm_smart_scroller_gravity_get (Evas_Object *obj, double *x, double *y); -Eina_Bool elm_smart_scroller_momentum_animator_disabled_get (Evas_Object *obj); -void elm_smart_scroller_momentum_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled); -void elm_smart_scroller_bounce_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled); -Eina_Bool elm_smart_scroller_bounce_animator_disabled_get (Evas_Object *obj); -Eina_Bool elm_smart_scroller_wheel_disabled_get (Evas_Object *obj); -void elm_smart_scroller_wheel_disabled_set (Evas_Object *obj, Eina_Bool disabled); +Evas_Object *elm_smart_scroller_add(Evas *evas); +void elm_smart_scroller_child_set(Evas_Object *obj, Evas_Object *child); +void elm_smart_scroller_extern_pan_set(Evas_Object *obj, Evas_Object *pan, void (*pan_set)(Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get)(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get)(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_min_get)(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get)(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)); +void elm_smart_scroller_custom_edje_file_set(Evas_Object *obj, char *file, char *group); +void elm_smart_scroller_child_pos_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +void elm_smart_scroller_child_pos_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void elm_smart_scroller_child_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); +void elm_smart_scroller_child_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); +void elm_smart_scroller_child_viewport_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); +void elm_smart_scroller_step_size_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +void elm_smart_scroller_step_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void elm_smart_scroller_page_size_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y); +void elm_smart_scroller_page_size_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +void elm_smart_scroller_policy_set(Evas_Object *obj, Elm_Smart_Scroller_Policy hbar, Elm_Smart_Scroller_Policy vbar); +void elm_smart_scroller_policy_get(Evas_Object *obj, Elm_Smart_Scroller_Policy *hbar, Elm_Smart_Scroller_Policy *vbar); +Evas_Object *elm_smart_scroller_edje_object_get(Evas_Object *obj); +void elm_smart_scroller_single_dir_set(Evas_Object *obj, Eina_Bool single_dir); +Eina_Bool elm_smart_scroller_single_dir_get(Evas_Object *obj); +void elm_smart_scroller_object_theme_set(Evas_Object *parent, Evas_Object *obj, const char *clas, const char *group, const char *style); +void elm_smart_scroller_mirrored_set(Evas_Object *obj, Eina_Bool mirrored); +void elm_smart_scroller_hold_set(Evas_Object *obj, Eina_Bool hold); +void elm_smart_scroller_freeze_set(Evas_Object *obj, Eina_Bool freeze); +void elm_smart_scroller_bounce_allow_set(Evas_Object *obj, Eina_Bool horiz, Eina_Bool vert); +void elm_smart_scroller_bounce_allow_get(const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert); +void elm_smart_scroller_paging_set(Evas_Object *obj, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v); +void elm_smart_scroller_paging_get(Evas_Object *obj, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v); +void elm_smart_scroller_current_page_get(Evas_Object *obj, int *pagenumber_h, int *pagenumber_v); +void elm_smart_scroller_last_page_get(Evas_Object *obj, int *pagenumber_h, int *pagenumber_v); +void elm_smart_scroller_page_show(Evas_Object *obj, int pagenumber_h, int pagenumber_v); +void elm_smart_scroller_page_bring_in(Evas_Object *obj, int pagenumber_h, int pagenumber_v); +void elm_smart_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); +void elm_smart_scroller_widget_set(Evas_Object *obj, Evas_Object *wid); +void elm_smart_scroller_gravity_set(Evas_Object *obj, double x, double y); +void elm_smart_scroller_gravity_get(Evas_Object *obj, double *x, double *y); +Eina_Bool elm_smart_scroller_momentum_animator_disabled_get(Evas_Object *obj); +void elm_smart_scroller_momentum_animator_disabled_set(Evas_Object *obj, Eina_Bool disabled); +void elm_smart_scroller_bounce_animator_disabled_set(Evas_Object *obj, Eina_Bool disabled); +Eina_Bool elm_smart_scroller_bounce_animator_disabled_get(Evas_Object *obj); +Eina_Bool elm_smart_scroller_wheel_disabled_get(Evas_Object *obj); +void elm_smart_scroller_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);