Modules | Macros | Typedefs | Functions
Canvas Functions

Low level Evas canvas functions. More...

Modules

 Render Engine Functions
 Functions that are used to set the render engine for a given function, and then get that engine working.
 
 Coordinate Mapping Functions
 Functions that are used to map coordinates from the canvas to the screen or the screen to the canvas.
 
 Output and Viewport Resizing Functions
 Functions that set and retrieve the output and viewport size of an evas.
 
 Canvas Events
 Functions relating to canvas events that report on changes of its internal states (an object got focused, the rendering is updated, etc).
 
 Image Functions
 Functions that deal with images at canvas level.
 
 Font Functions
 Functions that deal with fonts.
 
 Key Input Functions
 Functions that feed key events to the canvas.
 
 Rendering GL on Evas
 This group discusses the functions that are used to do OpenGL rendering on Evas.
 
 Touch Point List Functions
 Functions to get information of touched points in the Evas.
 

Macros

#define EVAS_CANVAS_CLASS   evas_canvas_class_get()
 Evas canvas class.
 

Typedefs

typedef Eo Evas
 An opaque handle to an Evas canvas. More...
 
typedef struct _Evas_Public_Data Evas_Public_Data
 Public data for an Evas.
 

Functions

EOAPI void evas_canvas_image_cache_set (Eo *obj, int size)
 Set the image cache. More...
 
EOAPI int evas_canvas_image_cache_get (const Eo *obj)
 Get the image cache. More...
 
EOAPI void evas_canvas_event_default_flags_set (Eo *obj, Evas_Event_Flags flags)
 Set the default set of flags an event begins with. More...
 
EOAPI Evas_Event_Flags evas_canvas_event_default_flags_get (const Eo *obj)
 Get the default set of flags an event begins with. More...
 
EOAPI void evas_canvas_font_cache_set (Eo *obj, int size)
 Changes the size of font cache of the given evas. More...
 
EOAPI int evas_canvas_font_cache_get (const Eo *obj)
 Get the size of font cache of the given evas in bytes. More...
 
EOAPI void evas_canvas_data_attach_set (Eo *obj, void *data)
 Attaches a specific pointer to the evas for fetching later. More...
 
EOAPI void * evas_canvas_data_attach_get (const Eo *obj)
 Returns the pointer attached by evas_canvas_data_attach_set. More...
 
EOAPI Efl_Canvas_Objectevas_canvas_focus_get (const Eo *obj)
 Retrieve the object focused by the default seat. More...
 
EOAPI Efl_Canvas_Objectevas_canvas_seat_focus_get (const Eo *obj, Evas_Device *seat)
 Return the focused object by a given seat. More...
 
EOAPI Efl_Canvas_Objectevas_canvas_object_top_get (const Eo *obj)
 Get the highest (stacked) Evas object on the canvas e. More...
 
EOAPI void evas_canvas_pointer_canvas_xy_by_device_get (const Eo *obj, Evas_Device *dev, int *x, int *y)
 This function returns the current known default pointer coordinates. More...
 
EOAPI void evas_canvas_pointer_canvas_xy_get (const Eo *obj, int *x, int *y)
 This function returns the current known default pointer coordinates. More...
 
EOAPI int evas_canvas_event_down_count_get (const Eo *obj)
 Get the number of mouse or multi presses currently active. More...
 
EOAPI int evas_canvas_smart_objects_calculate_count_get (const Eo *obj)
 This gets the internal counter that counts the number of smart calculations. More...
 
EOAPI Eina_Bool evas_canvas_focus_state_get (const Eo *obj)
 Get the focus state for the default seat. More...
 
EOAPI Eina_Bool evas_canvas_seat_focus_state_get (const Eo *obj, Evas_Device *seat)
 Get the focus state by a given seat. More...
 
EOAPI Eina_Bool evas_canvas_changed_get (const Eo *obj)
 Get the changed marker for the canvas. More...
 
EOAPI void evas_canvas_pointer_output_xy_by_device_get (const Eo *obj, Evas_Device *dev, int *x, int *y)
 This function returns the current known pointer coordinates. More...
 
EOAPI void evas_canvas_pointer_output_xy_get (const Eo *obj, int *x, int *y)
 This function returns the current known default pointer coordinates. More...
 
EOAPI Efl_Canvas_Objectevas_canvas_object_bottom_get (const Eo *obj)
 Get the lowest (stacked) Evas object on the canvas e. More...
 
EOAPI unsigned int evas_canvas_pointer_button_down_mask_by_device_get (const Eo *obj, Evas_Device *dev)
 Returns a bitmask with the mouse buttons currently pressed, set to 1. More...
 
EOAPI unsigned int evas_canvas_pointer_button_down_mask_get (const Eo *obj)
 Returns a bitmask with the default mouse buttons currently pressed, set to 1. More...
 
EOAPI Eina_Listevas_canvas_tree_objects_at_xy_get (Eo *obj, Efl_Canvas_Object *stop, int x, int y)
 Retrieve a list of Evas objects lying over a given position in a canvas. More...
 
EOAPI void evas_canvas_key_lock_on (Eo *obj, const char *keyname)
 Enables or turns on programmatically the lock key with name keyname for the default seat. More...
 
EOAPI void evas_canvas_seat_key_lock_on (Eo *obj, const char *keyname, Evas_Device *seat)
 Enables or turns on programmatically the lock key with name keyname for a give seat. More...
 
EOAPI void evas_canvas_seat_key_lock_off (Eo *obj, const char *keyname, Evas_Device *seat)
 Disables or turns off programmatically the lock key with name keyname for a given seat. More...
 
EOAPI void evas_canvas_key_modifier_add (Eo *obj, const char *keyname)
 Adds the keyname key to the current list of modifier keys. More...
 
EOAPI void evas_canvas_key_modifier_off (Eo *obj, const char *keyname)
 Disables or turns off programmatically the modifier key with name keyname for the default seat. More...
 
EOAPI Eina_Bool evas_canvas_render_async (Eo *obj)
 Render the given Evas canvas asynchronously. More...
 
EOAPI void evas_canvas_focus_out (Eo *obj)
 Inform the evas that it lost the focus from the default seat.
 
EOAPI void evas_canvas_norender (Eo *obj)
 Update the canvas internal objects but not triggering immediate renderization. More...
 
EOAPI void evas_canvas_nochange_pop (Eo *obj)
 Pop the nochange flag down 1. More...
 
EOAPI void evas_canvas_key_lock_off (Eo *obj, const char *keyname)
 Disables or turns off programmatically the lock key with name keyname for the default seat. More...
 
EOAPI void evas_canvas_nochange_push (Eo *obj)
 Push the nochange flag up 1. More...
 
EOAPI void evas_canvas_font_cache_flush (Eo *obj)
 Force the given evas and associated engine to flush its font cache.
 
EOAPI void evas_canvas_key_modifier_on (Eo *obj, const char *keyname)
 Enables or turns on programmatically the modifier key with name keyname for the default seat. More...
 
EOAPI void evas_canvas_seat_key_modifier_on (Eo *obj, const char *keyname, Evas_Device *seat)
 Enables or turns on programmatically the modifier key with name keyname for a given seat. More...
 
EOAPI void evas_canvas_seat_key_modifier_off (Eo *obj, const char *keyname, Evas_Device *seat)
 Disables or turns off programmatically the modifier key with name keyname for a given seat. More...
 
EOAPI Eina_Listevas_canvas_font_available_list (const Eo *obj)
 List of available font descriptions known or found by this evas. More...
 
EOAPI Efl_Canvas_Objectevas_canvas_object_name_find (const Eo *obj, const char *name)
 Retrieves the object on the given evas with the given name. More...
 
EOAPI void evas_canvas_font_path_append (Eo *obj, const char *path)
 Appends a font path to the list of font paths used by the given evas. More...
 
EOAPI void evas_canvas_font_path_clear (Eo *obj)
 Removes all font paths loaded into memory for the given evas.
 
EOAPI void evas_canvas_touch_point_list_nth_xy_get (Eo *obj, unsigned int n, double *x, double *y)
 This function returns the nth touch point's coordinates. More...
 
EOAPI void evas_canvas_key_lock_del (Eo *obj, const char *keyname)
 Removes the keyname key from the current list of lock keys on canvas e. More...
 
EOAPI void evas_canvas_damage_rectangle_add (Eo *obj, int x, int y, int w, int h)
 Add a damage rectangle. More...
 
EOAPI void evas_canvas_sync (Eo *obj)
 Sync evas canvas.
 
EOAPI const Eina_Listevas_canvas_font_path_list (const Eo *obj)
 Retrieves the list of font paths used by the given evas. More...
 
EOAPI void evas_canvas_image_cache_reload (Eo *obj)
 Reload the image cache. More...
 
EOAPI int evas_canvas_coord_world_x_to_screen (const Eo *obj, int x)
 Convert/scale a canvas coordinate into output screen coordinates. More...
 
EOAPI Eina_Listevas_canvas_render_updates (Eo *obj)
 Force immediate renderization of the given Evas canvas. More...
 
EOAPI void evas_canvas_image_cache_flush (Eo *obj)
 Flush the image cache of the canvas. More...
 
EOAPI int evas_canvas_coord_screen_y_to_world (const Eo *obj, int y)
 Convert/scale an output screen coordinate into canvas coordinates. More...
 
EOAPI void evas_canvas_key_modifier_del (Eo *obj, const char *keyname)
 Removes the keyname key from the current list of modifier keys on canvas e. More...
 
EOAPI void evas_canvas_focus_in (Eo *obj)
 Inform to the evas that it got the focus from the default seat.
 
EOAPI void evas_canvas_seat_focus_in (Eo *obj, Evas_Device *seat)
 Inform to the evas that it got the focus from a given seat. More...
 
EOAPI void evas_canvas_seat_focus_out (Eo *obj, Evas_Device *seat)
 Inform to the evas that it lost the focus from a given seat. More...
 
