Download

Support

Generic Object Functions

Functions that manipulate generic evas objects. More...

Functions

EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, void(*func)(void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data)
 Add a callback function to an object.
EAPI void * evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, void(*func)(void *data, Evas *e, Evas_Object *obj, void *event_info))
 Delete a callback function from an object.
EAPI void * evas_object_event_callback_del_full (Evas_Object *obj, Evas_Callback_Type type, void(*func)(void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data)
 Delete a callback function from an object.
EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip)
 Clip one object to another.
EAPI Evas_Objectevas_object_clip_get (const Evas_Object *obj)
 Get the object clipping this one (if any).
EAPI void evas_object_clip_unset (Evas_Object *obj)
 Disable clipping for an object.
EAPI const Eina_List * evas_object_clipees_get (const Evas_Object *obj)
 Return a list of objects currently clipped by a specific object.
EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data)
 Set an attached data pointer to an object with a given string key.
EAPI void * evas_object_data_get (const Evas_Object *obj, const char *key)
 Return an attached data pointer by its given string key.
EAPI void * evas_object_data_del (Evas_Object *obj, const char *key)
 Delete at attached data pointer from an object.
EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass)
 Set an object's pass events state.
EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj)
 Determine whether an object is set to pass events.
EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat)
 Set an object's repeat events state.
EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj)
 Determine whether an object is set to repeat events.
EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop)
 Set whether events on a smart member object should propagate to its parent.
EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj)
 Determine whether an object is set to propagate events.
EAPI void evas_object_layer_set (Evas_Object *obj, short l)
 Sets the layer of the evas that the given object will be part of.
EAPI short evas_object_layer_get (const Evas_Object *obj)
 Retrieves the layer of the evas that the given object is part of.
EAPI void evas_object_name_set (Evas_Object *obj, const char *name)
 Sets the name of the given evas object to the given name.
EAPI const char * evas_object_name_get (const Evas_Object *obj)
 Retrieves the name of the given evas object.
EAPI Evas_Objectevas_object_name_find (const Evas *e, const char *name)
 Retrieves the object on the given evas with the given name.
EAPI void evas_object_del (Evas_Object *obj)
 Deletes the given evas object and frees its memory.
EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 Moves the given evas object to the given location.
EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Changes the size of the given evas object.
EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 Retrieves the position and rectangular size of the given evas object.
EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Retrieves the size hint for the minimum size.
EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the size hint for the minimum size.
EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Retrieves the size hint for the maximum size.
EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the size hint for the maximum size.
EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Retrieves the size request hint.
EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the requested size hint.
EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
 Retrieves the size aspect control hint.
EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
 Sets the size aspect control hint.
EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y)
 Retrieves the size align control hint.
EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y)
 Sets the size align control hint.
EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y)
 Retrieves the size weight control hint.
EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y)
 Sets the size weight control hint.
EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
 Retrieves the size padding control hint.
EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
 Sets the size padding control hint.
EAPI void evas_object_show (Evas_Object *obj)
 Makes the given evas object visible.
EAPI void evas_object_hide (Evas_Object *obj)
 Makes the given evas object invisible.
EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj)
 Retrieves whether or not the given evas object is visible.
EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a)
 Sets the general colour of the given evas object to the given colour.
EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a)
 Retrieves the general colour of the given evas object.
EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool anti_alias)
 Sets whether or not the given evas object is to be drawn anti_aliased.
EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj)
 Retrieves whether or not the given evas object is to be drawn anti_aliased.
EAPI void evas_object_scale_set (Evas_Object *obj, double scale)
 Sets the scaling factor for an evas object.
EAPI double evas_object_scale_get (const Evas_Object *obj)
 Retrieves the scaling factor for the given evas object.
EAPI void evas_object_color_interpolation_set (Evas_Object *obj, int color_space)
 Sets the color_space to be used for linear interpolation of colors.
EAPI int evas_object_color_interpolation_get (const Evas_Object *obj)
 Retrieves the current value of the color space used for linear interpolation.
EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op render_op)
 Sets the render_op to be used for rendering the evas object.
EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj)
 Retrieves the current value of the operation used for rendering the evas object.
EAPI Evasevas_object_evas_get (const Evas_Object *obj)
 Retrieves the evas that the given evas object is on.
EAPI Evas_Objectevas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 To be documented.
EAPI Evas_Objectevas_object_top_at_pointer_get (const Evas *e)
 To be documented.
EAPI Evas_Objectevas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 To be documented.
EAPI Eina_List * evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 To be documented.
EAPI Eina_List * evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
 To be documented.
