Edje.h | Edje.h | |||
---|---|---|---|---|
/** | /** | |||
@brief Edje Graphical Design Library | @brief Edje Graphical Design Library | |||
These routines are used for Edje. | These routines are used for Edje. | |||
@mainpage Edje Library Documentation | @mainpage Edje Library Documentation | |||
@version 1.1 | @version 1.1 | |||
@date 2003-2011 | @date 2003-2012 | |||
Please see the @ref authors page for contact details. | Please see the @ref authors page for contact details. | |||
@section intro What is Edje? | @section intro What is Edje? | |||
Edje is a complex graphical design & layout library. | Edje is a complex graphical design & layout library. | |||
It doesn't pretend to do containing and regular layout like a widget | It doesn't intend to do containing and regular layout like a widget | |||
set, but it is the base for such components. Based on the requirements | set, but it is the base for such components. Based on the requirements | |||
of Enlightenment 0.17, Edje should serve all the purposes of creating | of Enlightenment 0.17, Edje should serve all the purposes of creating | |||
visual elements (borders of windows, buttons, scrollbars, etc.) and | visual elements (borders of windows, buttons, scrollbars, etc.) and | |||
allow the designer the ability to animate, layout and control the look | allow the designer the ability to animate, layout and control the look | |||
and feel of any program using Edje as its basic GUI constructor. This | and feel of any program using Edje as its basic GUI constructor. This | |||
library allows for multiple collections of Layouts in one file, | library allows for multiple collections of Layouts in one file, | |||
sharing the same image and font database and thus allowing a whole | sharing the same image and font database and thus allowing a whole | |||
theme to be conveniently packaged into 1 file and shipped around. | theme to be conveniently packaged into 1 file and shipped around. | |||
Edje separates the layout and behavior logic. Edje files ship with an | Edje separates the layout and behavior logic. Edje files ship with an | |||
skipping to change at line 104 | skipping to change at line 104 | |||
visible, not, where, at what size, with what colors etc. This is described | visible, not, where, at what size, with what colors etc. This is described | |||
to Edje from an Edje .edj file containing this information. These files can | to Edje from an Edje .edj file containing this information. These files can | |||
be produced by using edje_cc to take a text file (a .edc file) and "compile " | be produced by using edje_cc to take a text file (a .edc file) and "compile " | |||
an output .edj file that contains this information, images and any other | an output .edj file that contains this information, images and any other | |||
data needed. | data needed. | |||
The application using Edje will then create an object in its Evas | The application using Edje will then create an object in its Evas | |||
canvas and set the bundle file to use, specifying the @b group name to | canvas and set the bundle file to use, specifying the @b group name to | |||
use. Edje will load such information and create all the required | use. Edje will load such information and create all the required | |||
children objects with the specified properties as defined in each @b | children objects with the specified properties as defined in each @b | |||
part of the given group. See the following annotated example: | part of the given group. See the following example: | |||
@include edje_example.c | ||||
@code | The above example requires the following annotated source Edje file: | |||
@include edje_example.edc | ||||
#include <Eina.h> | ||||
#include <Evas.h> | ||||
#include <Ecore.h> | ||||
#include <Ecore_Evas.h> | ||||
#include <Edje.h> | ||||
#define WIDTH 320 | ||||
#define HEIGHT 240 | ||||
static Evas_Object *create_my_group(Evas *canvas, const char *text) | ||||
{ | ||||
Evas_Object *edje; | ||||
edje = edje_object_add(canvas); | ||||
if (!edje) | ||||
{ | ||||
EINA_LOG_CRIT("could not create edje object!"); | ||||
return NULL; | ||||
} | ||||
if (!edje_object_file_set(edje, "edje_example.edj", "my_group")) | ||||
{ | ||||
int err = edje_object_load_error_get(edje); | ||||
const char *errmsg = edje_load_error_str(err); | ||||
EINA_LOG_ERR("could not load 'my_group' from edje_example.edj: %s", | ||||
errmsg); | ||||
evas_object_del(edje); | ||||
return NULL; | ||||
} | ||||
if (text) | ||||
{ | ||||
if (!edje_object_part_text_set(edje, "text", text)) | ||||
{ | ||||
EINA_LOG_WARN("could not set the text. " | ||||
"Maybe part 'text' does not exist?"); | ||||
} | ||||
} | ||||
evas_object_move(edje, 0, 0); | ||||
evas_object_resize(edje, WIDTH, HEIGHT); | ||||
evas_object_show(edje); | ||||
return edje; | ||||
} | ||||
int main(int argc, char *argv[]) | ||||
{ | ||||
Ecore_Evas *window; | ||||
Evas *canvas; | ||||
Evas_Object *edje; | ||||
const char *text; | ||||
eina_init(); | ||||
evas_init(); | ||||
ecore_init(); | ||||
ecore_evas_init(); | ||||
edje_init(); | ||||
window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | ||||
if (!window) | ||||
{ | ||||
EINA_LOG_CRIT("could not create window."); | ||||
return -1; | ||||
} | ||||
canvas = ecore_evas_get(window); | ||||
text = (argc > 1) ? argv[1] : NULL; | ||||
edje = create_my_group(canvas, text); | ||||
if (!edje) | ||||
return -2; | ||||
ecore_evas_show(window); | ||||
ecore_main_loop_begin(); | ||||
evas_object_del(edje); | ||||
ecore_evas_free(window); | ||||
return 0; | ||||
} | ||||
@endcode | ||||
It requires the following source Edje file: | ||||
@code | ||||
// compile: edje_cc edje_example.edc | ||||
collections { | ||||
group { | ||||
name: "my_group"; // must be the same as in edje_example.c | ||||
parts { | ||||
part { | ||||
name: "background"; | ||||
type: RECT; // plain boring rectangle | ||||
mouse_events: 0; // we don't need any mouse event on the backgr | ||||
ound | ||||
// just one state "default" | ||||
description { | ||||
state: "default" 0.0; // must always exist | ||||
color: 255 255 255 255; // white | ||||
// define part coordinates: | ||||
rel1 { // top-left point at (0, 0) [WIDTH * 0 + 0, HEIGHT * | ||||
0 + 0] | ||||
relative: 0.0 0.0; | ||||
offset: 0 0; | ||||
} | ||||
rel2 { // bottom-right point at (WIDTH * 1.0 - 1, HEIGHT * 1 | ||||
.0 - 1) | ||||
relative: 1.0 1.0; | ||||
offset: -1 -1; | ||||
} | ||||
} | ||||
} | ||||
part { | ||||
name: "text"; | ||||
type: TEXT; | ||||
mouse_events: 1; // we want to change the color on mouse-over | ||||
// 2 states, one "default" and another "over" to be used | ||||
// on mouse over effect | ||||
description { | ||||
state: "default" 0.0; | ||||
color: 255 0 0 255; // red | ||||
// define part coordinates: | ||||
rel1 { // top-left at (WIDTH * 0.1 + 5, HEIGHT * 0.2 + 10) | ||||
relative: 0.1 0.2; | ||||
offset: 5 10; | ||||
} | ||||
rel2 { // bottom-right at (WIDTH * 0.9 - 6, HEIGHT * 0.8 - 1 | ||||
1) | ||||
relative: 0.9 0.8; | ||||
offset: -6 -11; | ||||
} | ||||
// define text specific state details | ||||
text { | ||||
font: "Sans"; // using fontconfig name! | ||||
size: 10; | ||||
text: "hello world"; | ||||
} | ||||
} | ||||
description { | ||||
state: "over" 0.0; | ||||
inherit: "default" 0.0; // copy everything from "default" at | ||||
this point | ||||
color: 0 255 0 255; // override color, now it is green | ||||
} | ||||
} | ||||
// do programs to change color on text mouse in/out (over) | ||||
programs { | ||||
program { | ||||
// what triggers this program: | ||||
signal: "mouse,in"; | ||||
source: "text"; | ||||
// what this program does: | ||||
action: STATE_SET "over" 0.0; | ||||
target: "text"; | ||||
// do the state-set in a nice interpolation animation | ||||
// using linear time in 0.1 second | ||||
transition: LINEAR 0.1; | ||||
} | ||||
program { | ||||
// what triggers this program: | ||||
signal: "mouse,out"; | ||||
source: "text"; | ||||
// what this program does: | ||||
action: STATE_SET "default" 0.0; | ||||
target: "text"; | ||||
// do the state-set in a nice interpolation animation | ||||
// using linear time in 0.1 second | ||||
transition: LINEAR 0.1; | ||||
} | ||||
} | ||||
} | ||||
} | ||||
} | ||||
@endcode | ||||
One should save these files as edje_example.c and edje_example.edc then: | One should save these files as edje_example.c and edje_example.edc then: | |||
@verbatim | @verbatim | |||
gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ec ore ecore-evas edje` | gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ec ore ecore-evas edje` | |||
edje_cc edje_example.edc | edje_cc edje_example.edc | |||
./edje_example "some text" | ./edje_example "some text" | |||
@endverbatim | @endverbatim | |||
Although simple, this example illustrates that animations and state | Although simple, this example illustrates that animations and state | |||
skipping to change at line 336 | skipping to change at line 150 | |||
layout and control the look and feel of any program using Edje as its | layout and control the look and feel of any program using Edje as its | |||
basic GUI constructor. | basic GUI constructor. | |||
Unlike Ebits, Edje separates the layout and behavior logic. | Unlike Ebits, Edje separates the layout and behavior logic. | |||
@section Edje_Examples Examples on Edje's usage | @section Edje_Examples Examples on Edje's usage | |||
What follows is a list with various commented examples, covering a great | What follows is a list with various commented examples, covering a great | |||
part of Edje's API: | part of Edje's API: | |||
@note The example files are located at /Where/Enlightenment/is/installed/sh | ||||
are/edje/examples | ||||
- @ref Example_Edje_Basics | - @ref Example_Edje_Basics | |||
- @ref tutorial_edje_basic2 | ||||
- @ref tutorial_edje_swallow | - @ref tutorial_edje_swallow | |||
- @ref tutorial_edje_swallow2 | ||||
- @ref tutorial_edje_table | - @ref tutorial_edje_table | |||
- @ref tutorial_edje_box | - @ref tutorial_edje_box | |||
- @ref tutorial_edje_box2 | - @ref tutorial_edje_box2 | |||
- @ref tutorial_edje_color_class | - @ref tutorial_edje_color_class | |||
- @ref tutorial_edje_animations | - @ref tutorial_edje_animations | |||
- @ref tutorial_edje_animations_2 | ||||
- @ref Example_Edje_Signals_Messages | - @ref Example_Edje_Signals_Messages | |||
- @ref tutorial_edje_signals_2 | ||||
- @ref tutorial_edje_text | ||||
- @ref tutorial_edje_drag | ||||
- @ref tutorial_edje_perspective | ||||
*/ | */ | |||
/** | /** | |||
@page authors Authors | @page authors Authors | |||
@author Carsten Haitzler <raster@@rasterman.com> | @author Carsten Haitzler <raster@@rasterman.com> | |||
@author Tilman Sauerbeck (tilman at code-monkey de) | @author Tilman Sauerbeck (tilman at code-monkey de) | |||
@author ZigsMcKenzie <zigsmckenzie@@gmail.com> | @author ZigsMcKenzie <zigsmckenzie@@gmail.com> | |||
@author Cedric BAIL <cedric.bail@@free.fr> | @author Cedric BAIL <cedric.bail@@free.fr> | |||
@author Brian Mattern <rephorm@@rephorm.com> | @author Brian Mattern <rephorm@@rephorm.com> | |||
@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr> | @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr> | |||
@author Tristan <blunderer@@gmail.com> | @author Tristan <blunderer@@gmail.com> | |||
@author Gustavo Lima Chaves <glima@@profusion.mobi> | @author Gustavo Lima Chaves <glima@@profusion.mobi> | |||
@author Bruno Dilly <bdilly@@profusion.mobi> | @author Bruno Dilly <bdilly@@profusion.mobi> | |||
@author Fabiano Fidêncio <fidencio@@profusion.mobi> | @author Fabiano Fidêncio <fidencio@@profusion.mobi> | |||
@author Jihoon Kim <jihoon48.kim@@samsung.com> | @author Jihoon Kim <jihoon48.kim@@samsung.com> | |||
@author Tiago Falcão <tiago@@profusion.mobi> | @author Tiago Falcão <tiago@@profusion.mobi> | |||
@author Davide Andreoli <dave@@gurumeditation.it> | @author Davide Andreoli <dave@@gurumeditation.it> | |||
@author Sebastian Dransfeld <sd@@tango.flipp.net> | @author Sebastian Dransfeld <sd@@tango.flipp.net> | |||
@author Tom Hacohen <tom@@stosb.com> | @author Tom Hacohen <tom@@stosb.com> | |||
@author Aharon Hillel <a.hillel@@partner.samsung.com> | @author Aharon Hillel <a.hillel@@partner.samsung.com> | |||
@author Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com> | ||||
@author Mike Blumenkrantz <michael.blumenkrantz@gmail.com | ||||
@author Jaehwan Kim <jae.hwan.kim@samsung.com> | ||||
@author billiob (Boris Faure) <billiob@gmail.com> | ||||
@author Govindaraju SM <govi.sm@samsung.com> <govism@gmail.com> | ||||
@author Prince Kumar Dubey <prince.dubey@samsung.com> <prince.dubey@gmail.c | ||||
om> | ||||
@author David Seikel <onefang at gmail.com> | ||||
@author Guilherme Íscaro <iscaro@profusion.mobi> | ||||
Please contact <enlightenment-devel@lists.sourceforge.net> to get in | Please contact <enlightenment-devel@lists.sourceforge.net> to get in | |||
contact with the developers and maintainers. | contact with the developers and maintainers. | |||
*/ | */ | |||
/** | /** | |||
@example embryo_custom_state.edc | @example embryo_custom_state.edc | |||
This example show how to create a custom state from embryo. Clicking on the | This example show how to create a custom state from embryo. Clicking on the | |||
3 labels will rotate the object in the given direction. | 3 labels will rotate the object in the given direction. | |||
skipping to change at line 432 | skipping to change at line 262 | |||
#include <math.h> | #include <math.h> | |||
#include <float.h> | #include <float.h> | |||
#include <limits.h> | #include <limits.h> | |||
#include <Evas.h> | #include <Evas.h> | |||
#ifdef EAPI | #ifdef EAPI | |||
# undef EAPI | # undef EAPI | |||
#endif | #endif | |||
#ifdef HAVE_ECORE_IMF | ||||
#include <Ecore_IMF.h> | ||||
#endif | ||||
#ifdef _WIN32 | #ifdef _WIN32 | |||
# ifdef EFL_EDJE_BUILD | # ifdef EFL_EDJE_BUILD | |||
# ifdef DLL_EXPORT | # ifdef DLL_EXPORT | |||
# define EAPI __declspec(dllexport) | # define EAPI __declspec(dllexport) | |||
# else | # else | |||
# define EAPI | # define EAPI | |||
# endif /* ! DLL_EXPORT */ | # endif /* ! DLL_EXPORT */ | |||
# else | # else | |||
# define EAPI __declspec(dllimport) | # define EAPI __declspec(dllimport) | |||
# endif /* ! EFL_EDJE_BUILD */ | # endif /* ! EFL_EDJE_BUILD */ | |||
skipping to change at line 459 | skipping to change at line 293 | |||
# else | # else | |||
# define EAPI | # define EAPI | |||
# endif | # endif | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
#define EDJE_VERSION_MAJOR 1 | #define EDJE_VERSION_MAJOR 1 | |||
#define EDJE_VERSION_MINOR 0 | #define EDJE_VERSION_MINOR 2 | |||
typedef struct _Edje_Version | typedef struct _Edje_Version | |||
{ | { | |||
int major; | int major; | |||
int minor; | int minor; | |||
int micro; | int micro; | |||
int revision; | int revision; | |||
} Edje_Version; | } Edje_Version; | |||
EAPI extern Edje_Version *edje_version; | EAPI extern Edje_Version *edje_version; | |||
skipping to change at line 758 | skipping to change at line 592 | |||
EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER | EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER | |||
} Edje_Text_Autocapital_Type; | } Edje_Text_Autocapital_Type; | |||
/** | /** | |||
* The possible types the parameters of an EXTERNAL part can be. | * The possible types the parameters of an EXTERNAL part can be. | |||
*/ | */ | |||
typedef enum _Edje_External_Param_Type | typedef enum _Edje_External_Param_Type | |||
{ | { | |||
EDJE_EXTERNAL_PARAM_TYPE_INT, /**< Parameter value is an integer. */ | EDJE_EXTERNAL_PARAM_TYPE_INT, /**< Parameter value is an integer. */ | |||
EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, /**< Parameter value is a double. */ | EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, /**< Parameter value is a double. */ | |||
EDJE_EXTERNAL_PARAM_TYPE_STRING, /**< Paramater value is a string. */ | EDJE_EXTERNAL_PARAM_TYPE_STRING, /**< Parameter value is a string. */ | |||
EDJE_EXTERNAL_PARAM_TYPE_BOOL, /**< Parameter value is boolean. */ | EDJE_EXTERNAL_PARAM_TYPE_BOOL, /**< Parameter value is boolean. */ | |||
EDJE_EXTERNAL_PARAM_TYPE_CHOICE, /**< Parameter value is one of a set of | EDJE_EXTERNAL_PARAM_TYPE_CHOICE, /**< Parameter value is one of a set of | |||
predefined string choices. */ | predefined string choices. */ | |||
EDJE_EXTERNAL_PARAM_TYPE_MAX /**< Sentinel. Don't use. */ | EDJE_EXTERNAL_PARAM_TYPE_MAX /**< Sentinel. Don't use. */ | |||
} Edje_External_Param_Type; | } Edje_External_Param_Type; | |||
/** | /** | |||
* Flags that determine how a parameter may be accessed in different | * Flags that determine how a parameter may be accessed in different | |||
* circumstances. | * circumstances. | |||
*/ | */ | |||
typedef enum _Edje_External_Param_Flags | typedef enum _Edje_External_Param_Flags | |||
{ | { | |||
EDJE_EXTERNAL_PARAM_FLAGS_NONE = 0, /**< Propery is incapable of operations, this is used to catch bogus flags. */ | EDJE_EXTERNAL_PARAM_FLAGS_NONE = 0, /**< Property is incapable of operations, this is used to catch bogus flags. */ | |||
EDJE_EXTERNAL_PARAM_FLAGS_GET = (1 << 0), /**< Property can be r ead/get. */ | EDJE_EXTERNAL_PARAM_FLAGS_GET = (1 << 0), /**< Property can be r ead/get. */ | |||
EDJE_EXTERNAL_PARAM_FLAGS_SET = (1 << 1), /**< Property can be w ritten/set. This only enables edje_object_part_external_param_set() and Emb ryo scripts. To enable the parameter being set from state description whene ver it changes state, use #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */ | EDJE_EXTERNAL_PARAM_FLAGS_SET = (1 << 1), /**< Property can be w ritten/set. This only enables edje_object_part_external_param_set() and Emb ryo scripts. To enable the parameter being set from state description whene ver it changes state, use #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */ | |||
EDJE_EXTERNAL_PARAM_FLAGS_STATE = (1 << 2), /**< Property can be s et from state dsecription. */ | EDJE_EXTERNAL_PARAM_FLAGS_STATE = (1 << 2), /**< Property can be s et from state description. */ | |||
EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR = (1 << 3), /**< This property is only set once when the object is constructed using its value from "default" 0.0 state description. Setting this overrides #EDJE_EXTERNAL_PARAM_FLAGS_S TATE. */ | EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR = (1 << 3), /**< This property is only set once when the object is constructed using its value from "default" 0.0 state description. Setting this overrides #EDJE_EXTERNAL_PARAM_FLAGS_S TATE. */ | |||
EDJE_EXTERNAL_PARAM_FLAGS_REGULAR = (EDJE_EXTERNAL_PARAM_FLAGS_GET | | EDJE_EXTERNAL_PARAM_FLAGS_REGULAR = (EDJE_EXTERNAL_PARAM_FLAGS_GET | | |||
EDJE_EXTERNAL_PARAM_FLAGS_SET | | EDJE_EXTERNAL_PARAM_FLAGS_SET | | |||
EDJE_EXTERNAL_PARAM_FLAGS_STATE ) /**< Convenience flag that sets property as GET, SET and STATE. */ | EDJE_EXTERNAL_PARAM_FLAGS_STATE ) /**< Convenience flag that sets property as GET, SET and STATE. */ | |||
} Edje_External_Param_Flags; | } Edje_External_Param_Flags; | |||
typedef enum | typedef enum _Edje_Input_Panel_Layout | |||
{ | { | |||
EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ | EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ | EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */ | EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */ | EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */ | EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ | EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ | EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ | EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ | |||
EDJE_INPUT_PANEL_LAYOUT_INVALID | EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ | |||
EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since | ||||
1.2 */ | ||||
EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layo | ||||
ut @since 1.2 */ | ||||
EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-c | ||||
orrect, no auto-capitalization etc. @since 1.2 */ | ||||
} Edje_Input_Panel_Layout; | } Edje_Input_Panel_Layout; | |||
typedef enum _Edje_Input_Panel_Lang | ||||
{ | ||||
EDJE_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */ | ||||
EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */ | ||||
} Edje_Input_Panel_Lang; | ||||
typedef enum _Edje_Input_Panel_Return_Key_Type | ||||
{ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon | ||||
@since 1.2 */ | ||||
EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND /**< Send @since 1.2 */ | ||||
} Edje_Input_Panel_Return_Key_Type; | ||||
/** | /** | |||
* @brief Converts type identifier to string nicer representation. | * @brief Converts type identifier to string nicer representation. | |||
* | * | |||
* This may be used to debug or other informational purposes. | * This may be used to debug or other informational purposes. | |||
* | * | |||
* @param type the identifier to convert. | * @param type the identifier to convert. | |||
* @return the string with the string representation, or @c "(unknown)". | * @return the string with the string representation, or @c "(unknown)". | |||
*/ | */ | |||
EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type ) EINA_PURE; | EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type ) EINA_PURE; | |||
skipping to change at line 863 | skipping to change at line 718 | |||
* range of values to set for each parameter. | * range of values to set for each parameter. | |||
*/ | */ | |||
struct _Edje_External_Param_Info | struct _Edje_External_Param_Info | |||
{ | { | |||
const char *name; /**< Name of the parameter. */ | const char *name; /**< Name of the parameter. */ | |||
Edje_External_Param_Type type; /**< Type of the parameter. */ | Edje_External_Param_Type type; /**< Type of the parameter. */ | |||
Edje_External_Param_Flags flags; /**< Flags indicating how this paramete r is | Edje_External_Param_Flags flags; /**< Flags indicating how this paramete r is | |||
used. */ | used. */ | |||
union { | union { | |||
struct { | struct { | |||
int def, /**< Default value for the paramter. */ | int def, /**< Default value for the parameter. */ | |||
min, /**< Minimum value it can have. */ | min, /**< Minimum value it can have. */ | |||
max, /**< Maximum value it can have. */ | max, /**< Maximum value it can have. */ | |||
step; /**< Values will be a multiple of this. */ | step; /**< Values will be a multiple of this. */ | |||
} i; /**< Info about integer type parametrs. Use #EDJE_EXTERNAL_INT_U NSET | } i; /**< Info about integer type parameters. Use #EDJE_EXTERNAL_INT_ UNSET | |||
on any of them to indicate they are not defined.*/ | on any of them to indicate they are not defined.*/ | |||
struct { | struct { | |||
double def, /**< Default value for the paramter. */ | double def, /**< Default value for the parameter. */ | |||
min, /**< Minimum value it can have. */ | min, /**< Minimum value it can have. */ | |||
max, /**< Maximum value it can have. */ | max, /**< Maximum value it can have. */ | |||
step; /**< Values will be a multiple of this. */ | step; /**< Values will be a multiple of this. */ | |||
} d; /**< Info about double type parametrs. Use | } d; /**< Info about double type parameters. Use | |||
#EDJE_EXTERNAL_DOUBLE_UNSET on any of them to indicate they are not defined .*/ | #EDJE_EXTERNAL_DOUBLE_UNSET on any of them to indicate they are not defined .*/ | |||
struct { | struct { | |||
const char *def; /**< Default value. */ | const char *def; /**< Default value. */ | |||
const char *accept_fmt; /**< Not implemented. */ | const char *accept_fmt; /**< Not implemented. */ | |||
const char *deny_fmt; /**< Not implemented */ | const char *deny_fmt; /**< Not implemented */ | |||
} s; /**< Info about string type parameters. NULL indicates undefined . */ | } s; /**< Info about string type parameters. NULL indicates undefined . */ | |||
struct { | struct { | |||
int def; /**< Default value. */ | int def; /**< Default value. */ | |||
const char *false_str; /**< String shown by editors to ind icate the false state. */ | const char *false_str; /**< String shown by editors to ind icate the false state. */ | |||
const char *true_str; /**< String shown by editors to indi cate the true state. */ | const char *true_str; /**< String shown by editors to indi cate the true state. */ | |||
skipping to change at line 1031 | skipping to change at line 886 | |||
{ | { | |||
const char *name; /**< The name of the type to register. * / | const char *name; /**< The name of the type to register. * / | |||
const Edje_External_Type *info; /**< The type definition. */ | const Edje_External_Type *info; /**< The type definition. */ | |||
}; | }; | |||
typedef struct _Edje_External_Type_Info Edje_External_Type_Info; | typedef struct _Edje_External_Type_Info Edje_External_Type_Info; | |||
typedef void (*Edje_Signal_Cb) (void *data, Evas_Object *o bj, const char *emission, const char *source); /**< Edje signal callback fu nctions's prototype definition. @c data will have the auxiliary data pointe r set at the time the callback registration. @c obj will be a pointer the E dje object where the signal comes from. @c emission will identify the exact signal's emission string and @c source the exact signal's source one. */ | typedef void (*Edje_Signal_Cb) (void *data, Evas_Object *o bj, const char *emission, const char *source); /**< Edje signal callback fu nctions's prototype definition. @c data will have the auxiliary data pointe r set at the time the callback registration. @c obj will be a pointer the E dje object where the signal comes from. @c emission will identify the exact signal's emission string and @c source the exact signal's source one. */ | |||
typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *o bj, const char *part); | typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *o bj, const char *part); | |||
typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *o bj, Edje_Message_Type type, int id, void *msg); /**< Edje message handler c allback functions's prototype definition. @c data will have the auxiliary d ata pointer set at the time the callback registration. @c obj will be a poi nter the Edje object where the message comes from. @c type will identify th e type of the given message and @c msg will be a pointer the message's cont ents, de facto, which depend on @c type. */ | typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *o bj, Edje_Message_Type type, int id, void *msg); /**< Edje message handler c allback functions's prototype definition. @c data will have the auxiliary d ata pointer set at the time the callback registration. @c obj will be a poi nter the Edje object where the message comes from. @c type will identify th e type of the given message and @c msg will be a pointer the message's cont ents, de facto, which depend on @c type. */ | |||
typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *o bj, const char *part, Edje_Text_Filter_Type type, char **text); | typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *o bj, const char *part, Edje_Text_Filter_Type type, char **text); | |||
typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *o bj, const char *part, char **text); | ||||
typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *o bj, const char *part, const char *item); | typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *o bj, const char *part, const char *item); | |||
/** | /** | |||
* @brief Initialize the Edje library. | * @brief Initialize the Edje library. | |||
* | * | |||
* @return The new init count. The initial value is zero. | * @return The new init count. The initial value is zero. | |||
* | * | |||
* This function initializes the Ejde library, making the proper calls | * This function initializes the Ejde library, making the proper calls | |||
* to internal initialization functions. It will also initialize its | * to internal initialization functions. It will also initialize its | |||
* @b dependencies, making calls to @c eina_init(), @c ecore_init(), | * @b dependencies, making calls to @c eina_init(), @c ecore_init(), | |||
skipping to change at line 1164 | skipping to change at line 1020 | |||
* | * | |||
* Edje allows one to build scalable interfaces. Scaling factors, | * Edje allows one to build scalable interfaces. Scaling factors, | |||
* which are set to neutral (@c 1.0) values by default (no scaling, | * which are set to neutral (@c 1.0) values by default (no scaling, | |||
* actual sizes), are of two types: @b global and @b individual. | * actual sizes), are of two types: @b global and @b individual. | |||
* Edje's global scaling factor will affect all its objects which | * Edje's global scaling factor will affect all its objects which | |||
* hadn't their individual scaling factors altered from the default | * hadn't their individual scaling factors altered from the default | |||
* value (which is zero). If they had it set differently, by | * value (which is zero). If they had it set differently, by | |||
* edje_object_scale_set(), that factor will @b override the global | * edje_object_scale_set(), that factor will @b override the global | |||
* one. | * one. | |||
* | * | |||
* Scaling affects the values of mininum/maximum @b part sizes, which | * Scaling affects the values of minimum/maximum @b part sizes, which | |||
* are @b multiplied by it. Font sizes are scaled, too. | * are @b multiplied by it. Font sizes are scaled, too. | |||
* | * | |||
* @warning Only parts which, at EDC level, had the @c "scale" | * @warning Only parts which, at EDC level, had the @c "scale" | |||
* property set to @c 1, will be affected by this function. Check the | * property set to @c 1, will be affected by this function. Check the | |||
* complete @ref edcref "syntax reference" for EDC files. | * complete @ref edcref "syntax reference" for EDC files. | |||
* | * | |||
* @see edje_scale_get(). | * @see edje_scale_get(). | |||
*/ | */ | |||
EAPI void edje_scale_set (double scale); | EAPI void edje_scale_set (double scale); | |||
skipping to change at line 1221 | skipping to change at line 1077 | |||
* @see edje_password_show_last_set(). | * @see edje_password_show_last_set(). | |||
* | * | |||
*/ | */ | |||
EAPI void edje_password_show_last_timeout_set(double password_show_last_tim eout); | EAPI void edje_password_show_last_timeout_set(double password_show_last_tim eout); | |||
/** | /** | |||
* @brief Set the scaling factor for a given Edje object. | * @brief Set the scaling factor for a given Edje object. | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
* @param scale The scaling factor (the default value is @c 0.0, | * @param scale The scaling factor (the default value is @c 0.0, | |||
* meaning indivinual scaling @b not set) | * meaning individual scaling @b not set) | |||
* | * | |||
* This function sets an @b individual scaling factor on the @a obj | * This function sets an @b individual scaling factor on the @a obj | |||
* Edje object. This property (or Edje's global scaling factor, when | * Edje object. This property (or Edje's global scaling factor, when | |||
* applicable), will affect this object's part sizes. If @p scale is | * applicable), will affect this object's part sizes. If @p scale is | |||
* not zero, than the individual scaling will @b override any global | * not zero, than the individual scaling will @b override any global | |||
* scaling set, for the object @p obj's parts. Put it back to zero to | * scaling set, for the object @p obj's parts. Put it back to zero to | |||
* get the effects of the global scaling again. | * get the effects of the global scaling again. | |||
* | * | |||
* @warning Only parts which, at EDC level, had the @c "scale" | * @warning Only parts which, at EDC level, had the @c "scale" | |||
* property set to @c 1, will be affected by this function. Check the | * property set to @c 1, will be affected by this function. Check the | |||
skipping to change at line 1256 | skipping to change at line 1112 | |||
* | * | |||
* @see edje_object_scale_set() for more details | * @see edje_object_scale_set() for more details | |||
* | * | |||
*/ | */ | |||
EAPI double edje_object_scale_get (const Evas_Object *obj); | EAPI double edje_object_scale_get (const Evas_Object *obj); | |||
/** | /** | |||
* @brief Set the RTL orientation for this object. | * @brief Set the RTL orientation for this object. | |||
* | * | |||
* @param obj A handle to an Edje object. | * @param obj A handle to an Edje object. | |||
* @rtl new value of flag EINA_TRUE/EINA_FALSE | * @param rtl new value of flag EINA_TRUE/EINA_FALSE | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_B ool rtl); | EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_B ool rtl); | |||
/** | /** | |||
* @brief Get the RTL orientation for this object. | * @brief Get the RTL orientation for this object. | |||
* | * | |||
* You can RTL orientation explicitly with edje_object_mirrored_set. | * You can RTL orientation explicitly with edje_object_mirrored_set. | |||
* | * | |||
* @param obj A handle to an Edje object. | * @param obj A handle to an Edje object. | |||
skipping to change at line 1638 | skipping to change at line 1494 | |||
* const char *errmsg = edje_load_error_str(err); | * const char *errmsg = edje_load_error_str(err); | |||
* fprintf(stderr, "could not load 'group_name' from theme.edj: %s", | * fprintf(stderr, "could not load 'group_name' from theme.edj: %s", | |||
* errmsg); | * errmsg); | |||
* | * | |||
* evas_object_del(edje); | * evas_object_del(edje); | |||
* return NULL; | * return NULL; | |||
* } | * } | |||
* | * | |||
* @endcode | * @endcode | |||
* | * | |||
* @note before creating the first Edje object in your code, remember | * @note You can get a callback every time edje re-calculates the object | |||
* (either due to animation or some kind of signal or input). This is calle | ||||
d | ||||
* in-line just after the recalculation has occurred. It is a good idea not | ||||
* to go and delete or alter the object inside this callbacks, simply make | ||||
* a note that the recalculation has taken place and then do something abou | ||||
t | ||||
* it outside the callback. to register a callback use code like: | ||||
* | ||||
* @code | ||||
* evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data) | ||||
; | ||||
* @endcode | ||||
* | ||||
* @see evas_object_smart_callback_add() | ||||
* | ||||
* @note Before creating the first Edje object in your code, remember | ||||
* to initialize the library, with edje_init(), or unexpected behavior | * to initialize the library, with edje_init(), or unexpected behavior | |||
* might occur. | * might occur. | |||
*/ | */ | |||
EAPI Evas_Object *edje_object_add (Evas *evas); | EAPI Evas_Object *edje_object_add (Evas *evas); | |||
/** | /** | |||
* @brief Retrive an <b>EDC data field's value</b> from a given Edje | * @brief Retrive an <b>EDC data field's value</b> from a given Edje | |||
* object's group. | * object's group. | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
skipping to change at line 1847 | skipping to change at line 1716 | |||
* | * | |||
* By using something like | * By using something like | |||
* @code | * @code | |||
* edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", | * edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", | |||
* signal_cb, NULL); | * signal_cb, NULL); | |||
* @endcode | * @endcode | |||
* being @c "button.*" the pattern for the names of parts implementing | * being @c "button.*" the pattern for the names of parts implementing | |||
* buttons on an interface, you'd be registering for notifications on | * buttons on an interface, you'd be registering for notifications on | |||
* events of mouse buttons being pressed down on either of those parts | * events of mouse buttons being pressed down on either of those parts | |||
* (those events all have the @c "mouse,down," common prefix on their | * (those events all have the @c "mouse,down," common prefix on their | |||
* names, with a suffix giving the button number). The actual emisson | * names, with a suffix giving the button number). The actual emission | |||
* and source strings of an event will be passed in as the @a emission | * and source strings of an event will be passed in as the @a emission | |||
* and @a source parameters of the callback function (e.g. @c | * and @a source parameters of the callback function (e.g. @c | |||
* "mouse,down,2" and @c "button.close"), for each of those events. | * "mouse,down,2" and @c "button.close"), for each of those events. | |||
* | * | |||
* @note See @ref edcref "the syntax" for EDC files | * @note See @ref edcref "the syntax" for EDC files | |||
* @see edje_object_signal_emit() on how to emits Edje signals from | * @see edje_object_signal_emit() on how to emits Edje signals from | |||
* code to a an object | * code to a an object | |||
* @see edje_object_signal_callback_del_full() | * @see edje_object_signal_callback_del_full() | |||
*/ | */ | |||
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); | EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); | |||
skipping to change at line 2178 | skipping to change at line 2047 | |||
* call will return the value 0, for each axis. | * call will return the value 0, for each axis. | |||
* | * | |||
* @note On failure, this function will make all non-@c NULL size | * @note On failure, this function will make all non-@c NULL size | |||
* pointers' pointed variables be set to zero. | * pointers' pointed variables be set to zero. | |||
* | * | |||
* @see edje_object_size_max_get() | * @see edje_object_size_max_get() | |||
*/ | */ | |||
EAPI void edje_object_size_min_get (const Evas_Object *o bj, Evas_Coord *minw, Evas_Coord *minh); | EAPI void edje_object_size_min_get (const Evas_Object *o bj, Evas_Coord *minw, Evas_Coord *minh); | |||
/** | /** | |||
* @brief Edje will automatically update the size hints on itself. | ||||
* | ||||
* @param obj A handle to an Edje object. | ||||
* @param update Wether or not update the size hints. | ||||
* | ||||
* By default edje doesn't set size hints on itself. With this function | ||||
* call, it will do so if update is true. Be carefully, it cost a lot to | ||||
* trigger this feature as it will recalc the object every time it make | ||||
* sense to be sure that's its minimal size hint is always accurate. | ||||
*/ | ||||
EAPI void edje_object_update_hints_set(Evas_Object *obj, Eina_Bool update); | ||||
/** | ||||
* @brief Wether or not Edje will update size hints on itself. | ||||
* | ||||
* @param obj A handle to an Edje object. | ||||
* @return @c true if does, @c false if it doesn't. | ||||
*/ | ||||
EAPI Eina_Bool edje_object_update_hints_get(Evas_Object *obj); | ||||
/** | ||||
* @brief Get the maximum size specified -- as an EDC property -- for a | * @brief Get the maximum size specified -- as an EDC property -- for a | |||
* given Edje object | * given Edje object | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
* @param maxw Pointer to a variable where to store the maximum width | * @param maxw Pointer to a variable where to store the maximum width | |||
* @param maxh Pointer to a variable where to store the maximum height | * @param maxh Pointer to a variable where to store the maximum height | |||
* | * | |||
* This function retrieves the @p obj object's maximum size values, | * This function retrieves the @p obj object's maximum size values, | |||
* <b>as declared in its EDC group definition</b>. Maximum size of | * <b>as declared in its EDC group definition</b>. Maximum size of | |||
* groups have the following syntax | * groups have the following syntax | |||
skipping to change at line 2245 | skipping to change at line 2135 | |||
* with the last two arguments set to 0. Please refer to its | * with the last two arguments set to 0. Please refer to its | |||
* documentation, then. | * documentation, then. | |||
*/ | */ | |||
EAPI void edje_object_size_min_calc (Evas_Object *obj, Ev as_Coord *minw, Evas_Coord *minh); | EAPI void edje_object_size_min_calc (Evas_Object *obj, Ev as_Coord *minw, Evas_Coord *minh); | |||
/** | /** | |||
* Calculate the geometry of the region, relative to a given Edje | * Calculate the geometry of the region, relative to a given Edje | |||
* object's area, <b>occupied by all parts in the object</b> | * object's area, <b>occupied by all parts in the object</b> | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
* @param part The Edje part's name | ||||
* @param x A pointer to a variable where to store the parts region's | * @param x A pointer to a variable where to store the parts region's | |||
* x coordinate | * x coordinate | |||
* @param y A pointer to a variable where to store the parts region's | * @param y A pointer to a variable where to store the parts region's | |||
* y coordinate | * y coordinate | |||
* @param w A pointer to a variable where to store the parts region's | * @param w A pointer to a variable where to store the parts region's | |||
* width | * width | |||
* @param h A pointer to a variable where to store the parts region's | * @param h A pointer to a variable where to store the parts region's | |||
* height | * height | |||
* | * | |||
* This function gets the geometry of the rectangle equal to the area | * This function gets the geometry of the rectangle equal to the area | |||
skipping to change at line 2301 | skipping to change at line 2190 | |||
* resized to new dimensions, but just return the calculated | * resized to new dimensions, but just return the calculated | |||
* sizes. The caller is the one up to change its geometry or not. | * sizes. The caller is the one up to change its geometry or not. | |||
* | * | |||
* @warning Be advised that invisible parts in @p obj @b will be taken | * @warning Be advised that invisible parts in @p obj @b will be taken | |||
* into account in this calculation. | * into account in this calculation. | |||
*/ | */ | |||
EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Ev as_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restri ctedh); | EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Ev as_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restri ctedh); | |||
/** | /** | |||
* @brief Check if an Edje part exists in a given Edje object's group | * @brief Check if an Edje part exists in a given Edje object's group | |||
* definition.. | * definition. | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
* @param part The part's name to check for existence in @p obj's | * @param part The part's name to check for existence in @p obj's | |||
* group | * group | |||
* @return @c EINA_TRUE, if the Edje part exists in @p obj's group or | * @return @c EINA_TRUE, if the Edje part exists in @p obj's group or | |||
* @c EINA_FALSE, otherwise (and on errors) | * @c EINA_FALSE, otherwise (and on errors) | |||
* | * | |||
* This function returns if a given part exists in the Edje group | * This function returns if a given part exists in the Edje group | |||
* bound to object @p obj (with edje_object_file_set()). | * bound to object @p obj (with edje_object_file_set()). | |||
* | * | |||
skipping to change at line 2326 | skipping to change at line 2215 | |||
/** | /** | |||
* @brief Get a handle to the Evas object implementing a given Edje | * @brief Get a handle to the Evas object implementing a given Edje | |||
* part, in an Edje object. | * part, in an Edje object. | |||
* | * | |||
* @param obj A handle to an Edje object | * @param obj A handle to an Edje object | |||
* @param part The Edje part's name | * @param part The Edje part's name | |||
* @return A pointer to the Evas object implementing the given part, | * @return A pointer to the Evas object implementing the given part, | |||
* or @c NULL on failure (e.g. the given part doesn't exist) | * or @c NULL on failure (e.g. the given part doesn't exist) | |||
* | * | |||
* This function gets a pointer the Evas object corresponding to a | * This function gets a pointer of the Evas object corresponding to a | |||
* given part in the @p obj object's group. | * given part in the @p obj object's group. | |||
* | * | |||
* You should @b never modify the state of the returned object (with | * You should @b never modify the state of the returned object (with | |||
* @c evas_object_move() or @c evas_object_hide() for example), | * @c evas_object_move() or @c evas_object_hide() for example), | |||
* because it's meant to be managed be Edje, solely. You are safe to | * because it's meant to be managed by Edje, solely. You are safe to | |||
* query information about its current state (with @c | * query information about its current state (with @c | |||
* evas_object_visible_get() or @c evas_object_color_get() for | * evas_object_visible_get() or @c evas_object_color_get() for | |||
* example), though. | * example), though. | |||
*/ | */ | |||
EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *o bj, const char *part); | EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *o bj, const char *part); | |||
/** | /** | |||
* @brief Retrieve the geometry of a given Edje part, in a given Edje | * @brief Retrieve the geometry of a given Edje part, in a given Edje | |||
* object's group definition, <b>relative to the object's area</b> | * object's group definition, <b>relative to the object's area</b> | |||
* | * | |||
skipping to change at line 2396 | skipping to change at line 2285 | |||
/** | /** | |||
* @brief Sets the text for an object part | * @brief Sets the text for an object part | |||
* | * | |||
* @param obj A valid Evas Object handle | * @param obj A valid Evas Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param text The text string | * @param text The text string | |||
*/ | */ | |||
EAPI Eina_Bool edje_object_part_text_set (Evas_Object *obj, co nst char *part, const char *text); | EAPI Eina_Bool edje_object_part_text_set (Evas_Object *obj, co nst char *part, const char *text); | |||
/** | /** | |||
* @brief Sets the text for an object part, but converts HTML escapes to UT | ||||
F8 | ||||
* | ||||
* This converts the given string @p text to UTF8 assuming it contains HTML | ||||
* style escapes like "&" and "©" etc. IF the part is of type TEXT | ||||
, | ||||
* as opposed to TEXTBLOCK. | ||||
* | ||||
* @param obj A valid Evas Object handle | ||||
* @param part The part name | ||||
* @param text The text string | ||||
* @since 1.2 | ||||
*/ | ||||
EAPI Eina_Bool edje_object_part_text_escaped_set (Evas_Object *obj, co | ||||
nst char *part, const char *text); | ||||
/** | ||||
* @brief Return the text of the object part. | * @brief Return the text of the object part. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* | * | |||
* @return The text string | * @return The text string | |||
* | * | |||
* This function returns the text associated to the object part. | * This function returns the text associated to the object part. | |||
* | * | |||
* @see edje_object_part_text_set(). | * @see edje_object_part_text_set(). | |||
*/ | */ | |||
EAPI const char *edje_object_part_text_get (const Evas_Object *o bj, const char *part); | EAPI const char *edje_object_part_text_get (const Evas_Object *o bj, const char *part); | |||
/** | /** | |||
* @brief Set the style of the | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param style The style to set (textblock conventions). | ||||
* | ||||
* This function sets the style associated with the textblock part. | ||||
* | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_style_user_push(Evas_Object *obj, const cha | ||||
r *part, const char *style); | ||||
/** | ||||
* @brief Return the text of the object part. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* | ||||
* @return The text string | ||||
* | ||||
* This function returns the style associated with the textblock part. | ||||
* | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI const char *edje_object_part_text_style_user_peek(const Evas_Object *o | ||||
bj, const char *part); | ||||
/** | ||||
* @brief Delete the top style form the user style stack. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_style_user_pop(Evas_Object *obj, const char | ||||
*part); | ||||
/** | ||||
* @brief Sets the raw (non escaped) text for an object part. | * @brief Sets the raw (non escaped) text for an object part. | |||
* | * | |||
* @param obj A valid Evas Object handle | * @param obj A valid Evas Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param text_to_escape The text string | * @param text_to_escape The text string | |||
* | * | |||
* This funciton will not do escape for you if it is a TEXTBLOCK part, that is, | * This funciton will not do escape for you if it is a TEXTBLOCK part, that is, | |||
* if text contain tags, these tags will not be interpreted/parsed by TEXTB LOCK. | * if text contain tags, these tags will not be interpreted/parsed by TEXTB LOCK. | |||
* | * | |||
* @see edje_object_part_text_unescaped_get(). | * @see edje_object_part_text_unescaped_get(). | |||
skipping to change at line 2577 | skipping to change at line 2517 | |||
* @param part The part name | * @param part The part name | |||
* @param x Cursor X position | * @param x Cursor X position | |||
* @param y Cursor Y position | * @param y Cursor Y position | |||
* @param w Cursor width | * @param w Cursor width | |||
* @param h Cursor height | * @param h Cursor height | |||
* | * | |||
*/ | */ | |||
EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coor d *w, Evas_Coord *h); | EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coor d *w, Evas_Coord *h); | |||
/** | /** | |||
* @brief Deletes the selection and emits a change event. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param text The text string | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_user_insert (const Evas_ | ||||
Object *obj, const char *part, const char *text); | ||||
/** | ||||
* @brief Enables selection if the entry is an EXPLICIT selection mode | * @brief Enables selection if the entry is an EXPLICIT selection mode | |||
* type. | * type. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param allow EINA_TRUE to enable, EINA_FALSE otherwise | * @param allow EINA_TRUE to enable, EINA_FALSE otherwise | |||
* | * | |||
* The default is to @b not allow selection. This function only affects use r | * The default is to @b not allow selection. This function only affects use r | |||
* selection, functions such as edje_object_part_text_select_all() and | * selection, functions such as edje_object_part_text_select_all() and | |||
* edje_object_part_text_select_none() are not affected. | * edje_object_part_text_select_none() are not affected. | |||
skipping to change at line 2677 | skipping to change at line 2627 | |||
* @param part The part name | * @param part The part name | |||
* @param cur the edje cursor to work on | * @param cur the edje cursor to work on | |||
*/ | */ | |||
EAPI void edje_object_part_text_cursor_end_set (Ev as_Object *obj, const char *part, Edje_Cursor cur); | EAPI void edje_object_part_text_cursor_end_set (Ev as_Object *obj, const char *part, Edje_Cursor cur); | |||
/** | /** | |||
* @brief Copy the cursor to another cursor. | * @brief Copy the cursor to another cursor. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param sry the cursor to copy from | * @param src the cursor to copy from | |||
* @param dst the cursor to copy to | * @param dst the cursor to copy to | |||
*/ | */ | |||
EAPI void edje_object_part_text_cursor_copy (Ev as_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst); | EAPI void edje_object_part_text_cursor_copy (Ev as_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst); | |||
/** | /** | |||
* @brief Move the cursor to the beginning of the line. | * @brief Move the cursor to the beginning of the line. | |||
* @see evas_textblock_cursor_line_char_first | * @see evas_textblock_cursor_line_char_first | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
skipping to change at line 2729 | skipping to change at line 2679 | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param cur The cursor to adjust. | * @param cur The cursor to adjust. | |||
* @return EINA_TRUE if it's true, EINA_FALSE otherwise. | * @return EINA_TRUE if it's true, EINA_FALSE otherwise. | |||
*/ | */ | |||
EAPI Eina_Bool edje_object_part_text_cursor_is_format_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | EAPI Eina_Bool edje_object_part_text_cursor_is_format_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | |||
/** | /** | |||
* @brief Return true if the cursor points to a visible format | * @brief Return true if the cursor points to a visible format | |||
* For example \t, \n, item and etc. | * For example \\t, \\n, item and etc. | |||
* @see evas_textblock_cursor_format_is_visible_get | * @see evas_textblock_cursor_format_is_visible_get | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param cur The cursor to adjust. | * @param cur The cursor to adjust. | |||
*/ | */ | |||
EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | |||
/** | /** | |||
* @brief Returns the content (char) at the cursor position. | * @brief Returns the content (char) at the cursor position. | |||
* @see evas_textblock_cursor_content_get | * @see evas_textblock_cursor_content_get | |||
* | * | |||
* You must free the return (if not NULL) after you are done with it. | ||||
* | ||||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param cur The cursor to use | * @param cur The cursor to use | |||
* @return The character string pointed to (may be a multi-byte utf8 sequen ce) terminated by a nul byte. | ||||
*/ | */ | |||
EAPI const char *edje_object_part_text_cursor_content_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | EAPI char *edje_object_part_text_cursor_content_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | |||
/** | /** | |||
* @brief Sets the cursor position to the given value | * @brief Sets the cursor position to the given value | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param cur The cursor to move | * @param cur The cursor to move | |||
* @param pos the position of the cursor | * @param pos the position of the cursor | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
skipping to change at line 2771 | skipping to change at line 2724 | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param cur The cursor to get the position | * @param cur The cursor to get the position | |||
* @return The cursor position | * @return The cursor position | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI int edje_object_part_text_cursor_pos_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | EAPI int edje_object_part_text_cursor_pos_get (co nst Evas_Object *obj, const char *part, Edje_Cursor cur); | |||
/** | /** | |||
* @brief Reset the input method context if needed. | ||||
* | ||||
* This can be necessary in the case where modifying the buffer would confu | ||||
se on-going input method behavior | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_imf_context_reset (co | ||||
nst Evas_Object *obj, const char *part); | ||||
/** | ||||
* @brief Get the input method context in entry. | ||||
* | ||||
* If ecore_imf was not available when edje was compiled, this function ret | ||||
urns NULL | ||||
* otherwise, the returned pointer is an Ecore_IMF * | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* | ||||
* @return The input method context (Ecore_IMF_Context *) in entry | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void *edje_object_part_text_imf_context_get (co | ||||
nst Evas_Object *obj, const char *part); | ||||
/** | ||||
* @brief Set the layout of the input panel. | * @brief Set the layout of the input panel. | |||
* | * | |||
* The layout of the input panel or virtual keyboard can make it easier or | * The layout of the input panel or virtual keyboard can make it easier or | |||
* harder to enter content. This allows you to hint what kind of input you | * harder to enter content. This allows you to hint what kind of input you | |||
* are expecting to enter and thus have the input panel automatically | * are expecting to enter and thus have the input panel automatically | |||
* come up with the right mode. | * come up with the right mode. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param layout layout type | * @param layout layout type | |||
* @since 1.1 | * @since 1.1 | |||
*/ | */ | |||
EAPI void edje_object_part_text_input_panel_layout_set (const E vas_Object *obj, const char *part, Edje_Input_Panel_Layout layout); | EAPI void edje_object_part_text_input_panel_layout_set (Ev as_Object *obj, const char *part, Edje_Input_Panel_Layout layout); | |||
/** | /** | |||
* @brief Get the layout of the input panel. | * @brief Get the layout of the input panel. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* | * | |||
* @return Layout type of the input panel | * @return Layout type of the input panel | |||
* | * | |||
* @see edje_object_part_text_input_panel_layout_set | * @see edje_object_part_text_input_panel_layout_set | |||
skipping to change at line 2806 | skipping to change at line 2784 | |||
EAPI Edje_Input_Panel_Layout edje_object_part_text_input_panel_layout_get ( const Evas_Object *obj, const char *part); | EAPI Edje_Input_Panel_Layout edje_object_part_text_input_panel_layout_get ( const Evas_Object *obj, const char *part); | |||
/** | /** | |||
* @brief Set the autocapitalization type on the immodule. | * @brief Set the autocapitalization type on the immodule. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param autocapital_type The type of autocapitalization | * @param autocapital_type The type of autocapitalization | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI void edje_object_part_text_autocapital_type_set (const Evas_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_ type); | EAPI void edje_object_part_text_autocapital_type_set (Ev as_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_ty pe); | |||
/** | /** | |||
* @brief Retrieves the autocapitalization type | * @brief Retrieves the autocapitalization type | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @return The autocapitalization type | * @return The autocapitalization type | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI Edje_Text_Autocapital_Type edje_object_part_text_autocapital_type_get (const Evas_Object *obj, const char *part); | EAPI Edje_Text_Autocapital_Type edje_object_part_text_autocapital_type_get (const Evas_Object *obj, const char *part); | |||
/** | /** | |||
* @brief Set whether the prediction is allowed or not. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param prediction If true, the prediction feature is allowed. | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_prediction_allow_set (Ev | ||||
as_Object *obj, const char *part, Eina_Bool prediction); | ||||
/** | ||||
* @brief Get whether the prediction is allowed or not. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @return EINA_TRUE if prediction feature is allowed. | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI Eina_Bool edje_object_part_text_prediction_allow_get (co | ||||
nst Evas_Object *obj, const char *part); | ||||
/** | ||||
* @brief Sets the attribute to show the input panel automatically. | * @brief Sets the attribute to show the input panel automatically. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param enabled If true, the input panel is appeared when entry is clicke d or has a focus | * @param enabled If true, the input panel is appeared when entry is clicke d or has a focus | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI void edje_object_part_text_input_panel_enabled_set (const Evas_Object *obj, const char *part, Eina_Bool enabled); | EAPI void edje_object_part_text_input_panel_enabled_set (Ev as_Object *obj, const char *part, Eina_Bool enabled); | |||
/** | /** | |||
* @brief Retrieve the attribute to show the input panel automatically. | * @brief Retrieve the attribute to show the input panel automatically. | |||
* @see edje_object_part_text_input_panel_enabled_set | * @see edje_object_part_text_input_panel_enabled_set | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @return EINA_TRUE if it supports or EINA_FALSE otherwise | * @return EINA_TRUE if it supports or EINA_FALSE otherwise | |||
* @since 1.1.0 | * @since 1.1.0 | |||
*/ | */ | |||
EAPI Eina_Bool edje_object_part_text_input_panel_enabled_get (const Evas_Object *obj, const char *part); | EAPI Eina_Bool edje_object_part_text_input_panel_enabled_get (const Evas_Object *obj, const char *part); | |||
/** | /** | |||
* @brief Show the input panel (virtual keyboard) based on the input panel | ||||
property such as layout, autocapital types, and so on. | ||||
* | ||||
* Note that input panel is shown or hidden automatically according to the | ||||
focus state. | ||||
* This API can be used in the case of manually controlling by using edje_o | ||||
bject_part_text_input_panel_enabled_set. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_show(const Evas_Obj | ||||
ect *obj, const char *part); | ||||
/** | ||||
* @brief Hide the input panel (virtual keyboard). | ||||
* @see edje_object_part_text_input_panel_show | ||||
* | ||||
* Note that input panel is shown or hidden automatically according to the | ||||
focus state. | ||||
* This API can be used in the case of manually controlling by using edje_o | ||||
bject_part_text_input_panel_enabled_set. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_hide(const Evas_Obj | ||||
ect *obj, const char *part); | ||||
/** | ||||
* Set the language mode of the input panel. | ||||
* | ||||
* This API can be used if you want to show the Alphabet keyboard. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param lang the language to be set to the input panel. | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_language_set(Evas_O | ||||
bject *obj, const char *part, Edje_Input_Panel_Lang lang); | ||||
/** | ||||
* Get the language mode of the input panel. | ||||
* | ||||
* See @ref edje_object_part_text_input_panel_language_set for more details | ||||
. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @return input panel language type | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI Edje_Input_Panel_Lang edje_object_part_text_input_panel_language_get(c | ||||
onst Evas_Object *obj, const char *part); | ||||
/** | ||||
* Set the input panel-specific data to deliver to the input panel. | ||||
* | ||||
* This API is used by applications to deliver specific data to the input p | ||||
anel. | ||||
* The data format MUST be negotiated by both application and the input pan | ||||
el. | ||||
* The size and format of data are defined by the input panel. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param data The specific data to be set to the input panel. | ||||
* @param len the length of data, in bytes, to send to the input panel | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_imdata_set(Evas_Obj | ||||
ect *obj, const char *part, const void *data, int len); | ||||
/** | ||||
* Get the specific data of the current active input panel. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param data The specific data to be got from the input panel | ||||
* @param len The length of data | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_imdata_get(const Ev | ||||
as_Object *obj, const char *part, void *data, int *len); | ||||
/** | ||||
* Set the "return" key type. This type is used to set string or icon on th | ||||
e "return" key of the input panel. | ||||
* | ||||
* An input panel displays the string or icon associated with this type | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param return_key_type The type of "return" key on the input panel | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_return_key_type_set | ||||
(Evas_Object *obj, const char *part, Edje_Input_Panel_Return_Key_Type retur | ||||
n_key_type); | ||||
/** | ||||
* Get the "return" key type. | ||||
* | ||||
* @see edje_object_part_text_input_panel_return_key_type_set() for more de | ||||
tails | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @return The type of "return" key on the input panel | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI Edje_Input_Panel_Return_Key_Type edje_object_part_text_input_panel_ret | ||||
urn_key_type_get(const Evas_Object *obj, const char *part); | ||||
/** | ||||
* Set the return key on the input panel to be disabled. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param disabled The state | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_part_text_input_panel_return_key_disabled | ||||
_set(Evas_Object *obj, const char *part, Eina_Bool disabled); | ||||
/** | ||||
* Get whether the return key on the input panel should be disabled or not. | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @return EINA_TRUE if it should be disabled | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI Eina_Bool edje_object_part_text_input_panel_return_key_disabled | ||||
_get(const Evas_Object *obj, const char *part); | ||||
/** | ||||
* Add a filter function for newly inserted text. | * Add a filter function for newly inserted text. | |||
* | * | |||
* Whenever text is inserted (not the same as set) into the given @p part, | * Whenever text is inserted (not the same as set) into the given @p part, | |||
* the list of filter functions will be called to decide if and how the new | * the list of filter functions will be called to decide if and how the new | |||
* text will be accepted. | * text will be accepted. | |||
* There are three types of filters, EDJE_TEXT_FILTER_TEXT, | * There are three types of filters, EDJE_TEXT_FILTER_TEXT, | |||
* EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP. | * EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP. | |||
* The text parameter in the @p func filter can be modified by the user and | * The text parameter in the @p func filter can be modified by the user and | |||
* it's up to him to free the one passed if he's to change the pointer. If | * it's up to him to free the one passed if he's to change the pointer. If | |||
* doing so, the newly set text should be malloc'ed, as once all the filter s | * doing so, the newly set text should be malloc'ed, as once all the filter s | |||
* are called Edje will free it. | * are called Edje will free it. | |||
* If the text is to be rejected, freeing it and setting the pointer to NUL L | * If the text is to be rejected, freeing it and setting the pointer to NUL L | |||
* will make Edje break out of the filter cycle and reject the inserted | * will make Edje break out of the filter cycle and reject the inserted | |||
* text. | * text. | |||
* | * | |||
* @warning This function will be deprecated because of difficulty in use. | ||||
* The type(format, text, or markup) of text should be always | ||||
* checked in the filter function for correct filtering. | ||||
* Please use edje_object_text_markup_filter_callback_add() instea | ||||
d. There | ||||
* is no need to check the type of text in the filter function | ||||
* because the text is always markup. | ||||
* @warning If you use this function with | ||||
* edje_object_text_markup_filter_callback_add() together, all | ||||
* Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functio | ||||
ns | ||||
* will be executed, and then filtered text will be inserted. | ||||
* | ||||
* @see edje_object_text_insert_filter_callback_del | * @see edje_object_text_insert_filter_callback_del | |||
* @see edje_object_text_insert_filter_callback_del_full | * @see edje_object_text_insert_filter_callback_del_full | |||
* @see edje_object_text_markup_filter_callback_add | ||||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param func The callback function that will act as filter | * @param func The callback function that will act as filter | |||
* @param data User provided data to pass to the filter function | * @param data User provided data to pass to the filter function | |||
*/ | */ | |||
EAPI void edje_object_text_insert_filter_callback_add (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | EAPI void edje_object_text_insert_filter_callback_add (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | |||
/** | /** | |||
* Delete a function from the filter list. | * Delete a function from the filter list. | |||
skipping to change at line 2878 | skipping to change at line 3007 | |||
* Delete the given @p func filter from the list in @p part. Returns | * Delete the given @p func filter from the list in @p part. Returns | |||
* the user data pointer given when added. | * the user data pointer given when added. | |||
* | * | |||
* @see edje_object_text_insert_filter_callback_add | * @see edje_object_text_insert_filter_callback_add | |||
* @see edje_object_text_insert_filter_callback_del_full | * @see edje_object_text_insert_filter_callback_del_full | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param func The function callback to remove | * @param func The function callback to remove | |||
* | * | |||
* @return The user data pointer if succesful, or NULL otherwise | * @return The user data pointer if successful, or NULL otherwise | |||
*/ | */ | |||
EAPI void *edje_object_text_insert_filter_callback_del (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func); | EAPI void *edje_object_text_insert_filter_callback_del (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func); | |||
/** | /** | |||
* Delete a function and matching user data from the filter list. | * Delete a function and matching user data from the filter list. | |||
* | * | |||
* Delete the given @p func filter and @p data user data from the list | * Delete the given @p func filter and @p data user data from the list | |||
* in @p part. | * in @p part. | |||
* Returns the user data pointer given when added. | * Returns the user data pointer given when added. | |||
* | * | |||
* @see edje_object_text_insert_filter_callback_add | * @see edje_object_text_insert_filter_callback_add | |||
* @see edje_object_text_insert_filter_callback_del | * @see edje_object_text_insert_filter_callback_del | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param func The function callback to remove | * @param func The function callback to remove | |||
* @param data The data passed to the callback function | * @param data The data passed to the callback function | |||
* | * | |||
* @return The same data pointer if succesful, or NULL otherwise | * @return The same data pointer if successful, or NULL otherwise | |||
*/ | */ | |||
EAPI void *edje_object_text_insert_filter_callback_del_full (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | EAPI void *edje_object_text_insert_filter_callback_del_full (Ev as_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | |||
/** | /** | |||
* Add a markup filter function for newly inserted text. | ||||
* | ||||
* Whenever text is inserted (not the same as set) into the given @p part, | ||||
* the list of markup filter functions will be called to decide if and how | ||||
* the new text will be accepted. | ||||
* The text parameter in the @p func filter is always markup. It can be | ||||
* modified by the user and it's up to him to free the one passed if he's t | ||||
o | ||||
* change the pointer. If doing so, the newly set text should be malloc'ed, | ||||
* as once all the filters are called Edje will free it. | ||||
* If the text is to be rejected, freeing it and setting the pointer to NUL | ||||
L | ||||
* will make Edje break out of the filter cycle and reject the inserted | ||||
* text. | ||||
* This function is different from edje_object_text_insert_filter_callback_ | ||||
add() | ||||
* in that the text parameter in the @p fucn filter is always markup. | ||||
* | ||||
* @warning If you use this function with | ||||
* edje_object_text_insert_filter_callback_add() togehter, all | ||||
* Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functio | ||||
ns | ||||
* will be executed, and then filtered text will be inserted. | ||||
* | ||||
* @see edje_object_text_markup_filter_callback_del | ||||
* @see edje_object_text_markup_filter_callback_del_full | ||||
* @see edje_object_text_insert_filter_callback_add | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param func The callback function that will act as markup filter | ||||
* @param data User provided data to pass to the filter function | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void edje_object_text_markup_filter_callback_add(Evas_Object *obj, con | ||||
st char *part, Edje_Markup_Filter_Cb func, void *data); | ||||
/** | ||||
* Delete a function from the markup filter list. | ||||
* | ||||
* Delete the given @p func filter from the list in @p part. Returns | ||||
* the user data pointer given when added. | ||||
* | ||||
* @see edje_object_text_markup_filter_callback_add | ||||
* @see edje_object_text_markup_filter_callback_del_full | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param func The function callback to remove | ||||
* | ||||
* @return The user data pointer if successful, or NULL otherwise | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void *edje_object_text_markup_filter_callback_del(Evas_Object *obj, co | ||||
nst char *part, Edje_Markup_Filter_Cb func); | ||||
/** | ||||
* Delete a function and matching user data from the markup filter list. | ||||
* | ||||
* Delete the given @p func filter and @p data user data from the list | ||||
* in @p part. | ||||
* Returns the user data pointer given when added. | ||||
* | ||||
* @see edje_object_text_markup_filter_callback_add | ||||
* @see edje_object_text_markup_filter_callback_del | ||||
* | ||||
* @param obj A valid Evas_Object handle | ||||
* @param part The part name | ||||
* @param func The function callback to remove | ||||
* @param data The data passed to the callback function | ||||
* | ||||
* @return The same data pointer if successful, or NULL otherwise | ||||
* @since 1.2.0 | ||||
*/ | ||||
EAPI void *edje_object_text_markup_filter_callback_del_full(Evas_Object *ob | ||||
j, const char *part, Edje_Markup_Filter_Cb func, void *data); | ||||
/** | ||||
* @brief Swallows an object into the edje. | * @brief Swallows an object into the edje. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @param obj_swallow The object to swallow | * @param obj_swallow The object to swallow | |||
* | * | |||
* Swallows the object into the edje part so that all geometry changes | * Swallows the object into the edje part so that all geometry changes | |||
* for the part affect the swallowed object. (e.g. resize, move, show, | * for the part affect the swallowed object. (e.g. resize, move, show, | |||
* raise/lower, etc.). | * raise/lower, etc.). | |||
* | * | |||
skipping to change at line 2925 | skipping to change at line 3125 | |||
EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, co nst char *part, Evas_Object *obj_swallow); | EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, co nst char *part, Evas_Object *obj_swallow); | |||
/** | /** | |||
* @brief Unswallow an object. | * @brief Unswallow an object. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param obj_swallow The swallowed object | * @param obj_swallow The swallowed object | |||
* | * | |||
* Causes the edje to regurgitate a previously swallowed object. :) | * Causes the edje to regurgitate a previously swallowed object. :) | |||
* | * | |||
* @note @p obj_swallow will @b not be deleted. | * @note @p obj_swallow will @b not be deleted or hidden. | |||
* @note @p obj_swallow may appear shown on the evas depending on its state | ||||
when | ||||
* it got unswallowed. Make sure you delete it or hide it if you do not wan | ||||
t it to. | ||||
*/ | */ | |||
EAPI void edje_object_part_unswallow (Evas_Object *obj, Ev as_Object *obj_swallow); | EAPI void edje_object_part_unswallow (Evas_Object *obj, Ev as_Object *obj_swallow); | |||
/** | /** | |||
* @brief Get the object currently swallowed by a part. | * @brief Get the object currently swallowed by a part. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
* @return The swallowed object, or NULL if there is none. | * @return The swallowed object, or NULL if there is none. | |||
*/ | */ | |||
skipping to change at line 3199 | skipping to change at line 3401 | |||
* | * | |||
* @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors. | * @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors. | |||
*/ | */ | |||
EAPI Eina_Bool edje_object_part_external_param_set (Ev as_Object *obj, const char *part, const Edje_External_Param *param); | EAPI Eina_Bool edje_object_part_external_param_set (Ev as_Object *obj, const char *part, const Edje_External_Param *param); | |||
/** | /** | |||
* @brief Get the parameter for the external part. | * @brief Get the parameter for the external part. | |||
* | * | |||
* Parts of type external may carry extra properties that have | * Parts of type external may carry extra properties that have | |||
* meanings defined by the external plugin. For instance, it may be a | * meanings defined by the external plugin. For instance, it may be a | |||
* string that defines a button label. This property can be modifed by | * string that defines a button label. This property can be modified by | |||
* state parameters, by explicit calls to | * state parameters, by explicit calls to | |||
* edje_object_part_external_param_set() or getting the actual object | * edje_object_part_external_param_set() or getting the actual object | |||
* with edje_object_part_external_object_get() and calling native | * with edje_object_part_external_object_get() and calling native | |||
* functions. | * functions. | |||
* | * | |||
* This function asks the external plugin what is the current value, | * This function asks the external plugin what is the current value, | |||
* independent on how it was set. | * independent on how it was set. | |||
* | * | |||
* @param obj A valid Evas_Object handle | * @param obj A valid Evas_Object handle | |||
* @param part The part name | * @param part The part name | |||
skipping to change at line 3803 | skipping to change at line 4005 | |||
* | * | |||
* @see edje_perspective_new() | * @see edje_perspective_new() | |||
*/ | */ | |||
EAPI void edje_perspective_free (Edje_Persp ective *ps); | EAPI void edje_perspective_free (Edje_Persp ective *ps); | |||
/** | /** | |||
* Setup the transform for this perspective object. | * Setup the transform for this perspective object. | |||
* | * | |||
* This sets the parameters of the perspective transformation. X, Y and Z | * This sets the parameters of the perspective transformation. X, Y and Z | |||
* values are used. The px and py points specify the "infinite distance" point | * values are used. The px and py points specify the "infinite distance" point | |||
* in the 3D conversion (where all lines converge to like when artists d raw | * in the 3D conversion (where all lines converge to like when artists d raw | |||
* 3D by hand). The @p z0 value specifis the z value at which there is a | * 3D by hand). The @p z0 value specifies the z value at which there is | |||
1:1 | a 1:1 | |||
* mapping between spatial coorinates and screen coordinates. Any points | * mapping between spatial coordinates and screen coordinates. Any point | |||
s | ||||
* on this z value will not have their X and Y values modified in the tr ansform. | * on this z value will not have their X and Y values modified in the tr ansform. | |||
* Those further away (Z value higher) will shrink into the distance, an d | * Those further away (Z value higher) will shrink into the distance, an d | |||
* those less than this value will expand and become bigger. The @p foc value | * those less than this value will expand and become bigger. The @p foc value | |||
* determines the "focal length" of the camera. This is in reality the d istance | * determines the "focal length" of the camera. This is in reality the d istance | |||
* between the camera lens plane itself (at or closer than this renderin g | * between the camera lens plane itself (at or closer than this renderin g | |||
* results are undefined) and the "z0" z value. This allows for some "de pth" | * results are undefined) and the "z0" z value. This allows for some "de pth" | |||
* control and @p foc must be greater than 0. | * control and @p foc must be greater than 0. | |||
* | * | |||
* @param m map to change. | * @param ps The perspective object | |||
* @param px The pespective distance X coordinate | * @param px The perspective distance X coordinate | |||
* @param py The pespective distance Y coordinate | * @param py The perspective distance Y coordinate | |||
* @param z0 The "0" z plane value | * @param z0 The "0" z plane value | |||
* @param foc The focal distance | * @param foc The focal distance | |||
*/ | */ | |||
EAPI void edje_perspective_set (Edje_Persp ective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); | EAPI void edje_perspective_set (Edje_Persp ective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); | |||
/** | /** | |||
* Make this perspective object be global for its canvas. | * Make this perspective object be global for its canvas. | |||
* | * | |||
* @param ps The given perspective object | * @param ps The given perspective object | |||
* @param global @c EINA_TRUE if the perspective should be global, @c | * @param global @c EINA_TRUE if the perspective should be global, @c | |||
* EINA_FALSE otherwise. | * EINA_FALSE otherwise. | |||
End of changes. 56 change blocks. | ||||
233 lines changed or deleted | 485 lines changed or added | |||