This group discusses functions that deal with Edje layouts and its components. More...
Modules | |
Edje Communication Interface: Message | |
Functions that deal with messages. | |
Edje Communication Interface: Signal | |
Functions that deal with signals. | |
Edje Scale | |
Functions that deal with scaling objects. | |
Edje Class: Color | |
Functions that deal with Color Classes. | |
Edje Class: Size | |
Functions that deal with Size Classes. | |
Edje Class: Text | |
Functions that deal with Text Classes. | |
Edje Object File | |
Functions to deals with EDJ files. | |
Edje Object Animation | |
Functions that deal with animations. | |
Edje Object Geometry | |
Functions that deal with object's geometry. | |
Edje Part | |
Functions that deal with layout components. | |
Edje Perspective | |
Functions that deal with 3D projection of an 2D object. | |
Typedefs | |
typedef enum _Edje_Aspect_Control | Edje_Aspect_Control |
All Edje aspect control values. | |
Functions | |
const char * | edje_object_part_object_name_get (const Evas_Object *obj) |
Gets the part name of an edje part object. More... | |
Evas_Object * | edje_object_add (Evas *evas) |
Instantiates a new Edje object. More... | |
Eina_Bool | edje_object_preload (Evas_Object *obj, Eina_Bool cancel) |
Preloads the images on the Edje Object in the background. More... | |
void | edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Adds a callback for an arriving Edje signal, emitted by a given Edje object. More... | |
void | edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source) |
Sends/emits an Edje signal to a given Edje object. More... | |
void * | edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) |
Removes a signal-triggered callback from an object. More... | |
void * | edje_object_signal_callback_del_full (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Unregisters/deletes a callback set for an arriving Edje signal, emitted by a given Edje object. More... | |
Edje_Load_Error | edje_object_load_error_get (const Evas_Object *obj) |
Gets the (last) file loading error for a given Edje object. More... | |
const char * | edje_load_error_str (Edje_Load_Error error) |
Converts the given Edje file load error code into a string describing it in English. More... | |
Eina_Bool | edje_object_part_geometry_get (const Evas_Object *obj, const char *part, int *x, int *y, int *w, int *h) |
Retrieves the geometry of a given Edje part, in a given Edje object's group definition, relative to the object's area. More... | |
const char * | edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret) |
Returns the state of the Edje part. More... | |
const Efl_Canvas_Object * | edje_object_part_object_get (const Evas_Object *obj, const char *part) |
Gets a handle to the Evas object implementing a given Edje part, in an Edje object. More... | |
void | edje_object_update_hints_set (Evas_Object *obj, Eina_Bool update) |
Whether this object updates its size hints automatically. More... | |
Eina_Bool | edje_object_update_hints_get (const Evas_Object *obj) |
Whether this object updates its size hints automatically. More... | |
void | edje_object_size_min_calc (Evas_Object *obj, int *minw, int *minh) |
Calculates the minimum required size for a given Edje object. More... | |
void | edje_object_size_min_restricted_calc (Evas_Object *obj, int *minw, int *minh, int restrictedw, int restrictedh) |
Calculates the minimum required size for a given Edje object. More... | |
Eina_Bool | edje_object_parts_extends_calc (Evas_Object *obj, int *x, int *y, int *w, int *h) |
Calculates the geometry of the region, relative to a given Edje object's area, occupied by all parts in the object. More... | |
void | edje_object_calc_force (Evas_Object *obj) |
Forces a Size/Geometry calculation. More... | |
int | edje_object_freeze (Evas_Object *obj) |
Freezes the Edje object. More... | |
int | edje_object_thaw (Evas_Object *obj) |
Thaws the Edje object. More... | |
EINA_DEPRECATED void | edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh) |
Sets the object minimum size. More... | |
EINA_DEPRECATED void | edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh) |
Sets the object maximum size. More... | |
EINA_DEPRECATED void | edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah) |
Sets the object aspect size. More... | |
Eina_Bool | edje_object_file_set (Evas_Object *obj, const char *file, const char *group) |
Sets the EDJ file (and group within it) to load an Edje object's contents from. More... | |
void | edje_object_file_get (const Evas_Object *obj, const char **file, const char **group) |
Gets the file and group name that a given Edje object is bound to. More... | |
Eina_Bool | edje_object_mmap_set (Evas_Object *obj, const Eina_File *file, const char *group) |
Sets the EDJ file (and group within it) to load an Edje object's contents from. More... | |
void | edje_object_mirrored_set (Evas_Object *obj, Eina_Bool rtl) |
Sets the RTL orientation for this object. More... | |
Eina_Bool | edje_object_mirrored_get (const Evas_Object *obj) |
Gets the RTL orientation for this object. More... | |
void | edje_object_language_set (Evas_Object *obj, const char *language) |
Sets the language for this object. More... | |
const char * | edje_object_language_get (const Evas_Object *obj) |
Gets the language for this object. More... | |
void | edje_object_text_insert_filter_callback_add (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data) |
Adds a filter function for newly inserted text. More... | |
void * | edje_object_text_insert_filter_callback_del (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func) |
Deletes a function from the filter list. More... | |
void * | edje_object_text_insert_filter_callback_del_full (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data) |
Deletes a function and matching user data from the filter list. More... | |
void | edje_object_text_markup_filter_callback_add (Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data) |
Adds a markup filter function for newly inserted text. More... | |
void * | edje_object_text_markup_filter_callback_del (Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func) |
Deletes a function from the markup filter list. More... | |
void * | edje_object_text_markup_filter_callback_del_full (Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data) |
Deletes a function and matching user data from the markup filter list. More... | |
void | edje_object_play_set (Evas_Object *obj, Eina_Bool play) |
Whether this object is playing or not. More... | |
Eina_Bool | edje_object_play_get (const Evas_Object *obj) |
Whether this object is playing or not. More... | |
void | edje_object_transition_duration_factor_set (Evas_Object *obj, double scale) |
Transition duration factor. More... | |
double | edje_object_transition_duration_factor_get (const Evas_Object *obj) |
Transition duration factor. More... | |
void | edje_object_size_min_get (const Evas_Object *obj, int *minw, int *minh) |
Gets the minimum size specified – as an EDC property – for a given Edje object. More... | |
void | edje_object_size_max_get (const Evas_Object *obj, int *maxw, int *maxh) |
Gets the maximum size specified – as an EDC property – for a given Edje object. More... | |
void | edje_object_item_provider_set (Edje_Object *obj, Edje_Item_Provider_Cb func, void *data) |
Sets the function that provides item objects for named items in an edje entry text. More... | |
void | edje_object_animation_set (Efl_Canvas_Layout *obj, Eina_Bool on) |
Whether this object is animating or not. More... | |
Eina_Bool | edje_object_animation_get (const Efl_Canvas_Layout *obj) |
Whether this object is animating or not. More... | |
Efl_Input_Device * | edje_object_seat_get (const Efl_Canvas_Layout *obj, Eina_Stringshare *name) |
Returns the seat device given its Edje's name. More... | |
Eina_Stringshare * | edje_object_seat_name_get (const Efl_Canvas_Layout *obj, Efl_Input_Device *device) |
Gets the name given to a set by Edje. More... | |
Eina_Error | edje_object_layout_load_error_get (const Efl_Canvas_Layout *obj) |
Gets the (last) file loading error for a given object. More... | |
Eina_Bool | edje_object_content_remove (Efl_Canvas_Layout *obj, Efl_Gfx_Entity *content) |
Unswallow an object from this Edje. More... | |
This group discusses functions that deal with Edje layouts and its components.
An important thing to know about this group is that there is no Edje_Object in code. What we refer here as object are layouts (or themes) defined by groups, and parts, both declared in EDC files. They are of type Evas_Object as the other native objects of Evas, but they only exist in Edje, so that is why we are calling them "edje objects".
With the Edje Object Group functions we can deal with layouts by managing its aspect, content, message and signal exchange and animation, among others.
const char * edje_object_part_object_name_get | ( | const Evas_Object * | obj | ) |
Gets the part name of an edje part object.
obj | An edje part object |
NULL
NULL
, obj
was not an Edje part object References evas_object_data_get().
Evas_Object * edje_object_add | ( | Evas * | evas | ) |
Instantiates a new Edje object.
evas | A valid Evas handle, the canvas to place the new object in |
NULL
on errors.This function creates a new Edje smart object, returning its Evas_Object
handle. An Edje object is useless without a (source) file set to it, so you'd most probably call edje_object_file_set() afterwards, like in:
References EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.
Referenced by edje_edit_part_source_set().
Eina_Bool edje_object_preload | ( | Evas_Object * | obj, |
Eina_Bool | cancel | ||
) |
Preloads the images on the Edje Object in the background.
This function requests the preload of all data images (on the given object) in the background. The work is queued before being processed (because there might be other pending requests of this type). It emits a signal "preload,done" when finished.
true
on scenarios where you don't need the image data preloaded anymore.[in] | obj | The object. |
[in] | cancel | false will add it the preloading work queue, true will remove it (if it was issued before). |
false
if obj was not a valid Edje object otherwise true
References alloca(), edje_object_preload(), edje_object_signal_callback_add(), edje_object_signal_callback_del(), EDJE_PART_TYPE_GROUP, EDJE_PART_TYPE_IMAGE, EINA_FALSE, EINA_TRUE, EVAS_CALLBACK_IMAGE_PRELOADED, evas_object_event_callback_add(), evas_object_event_callback_del_full(), evas_object_image_file_get(), and evas_object_image_preload().
Referenced by edje_object_preload().
void edje_object_signal_callback_add | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Adds a callback for an arriving Edje signal, emitted by a given Edje object.
Edje signals are one of the communication interfaces between code and a given Edje object's theme. With signals, one can communicate two string values at a time, which are: - "emission" value: the name of the signal, in general - "source" value: a name for the signal's context, in general
Though there are those common uses for the two strings, one is free to use them however they like.
Signal callback registration is powerful, in the way that blobs may be used to match multiple signals at once. All the "*?[\" set of @c fnmatch() operators can be used, both for emission and source. Edje has internal signals it will emit, automatically, on various actions taking place on group parts. For example, the mouse cursor being moved, pressed, released, etc., over a given part's area, all generate individual signals. By using something like edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", signal_cb, NULL); being @ref "button.*" the pattern for the names of parts implementing buttons on an interface, you'd be registering for notifications on events of mouse buttons being pressed down on either of those parts (those events all have the @"mouse,down," common prefix on their names, with a suffix giving the button number). The actual emission and source strings of an event will be passed in as the emission and source parameters of the callback function (e.g. "mouse,down,2" and @"button.close"), for each of those events. @note See @ref edcref "the syntax" for EDC files See also @ref edje_object_signal_emit() on how to emits Edje signals from code to a an object @ref edje_object_signal_callback_del_full() @param [in] emission The signal's "emission" string @param [in] source The signal's "source" string
[in] | func | The callback function to be executed when the signal is emitted. |
[in] | data | A pointer to data to pass in to func. |
Referenced by edje_object_preload().
void edje_object_signal_emit | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source | ||
) |
Sends/emits an Edje signal to a given Edje object.
This function sends a signal to the object obj. An Edje program, at obj's EDC specification level, can respond to a signal by having declared matching @'signal' and @'source' fields on its block (see the syntax for EDC files).
See also edje_object_signal_callback_add() for more on Edje signals.
[in] | emission | The signal's "emission" string |
[in] | source | The signal's "source" string |
Referenced by elm_slider_indicator_show_set(), and elm_thumb_animate_set().
void * edje_object_signal_callback_del | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func | ||
) |
Removes a signal-triggered callback from an object.
obj | A valid Evas_Object handle. |
emission | The emission string. |
source | The source string. |
func | The callback function. |
This function removes a callback, previously attached to the emission of a signal, from the object obj. The parameters emission, source and func must match exactly those passed to a previous call to edje_object_signal_callback_add(). The data pointer that was passed to this call will be returned.
References edje_object_signal_callback_del_full().
Referenced by edje_object_preload().
void * edje_object_signal_callback_del_full | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Unregisters/deletes a callback set for an arriving Edje signal, emitted by a given Edje object.
obj | A handle to an Edje object |
emission | The signal's "emission" string |
source | The signal's "source" string |
func | The callback function passed on the callback's registration |
data | The pointer given to be passed as data to func |
data
on success, or NULL
on errors (or if data
had this value)This function removes a callback, previously attached to the emission of a signal, from the object obj. The parameters emission, source, func and data must match exactly those passed to a previous call to edje_object_signal_callback_add(). The data pointer that was passed to this call will be returned.
References eina_stringshare_add(), eina_stringshare_del(), and EINA_TRUE.
Referenced by edje_object_signal_callback_del().
Edje_Load_Error edje_object_load_error_get | ( | const Evas_Object * | obj | ) |
Gets the (last) file loading error for a given Edje object.
This function is meant to be used after an Edje EDJ file loading, what takes place with the edje_object_file_set() function. If that function does not return true
, one should check for the reason of failure with this one.
const char * edje_load_error_str | ( | Edje_Load_Error | error | ) |
Converts the given Edje file load error code into a string describing it in English.
error | the error code, a value in ::Edje_Load_Error. |
error
is not supported, "Unknown error"
is returned.edje_object_file_set() is a function which sets an error value, afterwards, which can be fetched with edje_object_load_error_get(). The function in question is meant to be used in conjunction with the latter, for pretty-printing any possible error cause.
Eina_Bool edje_object_part_geometry_get | ( | const Evas_Object * | obj, |
const char * | part, | ||
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h | ||
) |
Retrieves the geometry of a given Edje part, in a given Edje object's group definition, relative to the object's area.
This function gets the geometry of an Edje part within its group. The x and y coordinates are relative to the top left corner of the whole obj object's area.
null
pointers on the geometry components you're not interested in: they'll be ignored by the function.[in] | part | The Edje part's name |
[out] | x | A pointer to a variable where to store the part's x coordinate |
[out] | y | A pointer to a variable where to store the part's y coordinate |
[out] | w | A pointer to a variable where to store the part's width |
[out] | h | A pointer to a variable where to store the part's height |
true
on success, false
otherwise References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.
const char * edje_object_part_state_get | ( | const Evas_Object * | obj, |
const char * | part, | ||
double * | val_ret | ||
) |
Returns the state of the Edje part.
[in] | part | The part name |
[out] | val_ret | Part state value |
const Efl_Canvas_Object * edje_object_part_object_get | ( | const Evas_Object * | obj, |
const char * | part | ||
) |
Gets a handle to the Evas object implementing a given Edje part, in an Edje object.
This function gets a pointer of the Evas object corresponding to a given part in the obj object's group.
You should never modify the state of the returned object (with evas_object_move() or evas_object_hide() for example), because it's meant to be managed by Edje, solely. You are safe to query information about its current state (with evas_object_visible_get() or evas_object_color_get() for example), though.
[in] | part | The Edje part's name |
null
on failure (e.g. the given part doesn't exist) void edje_object_update_hints_set | ( | Evas_Object * | obj, |
Eina_Bool | update | ||
) |
Whether this object updates its size hints automatically.
By default edje doesn't set size hints on itself. If this property is set to true
, size hints will be updated after recalculation. Be careful, as recalculation may happen often, enabling this property may have a considerable performance impact as other widgets will be notified of the size hints changes.
A layout recalculation can be triggered by edje_object_size_min_calc(), edje_object_size_min_restricted_calc(), edje_object_parts_extends_calc() or even any other internal event.
Enable or disable auto-update of size hints.
[in] | update | Whether or not update the size hints. |
Eina_Bool edje_object_update_hints_get | ( | const Evas_Object * | obj | ) |
Whether this object updates its size hints automatically.
By default edje doesn't set size hints on itself. If this property is set to true
, size hints will be updated after recalculation. Be careful, as recalculation may happen often, enabling this property may have a considerable performance impact as other widgets will be notified of the size hints changes.
A layout recalculation can be triggered by edje_object_size_min_calc(), edje_object_size_min_restricted_calc(), edje_object_parts_extends_calc() or even any other internal event.
Whether this object updates its size hints automatically.
void edje_object_size_min_calc | ( | Evas_Object * | obj, |
int * | minw, | ||
int * | minh | ||
) |
Calculates the minimum required size for a given Edje object.
This call works exactly as edje_object_size_min_restricted_calc(), with the last two arguments set to 0. Please refer to its documentation, then.
[out] | minw | The minimum required width (return value) |
[out] | minh | The minimum required height (return value) |
References edje_object_size_min_restricted_calc().
void edje_object_size_min_restricted_calc | ( | Evas_Object * | obj, |
int * | minw, | ||
int * | minh, | ||
int | restrictedw, | ||
int | restrictedh | ||
) |
Calculates the minimum required size for a given Edje object.
This call will trigger an internal recalculation of all parts of the object, in order to return its minimum required dimensions for width and height. The user might choose to impose those minimum sizes, making the resulting calculation to get to values equal or larger than restrictedw
and restrictedh
, for width and height, respectively.
[out] | minw | The minimum required width (return value) |
[out] | minh | The minimum required height (return value) |
[in] | restrictedw | The minimum width constraint as input, minw can not be lower than this |
[in] | restrictedh | The minimum height constraint as input, minh can not be lower than this |
References EINA_SIZE2D.
Referenced by edje_object_size_min_calc().
Eina_Bool edje_object_parts_extends_calc | ( | Evas_Object * | obj, |
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h | ||
) |
Calculates the geometry of the region, relative to a given Edje object's area, occupied by all parts in the object.
This function gets the geometry of the rectangle equal to the area required to group all parts in obj's group/collection. The x and y coordinates are relative to the top left corner of the whole obj object's area. Parts placed out of the group's boundaries will also be taken in account, so that x and y may be negative.
[out] | x | The parts region's X coordinate |
[out] | y | The parts region's Y coordinate |
[out] | w | The parts region's width |
[out] | h | The parts region's height |
true
on success, false
otherwise References EINA_RECT_ZERO.
void edje_object_calc_force | ( | Evas_Object * | obj | ) |
Forces a Size/Geometry calculation.
Forces the object to recalculate its layout regardless of freeze/thaw.
See also edje_object_freeze and edje_object_thaw.
Referenced by edje_edit_part_clip_to_set(), edje_edit_part_del(), edje_edit_part_effect_set(), edje_edit_part_scale_set(), edje_edit_part_selected_state_set(), edje_edit_state_aspect_pref_set(), edje_edit_state_color3_set(), edje_edit_state_color_class_set(), edje_edit_state_font_set(), edje_edit_state_image_border_fill_set(), edje_edit_state_image_border_set(), edje_edit_state_image_set(), edje_edit_state_map_light_set(), edje_edit_state_map_on_set(), edje_edit_state_map_perspective_focal_set(), edje_edit_state_map_perspective_set(), edje_edit_state_map_perspective_zplane_set(), edje_edit_state_map_rotation_center_set(), edje_edit_state_map_rotation_set(), edje_edit_state_map_zoom_set(), edje_edit_state_text_repch_set(), edje_edit_state_text_set(), edje_edit_state_text_size_range_min_max_set(), edje_edit_state_text_size_set(), edje_edit_state_text_source_set(), edje_edit_state_text_style_set(), edje_edit_state_text_text_source_set(), edje_edit_state_vector_set(), edje_edit_state_visible_set(), and edje_scale_set().
int edje_object_freeze | ( | Evas_Object * | obj | ) |
Freezes the Edje object.
This function puts all changes on hold. Successive freezes will nest, requiring an equal number of thaws.
See also edje_object_thaw()
Referenced by edje_freeze().
int edje_object_thaw | ( | Evas_Object * | obj | ) |
Thaws the Edje object.
This function thaws the given Edje object.
See also edje_object_freeze()
Referenced by edje_thaw().
EINA_DEPRECATED void edje_extern_object_min_size_set | ( | Evas_Object * | obj, |
Evas_Coord | minw, | ||
Evas_Coord | minh | ||
) |
Sets the object minimum size.
obj | A valid Evas_Object handle |
minw | The minimum width |
minh | The minimum height |
This sets the minimum size restriction for the object.
References evas_object_size_hint_min_set().
EINA_DEPRECATED void edje_extern_object_max_size_set | ( | Evas_Object * | obj, |
Evas_Coord | maxw, | ||
Evas_Coord | maxh | ||
) |
Sets the object maximum size.
obj | A valid Evas_Object handle |
maxw | The maximum width |
maxh | The maximum height |
This sets the maximum size restriction for the object.
References evas_object_size_hint_max_set().
EINA_DEPRECATED void edje_extern_object_aspect_set | ( | Evas_Object * | obj, |
Edje_Aspect_Control | aspect, | ||
Evas_Coord | aw, | ||
Evas_Coord | ah | ||
) |
Sets the object aspect size.
obj | A valid Evas_Object handle |
aspect | The aspect control axes |
aw | The aspect radio width |
ah | The aspect ratio height |
This sets the desired aspect ratio to keep an object that will be swallowed by Edje. The width and height define a preferred size ASPECT and the object may be scaled to be larger or smaller, but retaining the relative scale of both aspect width and height.
References EVAS_ASPECT_CONTROL_NONE.
Eina_Bool edje_object_file_set | ( | Evas_Object * | obj, |
const char * | file, | ||
const char * | group | ||
) |
Sets the EDJ file (and group within it) to load an Edje object's contents from.
EINA_TRUE
on success, or EINA_FALSE
on errors (check edje_object_load_error_get() after this call to get errors causes)Edje expects EDJ files, which are theming objects' descriptions and resources packed together in an EET file, to read Edje object definitions from. They usually are created with the .edj extension. EDJ files, in turn, are assembled from textual object description files, where one describes Edje objects declaratively – the EDC files (see the syntax for those files).
Those description files were designed so that many Edje object definitions – also called groups (or collections) – could be packed together in the same EDJ file, so that a whole application's theme could be packed in one file only. This is the reason for the group
argument.
Use this function after you instantiate a new Edje object, so that you can "give him life", telling where to get its contents from.
[in] | file | The path to the EDJ file to load from |
[in] | group | The name of the group, in file , which implements an Edje object |
Referenced by edje_edit_clean_save_as(), and edje_edit_part_source_set().
void edje_object_file_get | ( | const Evas_Object * | obj, |
const char ** | file, | ||
const char ** | group | ||
) |
Gets the file and group name that a given Edje object is bound to.
This gets the EDJ file's path, with the respective group set for the given Edje object. If obj is either not an Edje file, or has not had its file/group set previously, by edje_object_file_set(), then both file
and group
will be set to NULL
, indicating an error.
NULL
pointers on the file/group components you're not interested in: they'll be ignored by the function.[out] | file | The path to the EDJ file to load from |
[out] | group | The name of the group, in file , which implements an Edje object |
Eina_Bool edje_object_mmap_set | ( | Evas_Object * | obj, |
const Eina_File * | file, | ||
const char * | group | ||
) |
Sets the EDJ file (and group within it) to load an Edje object's contents from.
EINA_TRUE
on success, or EINA_FALSE
on errors (check edje_object_load_error_get() after this call to get errors causes)Edje expects EDJ files, which are theming objects' descriptions and resources packed together in an EET file, to read Edje object definitions from. They usually are created with the .edj extension. EDJ files, in turn, are assembled from textual object description files, where one describes Edje objects declaratively – the EDC files (see the syntax for those files).
Those description files were designed so that many Edje object definitions – also called groups (or collections) – could be packed together in the same EDJ file, so that a whole application's theme could be packed in one file only. This is the reason for the group
argument.
Use this function after you instantiate a new Edje object, so that you can "give him life", telling where to get its contents from.
[in] | file | The Eina.File pointing to the EDJ file to load from |
[in] | group | The name of the group, in file , which implements an Edje object |
void edje_object_mirrored_set | ( | Evas_Object * | obj, |
Eina_Bool | rtl | ||
) |
Sets the RTL orientation for this object.
[in] | rtl | New value of flag true/$false |
Eina_Bool edje_object_mirrored_get | ( | const Evas_Object * | obj | ) |
Gets the RTL orientation for this object.
You can RTL orientation explicitly with edje_object_mirrored_set.
true/$false
void edje_object_language_set | ( | Evas_Object * | obj, |
const char * | language | ||
) |
Sets the language for this object.
[in] | language | The language value |
const char * edje_object_language_get | ( | const Evas_Object * | obj | ) |
Gets the language for this object.
void edje_object_text_insert_filter_callback_add | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Text_Filter_Cb | func, | ||
void * | data | ||
) |
Adds a filter function for newly inserted text.
Whenever text is inserted (not the same as set) into the given part, the list of filter functions will be called to decide if and how the new text will be accepted. There are three types of filters, EDJE_TEXT_FILTER_TEXT, EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP. The text parameter in the 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 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 null
will make Edje break out of the filter cycle and reject the inserted text.
See also edje_object_text_insert_filter_callback_del, edje_object_text_insert_filter_callback_del_full and edje_object_text_markup_filter_callback_add
[in] | part | The part name |
[in] | func | The callback function that will act as filter |
[in] | data | User provided data to pass to the filter function |
References eina_list_append(), EINA_SAFETY_ON_NULL_RETURN, and eina_stringshare_add().
void * edje_object_text_insert_filter_callback_del | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Text_Filter_Cb | func | ||
) |
Deletes a function from the filter list.
Delete the given func filter from the list in part. Returns the user data pointer given when added.
See also edje_object_text_insert_filter_callback_add and edje_object_text_insert_filter_callback_del_full
[in] | part | The part name |
[in] | func | The function callback to remove |
null
otherwise References EINA_LIST_FOREACH, eina_list_remove_list(), EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_stringshare_del().
void * edje_object_text_insert_filter_callback_del_full | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Text_Filter_Cb | func, | ||
void * | data | ||
) |
Deletes a function and matching user data from the filter list.
Delete the given func filter and data user data from the list in part. Returns the user data pointer given when added.
See also edje_object_text_insert_filter_callback_add and edje_object_text_insert_filter_callback_del
[in] | part | The part name |
[in] | func | The function callback to remove |
[in] | data | The data passed to the callback function |
null
otherwise References EINA_LIST_FOREACH, eina_list_remove_list(), EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_stringshare_del().
void edje_object_text_markup_filter_callback_add | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Markup_Filter_Cb | func, | ||
void * | data | ||
) |
Adds a markup filter function for newly inserted text.
Whenever text is inserted (not the same as set) into the given 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 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 to 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 null
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 func filter is always markup.
See also edje_object_text_markup_filter_callback_del, edje_object_text_markup_filter_callback_del_full and edje_object_text_insert_filter_callback_add
[in] | part | The part name |
[in] | func | The callback function that will act as markup filter |
[in] | data | User provided data to pass to the filter function |
References eina_list_append(), EINA_SAFETY_ON_NULL_RETURN, and eina_stringshare_add().
void * edje_object_text_markup_filter_callback_del | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Markup_Filter_Cb | func | ||
) |
Deletes a function from the markup filter list.
Delete the given func filter from the list in part. Returns the user data pointer given when added.
See also edje_object_text_markup_filter_callback_add and edje_object_text_markup_filter_callback_del_full
[in] | part | The part name |
[in] | func | The function callback to remove |
null
otherwiseReferences EINA_LIST_FOREACH, eina_list_remove_list(), EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_stringshare_del().
void * edje_object_text_markup_filter_callback_del_full | ( | Evas_Object * | obj, |
const char * | part, | ||
Edje_Markup_Filter_Cb | func, | ||
void * | data | ||
) |
Deletes a function and matching user data from the markup filter list.
Delete the given func filter and data user data from the list in part. Returns the user data pointer given when added.
See also edje_object_text_markup_filter_callback_add and edje_object_text_markup_filter_callback_del
[in] | part | The part name |
[in] | func | The function callback to remove |
[in] | data | The data passed to the callback function |
null
otherwiseReferences EINA_LIST_FOREACH, eina_list_remove_list(), EINA_SAFETY_ON_NULL_RETURN_VAL, and eina_stringshare_del().
void edje_object_play_set | ( | Evas_Object * | obj, |
Eina_Bool | play | ||
) |
Whether this object is playing or not.
This property indicates whether the object is running or not. If stopped (or paused), all transitions are disabled and programs stop running, until resumed.
If play is disabled, the object will remain the same, and its parts will not change state. Note that play can be disabled during a transition between states, effectively freezing the object in flight. When paused, no events will be processed or sent.
Setting to true
resumes playing from the current state.
Start or stop playing programs in this object.
[in] | play | The play state, true by default. |
Eina_Bool edje_object_play_get | ( | const Evas_Object * | obj | ) |
Whether this object is playing or not.
This property indicates whether the object is running or not. If stopped (or paused), all transitions are disabled and programs stop running, until resumed.
If play is disabled, the object will remain the same, and its parts will not change state. Note that play can be disabled during a transition between states, effectively freezing the object in flight. When paused, no events will be processed or sent.
Setting to true
resumes playing from the current state.
Get the current state of play, true
by default.
true
by default. References EINA_FALSE.
void edje_object_transition_duration_factor_set | ( | Evas_Object * | obj, |
double | scale | ||
) |
Transition duration factor.
This defines a multiplier for the duration of transitions as they are defined in EDC. By default this factor is 1.0, which means animations play at the same speed as described in EDC.
Sets transition duration factor.
[in] | scale | The transition duration factor. |
double edje_object_transition_duration_factor_get | ( | const Evas_Object * | obj | ) |
Transition duration factor.
This defines a multiplier for the duration of transitions as they are defined in EDC. By default this factor is 1.0, which means animations play at the same speed as described in EDC.
Gets transition duration factor.
void edje_object_size_min_get | ( | const Evas_Object * | obj, |
int * | minw, | ||
int * | minh | ||
) |
Gets the minimum size specified – as an EDC property – for a given Edje object.
This function retrieves the obj object's minimum size values, as declared in its EDC group definition. For instance, for an Edje object of minimum size 100x100 pixels: collections { group { name: "a_group"; min: 100 100; } }
min
EDC property was not declared for this object, this call will return 0x0.See also edje_object_size_max_get.
[out] | minw | Pointer to a variable where to store the minimum width |
[out] | minh | Pointer to a variable where to store the minimum height |
void edje_object_size_max_get | ( | const Evas_Object * | obj, |
int * | maxw, | ||
int * | maxh | ||
) |
Gets the maximum size specified – as an EDC property – for a given Edje object.
This function retrieves the object's maximum size values, as declared in its EDC group definition. For instance, for an Edje object of maximum size 100x100 pixels: collections { group { name: "a_group"; max: 100 100; } }
max
EDC property was not declared for the object, this call will return the maximum size a given Edje object may have, for each axis.See also edje_object_size_min_get.
[out] | maxw | The maximum width |
[out] | maxh | The maximum height |
void edje_object_item_provider_set | ( | Edje_Object * | obj, |
Edje_Item_Provider_Cb | func, | ||
void * | data | ||
) |
Sets the function that provides item objects for named items in an edje entry text.
Item objects may be deleted any time by Edje, and will be deleted when the Edje object is deleted (or file is set to a new file).
[in] | obj | The object. |
[in] | func | The function to call (or null to disable) to get item objects |
[in] | data | The data pointer to pass to the func callback |
void edje_object_animation_set | ( | Efl_Canvas_Layout * | obj, |
Eina_Bool | on | ||
) |
Whether this object is animating or not.
This property indicates whether animations are stopped or not. Animations here refer to transitions between states.
If animations are disabled, transitions between states (as defined in EDC) are then instantaneous. This is conceptually similar to setting the Efl.Player.playback_speed to an infinitely high value.
Start or stop animating this object.
[in] | obj | The object. |
[in] | on | The animation state, true by default. |
Eina_Bool edje_object_animation_get | ( | const Efl_Canvas_Layout * | obj | ) |
Whether this object is animating or not.
This property indicates whether animations are stopped or not. Animations here refer to transitions between states.
If animations are disabled, transitions between states (as defined in EDC) are then instantaneous. This is conceptually similar to setting the Efl.Player.playback_speed to an infinitely high value.
Get the current state of animation, true
by default.
[in] | obj | The object. |
true
by default. Efl_Input_Device * edje_object_seat_get | ( | const Efl_Canvas_Layout * | obj, |
Eina_Stringshare * | name | ||
) |
Returns the seat device given its Edje's name.
Edje references seats by a name that differs from Evas. Edje naming follows a incrementional convention: first registered name is "seat1", second is "seat2", differently from Evas.
[in] | obj | The object. |
[in] | name | The name's character string. |
null
if not found.Eina_Stringshare * edje_object_seat_name_get | ( | const Efl_Canvas_Layout * | obj, |
Efl_Input_Device * | device | ||
) |
Gets the name given to a set by Edje.
Edje references seats by a name that differs from Evas. Edje naming follows a incrementional convention: first registered name is "seat1", second is "seat2", differently from Evas.
[in] | obj | The object. |
[in] | device | The seat device |
null
if not found.Eina_Error edje_object_layout_load_error_get | ( | const Efl_Canvas_Layout * | obj | ) |
Gets the (last) file loading error for a given object.
[in] | obj | The object. |
Eina_Bool edje_object_content_remove | ( | Efl_Canvas_Layout * | obj, |
Efl_Gfx_Entity * | content | ||
) |
Unswallow an object from this Edje.
[in] | obj | The object. |
[in] | content | To be removed content. |
false
if content
was not a child or can not be removed.