EAPI const char * evas_object_type_get (const Evas_Object *obj)
 Retrieves the name of the type of the given evas object.
EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise)
 Set whether to use a precise (usually expensive) point collision detection.
EAPI Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj)
 Determine whether an object is set to use a precise point collision detection.
EAPI void evas_object_raise (Evas_Object *obj)
 Raise obj to the top of its layer.
EAPI void evas_object_lower (Evas_Object *obj)
 Lower obj to the bottom of its layer.
EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above)
 Stack obj immediately above above.
EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below)
 Stack obj immediately below below.
EAPI Evas_Objectevas_object_above_get (const Evas_Object *obj)
 Get the evas object above obj.
EAPI Evas_Objectevas_object_below_get (const Evas_Object *obj)
 Get the evas object below obj.
EAPI Evas_Objectevas_object_bottom_get (const Evas *e)
 Get the lowest evas object on the Evas e.
EAPI Evas_Objectevas_object_top_get (const Evas *e)
 Get the highest evas object on the Evas e.

Detailed Description

Functions that manipulate generic evas objects.


Function Documentation

EAPI Evas_Object* evas_object_above_get ( const Evas_Object obj  ) 

Get the evas object above obj.

Parameters:
obj an Evas_Object
Returns:
the Evas_Object directly above
EAPI Eina_Bool evas_object_anti_alias_get ( const Evas_Object obj  ) 

Retrieves whether or not the given evas object is to be drawn anti_aliased.

Parameters:
obj The given evas object.
Returns:
1 if the object is to be anti_aliased. 0 otherwise.
EAPI void evas_object_anti_alias_set ( Evas_Object obj,
Eina_Bool  anti_alias 
)

Sets whether or not the given evas object is to be drawn anti_aliased.

Parameters:
obj The given evas object.
anti_alias. 1 if the object is to be anti_aliased, 0 otherwise.
EAPI Evas_Object* evas_object_below_get ( const Evas_Object obj  ) 

Get the evas object below obj.

Parameters:
obj an Evas_Object
Returns:
the Evas_Object directly below
EAPI Evas_Object* evas_object_bottom_get ( const Evas e  ) 

Get the lowest evas object on the Evas e.

Parameters:
e an Evas
Returns:
the lowest object
EAPI Evas_Object* evas_object_clip_get ( const Evas_Object obj  ) 

Get the object clipping this one (if any).

Parameters:
obj The object to get the clipper from

This function returns the the object clipping obj. If obj not being clipped, NULL is returned. The object obj must be a valid object.

See also evas_object_clip_set(), evas_object_clip_unset() and evas_object_clipees_get().

Example:

 extern Evas_Object *obj;
 Evas_Object *clipper;

 clipper = evas_object_clip_get(obj);
 if (clipper) evas_object_show(clipper);
EAPI void evas_object_clip_set ( Evas_Object obj,
Evas_Object clip 
)

Clip one object to another.

Parameters:
obj The object to be clipped
clip The object to clip obj by

This function will clip the object obj to the area occupied by the object clipper. This means the object obj will only be visible within the area occupied by the clipping object (clip). The color of the object being clipped will be multiplied by the color of the clipping object, so the resulting color for the clipped object is RESULT = (OBJ * CLIP) / (255 * 255) per color element (red, green, blue and alpha). Clipping is recursive, so clip objects may be clipped by other objects, and their color will in tern be multiplied. You may NOT set up circular clipping lists (i.e. object 1 clips object 2 which clips object 1). The behavior of Evas is undefined in this case. Objects which do not clip others are visible as normal, those that clip 1 or more objects become invisible themselves, only affecting what they clip. If an object ceases to have other objects being clipped by it, it will become visible again. The visibility of an object affects the objects that are clipped by it, so if the object clipping others is not shown, the objects clipped will not be shown either. If the object was being clipped by another object when this function is called, it is implicitly removed from the clipper it is being clipped to, and now is made to clip its new clipper.

At the moment the only objects that can validly be used to clip other objects are rectangle objects. All other object types are invalid and the result of using them is undefined.

The clip object clip must be a valid object, but may also be NULL in which case the effect of this function is the same as calling evas_object_clip_unset() on the obj object.

Example:

 extern Evas *evas;
 extern Evas_Object *obj;
 Evas_Object *clipper;

 clipper = evas_object_rectangle_add(evas);
 evas_object_color_set(clipper, 255, 255, 255, 255);
 evas_object_move(clipper, 10, 10);
 evas_object_resize(clipper, 20, 50);
 evas_object_clip_set(obj, clipper);
 evas_object_show(clipper);