EOAPI void evas_canvas_obscured_rectangle_add (Eo *obj, int x, int y, int w, int h)
 Add an "obscured region" to an Evas canvas. More...
 
EOAPI void evas_canvas_render_dump (Eo *obj)
 Make the canvas discard as much data as possible used by the engine at runtime. More...
 
EOAPI void evas_canvas_render (Eo *obj)
 Force renderization of the given canvas.
 
EOAPI void evas_canvas_font_path_prepend (Eo *obj, const char *path)
 Prepends a font path to the list of font paths used by the given evas. More...
 
EOAPI void evas_canvas_obscured_clear (Eo *obj)
 Remove all "obscured regions" from an Evas canvas. More...
 
EOAPI int evas_canvas_coord_screen_x_to_world (const Eo *obj, int x)
 Convert/scale an output screen coordinate into canvas coordinates. More...
 
EOAPI void evas_canvas_key_lock_add (Eo *obj, const char *keyname)
 Adds the keyname key to the current list of lock keys. More...
 
EOAPI void evas_canvas_render_idle_flush (Eo *obj)
 Make the canvas discard internally cached data used for rendering. More...
 
EOAPI Evas_Deviceevas_canvas_default_device_get (const Eo *obj, Evas_Device_Class type)
 Return the default device of a given type. More...
 
EOAPI int evas_canvas_coord_world_y_to_screen (const Eo *obj, int y)
 Convert/scale a canvas coordinate into output screen coordinates. More...
 
void evas_render_updates_free (Eina_List *updates)
 Free the rectangles returned by evas_render_updates(). More...
 
const Evas_Modifierevas_key_modifier_get (const Evas *obj)
 Returns a handle to the list of modifier keys registered in the canvas e. More...
 
Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *evas, const char *keyname)
 Creates a bit mask from the keyname modifier key. More...
 
const Evas_Lockevas_key_lock_get (const Evas *obj)
 Returns a handle to the list of lock keys registered in the canvas e. More...
 
Eina_Bool evas_pointer_inside_by_device_get (const Evas *obj, Efl_Input_Device *dev)
 Returns whether the mouse pointer is logically inside the canvas. More...
 
Eina_Bool evas_pointer_inside_get (const Evas *obj)
 Returns whether the default mouse pointer is logically inside the canvas. More...
 
void evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 Sets the output framespace size of the render engine of the given evas. More...
 
void evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 Get the render engine's output framespace coordinates in canvas units. More...
 
void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 Sets the output viewport of the given evas in evas units. More...
 
void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 Get the render engine's output viewport coordinates in canvas units. More...
 
void evas_output_method_set (Evas *e, int render_method)
 Sets the output engine for the given evas. More...
 
int evas_output_method_get (const Evas *e)
 Retrieves the number of the output engine used for the given evas. More...
 
void evas_output_size_set (Evas *e, int w, int h)
 Sets the output size of the render engine of the given evas. More...
 
void evas_output_size_get (const Evas *e, int *w, int *h)
 Retrieve the output size of the render engine of the given evas. More...
 
Evasevas_new (void)
 Creates a new empty evas. More...
 
void evas_free (Evas *e)
 Frees the given evas and any objects created on it. More...
 
Eina_Bool evas_engine_info_set (Evas *obj, Evas_Engine_Info *info)
 Applies the engine settings for the given evas from the given Evas_Engine_Info structure. More...
 
Evas_Engine_Infoevas_engine_info_get (const Evas *obj)
 Retrieves the current render engine info struct from the given evas. More...
 
Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting)
 Checks if the font hinting is supported by the given evas. More...
 
Evas_Objectevas_object_top_in_rectangle_get (const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 Retrieve the Evas object stacked at the top of a given rectangular region in a canvas. More...
 
void evas_smart_objects_calculate (Eo *obj)
 Call user-provided calculate smart functions and unset the flag signalling that the object needs to get recalculated to all smart objects in the canvas.
 
Eina_Bool evas_smart_objects_calculating_get (const Eo *obj)
 Get if the canvas is currently calculating smart objects. More...
 
Evas_Objectevas_object_smart_add (Evas *e, Evas_Smart *s)
 Instantiates a new smart object described by s. More...
 
void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj)
 Set an Evas object as a member of a given smart object. More...
 
void evas_object_smart_member_del (Evas_Object *obj)
 Removes a member object from a given smart object. More...
 
void evas_object_smart_callback_add (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data)
 Add (register) a callback function to the smart event specified by event on the smart object obj. More...
 
void evas_object_smart_callback_priority_add (Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data)
 Add (register) a callback function to the smart event specified by event on the smart object obj. More...
 
void * evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func)
 Delete (unregister) a callback function from the smart event specified by event on the smart object obj. More...
 
void * evas_object_smart_callback_del_full (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data)
 Delete (unregister) a callback function from the smart event specified by event on the smart object obj. More...
 
void evas_object_smart_callback_call (Evas_Object *obj, const char *event, void *event_info)
 Call a given smart callback on the smart object obj. More...
 
const void * evas_object_smart_interface_get (const Evas_Object *obj, const char *name)
 Retrieve an Evas smart object's interface, by name string pointer. More...
 
void * evas_object_smart_interface_data_get (const Evas_Object *obj, const Evas_Smart_Interface *iface)
 Retrieve an Evas smart object interface's private data. More...
 
Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type)
 Checks whether a given smart object or any of its smart object parents is of a given smart class. More...
 
Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type)
 Checks whether a given smart object or any of its smart object parents is of a given smart class, using pointer comparison. More...
 
Eina_Bool evas_object_smart_callbacks_descriptions_set (Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions)
 Set an smart object instance's smart callbacks descriptions. More...
 
void evas_object_smart_callbacks_descriptions_get (const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count)
 Retrieve an smart object's know smart callback descriptions (both instance and class ones). More...
 
void evas_object_smart_callback_description_find (const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description)
 Find callback description for callback called name or null if not found. More...
 
Evas_Smartevas_object_smart_smart_get (const Evas_Object *obj)
 Get the Evas_Smart from which obj smart object was created. More...
 
void evas_object_smart_data_set (Evas_Object *obj, void *data)
 Store a pointer to user data for a given smart object. More...
 
void * evas_object_smart_data_get (const Evas_Object *obj)
 
Evas_Objectevas_object_smart_clipped_clipper_get (const Evas_Object *obj)
 Get the clipper object for the given clipped smart object. More...
 
Eina_Listevas_object_smart_members_get (const Evas_Object *obj)
 Retrieves the list of the member objects of a given Evas smart object. More...
 
void evas_object_smart_need_recalculate_set (Evas_Object *obj, Eina_Bool value)
 Set or unset the flag signalling that a given smart object needs to get recalculated. More...
 
Eina_Bool evas_object_smart_need_recalculate_get (const Evas_Object *obj)
 Get the value of the flag signalling that a given smart object needs to get recalculated. More...
 
Eina_Iteratorevas_object_smart_iterator_new (const Evas_Object *obj)
 Retrieves an iterator of the member objects of a given Evas smart object. More...
 
void evas_object_smart_calculate (Evas_Object *obj)
 Call the calculate() smart function immediately on a given smart object. More...
 
void evas_object_smart_changed (Evas_Object *obj)
 Mark smart object as changed, dirty. More...
 
