Bases: efl.eo.Eo
The Evas Canvas.
Canvas is the base drawing area and scene manager, it should have a number of objects (or actors) that will be managed. Object state is monitored and redraw is optimized based on changes.
Variables: | rect – Rect describing object geometry, for easy manipulation. Changing this Rect will not affect current geometry, you have to set it again to have this behavior. |
---|
Attention
Canvas must be associated with an Input/Output system in order to be functional. So far it’s impossible to do this association directly from Python, so you should create Canvas indirectly using efl.elementary classes, like efl.elementary.window.Window.
Factory of efl.evas.Box associated with this canvas.
Return type: | efl.evas.Box |
---|
Factory of efl.evas.FilledImage associated with this canvas.
Return type: | efl.evas.FilledImage |
---|
Factory of efl.evas.Image associated with this canvas.
Return type: | efl.evas.Image |
---|
Factory of efl.evas.Line associated with this canvas.
Return type: | efl.evas.Line |
---|
Factory of efl.evas.Polygon associated with this canvas.
Return type: | efl.evas.Polygon |
---|
Factory of efl.evas.Rectangle associated with this canvas.
Return type: | efl.evas.Rectangle |
---|
Factory of efl.evas.Text associated with this canvas.
Return type: | efl.evas.Text |
---|
Factory of efl.evas.Textblock associated with this canvas.
Return type: | efl.evas.Textblock |
---|
Return type: | efl.evas.Object |
---|
Return type: | int |
---|
Return type: | int |
---|
Return type: | int |
---|
Return type: | int |
---|
Get the engine information pointer.
Note that given value is a pointer and is totally engine and platform dependent.
This call is very low level and is meant for extension to use, they usually do the machinery in C and just handle pointers as integers.
If in doubt, don’t mess with it.
Returns: | pointer as integer (uintptr_t). |
---|
Set the engine information pointer.
Note that given value is a pointer, usually acquired with engine_info_get() and is totally engine and platform dependent.
This call is very low level and is meant for extension to use, they usually do the machinery in C and just handle pointers as integers.
If in doubt, don’t mess with it.
Add a new callback for the given event.
Parameters: |
|
---|---|
Raises: |
|
Remove callback for the given event.
Parameters: |
|
---|---|
Precond: | type and func must be used as parameter for event_callback_add(). |
Raises ValueError: | |
if type is unknown or if there was no func connected with this type. |
Pause event propagation for this object.
Get the event freeze count for this object.
Returns: | the freeze count |
---|---|
Return type: | int |
Restart event propagation for this object.
Emit a feed_hold event in the canvas
Emit a key_down event in the canvas
Emit a key_up event in the canvas
Emit a mouse_cancel event in the canvas
Emit a mouse_down event in the canvas
Emit a mouse_in event in the canvas
Emit a mouse_move event in the canvas
Emit a mouse_out event in the canvas
Emit a mouse_up event in the canvas
Emit a mouse_wheel event in the canvas
Emit a multi_down event in the canvas
Emit a multi_move event in the canvas
Emit a multi_up event in the canvas
Return type: | efl.evas.Object |
---|
Return type: | list of str |
---|
Return type: | int |
---|
Return type: | bool |
---|
Return type: | int |
---|
Parameters: | flags – One of
|
---|
Return type: | list of str |
---|
Freeze event processing
Return type: | int |
---|
Return type: | int |
---|
Check if the object has been deleted thus leaving the object shallow.
Returns: | True if the object has been deleted yet, False otherwise. |
---|---|
Return type: | bool |
Return type: | bool |
---|
Find object by name.
Parameters: | name – |
---|---|
Return type: | efl.evas.Object |
Get all children at (x, y).
Parameters: |
|
---|---|
Returns: | children objects. |
Return type: | List of efl.evas.Object |
Get all children at given geometry.
Parameters: |
|
---|---|
Returns: | children objects. |
Return type: | List of efl.evas.Object |
Same as event_callback_add(EVAS_CALLBACK_CANVAS_FOCUS_IN, ...)
Expected signature:
function(object, *args, **kargs)
Same as event_callback_del(EVAS_CALLBACK_CANVAS_FOCUS_IN, ...)
Same as event_callback_add(EVAS_CALLBACK_CANVAS_FOCUS_OUT, ...)
Expected signature:
function(object, *args, **kargs)
Same as event_callback_del(EVAS_CALLBACK_CANVAS_FOCUS_OUT, ...)
Same as event_callback_add(EVAS_CALLBACK_RENDER_FLUSH_POST, ...)
Expected signature:
function(object, *args, **kargs)
Same as event_callback_del(EVAS_CALLBACK_RENDER_FLUSH_POST, ...)
Same as event_callback_add(EVAS_CALLBACK_RENDER_FLUSH_PRE, ...)
Expected signature:
function(object, *args, **kargs)
Same as event_callback_del(EVAS_CALLBACK_RENDER_FLUSH_PRE, ...)
Set canvas render method, can be either a name or id.
Parameters: | method – name(str) or id(int) of the method to set |
---|
The parent object
Type: | Eo |
---|
Returns a bitmask with the mouse buttons currently pressed set to 1.
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).
Return type: | int |
---|
Returns the pointer’s (x, y) relative to canvas.
Returns whether the mouse pointer is logically inside the canvas.
Return type: | bool |
---|
Returns the pointer’s (x, y) relative to output.
Force canvas to redraw pending updates.
Returns: | the tuple of int: (w, h) |
---|
Set canvas size.
Parameters: |
|
---|
Thaw (unfreeze) event processing
Get the topmost object at pointer position.
Returns: | child object. |
---|---|
Return type: | efl.evas.Object |
Get the topmost object at (x, y).
Parameters: |
|
---|---|
Returns: | child object. |
Return type: |
Return type: | efl.evas.Object |
---|
Get the topmost object at given geometry.
Parameters: |
|
---|---|
Returns: | child object. |
Return type: |
Returns: | the tuple of int: (x, y, w, h) |
---|
Sets the output viewport of the given evas in evas units.
Parameters: |
|
---|
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.