References evas_object_clip_unset().

EAPI void evas_object_clip_unset ( Evas_Object obj  ) 

Disable clipping for an object.

Parameters:
obj The object to cease clipping on

This function disables clipping for the object obj, if it was already clipped. If it wasn't, this has no effect. The object obj must be a valid object.

See also evas_object_clip_set(), evas_object_clipees_get() and evas_object_clip_get().

Example:

 extern Evas_Object *obj;
 Evas_Object *clipper;

 clipper = evas_object_clip_get(obj);
 if (clipper)
   {
     evas_object_clip_unset(obj);
     evas_object_hide(obj);
   }

Referenced by evas_object_clip_set(), and evas_object_del().

EAPI const Eina_List* evas_object_clipees_get ( const Evas_Object obj  ) 

Return a list of objects currently clipped by a specific object.

Parameters:
obj The object to get a list of clippees from

This returns the inernal list handle that contains all objects clipped by the object obj. If none are clipped, it returns NULL. This list is only valid until the clip list is changed and should be fetched again with another call to evas_object_clipees_get() if any objects being clipped by this object are unclipped, clipped by a new object, are deleted or the clipper is deleted. These operations will invalidate the list returned so it should not be used anymore after that point. Any use of the list after this may have undefined results, not limited just to strange behavior but possible segfaults and other strange memory errors. The object obj must be a valid object.

See also evas_object_clip_set(), evas_object_clip_unset() and evas_object_clip_get().

Example:

 extern Evas_Object *obj;
 Evas_Object *clipper;

 clipper = evas_object_clip_get(obj);
 if (clipper)
   {
     Eina_List *clippees, *l;
     Evas_Object *obj_tmp;

     clippees = evas_object_clipees_get(clipper);
     printf("Clipper clips %i objects\n", eina_list_count(clippees));
     EINA_LIST_FOREACH(clippees, l, obj_tmp)
         evas_object_show(obj_tmp);
   }
EAPI void evas_object_color_get ( const Evas_Object obj,
int *  r,
int *  g,
int *  b,
int *  a 
)

Retrieves the general colour of the given evas object.

Note that if any of r, g, b or a are NULL, then the NULL parameters are ignored.

Parameters:
obj The given evas object.
r Pointer to an integer in which to store the red component of the colour.
g Pointer to an integer in which to store the green component of the colour.
b Pointer to an integer in which to store the blue component of the colour.
a Pointer to an integer in which to store the alpha component of the colour.
EAPI int evas_object_color_interpolation_get ( const Evas_Object obj  ) 

Retrieves the current value of the color space used for linear interpolation.

Parameters:
obj The given evas object.
Returns:
EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV.
EAPI void evas_object_color_interpolation_set ( Evas_Object obj,
int  color_space 
)

Sets the color_space to be used for linear interpolation of colors.

Parameters:
obj The given evas object.
color_space,one of EVAS_COLOR_SPACE_ARGB or EVAS_COLOR_SPACE_AHSV.
EAPI void evas_object_color_set ( Evas_Object obj,
int  r,
int  g,
int  b,
int  a 
)

Sets the general colour of the given evas object to the given colour.

Parameters:
obj The given evas object.
r The red component of the given colour.
g The green component of the given colour.
b The blue component of the given colour.
a The alpha component of the given colour.
EAPI void* evas_object_data_del ( Evas_Object obj,
const char *  key 
)

Delete at attached data pointer from an object.

Parameters:
obj The object to delete the data pointer from
key The string key the data was stored under
Returns:
The original data pointer stored at key on obj

This will remove thee stored data pointer from obj stored under key, and return the original pointer stored under key, if any, nor NULL if nothing was stored under that key.

Example:

 int *my_data;
 extern Evas_Object *obj;

 my_data = evas_object_data_del(obj, "name_of_my_data");

Referenced by evas_object_data_set().

EAPI void* evas_object_data_get ( const Evas_Object obj,
const char *  key 
)

Return an attached data pointer by its given string key.

Parameters:
obj The object to which the data was attached
key The string key the data was stored under
Returns:
The data pointer stored, or NULL if none was stored

This function will return the data pointer attached to the object obj stored using the string key key. If the object is valid and data was stored under the given key, the pointer that was stored will be reuturned. If this is not the case, NULL will be returned, signifying an invalid object or non-existent key. It is possible a NULL pointer was stored given that key, but this situation is non-sensical and thus can be considered an error as well. NULL pointers are never stored as this is the return value if an error occurs.

