Tizen Native API

The Elementary cursor is an internal smart object used to customize the mouse cursor displayed over objects (or widgets).

In the most common scenario, the cursor decoration comes from the graphical engine Elementary that is running. Those engines may provide different decorations for cursors, and Elementary provides functions to choose them (think of X11 cursors, as an example).

By default, Elementary searches cursors only from engine. There's also the possibility of, besides using engine provided cursors, to also use the ones coming from Edje theme files. Both globally and per widget, Elementary makes it possible for one to make the cursors lookup to be held on engines only or on Elementary's theme file, too. To set the cursor's hot spot, two data items should be added to the cursor's theme: "hot_x" and "hot_y", that are the offset from the upper-left corner of the cursor (coordinates (0,0)).

Functions

void elm_object_cursor_set (Evas_Object *obj, const char *cursor)
 Sets the cursor to be shown when the mouse is over the object.
const char * elm_object_cursor_get (const Evas_Object *obj)
 Gets the cursor to be shown when the mouse is over the object.
void elm_object_cursor_unset (Evas_Object *obj)
 Unsets the cursor for an object.
void elm_object_cursor_style_set (Evas_Object *obj, const char *style)
 Sets a different style for this object cursor.
const char * elm_object_cursor_style_get (const Evas_Object *obj)
 Gets the style for this object cursor.
void elm_object_cursor_theme_search_enabled_set (Evas_Object *obj, Eina_Bool theme_search)
 Sets whether the cursor set should be searched on the theme or should use the theme provided by the engine, only.
Eina_Bool elm_object_cursor_theme_search_enabled_get (const Evas_Object *obj)
 Gets the cursor engine only usage for this object cursor.

Function Documentation

Gets only the usage of the configured cursor engine.

This gets the globally configured exclusive usage of the engine cursors.

Since :
2.3.1
Returns:
1 if only engine cursors should be used, otherwise 0

Sets only the usage of the configured cursor engine.

This sets the globally configured exclusive usage of the engine cursors. It won't affect the cursors set until this value is changed.

Since :
2.3.1
Parameters:
[in]engine_onlyIf 1 only engine cursors are enabled, otherwise 0 if they are looked for on the theme
const char* elm_object_cursor_get ( const Evas_Object obj)

Gets the cursor to be shown when the mouse is over the object.

Since :
2.3.1
Parameters:
[in]objThe object with the cursor already set
Returns:
The cursor name
void elm_object_cursor_set ( Evas_Object obj,
const char *  cursor 
)

Sets the cursor to be shown when the mouse is over the object.

This sets the cursor that is displayed when the mouse is over the object. The object can have only one cursor set to it, so if this function is called twice for an object, the previous set is unset.

If using X cursors, a definition of all the valid cursor names is listed on Elementary_Cursors.h. If an invalid name is set the default cursor is used.

Since :
2.3.1
Parameters:
[in]objThe object being set as a cursor
[in]cursorThe cursor name to be used
const char* elm_object_cursor_style_get ( const Evas_Object obj)

Gets the style for this object cursor.

Since :
2.3.1
Parameters:
[in]objAn object with the cursor already set
Returns:
style The theme style in use, defaults to "default"
If the object does not have a cursor set, then NULL is returned.
void elm_object_cursor_style_set ( Evas_Object obj,
const char *  style 
)

Sets a different style for this object cursor.

Remarks:
Before you set a style you should define a cursor with elm_object_cursor_set().
Since :
2.3.1
Parameters:
[in]objAn object with the cursor already set
[in]styleThe theme style to use (default, transparent, ...)

Gets the cursor engine only usage for this object cursor.

Since :
2.3.1
Parameters:
[in]objAn object with the cursor already set
Returns:
engine_only A boolean value to define if cursors should be looked for only from the theme provided by the engine or should be searched on the widget's theme as well
If the object does not have a cursor set, then EINA_FALSE is returned.

Sets whether the cursor set should be searched on the theme or should use the theme provided by the engine, only.

Remarks:
Before you set engine_only you should define a cursor with elm_object_cursor_set(). By default it only looks for cursors provided by the engine.
Since :
2.3.1
Parameters:
[in]objAn object with the cursor already set
[in]theme_searchThe boolean value to define if cursors should be looked for only from the theme provided by the engine or should be searched on the widget's theme as well

Unsets the cursor for an object.

This unsets the cursor for an object, and sets the cursor to default if the mouse is over this object.

Since :
2.3.1
Parameters:
[in]objThe target object
See also:
elm_object_cursor_set()