void evas_object_smart_move_children_relative (Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
 Moves all children objects of a given smart object relative to a given offset. More...
 

Detailed Description

Low level Evas canvas functions.

Sub groups will present more high level ones, though.

Most of these functions deal with low level Evas actions, like:

Most users will be using Evas by means of the Ecore_Evas wrapper, which deals with all the above mentioned issues automatically for them. Thus, you'll be looking at this section only if you're building low level stuff.

The groups within present you functions that deal with the canvas directly, too, and not yet with its objects. They are the functions you need to use at a minimum to get a working canvas.

Some of the functions in this group are exemplified here.

Typedef Documentation

◆ Evas

An opaque handle to an Evas canvas.

See also
evas_new()
evas_free()

Function Documentation

◆ evas_canvas_image_cache_set()

EOAPI void evas_canvas_image_cache_set ( Eo obj,
int  size 
)

Set the image cache.

This function sets the image cache of canvas in bytes.

Parameters
[in]objThe object.
[in]sizeThe cache size.

◆ evas_canvas_image_cache_get()

EOAPI int evas_canvas_image_cache_get ( const Eo obj)

Get the image cache.

This function returns the image cache size of canvas in bytes.

Parameters
[in]objThe object.
Returns
The cache size.

◆ evas_canvas_event_default_flags_set()

EOAPI void evas_canvas_event_default_flags_set ( Eo obj,
Evas_Event_Flags  flags 
)

Set the default set of flags an event begins with.

Events in evas can have an event_flags member. This starts out with an initial value (no flags). This lets you set the default flags that an event begins with to flags.

Parameters
[in]objThe object.
[in]flagsThe default flags to use.
Since
1.2

◆ evas_canvas_event_default_flags_get()

EOAPI Evas_Event_Flags evas_canvas_event_default_flags_get ( const Eo obj)

Get the default set of flags an event begins with.

This gets the default event flags events are produced with when fed in.

Parameters
[in]objThe object.
Returns
The default flags to use.
Since
1.2

◆ evas_canvas_font_cache_set()

EOAPI void evas_canvas_font_cache_set ( Eo obj,
int  size 
)

Changes the size of font cache of the given evas.

Parameters
[in]objThe object.
[in]sizeThe size in bytes.

◆ evas_canvas_font_cache_get()

EOAPI int evas_canvas_font_cache_get ( const Eo obj)

Get the size of font cache of the given evas in bytes.

Parameters
[in]objThe object.
Returns
The size in bytes.

◆ evas_canvas_data_attach_set()

EOAPI void evas_canvas_data_attach_set ( Eo obj,
void *  data 
)

Attaches a specific pointer to the evas for fetching later.

Parameters
[in]objThe object.
[in]dataThe attached pointer.

◆ evas_canvas_data_attach_get()

EOAPI void* evas_canvas_data_attach_get ( const Eo obj)

Returns the pointer attached by evas_canvas_data_attach_set.

Parameters
[in]objThe object.
Returns
The attached pointer.

◆ evas_canvas_focus_get()

EOAPI Efl_Canvas_Object* evas_canvas_focus_get ( const Eo obj)

Retrieve the object focused by the default seat.

Focused objects will be the ones having key events delivered to, which the programmer can act upon by means of evas_object_event_callback_add usage.

Note
Most users wouldn't be dealing directly with Evas' focused objects. Instead, they would be using a higher level library for that (like a toolkit, as Elementary) to handle focus and who's receiving input for them.

This call returns the object that currently has focus on the canvas e or null, if none.

See also evas_object_focus_set, evas_object_focus_get, evas_object_key_grab, evas_object_key_ungrab, evas_canvas_seat_focus_get, efl_canvas_object_seat_focus_check, efl_canvas_object_seat_focus_add, efl_canvas_object_seat_focus_del.

Parameters
[in]objThe object.
Returns
The object that has focus or null if there is not one.

◆ evas_canvas_seat_focus_get()

EOAPI Efl_Canvas_Object* evas_canvas_seat_focus_get ( const Eo obj,
Evas_Device seat 
)

Return the focused object by a given seat.

Parameters
[in]objThe object.
[in]seatThe seat to fetch the focused object or null for the default seat.
Returns
The object that has the focus or null if the seat has no focused object.
Since
1.19

◆ evas_canvas_object_top_get()

EOAPI Efl_Canvas_Object* evas_canvas_object_top_get ( const Eo obj)

Get the highest (stacked) Evas object on the canvas e.

This function will take all populated layers in the canvas into account, getting the highest object for the highest layer, naturally.

Warning
This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.

See also evas_object_layer_get, evas_object_layer_set, evas_object_below_get, evas_object_above_get.

Parameters
[in]objThe object.
Returns
A pointer to the highest object on it (if any) or null otherwise.

◆ evas_canvas_pointer_canvas_xy_by_device_get()

EOAPI void evas_canvas_pointer_canvas_xy_by_device_get ( const Eo obj,
Evas_Device dev,
int *  x,
int *  y 
)

This function returns the current known default pointer coordinates.

Parameters
[in]objThe object.
[in]devThe pointer device.
[out]xThe pointer to a Evas_Coord to be filled in.
[out]yThe pointer to a Evas_Coord to be filled in.
Since
1.19

◆ evas_canvas_pointer_canvas_xy_get()

EOAPI void evas_canvas_pointer_canvas_xy_get ( const Eo obj,
int *  x,
int *  y 
)

This function returns the current known default pointer coordinates.

This function returns the current known canvas unit coordinates of the mouse pointer and sets the contents of the Evas_Coords pointed to by x and y to contain these coordinates. If e is not a valid canvas the results of this function are undefined.

Parameters
[in]objThe object.
[out]xThe pointer to a Evas_Coord to be filled in.
[out]yThe pointer to a Evas_Coord to be filled in.

◆ evas_canvas_event_down_count_get()

EOAPI int evas_canvas_event_down_count_get ( const Eo obj)

Get the number of mouse or multi presses currently active.

Parameters
[in]objThe object.
Returns
Mouse or multi presses currently active
Since
1.2

◆ evas_canvas_smart_objects_calculate_count_get()

EOAPI int evas_canvas_smart_objects_calculate_count_get ( const Eo obj)

This gets the internal counter that counts the number of smart calculations.

Whenever evas performs smart object calculations on the whole canvas it increments a counter by 1. This function returns the value of the smart object calculate counter. It starts with a value of 0 and will increase (and eventually wrap around to negative values and so on) by 1 every time objects are calculated. You can use this counter to ensure you don't re-do calculations withint the same calculation generation/run if the calculations maybe cause self-feeding effects.

Parameters
[in]objThe object.
Returns
Number of smart calculations
Since
1.1

◆ evas_canvas_focus_state_get()

EOAPI Eina_Bool evas_canvas_focus_state_get ( const Eo obj)

Get the focus state for the default seat.

Parameters
[in]objThe object.
Returns
true if focused, false otherwise

◆ evas_canvas_seat_focus_state_get()

EOAPI Eina_Bool evas_canvas_seat_focus_state_get ( const Eo obj,
Evas_Device seat 
)

Get the focus state by a given seat.

Parameters
[in]objThe object.
[in]seatThe seat to check the focus state. Use null for the default seat.
Returns
true if the seat has the canvas focus, false otherwise.

◆ evas_canvas_changed_get()

EOAPI Eina_Bool evas_canvas_changed_get ( const Eo obj)

Get the changed marker for the canvas.

Parameters
[in]objThe object.
Returns
true if changed, false otherwise
Since
1.11

◆ evas_canvas_pointer_output_xy_by_device_get()

EOAPI void evas_canvas_pointer_output_xy_by_device_get ( const Eo obj,
Evas_Device dev,
int *  x,
int *  y 
)

This function returns the current known pointer coordinates.

Parameters
[in]objThe object.
[in]devThe mouse device.
[out]xThe pointer to an integer to be filled in.
[out]yThe pointer to an integer to be filled in.
Since
1.19

◆ evas_canvas_pointer_output_xy_get()

EOAPI void evas_canvas_pointer_output_xy_get ( const Eo obj,
int *  x,
int *  y 
)

This function returns the current known default pointer coordinates.

This function returns the current known screen/output coordinates of the mouse pointer and sets the contents of the integers pointed to by x and y to contain these coordinates. If e is not a valid canvas the results of this function are undefined.

Parameters
[in]objThe object.
[out]xThe pointer to an integer to be filled in.
[out]yThe pointer to an integer to be filled in.

◆ evas_canvas_object_bottom_get()

EOAPI Efl_Canvas_Object* evas_canvas_object_bottom_get ( const Eo obj)

Get the lowest (stacked) Evas object on the canvas e.

This function will take all populated layers in the canvas into account, getting the lowest object for the lowest layer, naturally.

Warning
This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.

See also evas_object_layer_get, evas_object_layer_set, evas_object_below_get, evas_object_below_set.

Parameters
[in]objThe object.
Returns
A pointer to the lowest object on it, if any, or null otherwise.

◆ evas_canvas_pointer_button_down_mask_by_device_get()

EOAPI unsigned int evas_canvas_pointer_button_down_mask_by_device_get ( const Eo obj,
Evas_Device dev 
)

Returns a bitmask with the mouse buttons currently pressed, set to 1.

Parameters
[in]objThe object.
[in]devThe mouse device.
Returns
A bitmask of the currently depressed buttons on the canvas.

◆ evas_canvas_pointer_button_down_mask_get()

EOAPI unsigned int evas_canvas_pointer_button_down_mask_get ( const Eo obj)

Returns a bitmask with the default mouse buttons currently pressed, set to 1.

Calling this function will return a 32-bit integer with the appropriate bits set to 1, which correspond to a mouse button being depressed. This limits Evas to a mouse devices with a maximum of 32 buttons, but that is generally in excess of any host system's pointing device abilities.

A canvas by default begins with no mouse buttons being pressed and only pointer move events can alter that.

The least significant bit corresponds to the first mouse button (button 1) and the most significant bit corresponds to the last mouse button (button 32).

If e is not a valid canvas, the return value is undefined.

Parameters
[in]objThe object.
Returns
A bitmask of the currently depressed buttons on the canvas.

◆ evas_canvas_tree_objects_at_xy_get()

EOAPI Eina_List* evas_canvas_tree_objects_at_xy_get ( Eo obj,
Efl_Canvas_Object stop,
int  x,
int  y 
)

Retrieve a list of Evas objects lying over a given position in a canvas.

This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas covering the given position. It will enter the smart objects. It will not append to the list pass events as hidden objects. Call eina_list_free on the returned list after usage.

Parameters
[in]objThe object.
[in]stopAn Evas Object where to stop searching.
[in]xThe horizontal coordinate of the position.
[in]yThe vertical coordinate of the position.
Returns
List of objects

◆ evas_canvas_key_lock_on()

EOAPI void evas_canvas_key_lock_on ( Eo obj,
const char *  keyname 
)

Enables or turns on programmatically the lock key with name keyname for the default seat.

The effect will be as if the key was put on its active state after this call.

See also evas_canvas_key_lock_add, evas_canvas_key_lock_del, evas_canvas_key_lock_del, evas_canvas_key_lock_off, evas_canvas_seat_key_lock_on, evas_canvas_seat_key_lock_off.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to enable.

◆ evas_canvas_seat_key_lock_on()

EOAPI void evas_canvas_seat_key_lock_on ( Eo obj,
const char *  keyname,
Evas_Device seat 
)

Enables or turns on programmatically the lock key with name keyname for a give seat.

The effect will be as if the key was put on its active state after this call.

See also evas_canvas_key_lock_add, evas_canvas_key_lock_del, evas_canvas_key_lock_del, evas_canvas_key_lock_off, evas_canvas_key_lock_on, evas_canvas_seat_key_lock_off.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to enable.
[in]seatThe seat to enable the keylock. A null seat repesents the default seat.
Since
1.19

◆ evas_canvas_seat_key_lock_off()

EOAPI void evas_canvas_seat_key_lock_off ( Eo obj,
const char *  keyname,
Evas_Device seat 
)

Disables or turns off programmatically the lock key with name keyname for a given seat.

The effect will be as if the key was put on its inactive state after this call.

See also evas_canvas_key_lock_on, evas_canvas_seat_key_lock_on, evas_canvas_key_lock_off.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to enable.
[in]seatThe seat to disable the keylock. A null seat repesents the default seat.
Since
1.19

◆ evas_canvas_key_modifier_add()

EOAPI void evas_canvas_key_modifier_add ( Eo obj,
const char *  keyname 
)

Adds the keyname key to the current list of modifier keys.

Modifiers are keys like shift, alt and ctrl, i.e. keys which are meant to be pressed together with others, altering the behavior of the second keys pressed. Evas is so that these keys can be user defined.

This call allows custom modifiers to be added to the Evas system at run time. It is then possible to set and unset modifier keys programmatically for other parts of the program to check and act on. Programmers using Evas would check for modifier keys on key event callbacks using evas_key_modifier_is_set.

Note
If the programmer instantiates the canvas by means of the ecore_evas_new family of helper functions, Ecore will take care of registering on it all standard modifiers: "Shift", "Control", "Alt", "Meta", "Hyper", "Super".
Parameters
[in]objThe object.
[in]keynameThe name of the modifier key to add to the list of Evas modifiers.

◆ evas_canvas_key_modifier_off()

EOAPI void evas_canvas_key_modifier_off ( Eo obj,
const char *  keyname 
)

Disables or turns off programmatically the modifier key with name keyname for the default seat.

See also evas_canvas_key_modifier_add, evas_key_modifier_get, evas_canvas_key_modifier_on, evas_canvas_seat_key_modifier_off, evas_canvas_seat_key_modifier_off, evas_key_modifier_is_set, evas_seat_key_modifier_is_set.

Parameters
[in]objThe object.
[in]keynameThe name of the modifier to disable.

◆ evas_canvas_render_async()

EOAPI Eina_Bool evas_canvas_render_async ( Eo obj)

Render the given Evas canvas asynchronously.

This function only returns true when a frame will be rendered. If the previous frame is still rendering, false will be returned so the users know not to wait for the updates callback and just return to their main loop.

If a func callback is given, a list of updated areas will be generated and the function will be called from the main thread after the rendered frame is flushed to the screen. The resulting list should be freed with evas_render_updates_free.

The list is given in the event_info parameter of the callback function.

Parameters
[in]objThe object.
Returns
true if the canvas will render, false otherwise.
Since
1.8

◆ evas_canvas_norender()

EOAPI void evas_canvas_norender ( Eo obj)

Update the canvas internal objects but not triggering immediate renderization.

This function updates the canvas internal objects not triggering renderization. To force renderization function evas_canvas_render should be used.

Parameters
[in]objThe object.

◆ evas_canvas_nochange_pop()

EOAPI void evas_canvas_nochange_pop ( Eo obj)

Pop the nochange flag down 1.

This tells evas, that while the nochange flag is greater than 0, do not mark objects as "changed" when making changes.

Warning
Do not use this function unless you know what Evas exactly works with "changed" state.
Parameters
[in]objThe object.

◆ evas_canvas_key_lock_off()

EOAPI void evas_canvas_key_lock_off ( Eo obj,
const char *  keyname 
)

Disables or turns off programmatically the lock key with name keyname for the default seat.

The effect will be as if the key was put on its inactive state after this call.

See also evas_canvas_key_lock_on, evas_canvas_seat_key_lock_on, evas_canvas_seat_key_lock_off.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to disable.

◆ evas_canvas_nochange_push()

EOAPI void evas_canvas_nochange_push ( Eo obj)

Push the nochange flag up 1.

This tells evas, that while the nochange flag is greater than 0, do not mark objects as "changed" when making changes.

Warning
Do not use this function unless you know what Evas exactly works with "changed" state.
Parameters
[in]objThe object.

◆ evas_canvas_key_modifier_on()

EOAPI void evas_canvas_key_modifier_on ( Eo obj,
const char *  keyname 
)

Enables or turns on programmatically the modifier key with name keyname for the default seat.

The effect will be as if the key was pressed for the whole time between this call and a matching evas_key_modifier_off().

See also evas_canvas_key_modifier_off, evas_canvas_seat_key_modifier_on, evas_canvas_seat_key_modifier_off.

Parameters
[in]objThe object.
[in]keynameThe name of the modifier to enable.

◆ evas_canvas_seat_key_modifier_on()

EOAPI void evas_canvas_seat_key_modifier_on ( Eo obj,
const char *  keyname,
Evas_Device seat 
)

Enables or turns on programmatically the modifier key with name keyname for a given seat.

The effect will be as if the key was pressed for the whole time between this call and a matching evas_canvas_seat_key_modifier_off.

See also evas_canvas_key_modifier_off, evas_canvas_seat_key_modifier_on, evas_canvas_seat_key_modifier_off.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to enable.
[in]seatThe seat to enable the modifier. A null seat repesents the default seat.
Since
1.19

◆ evas_canvas_seat_key_modifier_off()

EOAPI void evas_canvas_seat_key_modifier_off ( Eo obj,
const char *  keyname,
Evas_Device seat 
)

Disables or turns off programmatically the modifier key with name keyname for a given seat.

See also evas_canvas_key_modifier_add, evas_key_modifier_get, evas_canvas_key_modifier_on, evas_canvas_seat_key_modifier_off, evas_canvas_seat_key_modifier_off, evas_key_modifier_is_set, evas_seat_key_modifier_is_set.

Parameters
[in]objThe object.
[in]keynameThe name of the lock to enable.
[in]seatThe seat to disable the modifier. A null seat repesents the default seat.
Since
1.19

◆ evas_canvas_font_available_list()

EOAPI Eina_List* evas_canvas_font_available_list ( const Eo obj)

List of available font descriptions known or found by this evas.

The list depends on Evas compile time configuration, such as fontconfig support, and the paths provided at runtime as explained in Font Path Functions.

Parameters
[in]objThe object.
Returns
A newly allocated list of strings. Do not change the strings. Be sure to call evas_font_available_list_free after you're done.

◆ evas_canvas_object_name_find()

EOAPI Efl_Canvas_Object* evas_canvas_object_name_find ( const Eo obj,
const char *  name 
)

Retrieves the object on the given evas with the given name.

This looks for the evas object given a name by evas_object_name_set. If the name is not unique canvas-wide, then which one of the many objects with that name is returned is undefined, so only use this if you can ensure the object name is unique.

Parameters
[in]objThe object.
[in]nameThe given name.
Returns
If successful, the Evas object with the given name. Otherwise, null.

◆ evas_canvas_font_path_append()

EOAPI void evas_canvas_font_path_append ( Eo obj,
const char *  path 
)

Appends a font path to the list of font paths used by the given evas.

Parameters
[in]objThe object.
[in]pathThe new font path.

◆ evas_canvas_touch_point_list_nth_xy_get()

EOAPI void evas_canvas_touch_point_list_nth_xy_get ( Eo obj,
unsigned int  n,
double *  x,
double *  y 
)

This function returns the nth touch point's coordinates.

Touch point's coordinates is updated whenever moving that point on the canvas.

Parameters
[in]objThe object.
[in]nThe number of the touched point (0 being the first).
[out]xLast known X position in window coordinates
[out]yLast known Y position in window coordinates

◆ evas_canvas_key_lock_del()

EOAPI void evas_canvas_key_lock_del ( Eo obj,
const char *  keyname 
)

Removes the keyname key from the current list of lock keys on canvas e.

Parameters
[in]objThe object.
[in]keynameThe name of the key to remove from the locks list.

◆ evas_canvas_damage_rectangle_add()

EOAPI void evas_canvas_damage_rectangle_add ( Eo obj,
int  x,
int  y,
int  w,
int  h 
)

Add a damage rectangle.

This is the function by which one tells evas that a part of the canvas has to be repainted.

Note
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
Parameters
[in]objThe object.
[in]xThe rectangle's left position.
[in]yThe rectangle's top position.
[in]wThe rectangle's width.
[in]hThe rectangle's height.

◆ evas_canvas_font_path_list()

EOAPI const Eina_List* evas_canvas_font_path_list ( const Eo obj)

Retrieves the list of font paths used by the given evas.

Parameters
[in]objThe object.
Returns
The list of font paths used.

◆ evas_canvas_image_cache_reload()

EOAPI void evas_canvas_image_cache_reload ( Eo obj)

Reload the image cache.

This function reloads the image cache of canvas.

Parameters
[in]objThe object.

◆ evas_canvas_coord_world_x_to_screen()

EOAPI int evas_canvas_coord_world_x_to_screen ( const Eo obj,
int  x 
)

Convert/scale a canvas coordinate into output screen coordinates.

This function takes in a horizontal coordinate as the x parameter and converts it into output units, accounting for output size, viewport size and location, returning it as the function return value. If e is invalid, the results are undefined.

Parameters
[in]objThe object.
[in]xThe canvas X coordinate.
Returns
The output/screen coordinate translated to output coordinates.

◆ evas_canvas_render_updates()

EOAPI Eina_List* evas_canvas_render_updates ( Eo obj)

Force immediate renderization of the given Evas canvas.

This function forces an immediate renderization update of the given canvas e.

Note
This is a very low level function, which most of Evas' users wouldn't care about. You might use it, for instance, to grab an Evas' canvas update regions and paint them back, using the canvas' pixmap, on a displaying system working below Evas.
Evas is a stateful canvas. If no operations changing its state took place since the last rendering action, you won't see any changes and this call will be a no-op.
Parameters
[in]objThe object.
Returns
A newly allocated list of updated rectangles of the canvas (.Rect structs). Free this list with evas_render_updates_free.

◆ evas_canvas_image_cache_flush()

EOAPI void evas_canvas_image_cache_flush ( Eo obj)

Flush the image cache of the canvas.

This function flushes image cache of canvas.

Parameters
[in]objThe object.

◆ evas_canvas_coord_screen_y_to_world()

EOAPI int evas_canvas_coord_screen_y_to_world ( const Eo obj,
int  y 
)

Convert/scale an output screen coordinate into canvas coordinates.

This function takes in a vertical coordinate as the y parameter and converts it into canvas units, accounting for output size, viewport size and location, returning it as the function return value. If e is invalid, the results are undefined.

Parameters
[in]objThe object.
[in]yThe screen/output y coordinate.
Returns
The screen coordinate translated to canvas unit coordinates.

◆ evas_canvas_key_modifier_del()

EOAPI void evas_canvas_key_modifier_del ( Eo obj,
const char *  keyname 
)

Removes the keyname key from the current list of modifier keys on canvas e.

See also evas_canvas_key_modifier_add.

Parameters
[in]objThe object.
[in]keynameThe name of the key to remove from the modifiers list.

◆ evas_canvas_seat_focus_in()

EOAPI void evas_canvas_seat_focus_in ( Eo obj,
Evas_Device seat 
)

Inform to the evas that it got the focus from a given seat.

Parameters
[in]objThe object.
[in]seatThe seat or null for the default seat.
Since
1.19

◆ evas_canvas_seat_focus_out()

EOAPI void evas_canvas_seat_focus_out ( Eo obj,
Evas_Device seat 
)

Inform to the evas that it lost the focus from a given seat.

Parameters
[in]objThe object.
[in]seatThe seat or null for the default seat.
Since
1.19

◆ evas_canvas_obscured_rectangle_add()

EOAPI void evas_canvas_obscured_rectangle_add ( Eo obj,
int  x,
int  y,
int  w,
int  h 
)

Add an "obscured region" to an Evas canvas.

This is the function by which one tells an Evas canvas that a part of it must not be repainted. The region must be rectangular and its coordinates inside the canvas viewport are passed in the call. After this call, the region specified won't participate in any form in Evas' calculations and actions during its rendering updates, having its displaying content frozen as it was just after this function took place.

We call it "obscured region" because the most common use case for this rendering (partial) freeze is something else (most probably other canvas) being on top of the specified rectangular region, thus shading it completely from the user's final scene in a display. To avoid unnecessary processing, one should indicate to the obscured canvas not to bother about the non-important area.

The majority of users won't have to worry about this function, as they'll be using just one canvas in their applications, with nothing inset or on top of it in any form.

To make this region one that has to be repainted again, call the function evas_obscured_clear.

Note
This is a very low level function, which most of Evas' users wouldn't care about.
This function does not flag the canvas as having its state changed. If you want to re-render it afterwards expecting new contents, you have to add "damage" regions yourself (see evas_damage_rectangle_add).
Parameters
[in]objThe object.
[in]xThe rectangle's top left corner's horizontal coordinate.
[in]yThe rectangle's top left corner's vertical coordinate.
[in]wThe rectangle's width.
[in]hThe rectangle's height.

◆ evas_canvas_render_dump()

EOAPI void evas_canvas_render_dump ( Eo obj)

Make the canvas discard as much data as possible used by the engine at runtime.

This function will unload images, delete textures and much more where possible. You may also want to call evas_canvas_render_idle_flush immediately prior to this to perhaps discard a little more, though this function should implicitly delete most of what evas_canvas_render_idle_flush might discard too.

Parameters
[in]objThe object.

◆ evas_canvas_font_path_prepend()

EOAPI void evas_canvas_font_path_prepend ( Eo obj,
const char *  path 
)

Prepends a font path to the list of font paths used by the given evas.

Parameters
[in]objThe object.
[in]pathThe new font path.

◆ evas_canvas_obscured_clear()

EOAPI void evas_canvas_obscured_clear ( Eo obj)

Remove all "obscured regions" from an Evas canvas.

This function removes all the rectangles from the obscured regions list of the canvas e. It takes obscured areas added with evas_canvas_obscured_rectangle_add and make them again a regions that have to be repainted on rendering updates.

Note
This is a very low level function, which most of Evas' users wouldn't care about.
This function does not flag the canvas as having its state changed. If you want to re-render it afterwards expecting new contents, you have to add "damage" regions yourself (see evas_canvas_damage_rectangle_add).
Parameters
[in]objThe object.

◆ evas_canvas_coord_screen_x_to_world()

EOAPI int evas_canvas_coord_screen_x_to_world ( const Eo obj,
int  x 
)

Convert/scale an output screen coordinate into canvas coordinates.

This function takes in a horizontal coordinate as the x parameter and converts it into canvas units, accounting for output size, viewport size and location, returning it as the function return value. If e is invalid, the results are undefined.

Parameters
[in]objThe object.
[in]xThe screen/output x coordinate.
Returns
The screen coordinate translated to canvas unit coordinates.

◆ evas_canvas_key_lock_add()

EOAPI void evas_canvas_key_lock_add ( Eo obj,
const char *  keyname 
)

Adds the keyname key to the current list of lock keys.

Locks are keys like caps lock, num lock or scroll lock, i.e., keys which are meant to be pressed once – toggling a binary state which is bound to it – and thus altering the behavior of all subsequently pressed keys somehow, depending on its state. Evas is so that these keys can be defined by the user.

This allows custom locks to be added to the evas system at run time. It is then possible to set and unset lock keys programmatically for other parts of the program to check and act on. Programmers using Evas would check for lock keys on key event callbacks using evas_key_lock_is_set.

Note
If the programmer instantiates the canvas by means of the ecore_evas_new() family of helper functions, Ecore will take care of registering on it all standard lock keys: "Caps_Lock", "Num_Lock", "Scroll_Lock".
Parameters
[in]objThe object.
[in]keynameThe name of the key to add to the locks list.

◆ evas_canvas_render_idle_flush()

EOAPI void evas_canvas_render_idle_flush ( Eo obj)

Make the canvas discard internally cached data used for rendering.

This function flushes the arrays of delete, active and render objects. Other things it may also discard are: shared memory segments, temporary scratch buffers, cached data to avoid re-compute of that data etc.

Parameters
[in]objThe object.

◆ evas_canvas_default_device_get()

EOAPI Evas_Device* evas_canvas_default_device_get ( const Eo obj,
Evas_Device_Class  type 
)

Return the default device of a given type.

Note
Currently EFL only creates a seat, mouse and keyboard.
Parameters
[in]objThe object.
[in]typeThe class of the default device to fetch.
Returns
The default device or null on error.
Since
1.19

◆ evas_canvas_coord_world_y_to_screen()

EOAPI int evas_canvas_coord_world_y_to_screen ( const Eo obj,
int  y 
)

Convert/scale a canvas coordinate into output screen coordinates.

This function takes in a vertical coordinate as the x parameter and converts it into output units, accounting for output size, viewport size and location, returning it as the function return value. If e is invalid, the results are undefined.

Parameters
[in]objThe object.
[in]yThe canvas y coordinate.
Returns
The output/screen coordinate translated to output coordinates.

◆ evas_render_updates_free()

void evas_render_updates_free ( Eina_List updates)

Free the rectangles returned by evas_render_updates().

Parameters
updatesThe list of updated rectangles of the canvas.

This function removes the region from the render updates list. It makes the region doesn't be render updated anymore.

See also
evas_render_updates() for an example

References efl_data_scope_get(), eina_array_clean(), eina_array_foreach(), eina_array_push(), EINA_COW_WRITE_BEGIN, EINA_COW_WRITE_END, eina_evlog(), EINA_FALSE, eina_inarray_flush(), eina_inlist_append(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_list_append(), EINA_LIST_FOREACH, EINA_LIST_FREE, eina_list_merge(), eina_rectangle_free(), eina_spinlock_release(), eina_spinlock_take(), EINA_TRUE, and EVAS_CANVAS_CLASS.

◆ evas_new()

Evas* evas_new ( void  )

Creates a new empty evas.

Note that before you can use the evas, you will to at a minimum:

This function should only fail if the memory allocation fails

Note
this function is very low level. Instead of using it directly, consider using the high level functions in Ecore_Evas wrapper/helper set of functions such as ecore_evas_new(). See Ecore.
Attention
it is recommended that one calls evas_init() before creating new canvas.
Returns
A new uninitialised Evas canvas on success. Otherwise, NULL.

References efl_add, efl_super(), efl_wref_add(), eina_clist_init(), eina_hash_pointer_new(), eina_hash_string_superfast_new(), eina_inarray_step_set(), eina_list_free(), eina_lock_new(), eina_spinlock_new(), EVAS_CALLBACK_LAST, and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_new().

◆ evas_free()

void evas_free ( Evas e)

Frees the given evas and any objects created on it.

Any objects with 'free' callbacks will have those callbacks called in this function.

Parameters
eThe given evas.

References EFL_CALLBACKS_ARRAY_DEFINE, efl_del(), efl_unref(), EINA_TRUE, and EINA_UNUSED.

◆ evas_engine_info_set()

Eina_Bool evas_engine_info_set ( Evas obj,
Evas_Engine_Info info 
)

Applies the engine settings for the given evas from the given Evas_Engine_Info structure.

To get the Evas_Engine_Info structure to use, call evas_engine_info_get. Do not try to obtain a pointer to an Evas_Engine_Info structure in any other way.

You will need to call this function at least once before you can create objects on an evas or render that evas. Some engines allow their settings to be changed more than once.

Once called, the info pointer should be considered invalid.

Parameters
[in]infoThe pointer to the engine info to use.
Returns
true if no error occurred, false otherwise.

References efl_data_scope_get(), EINA_FALSE, eina_list_data_get(), and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_new().

◆ evas_engine_info_get()

Evas_Engine_Info* evas_engine_info_get ( const Evas obj)

Retrieves the current render engine info struct from the given evas.

The returned structure is publicly modifiable. The contents are valid until either evas_engine_info_set or evas_render are called.

This structure does not need to be freed by the caller.

Returns
The pointer to the engine info to use.

References efl_data_scope_get(), eina_list_data_get(), EINA_TRUE, and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_new().

◆ evas_key_modifier_get()

const Evas_Modifier* evas_key_modifier_get ( const Evas obj)

Returns a handle to the list of modifier keys registered in the canvas e.

This is required to check for which modifiers are set at a given time with the evas_key_modifier_is_set function.

See also evas_key_modifier_add, evas_key_modifier_del, evas_key_modifier_on, evas_key_modifier_off, evas_seat_key_modifier_on, evas_seat_key_modifier_off.

Returns
An Evas_Modifier handle to query Evas' keys subsystem with evas_key_modifier_is_set or evas_seat_key_modifier_is_set, or null on error.

Referenced by elm_win_floating_mode_get().

◆ evas_key_modifier_mask_get()

Evas_Modifier_Mask evas_key_modifier_mask_get ( const Evas evas,
const char *  keyname 
)

Creates a bit mask from the keyname modifier key.

Values returned from different calls to it may be ORed together, naturally.

This function is meant to be using in conjunction with evas_object_key_grab/@ref evas_object_key_ungrab. Go check their documentation for more information.

See also evas_key_modifier_add, evas_key_modifier_get, evas_key_modifier_on, evas_key_modifier_off, evas_seat_key_modifier_on, evas_seat_key_modifier_off, evas_key_modifier_is_set, evas_seat_key_modifier_is_set..

Parameters
[in]keynameThe name of the modifier key to create the mask for.
Returns
The bit mask or 0 if the keyname key wasn't registered as a modifier for canvas e.

◆ evas_key_lock_get()

const Evas_Lock* evas_key_lock_get ( const Evas obj)

Returns a handle to the list of lock keys registered in the canvas e.

This is required to check for which locks are set at a given time with the evas_key_lock_is_set function.

Returns
An Evas_Lock handle to query Evas' keys subsystem with evas_key_lock_is_set or evas_seat_key_lock_is_set, or null on error.

References eina_hash_find().

Referenced by elm_win_floating_mode_get().

◆ evas_pointer_inside_by_device_get()

Eina_Bool evas_pointer_inside_by_device_get ( const Evas obj,
Efl_Input_Device *  dev 
)

Returns whether the mouse pointer is logically inside the canvas.

Parameters
[in]objThe object.
[in]devThe pointer device.
Returns
true if the pointer is inside, false otherwise.
Since
1.19

◆ evas_pointer_inside_get()

Eina_Bool evas_pointer_inside_get ( const Evas obj)

Returns whether the default mouse pointer is logically inside the canvas.

When this function is called it will return a value of either false or true, depending on if event_feed_mouse_in or event_feed_mouse_out have been called to feed in a mouse enter event into the canvas.

A return value of true indicates the mouse is logically inside the canvas, and false implies it is logically outside the canvas.

A canvas begins with the mouse being assumed outside ($false).

If e is not a valid canvas, the return value is undefined.

Parameters
[in]objThe object.
Returns
true if the mouse pointer is inside the canvas, false otherwise

◆ evas_font_hinting_can_hint()

Eina_Bool evas_font_hinting_can_hint ( const Evas e,
Evas_Font_Hinting_Flags  hinting 
)

Checks if the font hinting is supported by the given evas.

One of #EVAS_FONT_HINTING_NONE, #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.

Parameters
[in]hintingThe hinting to use.
Returns
true if it is supported, false otherwise.

References EINA_FALSE.

◆ evas_object_top_in_rectangle_get()

Evas_Object* evas_object_top_in_rectangle_get ( const Eo obj,
int  x,
int  y,
int  w,
int  h,
Eina_Bool  include_pass_events_objects,
Eina_Bool  include_hidden_objects 
)

Retrieve the Evas object stacked at the top of a given rectangular region in a canvas.

This function will traverse all the layers of the given canvas, from top to bottom, querying for objects with areas overlapping with the given rectangular region inside e. The user can remove from the query objects which are hidden and/or which are set to pass events.

Warning
This function will skip objects parented by smart objects, acting only on the ones at the "top level", with regard to object parenting.
Parameters
[in]objThe object.
[in]xThe top left corner's horizontal coordinate for the rectangular region.
[in]yThe top left corner's vertical coordinate for the rectangular region.
[in]wThe width of the rectangular region.
[in]hThe height of the rectangular region.
[in]include_pass_events_objectsBoolean flag to include or not objects which pass events in this calculation.
[in]include_hidden_objectsBoolean flag to include or not hidden objects in this calculation.
Returns
The Evas object that is over all other objects at the given rectangular region.

◆ evas_smart_objects_calculating_get()

Eina_Bool evas_smart_objects_calculating_get ( const Eo obj)

Get if the canvas is currently calculating smart objects.

Parameters
[in]objThe object.
Returns
true if currently calculating smart objects.

◆ evas_output_framespace_set()

void evas_output_framespace_set ( Evas e,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the output framespace size of the render engine of the given evas.

The framespace size is used in the Wayland engines to denote space in the viewport which is occupied by the window frame. This is mainly used in ecore_evas to draw borders.

The units used for w and h depend on the engine used by the evas.

Parameters
[in]xThe left coordinate in output units, usually pixels.
[in]yThe top coordinate in output units, usually pixels.
[in]wThe width in output units, usually pixels.
[in]hThe height in output units, usually pixels.
Since
1.1

References efl_data_scope_get(), and EVAS_CANVAS_CLASS.

◆ evas_output_framespace_get()

void evas_output_framespace_get ( const Evas e,
Evas_Coord x,
Evas_Coord y,
Evas_Coord w,
Evas_Coord h 
)

Get the render engine's output framespace coordinates in canvas units.

Parameters
[out]xThe left coordinate in output units, usually pixels.
[out]yThe top coordinate in output units, usually pixels.
[out]wThe width in output units, usually pixels.
[out]hThe height in output units, usually pixels.
Since
1.1

References efl_data_scope_get(), and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_background_set().

◆ evas_output_viewport_set()

void evas_output_viewport_set ( Evas e,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the output viewport of the given evas in evas units.

The output viewport is the area of the evas that will be visible to the viewer. The viewport will be stretched to fit the output target of the evas when rendering is performed.

Note
The coordinate values do not have to map 1-to-1 with the output target. However, it is generally advised that it is done for ease of use.
Parameters
[in]xThe top-left corner x value of the viewport.
[in]yThe top-left corner y value of the viewport.
[in]wThe width of the viewport. Must be greater than 0.
[in]hThe height of the viewport. Must be greater than 0.

References efl_data_scope_get(), ERR, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_new().

◆ evas_output_viewport_get()

void evas_output_viewport_get ( const Evas e,
Evas_Coord x,
Evas_Coord y,
Evas_Coord w,
Evas_Coord h 
)

Get the render engine's output viewport coordinates in canvas units.

Calling this function writes the current canvas output viewport size and location values into the variables pointed to by x, y, w and h. On success the variables have the output location and size values written to them in canvas units. Any of x, y, w or h that are null will not be written to. If e is invalid, the results are undefined.

Parameters
[out]xThe top-left corner x value of the viewport.
[out]yThe top-left corner y value of the viewport.
[out]wThe width of the viewport. Must be greater than 0.
[out]hThe height of the viewport. Must be greater than 0.

References efl_data_scope_get(), EINA_INLIST_FOREACH, and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_background_set(), and edje_perspective_new().

◆ evas_output_method_set()

void evas_output_method_set ( Evas e,
int  render_method 
)

Sets the output engine for the given evas.

Once the output engine for an evas is set, any attempt to change it will be ignored. The value for render_method can be found using evas_render_method_lookup.

Note
it is mandatory that one calls evas_init before setting the output method.
Parameters
[in]render_methodThe numeric engine value to use.

References efl_data_scope_get(), eina_inlist_append(), EINA_INLIST_GET, EINA_LIST_FOREACH, eina_streq(), EVAS_CANVAS_CLASS, evas_device_add_full(), EVAS_DEVICE_CLASS_KEYBOARD, EVAS_DEVICE_CLASS_MOUSE, EVAS_DEVICE_CLASS_SEAT, evas_device_seat_id_set(), and EVAS_DEVICE_SUBCLASS_NONE.

Referenced by ecore_evas_ews_new().

◆ evas_output_method_get()

int evas_output_method_get ( const Evas e)

Retrieves the number of the output engine used for the given evas.

Returns
The numeric engine value to use.

References efl_data_scope_get(), and EVAS_CANVAS_CLASS.

◆ evas_output_size_set()

void evas_output_size_set ( Evas e,
int  w,
int  h 
)

Sets the output size of the render engine of the given evas.

The evas will render to a rectangle of the given size once this function is called. The output size is independent of the viewport size. The viewport will be stretched to fill the given rectangle.

The units used for w and h depend on the engine used by the evas.

Parameters
[in]wThe width in output units, usually pixels.
[in]hThe height in output units, usually pixels.

References efl_data_scope_get(), eina_list_data_get(), and EVAS_CANVAS_CLASS.

Referenced by ecore_evas_ews_new().

◆ evas_output_size_get()

void evas_output_size_get ( const Evas e,
int *  w,
int *  h 
)

Retrieve the output size of the render engine of the given evas.

The output size is given in whatever the output units are for the engine.

If either w or h is null, then it is ignored. If e is invalid, the returned results are undefined.

Parameters
[out]wThe width in output units, usually pixels.
[out]hThe height in output units, usually pixels.

References efl_data_scope_get(), and EVAS_CANVAS_CLASS.

◆ evas_object_smart_add()

Evas_Object* evas_object_smart_add ( Evas e,
Evas_Smart s 
)

Instantiates a new smart object described by s.

Parameters
ethe canvas on which to add the object
sthe Evas_Smart describing the smart object
Returns
a new Evas_Object handle

This is the function one should use when defining the public function adding an instance of the new smart object to a given canvas. It will take care of setting all of its internals to work as they should, if the user set things properly, as seem on the EVAS_SMART_SUBCLASS_NEW, for example.

◆ evas_object_smart_member_add()

void evas_object_smart_member_add ( Evas_Object obj,
Evas_Object smart_obj 
)

Set an Evas object as a member of a given smart object.

Parameters
objThe member object
smart_objThe smart object

Members will automatically be stacked and layered together with the smart object. The various stacking functions will operate on members relative to the other members instead of the entire canvas, since they now live on an exclusive layer (see evas_object_stack_above(), for more details).

Any smart_obj object's specific implementation of the member_add() smart function will take place too, naturally.

See also
evas_object_smart_member_del()
evas_object_smart_members_get()

References efl_data_scope_get(), efl_data_scope_safe_get(), EINA_FALSE, eina_inlist_append(), EINA_INLIST_FOREACH, EINA_INLIST_GET, EINA_UNLIKELY, evas_object_clipees_has(), and evas_object_smart_member_del().

Referenced by edje_edit_part_name_set(), elm_flip_perspective_set(), emotion_object_file_get(), evas_object_box_smart_class_get(), and evas_object_smart_move_children_relative().

◆ evas_object_smart_member_del()

void evas_object_smart_member_del ( Evas_Object obj)

Removes a member object from a given smart object.

Parameters
objthe member object

This removes a member object from a smart object, if it was added to any. The object will still be on the canvas, but no longer associated with whichever smart object it was associated with.

See also
evas_object_smart_member_add() for more details
evas_object_smart_members_get()

References efl_data_scope_get(), efl_data_scope_safe_get(), efl_event_callback_call(), and EINA_UNUSED.

Referenced by evas_object_box_smart_class_get(), evas_object_smart_callback_description_find(), and evas_object_smart_member_add().

◆ evas_object_smart_callback_add()

void evas_object_smart_callback_add ( Evas_Object obj,
const char *  event,
Evas_Smart_Cb  func,
const void *  data 
)

Add (register) a callback function to the smart event specified by event on the smart object obj.

Parameters
obja smart object
eventthe event's name string
functhe callback function
datauser data to be passed to the callback function

Smart callbacks look very similar to Evas callbacks, but are implemented as smart object's custom ones.

This function adds a function callback to an smart object when the event named event occurs in it. The function is func.

In the event of a memory allocation error during addition of the callback to the object, evas_alloc_error() should be used to determine the nature of the error, if any, and the program should sensibly try and recover.

A smart callback function must have the Evas_Smart_Cb prototype definition. The first parameter (data) in this definition will have the same value passed to evas_object_smart_callback_add() as the data parameter, at runtime. The second parameter obj is a handle to the object on which the event occurred. The third parameter, event_info, is a pointer to data which is totally dependent on the smart object's implementation and semantic for the given event.

There is an infrastructure for introspection on smart objects' events (see evas_smart_callbacks_descriptions_get()), but no internal smart objects on Evas implement them yet.

See also
Smart events and callbacks for more details.
evas_object_smart_callback_del()

References EVAS_CALLBACK_PRIORITY_DEFAULT, and evas_object_smart_callback_priority_add().

◆ evas_object_smart_callback_priority_add()

void evas_object_smart_callback_priority_add ( Evas_Object obj,
const char *  event,
Evas_Callback_Priority  priority,
Evas_Smart_Cb  func,
const void *  data 
)

Add (register) a callback function to the smart event specified by event on the smart object obj.

Except for the priority field, it's exactly the same as evas_object_smart_callback_add

Parameters
obja smart object
eventthe event's name string
priorityThe priority of the callback, lower values called first.
functhe callback function
datauser data to be passed to the callback function
See also
evas_object_smart_callback_add
Since
1.1

References efl_event_callback_priority_add(), eina_inlist_append(), and EINA_INLIST_GET.

Referenced by evas_object_smart_callback_add().

◆ evas_object_smart_callback_del()

void* evas_object_smart_callback_del ( Evas_Object obj,
const char *  event,
Evas_Smart_Cb  func 
)

Delete (unregister) a callback function from the smart event specified by event on the smart object obj.

Parameters
obja smart object
eventthe event's name string
functhe callback function
Returns
the data pointer

This function removes the first added smart callback on the object obj matching the event name event and the registered function pointer func. If the removal is successful it will also return the data pointer that was passed to evas_object_smart_callback_add() (that will be the same as the parameter) when the callback(s) was(were) added to the canvas. If not successful NULL will be returned.

See also
evas_object_smart_callback_add() for more details.

References efl_event_callback_del(), EINA_INLIST_FOREACH, EINA_INLIST_GET, and eina_inlist_remove().

◆ evas_object_smart_callback_del_full()

void* evas_object_smart_callback_del_full ( Evas_Object obj,
const char *  event,
Evas_Smart_Cb  func,
const void *  data 
)

Delete (unregister) a callback function from the smart event specified by event on the smart object obj.

Parameters
obja smart object
eventthe event's name string
functhe callback function
datathe data pointer that was passed to the callback
Returns
the data pointer

This function removes the first added smart callback on the object obj matching the event name event, the registered function pointer func and the callback data pointer data. If the removal is successful it will also return the data pointer that was passed to evas_object_smart_callback_add() (that will be the same as the parameter) when the callback(s) was(were) added to the canvas. If not successful NULL will be returned. A common use would be to remove an exact match of a callback

See also
evas_object_smart_callback_add() for more details.
Since
1.2
Note
To delete all smart event callbacks which match type and func, use evas_object_smart_callback_del().

References efl_event_callback_del(), EINA_INLIST_FOREACH, EINA_INLIST_GET, and eina_inlist_remove().

◆ evas_object_smart_callback_call()

void evas_object_smart_callback_call ( Evas_Object obj,
const char *  event,
void *  event_info 
)

Call a given smart callback on the smart object obj.

Parameters
objthe smart object
eventthe event's name string
event_infopointer to an event specific struct or information to pass to the callback functions registered on this smart event

This should be called internally, from the smart object's own code, when some specific event has occurred and the implementor wants is to pertain to the object's events API (see Smart events and callbacks). The documentation for the smart object should include a list of possible events and what type of event_info to expect for each of them. Also, when defining an Evas_Smart_Class, smart object implementors are strongly encouraged to properly set the Evas_Smart_Class::callbacks callbacks description array, so that the users of the smart object can have introspection on its events API at run time.

References efl_event_callback_legacy_call().

Referenced by elm_entry_entry_get(), elm_object_focus_set(), emotion_object_last_position_load(), emotion_object_last_position_save(), and emotion_object_priority_get().

◆ evas_object_smart_interface_get()

const void* evas_object_smart_interface_get ( const Evas_Object obj,
const char *  name 
)

Retrieve an Evas smart object's interface, by name string pointer.

Parameters
objAn Evas smart object.
nameName string of the desired interface, which must be the same pointer used at the interface's declarion, when creating the smart object obj.
Since
1.7
Returns
The interface's handle pointer, if found, NULL otherwise.
Examples:
evas-smart-interface.c.

References evas_object_smart_smart_get(), and _Evas_Smart_Interface::name.

◆ evas_object_smart_interface_data_get()

void* evas_object_smart_interface_data_get ( const Evas_Object obj,
const Evas_Smart_Interface iface 
)

Retrieve an Evas smart object interface's private data.

Parameters
objAn Evas smart object.
ifaceThe given object's interface handle.
Since
1.7
Returns
The object interface's private data blob pointer, if found, NULL otherwise.
Examples:
evas-smart-interface.c.

References evas_object_smart_smart_get().

◆ evas_object_smart_type_check()

Eina_Bool evas_object_smart_type_check ( const Evas_Object obj,
const char *  type 
)

Checks whether a given smart object or any of its smart object parents is of a given smart class.

If obj is not a smart object, this call will fail immediately.

This function supports Eo and legacy inheritance mechanisms. However, it is recommended to use efl_isa instead if your object is using Eo from top to bottom.

The checks use smart classes names and string comparison. There is a version of this same check using pointer comparison, since a smart class' name is a single string in Evas.

See also evas_object_smart_type_check_ptr.

Parameters
[in]typeThe name (type) of the smart class to check for.
Examples:
evas-smart-interface.c, and evas-smart-object.c.

References efl_isa(), EINA_FALSE, eina_hash_find(), EINA_TRUE, _Evas_Smart_Class::name, and _Evas_Smart_Class::parent.

◆ evas_object_smart_type_check_ptr()

Eina_Bool evas_object_smart_type_check_ptr ( const Evas_Object obj,
const char *  type 
)

Checks whether a given smart object or any of its smart object parents is of a given smart class, using pointer comparison.

Parameters
[in]typeThe type (name string) to check for. Must be the name.
Returns
true if obj or any of its parents is of type type, false otherwise.

References efl_isa(), EINA_FALSE, eina_hash_find(), EINA_TRUE, _Evas_Smart_Class::name, and _Evas_Smart_Class::parent.

Referenced by elm_win_win32_window_get(), elm_win_window_id_get(), and elm_win_wl_window_get().

◆ evas_object_smart_callbacks_descriptions_set()

Eina_Bool evas_object_smart_callbacks_descriptions_set ( Evas_Object obj,
const Evas_Smart_Cb_Description descriptions 
)

Set an smart object instance's smart callbacks descriptions.

These descriptions are hints to be used by introspection and are not enforced in any way.

It will not be checked if instance callbacks descriptions have the same name as respective possibly registered in the smart object class. Both are kept in different arrays and users of evas_object_smart_callbacks_descriptions_get() should handle this case as they wish.

Note
Because descriptions must be null terminated, and because a null name makes little sense, too, Evas_Smart_Cb_Description.name must not be null.
While instance callbacks descriptions are possible, they are not recommended. Use class callbacks descriptions instead as they make you smart object user's life simpler and will use less memory, as descriptions and arrays will be shared among all instances.
Parameters
[in]descriptionsnull terminated array with Evas_Smart_Cb_Description descriptions. Array elements won't be modified at run time, but references to them and their contents will be made, so this array should be kept alive during the whole object's lifetime.
Returns
true on success, false on failure.

References EINA_FALSE, EINA_TRUE, and _Evas_Smart_Cb_Description::name.

Referenced by elm_spinner_value_get().

◆ evas_object_smart_callbacks_descriptions_get()

void evas_object_smart_callbacks_descriptions_get ( const Evas_Object obj,
const Evas_Smart_Cb_Description ***  class_descriptions,
unsigned int *  class_count,
const Evas_Smart_Cb_Description ***  instance_descriptions,
unsigned int *  instance_count 
)

Retrieve an smart object's know smart callback descriptions (both instance and class ones).

This call searches for registered callback descriptions for both instance and class of the given smart object. These arrays will be sorted by Evas_Smart_Cb_Description.name and also null terminated, so both class_count and instance_count can be ignored, if the caller wishes so. The terminator null is not counted in these values.

Note
If just class descriptions are of interest, try evas_smart_callbacks_descriptions_get() instead.
Use null pointers on the descriptions/counters you're not interested in: they'll be ignored by the function.

evas_smart_callbacks_descriptions_get().

Parameters
[out]class_descriptionsWhere to store class callbacks descriptions array, if any is known. If no descriptions are known, null is returned.
[out]class_countReturns how many class callbacks descriptions are known.
[out]instance_descriptionsWhere to store instance callbacks descriptions array, if any is known. If no descriptions are known, null is returned.
[out]instance_countReturns how many instance callbacks descriptions are known.
Examples:
evas-smart-interface.c, and evas-smart-object.c.

References efl_data_scope_get().

◆ evas_object_smart_callback_description_find()

void evas_object_smart_callback_description_find ( const Evas_Object obj,
const char *  name,
const Evas_Smart_Cb_Description **  class_description,
const Evas_Smart_Cb_Description **  instance_description 
)

Find callback description for callback called name or null if not found.

If parameter is null, no search will be done on instance descriptions.

Parameters
[in]namename of desired callback, must not be null. The search have a special case for name being the same pointer as registered with Evas_Smart_Cb_Description, one can use it to avoid excessive use of strcmp().
[out]class_descriptionpointer to return class description or null if not found. If parameter is null, no search will be done on class descriptions.
[out]instance_descriptionpointer to return instance description.

References _Evas_Smart_Interface::del, efl_data_scope_get(), efl_debug_name_get(), efl_event_callback_del(), eina_clist_add_tail(), eina_clist_element_is_linked(), EINA_CLIST_ENTRY, eina_clist_head(), eina_clist_remove(), EINA_FALSE, eina_hash_free(), eina_hash_string_small_new(), eina_inlist_append_relative(), eina_inlist_demote(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_inlist_prepend(), eina_inlist_prepend_relative(), eina_inlist_promote(), eina_inlist_remove(), EINA_TRUE, ERR, EVAS_CANVAS_CLASS, evas_event_freeze(), evas_event_thaw(), evas_event_thaw_eval(), evas_object_smart_data_set(), evas_object_smart_member_del(), and evas_smart_legacy_type_register().

◆ evas_object_smart_smart_get()

Evas_Smart* evas_object_smart_smart_get ( const Evas_Object obj)

Get the Evas_Smart from which obj smart object was created.

Returns
the Evas_Smart handle or null, on errors.

Referenced by evas_object_smart_interface_data_get(), and evas_object_smart_interface_get().

◆ evas_object_smart_data_set()

void evas_object_smart_data_set ( Evas_Object obj,
void *  data 
)

Store a pointer to user data for a given smart object.

This data is stored independently of the one set by evas_object_data_set(), naturally.

See also evas_object_smart_data_get.

Parameters
[in]dataA pointer to user data.

References EINA_TRUE.

Referenced by evas_object_smart_callback_description_find().

◆ evas_object_smart_clipped_clipper_get()

Evas_Object* evas_object_smart_clipped_clipper_get ( const Evas_Object obj)

Get the clipper object for the given clipped smart object.

Use this function if you want to change any of this clipper's properties, like colors.

Examples:
evas-smart-interface.c, and evas-smart-object.c.

References efl_isa(), evas_object_clip_set(), evas_object_clipees_has(), evas_object_color_set(), evas_object_hide(), and evas_object_show().

◆ evas_object_smart_members_get()

Eina_List* evas_object_smart_members_get ( const Evas_Object obj)

Retrieves the list of the member objects of a given Evas smart object.

The returned list should be freed with eina_list_free() when you no longer need it.

This function will return null when a non-smart object is passed.

See also Efl.Canvas.Group.group_member_add, Efl.Canvas.Group.group_member_remove and evas_object_smart_iterator_new.

Returns
Returns the list of the member objects of obj.
Since
1.7

References efl_data_scope_get(), EINA_INLIST_FOREACH_SAFE, eina_list_append(), EINA_TRUE, ERR, _Evas_Smart_Class::interfaces, _Evas_Smart_Interface::name, _Eina_Inlist::next, _Evas_Smart_Class::parent, and _Evas_Smart_Interface::private_size.

◆ evas_object_smart_need_recalculate_set()

void evas_object_smart_need_recalculate_set ( Evas_Object obj,
Eina_Bool  value 
)

Set or unset the flag signalling that a given smart object needs to get recalculated.

If this flag is set, then the calculate() smart function of obj will be called, if one is provided, during rendering phase of Evas (see evas_render()), after which this flag will be automatically unset.

If that smart function is not provided for the given object, this flag will be left unchanged.

Note
just setting this flag will not make the canvas' whole scene dirty, by itself, and evas_render() will have no effect. To force that, use evas_object_smart_changed(), that will also call this function automatically, with true as parameter.

See also evas_object_smart_need_recalculate_get, evas_object_smart_calculate and evas_smart_objects_calculate().

Parameters
[in]valuewhether one wants to set ($true) or to unset ($false) the flag.

Set or unset the flag signalling that a given smart object needs to get recalculated.

If this flag is set, then the evas_object_smart_calculate function will be called, during rendering phase of the canvas. After that, this flag will be automatically unset.

Note
setting this flag alone will not make the canvas' whole scene dirty. Using evas_render() will have no effect. To force this, use evas_object_smart_changed, which will also call this function automatically, with the parameter set to true.

See also evas_object_smart_calculate.

Parameters
[in]objThe object.
[in]valuetrue if the group layout needs to be recalculated, false otherwise

◆ evas_object_smart_need_recalculate_get()

Eina_Bool evas_object_smart_need_recalculate_get ( const Evas_Object obj)

Get the value of the flag signalling that a given smart object needs to get recalculated.

Note
this flag will be unset during the rendering phase, when the calculate() smart function is called, if one is provided. If it's not provided, then the flag will be left unchanged after the rendering phase.

See also evas_object_smart_need_recalculate_set, for more details.

Returns
whether one wants to set ($true) or to unset ($false) the flag.

Get the value of the flag signalling that a given smart object needs to get recalculated.

If this flag is set, then the evas_object_smart_calculate function will be called, during rendering phase of the canvas. After that, this flag will be automatically unset.

Note
setting this flag alone will not make the canvas' whole scene dirty. Using evas_render() will have no effect. To force this, use evas_object_smart_changed, which will also call this function automatically, with the parameter set to true.

See also evas_object_smart_calculate.

Parameters
[in]objThe object.
Returns
true if the group layout needs to be recalculated, false otherwise

◆ evas_object_smart_iterator_new()

Eina_Iterator* evas_object_smart_iterator_new ( const Evas_Object obj)

Retrieves an iterator of the member objects of a given Evas smart object.

See also Efl.Canvas.Group.group_member_add and Efl.Canvas.Group.group_member_remove

Returns
Returns the iterator of the member objects of obj.
Since
1.8

Retrieves an iterator of the member objects of a given Evas smart object.

This returns the list of "smart" children. This might be different from both the Efl_Object children list as well as the Efl_Container content list.

Parameters
[in]objThe object.
Returns
Iterator to object children

◆ evas_object_smart_calculate()

void evas_object_smart_calculate ( Evas_Object obj)

Call the calculate() smart function immediately on a given smart object.

This will force immediate calculations (see Evas_Smart_Class) needed for renderization of this object and, besides, unset the flag on it telling it needs recalculation for the next rendering phase.

See also evas_object_smart_need_recalculate_set

Call the calculate() smart function immediately on a given smart object.

This will also reset the flag evas_object_smart_need_recalculate_get.

Parameters
[in]objThe object.

Referenced by elm_table_pack_get(), and elm_toolbar_transverse_expanded_get().

◆ evas_object_smart_changed()

void evas_object_smart_changed ( Evas_Object obj)

Mark smart object as changed, dirty.

This will flag the given object as needing recalculation, forcefully. As an effect, on the next rendering cycle its calculate() (see Evas_Smart_Class) smart function will be called.

See also evas_object_smart_need_recalculate_set and evas_object_smart_calculate.

Mark smart object as changed, dirty.

This also forcefully marks the given object as needing recalculation. As an effect, on the next rendering cycle its evas_object_smart_calculate method will be called.

Parameters
[in]objThe object.
Examples:
evas-aspect-hints.c, evas-smart-interface.c, and evas-smart-object.c.

Referenced by elm_layout_sizing_restricted_eval(), elm_map_zoom_get(), elm_slider_indicator_show_set(), and evas_object_box_smart_class_get().

◆ evas_object_smart_move_children_relative()

void evas_object_smart_move_children_relative ( Evas_Object obj,
Evas_Coord  dx,
Evas_Coord  dy 
)

Moves all children objects of a given smart object relative to a given offset.

This will make each of obj object's children to move, from where they before, with those delta values (offsets) on both directions.

Note
This is most useful on custom smart move functions.
Clipped smart objects already make use of this function on their move smart function definition.
Parameters
[in]dxHorizontal offset (delta).
[in]dyVertical offset (delta).

References efl_data_scope_get(), efl_super(), EINA_FALSE, EINA_INLIST_FOREACH, EINA_TRUE, evas_object_color_set(), evas_object_hide(), evas_object_pass_events_set(), evas_object_rectangle_add(), and evas_object_smart_member_add().