Example:

 int *my_data;
 extern Evas_Object *obj;

 my_data = evas_object_data_get(obj, "name_of_my_data");
 if (my_data) printf("Data stored was %p\n", my_data);
 else printf("No data was stored on the object\n");
EAPI void evas_object_data_set ( Evas_Object obj,
const char *  key,
const void *  data 
)

Set an attached data pointer to an object with a given string key.

Parameters:
obj The object to attach the data pointer to
key The string key for the data to access it
data The ponter to the data to be attached

This attaches the pointer data to the object obj given the string key. This pointer will stay "hooked" to the object until a new pointer with the same string key is attached with evas_object_data_set() or it is deleted with evas_object_data_del(). On deletion of the object obj, the pointers will not be accessible from the object anymore.

You can find the pointer attached under a string key using evas_object_data_get(). It is the job of the calling application to free any data pointed to by data when it is no longer required.

If data is NULL, the old value stored at key will be removed but no new value will be stored. This is synonymous with calling evas_object_data_del() with obj and key.

Example:

 int *my_data;
 extern Evas_Object *obj;

 my_data = malloc(500);
 evas_object_data_set(obj, "name_of_data", my_data);
 printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));

References evas_object_data_del().

EAPI void evas_object_del ( Evas_Object obj  ) 

Deletes the given evas object and frees its memory.

The object's 'free' callback is called when this function is called. If the object currently has the focus, its 'focus out' callback is also called.

Parameters:
obj The given evas object.

References EVAS_CALLBACK_DEL, EVAS_CALLBACK_FOCUS_OUT, EVAS_CALLBACK_FREE, evas_object_clip_unset(), evas_object_hide(), and evas_object_name_set().

Referenced by evas_object_box_remove_all(), and evas_object_table_clear().

EAPI Evas* evas_object_evas_get ( const Evas_Object obj  ) 

Retrieves the evas that the given evas object is on.

Parameters:
obj The given evas object.
Returns:
The evas that the object is on.

Referenced by evas_object_box_add_to(), and evas_object_table_add_to().

EAPI void evas_object_event_callback_add ( Evas_Object obj,
Evas_Callback_Type  type,
void(*)(void *data, Evas *e, Evas_Object *obj, void *event_info)  func,
const void *  data 
)

Add a callback function to an object.

Parameters:
obj Object to attach a callback to
type The type of event that will trigger the callback
func The function to be called when the event is triggered
data The data pointer to be passed to func

This function adds a function callback to an object when the event of type type occurs on object obj. 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.

The function will be passed the pointer data when it is called. A callback function must look like this:

 void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);

The first parameter data in this function will be the same value passed to evas_object_event_callback_add() as the data parameter. The second parameter is a convenience for the programmer to know what evas canvas the event occured on. The third parameter obj is the Object handle on which the event occured. The foruth parameter event_info is a pointer to a data structure that may or may not be passed to the callback, depending on the event type that triggered the callback.

The event type type to trigger the function may be one of EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_OUT, EVAS_CALLBACK_MOUSE_DOWN, EVAS_CALLBACK_MOUSE_UP, EVAS_CALLBACK_MOUSE_MOVE, EVAS_CALLBACK_MOUSE_WHEEL, EVAS_CALLBACK_FREE, EVAS_CALLBACK_KEY_DOWN, EVAS_CALLBACK_KEY_UP, EVAS_CALLBACK_FOCUS_IN, EVAS_CALLBACK_FOCUS_OUT, EVAS_CALLBACK_SHOW, EVAS_CALLBACK_HIDE, EVAS_CALLBACK_MOVE, EVAS_CALLBACK_RESIZE or EVAS_CALLBACK_RESTACK. This determines the kind of event that will trigger the callback to be called. The event_info pointer passed to the callback will be one of the following, depending on the event triggering it:

EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In

This event is triggered when the mouse pointer enters the region of the object obj. This may occur by the mouse pointer being moved by evas_event_feed_mouse_move() or evas_event_feed_mouse_move_data() calls, or by the object being shown, raised, moved, resized, or other objects being moved out of the way, hidden, lowered or moved out of the way.

EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out

This event is triggered exactly like EVAS_CALLBACK_MOUSE_IN is, but occurs when the mouse pointer exits an object. Note that no out events will be reported if the mouse pointer is implicitly grabbed to an object (the mouse buttons are down at all and any were pressed on that object). An out event will be reported as soon as the mouse is no longer grabbed (no mouse buttons are depressed). Out events will be reported once all buttons are released, if the mouse has left the object.

EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to Evas_Event_Mouse_Down

This event is triggered by a mouse button being depressed while over an object. If pointermode is EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default) this causes this object to passively grab the mouse until all mouse buttons have been released. That means if this mouse button is the first to be pressed, all future mouse events will be reported to only this object until no buttons are down. That includes mouse move events, in and out events, and further button presses. When all buttons are released, event propagation occurs as normal.

EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up

This event is triggered by a mouse button being released while over an object or when passively grabbed to an object. If this is the last mouse button to be raised on an object then the passive grab is released and event processing will continue as normal.

EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move

This event is triggered by the mouse pointer moving while over an object or passively grabbed to an object.

EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to Evas_Event_Mouse_Wheel

This event is triggered by the mouse wheel being rolled while over an object or passively grabbed to an object.

EVAS_CALLBACK_FREE: event_info = NULL

This event is triggered just before Evas is about to free all memory used by an object and remove all references to it. This is useful for programs to use if they attached data to an object and want to free it when the object is deleted. The object is still valid when this callback is called, but after this callback returns, there is no guarantee on the object's validity.

EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down

This callback is called when a key is pressed and the focus is on the object, or a key has been grabbed to a particular object which wants to intercept the key press regardless of what object has the focus.

EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up

This callback is called when a key is released and the focus is on the object, or a key has been grabbed to a particular object which wants to intercept the key release regardless of what object has the focus.

EVAS_CALLBACK_FOCUS_IN: event_info = NULL

This event is called when an object gains the focus. When the callback is called the object has already gained the focus.

EVAS_CALLBACK_FOCUS_OUT: event_info = NULL

This event is triggered by an object losing the focus. When the callback is called the object has already lost the focus.

EVAS_CALLBACK_SHOW: event_info = NULL

This event is triggered by the object being shown by evas_object_show().

EVAS_CALLBACK_HIDE: event_info = NULL

This event is triggered by an object being hidden by evas_object_hide().

EVAS_CALLBACK_MOVE: event_info = NULL

This event is triggered by an object being moved. evas_object_move() can trigger this, as can any object-specific manipulations that would mean the object's origin could move.

EVAS_CALLBACK_RESIZE: event_info = NULL

This event is triggered by an object being resized. Resizes can be triggered by evas_object_resize() or by any object-specific calls that may cause the object to resize.

Example:

 extern Evas_Object *object;
 extern void *my_data;
 void down_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
 void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);

 evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_UP, up_callback, my_data);
 if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
   {
     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
     exit(-1);
   }
 evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, down_callback, my_data);
 if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
   {
     fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
     exit(-1);
   }

Referenced by evas_object_image_filled_set().

EAPI void* evas_object_event_callback_del ( Evas_Object obj,
Evas_Callback_Type  type,
void(*)(void *data, Evas *e, Evas_Object *obj, void *event_info)  func 
)

Delete a callback function from an object.

Parameters:
obj Object to remove a callback from
type The type of event that was triggering the callback
func The function that was to be called when the event was triggered
Returns:
The data pointer that was to be passed to the callback

This function removes the most recently added callback from the object obj which was triggered by the event type type and was calling the function func when triggered. If the removal is successful it will also return the data pointer that was passed to evas_object_event_callback_add() when the callback was added to the object. If not successful NULL will be returned.

Example:

 extern Evas_Object *object;
 void *my_data;
 void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);

 my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);

Referenced by evas_object_image_filled_set().

EAPI void* evas_object_event_callback_del_full ( Evas_Object obj,
Evas_Callback_Type  type,
void(*)(void *data, Evas *e, Evas_Object *obj, void *event_info)  func,
const void *  data 
)

Delete a callback function from an object.

Parameters:
obj Object to remove a callback from
type The type of event that was triggering the callback
func The function that was to be called when the event was triggered
data The data pointer that was to be passed to the callback
Returns:
The data pointer that was to be passed to the callback

This function removes the most recently added callback from the object obj which was triggered by the event type type and was calling the function func with data data when triggered. If the removal is successful it will also return the data pointer that was passed to evas_object_event_callback_add() (that will be the same as the parameter) when the callback was added to the object. If not successful NULL will be returned.

Example:

 extern Evas_Object *object;
 void *my_data;
 void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);

 my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
