Tizen Native API
|
Functions | |
void | evas_data_attach_set (Evas_Canvas *obj, void *data) |
Attaches a specific pointer to the evas for fetching later. | |
void * | evas_data_attach_get (const Evas_Canvas *obj) |
Returns the pointer attached by evas_data_attach_set() | |
Eina_Bool | evas_focus_state_get (const Evas_Canvas *obj) |
Get the focus state known by the given evas. | |
void | evas_focus_out (Evas_Canvas *obj) |
Inform to the evas that it lost the focus. | |
void | evas_norender (Evas_Canvas *obj) |
Update the canvas internal objects but not triggering immediate renderization. | |
void | evas_nochange_pop (Evas_Canvas *obj) |
Pop the nochange flag down 1. | |
void | evas_nochange_push (Evas_Canvas *obj) |
Push the nochange flag up 1. | |
void | evas_damage_rectangle_add (Evas_Canvas *obj, int x, int y, int w, int h) |
Add a damage rectangle. | |
Eina_List * | evas_render_updates (Evas_Canvas *obj) |
Force immediate renderization of the given Evas canvas. | |
void | evas_focus_in (Evas_Canvas *obj) |
Inform to the evas that it got the focus. | |
void | evas_obscured_rectangle_add (Evas_Canvas *obj, int x, int y, int w, int h) |
Add an "obscured region" to an Evas canvas. | |
void | evas_render_dump (Evas_Canvas *obj) |
Make the canvas discard as much data as possible used by the engine at runtime. | |
void | evas_render (Evas_Canvas *obj) |
Force renderization of the given canvas. | |
void | evas_obscured_clear (Evas_Canvas *obj) |
Remove all "obscured regions" from an Evas canvas. | |
void | evas_render_idle_flush (Evas_Canvas *obj) |
Make the canvas discard internally cached data used for rendering. | |
void | evas_render_updates_free (Eina_List *updates) |
Free the rectangles returned by evas_render_updates(). | |
Evas * | evas_new (void) |
Creates a new empty evas. | |
void | evas_free (Evas *e) |
Frees the given evas and any objects created on it. | |
Typedefs | |
typedef Eo | Evas |
typedef struct _Evas_Public_Data | Evas_Public_Data |
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:
- create/destroy raw canvases, not bound to any displaying engine
- tell a canvas i got focused (in a windowing context, for example)
- tell a canvas a region should not be calculated anymore in rendering
- tell a canvas to render its contents, immediately
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 Evas events (canvas and object ones) and some canvas operations example here.
Typedef Documentation
An opaque handle to an Evas canvas.
- See also:
- evas_new()
- evas_free()
Public data for an Evas.
Function Documentation
void evas_damage_rectangle_add | ( | Evas_Canvas * | obj, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Add a damage rectangle.
- Since :
- 2.3
- Remarks:
- This is the function by which one tells evas that a part of the canvas has to be repainted.
- All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
- Parameters:
-
[in] obj The canvas object [in] x The rectangle's left position. [in] y The rectangle's top position. [in] w The rectangle's width. [in] h The rectangle's height.
void* evas_data_attach_get | ( | const Evas_Canvas * | obj | ) |
Returns the pointer attached by evas_data_attach_set()
- Since :
- 2.3
- Returns:
- The pointer attached
- Parameters:
-
[in] obj The canvas object
void evas_data_attach_set | ( | Evas_Canvas * | obj, |
void * | data | ||
) |
Attaches a specific pointer to the evas for fetching later.
- Since :
- 2.3
- Parameters:
-
[in] obj The canvas object [in] data The pointer to attach
void evas_focus_in | ( | Evas_Canvas * | obj | ) |
Inform to the evas that it got the focus.
- Since :
- 2.3
- Parameters:
-
[in] obj The canvas object
void evas_focus_out | ( | Evas_Canvas * | obj | ) |
Inform to the evas that it lost the focus.
- Since :
- 2.3
- Parameters:
-
[in] obj The canvas object
Eina_Bool evas_focus_state_get | ( | const Evas_Canvas * | obj | ) |
Get the focus state known by the given evas.
- Since :
- 2.3
- Returns:
EINA_TRUE
if it got the focus,EINA_FALSE
otherwise.
- Parameters:
-
[in] obj The canvas object
Frees the given evas and any objects created on it.
- Since :
- 2.3
- Remarks:
- Any objects with 'free' callbacks will have those callbacks called in this function.
- Parameters:
-
[in] e The given evas.
Creates a new empty evas.
- Since :
- 2.3
- Remarks:
- Note that before you can use the evas, you will to at a minimum:
- Set its render method with evas_output_method_set .
- Set its viewport size with evas_output_viewport_set .
- Set its size of the canvas with evas_output_size_set .
- Ensure that the render engine is given the correct settings with evas_engine_info_set .
- This function should only fail if the memory allocation fails
-
this function is very low level. Instead of using it directly, consider using the high level functions in Ecore_Evas_Group such as
ecore_evas_new()
. See Ecore.
- Attention:
- it is recommended that one calls Evas Initialization function before creating new canvas.
- Returns:
- A new uninitialised Evas canvas on success. Otherwise,
NULL
.
void evas_nochange_pop | ( | Evas_Canvas * | obj | ) |
Pop the nochange flag down 1.
- Since :
- 2.3
- Remarks:
- 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] obj The canvas object
void evas_nochange_push | ( | Evas_Canvas * | obj | ) |
Push the nochange flag up 1.
- Since :
- 2.3
- Remarks:
- 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] obj The canvas object
void evas_norender | ( | Evas_Canvas * | obj | ) |
Update the canvas internal objects but not triggering immediate renderization.
- Since :
- 2.3
- Remarks:
- This function updates the canvas internal objects not triggering renderization. To force renderization function evas_render() should be used.
- See also:
- evas_render.
- Parameters:
-
[in] obj The canvas object
void evas_obscured_clear | ( | Evas_Canvas * | obj | ) |
Remove all "obscured regions" from an Evas canvas.
- Since :
- 2.3
- Remarks:
- This function removes all the rectangles from the obscured regions list of the canvas
e
. It takes obscured areas added with evas_obscured_rectangle_add() and make them again a regions that have to be repainted on rendering updates. - 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()).
- See also:
- evas_obscured_rectangle_add() for an example
- evas_render_updates()
- Parameters:
-
[in] obj The canvas object
void evas_obscured_rectangle_add | ( | Evas_Canvas * | obj, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Add an "obscured region" to an Evas canvas.
- Since :
- 2.3
- Remarks:
- 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().
- 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()).
- Remarks:
- Example code follows.
- In that example, pressing the "Ctrl" and "o" keys will impose or remove an obscured region in the middle of the canvas. You'll get the same contents at the time the key was pressed, if toggling it on, until you toggle it off again (make sure the animation is running on to get the idea better). See the full example.
- Parameters:
-
[in] obj The canvas object [in] x The rectangle's top left corner's horizontal coordinate. [in] y The rectangle's top left corner's vertical coordinate [in] w The rectangle's width. [in] h The rectangle's height.
void evas_render | ( | Evas_Canvas * | obj | ) |
Force renderization of the given canvas.
- Since :
- 2.3
- Parameters:
-
[in] obj The canvas object
void evas_render_dump | ( | Evas_Canvas * | obj | ) |
Make the canvas discard as much data as possible used by the engine at runtime.
- Since :
- 2.3
- Remarks:
- This function will unload images, delete textures and much more, where possible. You may also want to call evas_render_idle_flush() immediately prior to this to perhaps discard a little more, though evas_render_dump() should implicitly delete most of what evas_render_idle_flush() might discard too.
- Parameters:
-
[in] obj The canvas object
void evas_render_idle_flush | ( | Evas_Canvas * | obj | ) |
Make the canvas discard internally cached data used for rendering.
- Since :
- 2.3
- Remarks:
- 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] obj The canvas object
Eina_List* evas_render_updates | ( | Evas_Canvas * | obj | ) |
Force immediate renderization of the given Evas canvas.
- Since :
- 2.3
- Returns:
- A newly allocated list of updated rectangles of the canvas (
Eina.Rectangle
structs). Free this list with evas_render_updates_free().
- Remarks:
- This function forces an immediate renderization update of the given canvas
e
. - This is a very low level function, which most of Evas' users wouldn't care about. One would use it, for example, 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 no changes and this call will be a no-op.
-
Example code follows.
- See the full example.
- Parameters:
-
[in] obj The canvas object
void evas_render_updates_free | ( | Eina_List * | updates | ) |
Free the rectangles returned by evas_render_updates().
- Since :
- 2.3
- Parameters:
-
[in] updates The list of updated rectangles of the canvas.
- Remarks:
- 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