edje (3) - Linux Manuals
edje: Edje Graphical Design Library.
NAME
edje.c - Edje Graphical Design Library.
SYNOPSIS
Functions
EAPI int edje_init (void)
Initialize the EDJE library.
EAPI int edje_shutdown (void)
Shutdown the EDJE library.
EAPI void edje_frametime_set (double t)
Set the frametime.
EAPI double edje_frametime_get (void)
Get the frametime.
EAPI void edje_freeze (void)
Freeze all Edje objects in the current process.
EAPI void edje_thaw (void)
Thaw all Edje objects in the current process.
EAPI Evas_List * edje_file_collection_list (const char *file)
Get a list of groups in an edje file.
EAPI void edje_file_collection_list_free (Evas_List *lst)
Free file collection list.
EAPI int edje_file_group_exists (const char *file, const char *glob)
Determine whether a group matching glob exists in an edje file.
EAPI char * edje_file_data_get (const char *file, const char *key)
Get data from the file level data block of an edje file.
EAPI void edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
Set Edje color class.
EAPI void edje_color_class_del (const char *color_class)
EAPI Evas_List * edje_color_class_list (void)
Lists all color classes known about by the current process.
EAPI void edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size)
Set the Edje text class.
EAPI void edje_text_class_del (const char *text_class)
EAPI Evas_List * edje_text_class_list (void)
Lists all text classes known about by the current process.
EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
Set the object minimum size.
EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh)
Set the object maximum size.
EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah)
Set the object aspect size.
EAPI Evas_Object * edje_object_add (Evas *evas)
Constructs the Edje object.
EAPI const char * edje_object_data_get (const Evas_Object *obj, const char *key)
Get Edje object data.
EAPI int edje_object_file_set (Evas_Object *obj, const char *file, const char *group)
Sets the EET file and group to load obj from.
EAPI void edje_object_file_get (const Evas_Object *obj, const char **file, const char **group)
Get the file and group name that obj was loaded from.
EAPI int edje_object_load_error_get (const Evas_Object *obj)
Gets the Edje load error.
EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source)
Send a signal to the Edje object.
EAPI void edje_object_play_set (Evas_Object *obj, int play)
Set the Edje to play or pause.
EAPI int edje_object_play_get (const Evas_Object *obj)
Get the Edje play/pause state.
EAPI void edje_object_animation_set (Evas_Object *obj, int on)
Set Animation state.
EAPI int edje_object_animation_get (const Evas_Object *obj)
Get the animation state.
EAPI int edje_object_freeze (Evas_Object *obj)
Freeze object.
EAPI int edje_object_thaw (Evas_Object *obj)
Thaw object.
EAPI void edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
Sets the object color class.
EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class)
EAPI void edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
Sets Edje text class.
EAPI void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
Get the minimum size for an object.
EAPI void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
Get the maximum size for an object.
EAPI void edje_object_calc_force (Evas_Object *obj)
Force a Size/Geometry calculation.
EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
Calculate minimum size.
EAPI void edje_object_size_min_restricted_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
Calculate minimum size.
EAPI int edje_object_part_exists (const Evas_Object *obj, const char *part)
Check if Edje part exists.
EAPI const Evas_Object * edje_object_part_object_get (const Evas_Object *obj, const char *part)
Gets the Evas_Object corresponding to a given part.
EAPI void edje_object_part_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
Get the geometry of an Edje part.
EAPI void edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text)
Sets the text for an object part.
EAPI const char * edje_object_part_text_get (const Evas_Object *obj, const char *part)
Returns the text of the object part.
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow)
Swallows an object into the edje.
EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow)
Unswallow an object.
EAPI Evas_Object * edje_object_part_swallow_get (const Evas_Object *obj, const char *part)
Get the object currently swallowed by a part.
EAPI const char * edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret)
Returns the state of the Edje part.
EAPI int edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part)
Determine dragable directions.
EAPI void edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy)
Set the dragable object location.
EAPI void edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
Get the dragable object location.
EAPI void edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh)
Set the dragable object size.
EAPI void edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh)
Get the dragable object size.
EAPI void edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy)
Sets the drag step increment.
EAPI void edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
Gets the drag step increment values.
EAPI void edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy)
Sets the page step increments.
EAPI void edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
Gets the page step increments.
EAPI void edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy)
Steps the dragable x,y steps.
EAPI void edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy)
Pages x,y steps.
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, void(*func)(void *data, Evas_Object *o, const char *emission, const char *source), void *data)
Add a callback for a signal emitted by obj.
EAPI void * edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, void(*func)(void *data, Evas_Object *o, const char *emission, const char *source))
Remove a callback from an object.
Detailed Description
Edje Graphical Design Library.
These routines are used for Edje.
Function Documentation
void edje_color_class_del (const char * color_class)
Parameters:
- color_class Deletes any values at the process level for the specified color class.
Evas_List * edje_color_class_list (void)
Lists all color classes known about by the current process.
Returns:
- A list of color class names (strings). These strings and the list must be free()'d by the caller.
EAPI void edje_color_class_set (const char * color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
Set Edje color class.
Parameters:
-
color_class
r Object Red value
g Object Green value
b Object Blue value
a Object Alpha value
r2 Outline Red value
g2 Outline Green value
b2 Outline Blue value
a2 Outline Alpha value
r3 Shadow Red value
g3 Shadow Green value
b3 Shadow Blue value
a3 Shadow Alpha value
Sets the color values for a process level color class. This will cause all edje parts in the current process that have the specified color class to have their colors multiplied by these values. (Object level color classes set by edje_object_color_class_set() will override the values set by this function).
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts)
EAPI void edje_extern_object_aspect_set (Evas_Object * obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah)
Set the object aspect size.
Parameters:
-
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.
EAPI void edje_extern_object_max_size_set (Evas_Object * obj, Evas_Coord maxw, Evas_Coord maxh)
Set the object maximum size.
Parameters:
-
obj A valid Evas_Object handle
maxw The maximum width
maxh The maximum height
This sets the maximum size restriction for the object.
EAPI void edje_extern_object_min_size_set (Evas_Object * obj, Evas_Coord minw, Evas_Coord minh)
Set the object minimum size.
Parameters:
-
obj A valid Evas_Object handle
minw The minimum width
minh The minimum height
This sets the minimum size restriction for the object.
EAPI Evas_List * edje_file_collection_list (const char * file)
Get a list of groups in an edje file.
Parameters:
- file The path to the edje file
Returns:
- The Evas_List of group names (char *)
Note: the list must be freed using edje_file_collection_list_free() when you are done with it.
EAPI void edje_file_collection_list_free (Evas_List * lst)
Free file collection list.
Parameters:
- lst The Evas_List of groups
Frees the list returned by edje_file_collection_list().
EAPI char * edje_file_data_get (const char * file, const char * key)
Get data from the file level data block of an edje file.
Parameters:
-
file The path to the .edj file
key The data key
Returns:
- The string value of the data
If an edje file is built from the following edc:
data { item: 'key1' 'value1'; item: 'key2' 'value2'; } collections { ... }
Then, edje_file_data_get('key1') will return 'value1'
EAPI int edje_file_group_exists (const char * file, const char * glob)
Determine whether a group matching glob exists in an edje file.
Parameters:
-
file The file path
glob A glob to match on
Returns:
- 1 if a match is found, 0 otherwise
EAPI double edje_frametime_get (void)
Get the frametime.
Returns:
- The frametime
Returns the frametime in seconds, by default this is 1/30.
EAPI void edje_frametime_set (double t)
Set the frametime.
Parameters:
- t The frametime
Sets the global frametime in seconds, by default this is 1/30.
EAPI void edje_freeze (void)
Freeze all Edje objects in the current process.
See edje_object_freeze() for more.
References edje_object_freeze().
EAPI int edje_init (void)
Initialize the EDJE library.
Returns:
- The new init count.
EAPI Evas_Object * edje_object_add (Evas * evas)
Constructs the Edje object.
Parameters:
- evas A valid Evas handle
Returns:
- The Evas_Object pointer.
Creates the Edje smart object, returning the Evas_Object handle.
EAPI int edje_object_animation_get (const Evas_Object * obj)
Get the animation state.
Parameters:
- obj A valid Evas_Object handle
Returns:
-
0 on Error or if not animated
1 if animated
EAPI void edje_object_animation_set (Evas_Object * obj, int on)
Set Animation state.
Parameters:
-
obj A valid Evas_Object handle
on Animation State
Stop or start an Edje animation.
EAPI void edje_object_calc_force (Evas_Object * obj)
Force a Size/Geometry calculation.
Parameters:
- obj A valid Evas_Object handle
Forces the object obj to recalculation layout regardless of freeze/thaw.
void edje_object_color_class_del (Evas_Object * obj, const char * color_class)
Parameters:
- color_class Deletes any values at the object level for the specified object and color class.
EAPI void edje_object_color_class_set (Evas_Object * obj, const char * color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
Sets the object color class.
Parameters:
-
obj A valid Evas_Object handle
color_class
r Object Red value
g Object Green value
b Object Blue value
a Object Alpha value
r2 Outline Red value
g2 Outline Green value
b2 Outline Blue value
a2 Outline Alpha value
r3 Shadow Red value
g3 Shadow Green value
b3 Shadow Blue value
a3 Shadow Alpha value
Sets the color values for an object level color class. This will cause all edje parts in the specified object that have the specified color class to have their colors multiplied by these values.
The first color is the object, the second is the text outline, and the third is the text shadow. (Note that the second two only apply to text parts)
EAPI const char * edje_object_data_get (const Evas_Object * obj, const char * key)
Get Edje object data.
Parameters:
-
obj A valid Evas_Object handle
key The data key
Returns:
- The data string
This fetches data specified at the object level.
In EDC this comes from a data block within the group block that obj was loaded from. E.g.
collections { group { name: 'a_group'; data { item: 'key1' 'value1'; item: 'key2' 'value2'; } } }
Get the file and group name that obj was loaded from.
Parameters:
This gets the EET file location and group for the given Evas_Object. If obj is either not an edje file, or has not had its file/group set using edje_object_file_set(), then both file and group will be set to NULL.
It is valid to pass in NULL for either file or group if you are not interested in one of the values.
Sets the EET file and group to load obj from.
Parameters:
Returns:
Edje uses EET files, conventionally ending in .edj, to store object descriptions. A single file contains multiple named groups. This function specifies the file and group name to load obj from.
Freeze object.
Parameters:
Returns:
This puts all changes on hold. Successive freezes will nest, requiring an equal number of thaws.
Gets the Edje load error.
Parameters:
Returns:
Determine dragable directions.
Parameters:
Returns:
Pages x,y steps.
Parameters:
Pages x,y where the increment is defined by edje_object_part_drag_page_set.
Gets the page step increments.
Parameters:
Gets the x,y page step increments for the dragable object.
Sets the page step increments.
Parameters:
Sets the x,y page step increment values.
Get the dragable object size.
Parameters:
Gets the dragable object size.
Set the dragable object size.
Parameters:
Sets the size of the dragable object.
Steps the dragable x,y steps.
Parameters:
Steps x,y where the step increment is the amount set by edje_object_part_drag_step_set.
Gets the drag step increment values.
Parameters:
Gets the x and y step increments for the dragable object.
Sets the drag step increment.
Parameters:
Sets the x,y step increments for a dragable object.
Get the dragable object location.
Parameters:
Gets the drag location values.
Set the dragable object location.
Parameters:
Places the dragable object at the given location.
Check if Edje part exists.
Parameters:
Returns:
Get the geometry of an Edje part.
Parameters:
Gets the geometry of an Edje part
It is valid to pass NULL as any of x, y, w or h, whose values you are uninterested in.
Gets the Evas_Object corresponding to a given part.
You should never modify the state of the returned object (with evas_object_move() or evas_object_hide() for example), but you can safely query info about its current state (with evas_object_visible_get() or evas_object_color_get() for example)
Parameters:
Returns:
Returns the state of the Edje part.
Parameters:
Returns:
Swallows an object into the edje.
Parameters:
Swallows the object into the edje part so that all geometry changes for the part affect the swallowed object. (e.g. resize, move, show, raise/lower, etc.).
If an object has already been swallowed into this part, then it will first be unswallowed before the new object is swallowed.
Get the object currently swallowed by a part.
Parameters:
Returns:
Returns the text of the object part.
Parameters:
Returns:
Sets the text for an object part.
Parameters:
Unswallow an object.
Parameters:
Causes the edje to regurgitate a previously swallowed object. :)
Get the Edje play/pause state.
Parameters:
Returns:
Set the Edje to play or pause.
Parameters:
This sets the Edje to play or pause depending on the parameter. This has no effect if the Edje is already in that state.
Add a callback for a signal emitted by obj.
Parameters:
Connects a callback function to a signal emitted by obj. In EDC, a program can emit a signal as follows:
Assuming a function with the following declaration is definded:
a callback is attached using:
Here, data is an arbitrary pointer to be used as desired. Note that emission and source correspond respectively to first and second parameters to the SIGNAL_EMIT action.
Internal edje signals can also be attached to, and globs can be in either the emission or source name. e.g.
Here, any mouse down events on an edje part whose name begins with 'button.' will trigger the callback. The actual signal and source name will be passed in to the emission and source parameters of the callback function. (e.g. 'mouse,down,2' and 'button.close').
Remove a callback from an object.
Parameters:
Returns:
Removes a callback from an object. 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.
Send a signal to the Edje object.
Parameters:
This sends a signal to the edje object.
An edje program can respond to a signal by specifying matching 'signal' and 'source' fields.
E.g.
will trigger a program whose edc is:
FIXME should this signal be sent to children also?
Get the maximum size for an object.
Parameters:
Gets the object's maximum size values from the Edje. These are set to zero if no Edje is connected to the Evas Object.
Calculate minimum size.
Parameters:
Calculates the object's minimum size ?!
References edje_object_size_min_restricted_calc().
Get the minimum size for an object.
Parameters:
Gets the object's minimum size values from the Edje. These are set to zero if no Edje is connected to the Evas Object.
Calculate minimum size.
Parameters:
Calculates the object's minimum size ?!
Referenced by edje_object_size_min_calc().
Sets Edje text class.
Parameters:
Sets the text class for the Edje.
Thaw object.
Parameters:
Returns:
This allows frozen changes to occur.
Shutdown the EDJE library.
Returns:
Parameters:
Lists all text classes known about by the current process.
Returns:
Set the Edje text class.
Parameters:
This sets updates all edje members which belong to this text class with the new font attributes.
Thaw all Edje objects in the current process.
See edje_object_thaw() for more.
References edje_object_thaw().
Generated automatically by Doxygen for Edje from the source code.
EAPI void edje_object_file_get (const Evas_Object * obj, const char ** file, const char ** group)
file A pointer to store a pointer to the filename in
group A pointer to store a pointer to the group name in
EAPI int edje_object_file_set (Evas_Object * obj, const char * file, const char * group)
file The path to the EET file
group The group name in the Edje
EAPI int edje_object_freeze (Evas_Object * obj)
EAPI int edje_object_load_error_get (const Evas_Object * obj)
EAPI int edje_object_part_drag_dir_get (const Evas_Object * obj, const char * part)
part The part name
EAPI void edje_object_part_drag_page (Evas_Object * obj, const char * part, double dx, double dy)
part The part name
dx The x step
dy The y step
EAPI void edje_object_part_drag_page_get (const Evas_Object * obj, const char * part, double * dx, double * dy)
part The part name
dx The dx page increment pointer
dy The dy page increment pointer
EAPI void edje_object_part_drag_page_set (Evas_Object * obj, const char * part, double dx, double dy)
part The part name
dx The x page step increment
dy The y page step increment
EAPI void edje_object_part_drag_size_get (const Evas_Object * obj, const char * part, double * dw, double * dh)
part The part name
dw The drag width pointer
dh The drag height pointer
EAPI void edje_object_part_drag_size_set (Evas_Object * obj, const char * part, double dw, double dh)
part The part name
dw The drag width
dh The drag height
EAPI void edje_object_part_drag_step (Evas_Object * obj, const char * part, double dx, double dy)
part The part name
dx The x step
dy The y step
EAPI void edje_object_part_drag_step_get (const Evas_Object * obj, const char * part, double * dx, double * dy)
part The part
dx The x step increment pointer
dy The y step increment pointer
EAPI void edje_object_part_drag_step_set (Evas_Object * obj, const char * part, double dx, double dy)
part The part name
dx The x step ammount
dy The y step ammount
EAPI void edje_object_part_drag_value_get (const Evas_Object * obj, const char * part, double * dx, double * dy)
part The part name
dx The X value pointer
dy The Y value pointer
EAPI void edje_object_part_drag_value_set (Evas_Object * obj, const char * part, double dx, double dy)
part The part name
dx The x value
dy The y value
EAPI int edje_object_part_exists (const Evas_Object * obj, const char * part)
part The part name to check
EAPI void edje_object_part_geometry_get (const Evas_Object * obj, const char * part, Evas_Coord * x, Evas_Coord * y, Evas_Coord * w, Evas_Coord * h)
part The Edje part
x The x coordinate pointer
y The y coordinate pointer
w The width pointer
h The height pointer
EAPI const Evas_Object * edje_object_part_object_get (const Evas_Object * obj, const char * part)
part The Edje part
EAPI const char * edje_object_part_state_get (const Evas_Object * obj, const char * part, double * val_ret)
part The part name
val_ret
EAPI void edje_object_part_swallow (Evas_Object * obj, const char * part, Evas_Object * obj_swallow)
part The part name
obj_swallow The object to swallow
EAPI Evas_Object * edje_object_part_swallow_get (const Evas_Object * obj, const char * part)
part The part name
EAPI const char * edje_object_part_text_get (const Evas_Object * obj, const char * part)
part The part name
EAPI void edje_object_part_text_set (Evas_Object * obj, const char * part, const char * text)
part The part name
text The text string
EAPI void edje_object_part_unswallow (Evas_Object * obj, Evas_Object * obj_swallow)
obj_swallow The swallowed object
EAPI int edje_object_play_get (const Evas_Object * obj)
EAPI void edje_object_play_set (Evas_Object * obj, int play)
play Play instruction (1 to play, 0 to pause)
EAPI void edje_object_signal_callback_add (Evas_Object * obj, const char * emission, const char * source, void(*)(void *data, Evas_Object *o, const char *emission, const char *source) func, void * data)
emission The signal name
source The signal source
func The callback function to be executed when the signal is emitted
data A pointer to data to pass in to the callback function
program {
name: 'emit_example';
action: SIGNAL_EMIT 'a_signal' 'a_source';
}
void cb_signal(void *data, Evas_Object *o, const char *emission, const char *source);
edje_object_callback_add(obj, 'a_signal', 'a_source', cb_signal, data);
edje_object_callback_add(obj, 'mouse,down,*', 'button.*', NULL);
EAPI void* edje_object_signal_callback_del (Evas_Object * obj, const char * emission, const char * source, void(*)(void *data, Evas_Object *o, const char *emission, const char *source) func)
emission the emission string
source the source string
func the callback function
EAPI void edje_object_signal_emit (Evas_Object * obj, const char * emission, const char * source)
emission The signal
source The signal source
edje_object_signal_emit(obj, 'a_signal', '');
program {
name: 'a_program';
signal: 'a_signal';
source: '';
action: ...
}
EAPI void edje_object_size_max_get (const Evas_Object * obj, Evas_Coord * maxw, Evas_Coord * maxh)
maxw Maximum width pointer
maxh Maximum height pointer
EAPI void edje_object_size_min_calc (Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh)
minw Minimum width pointer
minh Minimum height pointer
EAPI void edje_object_size_min_get (const Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh)
minw Minimum width pointer
minh Minimum height pointer
EAPI void edje_object_size_min_restricted_calc (Evas_Object * obj, Evas_Coord * minw, Evas_Coord * minh, Evas_Coord restrictedw, Evas_Coord restrictedh)
minw Minimum width pointer
minh Minimum height pointer
restrictedw Do not allow object min width calc to be less than this
restrictedh Do not allow object min height calc to be less than this
EAPI void edje_object_text_class_set (Evas_Object * obj, const char * text_class, const char * font, Evas_Font_Size size)
text_class The text class name
font Font name
size Font Size
EAPI int edje_object_thaw (Evas_Object * obj)
EAPI int edje_shutdown (void)
void edje_text_class_del (const char * text_class)
Evas_List * edje_text_class_list (void)
EAPI void edje_text_class_set (const char * text_class, const char * font, Evas_Font_Size size)
font The font name
size The font size
EAPI void edje_thaw (void)
Author