EAPI void evas_object_geometry_get ( const Evas_Object obj,
Evas_Coord *  x,
Evas_Coord *  y,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the position and rectangular size of the given evas object.

Note that if any of x, y, w or h are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
x Pointer to an integer in which to store the X coordinate of the object.
y Pointer to an integer in which to store the Y coordinate of the object.
w Pointer to an integer in which to store the width of the object.
h Pointer to an integer in which to store the height of the object.

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), evas_object_box_layout_vertical(), evas_object_image_filled_set(), and evas_object_smart_move_children_relative().

EAPI void evas_object_hide ( Evas_Object obj  ) 

Makes the given evas object invisible.

Parameters:
obj The given evas object.

References _Evas_Event_Mouse_Out::buttons, EVAS_CALLBACK_MOUSE_OUT, and EVAS_EVENT_FLAG_NONE.

Referenced by evas_object_del().

EAPI short evas_object_layer_get ( const Evas_Object obj  ) 

Retrieves the layer of the evas that the given object is part of.

Be carefull, it doesn't make sense to change the layer of smart object's child. So the returned value could be wrong in some case. Don't rely on it's accuracy.

Parameters:
obj The given evas object.
Returns:
Number of the layer.
EAPI void evas_object_layer_set ( Evas_Object obj,
short  l 
)

Sets the layer of the evas that the given object will be part of.

It is not possible to change the layer of a smart object's child.

Parameters:
obj The given evas object.
l The number of the layer to place the object on.

References evas_object_raise().

EAPI void evas_object_lower ( Evas_Object obj  ) 

Lower obj to the bottom of its layer.

Parameters:
obj the object to lower

Referenced by evas_object_stack_below().

EAPI void evas_object_move ( Evas_Object obj,
Evas_Coord  x,
Evas_Coord  y 
)
EAPI Evas_Object* evas_object_name_find ( const Evas e,
const char *  name 
)

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

Parameters:
e The given evas.
name The given name.
Returns:
If successful, the evas object with the given name. Otherwise, NULL.
EAPI const char* evas_object_name_get ( const Evas_Object obj  ) 

Retrieves the name of the given evas object.

Parameters:
obj The given object.
Returns:
The name of the object. NULL if no name has been given to the object.
EAPI void evas_object_name_set ( Evas_Object obj,
const char *  name 
)

Sets the name of the given evas object to the given name.

Parameters:
obj The given object.
name The given name.

Referenced by evas_object_del().

EAPI Eina_Bool evas_object_pass_events_get ( const Evas_Object obj  ) 

Determine whether an object is set to pass events.

Parameters:
obj 
Returns:
pass events state
EAPI void evas_object_pass_events_set ( Evas_Object obj,
Eina_Bool  pass 
)

Set an object's pass events state.

Parameters:
obj the evas object
pass whether to pass events or not

If pass is true, this will cause events on obj to be ignored. They will be triggered on the next lower object (that is not set to pass events) instead.

If pass is false, events will be processed as normal.

EAPI Eina_Bool evas_object_precise_is_inside_get ( const Evas_Object obj  ) 

Determine whether an object is set to use a precise point collision detection.

Parameters:
obj The given object.
EAPI void evas_object_precise_is_inside_set ( Evas_Object obj,
Eina_Bool  precise 
)

Set whether to use a precise (usually expensive) point collision detection.

Parameters:
obj The given object.
precise wheter to use a precise point collision detection or not The default value is false.
EAPI Eina_Bool evas_object_propagate_events_get ( const Evas_Object obj  ) 

Determine whether an object is set to propagate events.

Parameters:
obj 
Returns:
propogate events state
EAPI void evas_object_propagate_events_set ( Evas_Object obj,
Eina_Bool  prop 
)

Set whether events on a smart member object should propagate to its parent.

Parameters:
obj the smart member object
prop wheter to propagate events or not

This function has no effect if obj is not a member of a smart object.

If prop is true, events occuring on this object will propagate on to the smart object of which obj is a member.

If prop is false, events for which callbacks are set on the member object, obj, will not be passed on to the parent smart object.

The default value is true.

EAPI void evas_object_raise ( Evas_Object obj  ) 

Raise obj to the top of its layer.

Parameters:
obj the object to raise

Referenced by evas_object_layer_set(), and evas_object_stack_above().

EAPI Evas_Render_Op evas_object_render_op_get ( const Evas_Object obj  ) 

Retrieves the current value of the operation used for rendering the evas object.

Parameters:
obj The given evas object.
Returns:
one of the enumerated values in Evas_Render_Op.

References EVAS_RENDER_BLEND.

EAPI void evas_object_render_op_set ( Evas_Object obj,
Evas_Render_Op  render_op 
)

Sets the render_op to be used for rendering the evas object.

Parameters:
obj The given evas object.
render_op one of the Evas_Render_Op values.
EAPI Eina_Bool evas_object_repeat_events_get ( const Evas_Object obj  ) 

Determine whether an object is set to repeat events.

Parameters:
obj 
Returns:
repeat events state
EAPI void evas_object_repeat_events_set ( Evas_Object obj,
Eina_Bool  repeat 
)

Set an object's repeat events state.

Parameters:
obj the object
repeat wheter to repeat events or not

If repeat is true, this will cause events on obj to trigger callbacks, but also to be repeated on the next lower object in the stack.

If repeat is false, events occuring on obj will be processed normally.

EAPI void evas_object_resize ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)
EAPI double evas_object_scale_get ( const Evas_Object obj  ) 

Retrieves the scaling factor for the given evas object.

Parameters:
obj The given evas object.
Returns:
The scaling factor.
EAPI void evas_object_scale_set ( Evas_Object obj,
double  scale 
)

Sets the scaling factor for an evas object.

Does not affect all objects.

Parameters:
obj The given evas object.
scale. The scaling factor. 1.0 == none.
EAPI void evas_object_show ( Evas_Object obj  ) 

Makes the given evas object visible.

Parameters:
obj The given evas object.
EAPI void evas_object_size_hint_align_get ( const Evas_Object obj,
double *  x,
double *  y 
)

Retrieves the size align control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of x or y are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
x Pointer to a double in which to store the align x.
y Pointer to a double in which to store the align y.

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), and evas_object_box_layout_vertical().

EAPI void evas_object_size_hint_align_set ( Evas_Object obj,
double  x,
double  y 
)

Sets the size align control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Accepted values are in the 0.0 to 1.0 range, with the special value -1.0 used to specify "justify" or "fill" by some users. See documentation of possible users.

Parameters:
obj The given evas object.
x Double (0.0..1.0 or -1.0) to use as align x hint.
y Double (0.0..1.0 or -1.0) to use as align y hint.
EAPI void evas_object_size_hint_aspect_get ( const Evas_Object obj,
Evas_Aspect_Control *  aspect,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the size aspect control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of aspect, w or h are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
aspect Returns the hint on how size should be calculated.
w Pointer to an integer in which to store the aspect width.
h Pointer to an integer in which to store the aspect height.
EAPI void evas_object_size_hint_aspect_set ( Evas_Object obj,
Evas_Aspect_Control  aspect,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the size aspect control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Parameters:
obj The given evas object.
aspect Hint on how to calculate size.
w Integer to use as aspect width hint.
h Integer to use as aspect height hint.
EAPI void evas_object_size_hint_max_get ( const Evas_Object obj,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the size hint for the maximum size.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of w or h are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
w Pointer to an integer in which to store the maximum width.
h Pointer to an integer in which to store the maximum height.

Referenced by evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), and evas_object_box_layout_vertical().

EAPI void evas_object_size_hint_max_set ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the size hint for the maximum size.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Value -1 is considered unset.

Parameters:
obj The given evas object.
w Integer to use as the maximum width hint.
h Integer to use as the maximum height hint.
EAPI void evas_object_size_hint_min_get ( const Evas_Object obj,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the size hint for the minimum size.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of w or h are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
w Pointer to an integer in which to store the minimum width.
h Pointer to an integer in which to store the minimum height.

Referenced by evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), and evas_object_box_layout_stack().

EAPI void evas_object_size_hint_min_set ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the size hint for the minimum size.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Value 0 is considered unset.

Parameters:
obj The given evas object.
w Integer to use as the minimum width hint.
h Integer to use as the minimum height hint.

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), and evas_object_box_layout_vertical().

EAPI void evas_object_size_hint_padding_get ( const Evas_Object obj,
Evas_Coord *  l,
Evas_Coord *  r,
Evas_Coord *  t,
Evas_Coord *  b 
)

Retrieves the size padding control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of l, r, t or b are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
l Pointer to an integer in which to store left padding.
r Pointer to an integer in which to store right padding.
t Pointer to an integer in which to store top padding.
b Pointer to an integer in which to store bottom padding.

Referenced by evas_object_box_layout_flow_horizontal(), evas_object_box_layout_flow_vertical(), evas_object_box_layout_homogeneous_horizontal(), evas_object_box_layout_homogeneous_max_size_horizontal(), evas_object_box_layout_homogeneous_max_size_vertical(), evas_object_box_layout_homogeneous_vertical(), evas_object_box_layout_horizontal(), evas_object_box_layout_stack(), and evas_object_box_layout_vertical().

EAPI void evas_object_size_hint_padding_set ( Evas_Object obj,
Evas_Coord  l,
Evas_Coord  r,
Evas_Coord  t,
Evas_Coord  b 
)

Sets the size padding control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Parameters:
obj The given evas object.
l Integer to specify left padding.
r Integer to specify right padding.
t Integer to specify top padding.
b Integer to specify bottom padding.
EAPI void evas_object_size_hint_request_get ( const Evas_Object obj,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the size request hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of w or h are NULL, the NULL parameters are ignored.

Parameters:
obj The given evas object.
w Pointer to an integer in which to store the requested width.
h Pointer to an integer in which to store the requested height.
EAPI void evas_object_size_hint_request_set ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the requested size hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Value 0 is considered unset.

Parameters:
obj The given evas object.
w Integer to use as the preferred width hint.
h Integer to use as the preferred height hint.
EAPI void evas_object_size_hint_weight_get ( const Evas_Object obj,
double *  x,
double *  y 
)

Retrieves the size weight control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Note that if any of x or y are NULL, the NULL parameters are ignored.

Accepted values are zero or positive values. Some users might use this hint as a boolean, but some might consider it as a proportion, see documentation of possible users.

Parameters:
obj The given evas object.
x Pointer to a double in which to store the weight x.
y Pointer to a double in which to store the weight y.

Referenced by evas_object_box_layout_horizontal(), and evas_object_box_layout_vertical().

EAPI void evas_object_size_hint_weight_set ( Evas_Object obj,
double  x,
double  y 
)

Sets the size weight control hint.

This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate.

Parameters:
obj The given evas object.
x Double (0.0-1.0) to use as weight x hint.
y Double (0.0-1.0) to use as weight y hint.
EAPI void evas_object_stack_above ( Evas_Object obj,
Evas_Object above 
)

Stack obj immediately above above.

If obj is a member of a smart object, then above must also be a member of the same smart object.

Similarly, if obj is not a member of smart object, above may not either.

Parameters:
obj the object to stack
above the object above which to stack

References evas_object_raise().

Referenced by evas_object_box_layout_stack().

EAPI void evas_object_stack_below ( Evas_Object obj,
Evas_Object below 
)

Stack obj immediately below below.

If obj is a member of a smart object, then below must also be a member of the same smart object.

Similarly, if obj is not a member of smart object, below may not either.

Parameters:
obj the object to stack
below the object below which to stack

References evas_object_lower().

EAPI Evas_Object* evas_object_top_at_pointer_get ( const Evas e  ) 

To be documented.

FIXME: To be fixed.

References evas_object_top_at_xy_get().

EAPI Evas_Object* evas_object_top_at_xy_get ( const Evas e,
Evas_Coord  x,
Evas_Coord  y,
Eina_Bool  include_pass_events_objects,
Eina_Bool  include_hidden_objects 
)

To be documented.

FIXME: To be fixed.

Referenced by evas_object_top_at_pointer_get().

EAPI Evas_Object* evas_object_top_get ( const Evas e  ) 

Get the highest evas object on the Evas e.

Parameters:
e an Evas
Returns:
the highest object
EAPI Evas_Object* evas_object_top_in_rectangle_get ( const Evas e,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h,
Eina_Bool  include_pass_events_objects,
Eina_Bool  include_hidden_objects 
)

To be documented.

FIXME: To be fixed.

EAPI const char* evas_object_type_get ( const Evas_Object obj  ) 

Retrieves the name of the type of the given evas object.

Parameters:
obj The given object.
Returns:
The name.
EAPI Eina_Bool evas_object_visible_get ( const Evas_Object obj  ) 

Retrieves whether or not the given evas object is visible.

Parameters:
obj The given evas object.
Returns:
1 if the object is visible. 0 otherwise.
EAPI Eina_List* evas_objects_at_xy_get ( const Evas e,
Evas_Coord  x,
Evas_Coord  y,
Eina_Bool  include_pass_events_objects,
Eina_Bool  include_hidden_objects 
)

To be documented.

FIXME: To be fixed.

EAPI Eina_List* evas_objects_in_rectangle_get ( const Evas e,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h,
Eina_Bool  include_pass_events_objects,
Eina_Bool  include_hidden_objects 
)

To be documented.

FIXME: To be fixed.


Copyright © Enlightenment.org

Evas Documentation Generated: Sat Sep 5 03:05:15 2009