Cursors

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
Cursors
Elementary

## Functions
Eina_Bool | elm_config_cursor_engine_only_get (void)
| Get the configured cursor engine only usage.
void | elm_config_cursor_engine_only_set (Eina_Bool engine_only)
| Set the configured cursor engine only usage.
Eina_Bool | elm_object_cursor_set (Eo *obj, const char *cursor)
| The cursor to be shown when mouse is over the object.
const char * | elm_object_cursor_get (const Eo *obj)
| The cursor to be shown when mouse is over the object.
Eina_Bool | elm_object_cursor_style_set (Eo *obj, const char *style)
| A different style for the cursor.
const char * | elm_object_cursor_style_get (const Eo *obj)
| A different style for the cursor.
Eina_Bool | elm_object_cursor_theme_search_enabled_set (Eo *obj, Eina_Bool allow)
| Whether the cursor may be looked in the theme or not.
Eina_Bool | elm_object_cursor_theme_search_enabled_get (const Eo *obj)
| Whether the cursor may be looked in the theme or not.
void | elm_object_cursor_unset (Evas_Object *obj)
| Unset cursor for object.

## Detailed Description

## Function Documentation

## ◆ elm_config_cursor_engine_only_get()

Eina_Bool elm_config_cursor_engine_only_get | ( | void |  | ) |

Get the configured cursor engine only usage.

This gets the globally configured exclusive usage of engine cursors.

Returns
  1 if only engine cursors should be used

## ◆ elm_config_cursor_engine_only_set()

void elm_config_cursor_engine_only_set | ( | Eina_Bool | engine_only | ) |

Set the configured cursor engine only usage.

This sets the globally configured exclusive usage of engine cursors. It won't affect cursors set before changing this value.

Parameters

  engine_only | If 1 only engine cursors will be enabled, if 0 will look for them on theme before.

References EINA_TRUE.

## ◆ elm_object_cursor_set()

Eina_Bool elm_object_cursor_set | ( | Eo * | obj,
|  | const char * | cursor
| ) |  |

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

This is the cursor that will be displayed when mouse is over the object. The object can have only one cursor set to it so if elm_object_cursor_set is called twice for an object, the previous set will be 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 will be used.

Sets or unsets the current cursor.

If `cursor` is `null` this function will reset the cursor to the default one.

Parameters

  [in] | obj | The object.
  [in] | cursor | The cursor name, defined either by the display system or the theme.

Returns
  `true` if successful.

## ◆ elm_object_cursor_get()

const char * elm_object_cursor_get | ( | const Eo * | obj | ) |

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

This is the cursor that will be displayed when mouse is over the object. The object can have only one cursor set to it so if elm_object_cursor_set is called twice for an object, the previous set will be 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 will be used.

Returns the current cursor name.

Parameters

  [in] | obj | The object.

Returns
  The cursor name, defined either by the display system or the theme.

## ◆ elm_object_cursor_style_set()

Eina_Bool elm_object_cursor_style_set | ( | Eo * | obj,
|  | const char * | style
| ) |  |

A different style for the cursor.

This only makes sense if theme cursors are used. The cursor should be set with elm_object_cursor_set first before setting its style with this property.

Sets a style for the current cursor. Call after elm_object_cursor_set.

Parameters

  [in] | obj | The object.
  [in] | style | A specific style to use, eg. default, transparent, ....

Returns
  `true` if successful.

## ◆ elm_object_cursor_style_get()

const char * elm_object_cursor_style_get | ( | const Eo * | obj | ) |

A different style for the cursor.

This only makes sense if theme cursors are used. The cursor should be set with elm_object_cursor_set first before setting its style with this property.

Returns the current cursor style name.

Parameters

  [in] | obj | The object.

Returns
  A specific style to use, eg. default, transparent, ....

## ◆ elm_object_cursor_theme_search_enabled_set()

Eina_Bool elm_object_cursor_theme_search_enabled_set | ( | Eo * | obj,
|  | Eina_Bool | allow
| ) |  |

Whether the cursor may be looked in the theme or not.

If `false`, the cursor may only come from the render engine, i.e. from the display manager.

Enables or disables theme cursors.

Parameters

  [in] | obj | The object.
  [in] | allow | Whether to use theme cursors.

Returns
  `true` if successful.

## ◆ elm_object_cursor_theme_search_enabled_get()

Eina_Bool elm_object_cursor_theme_search_enabled_get | ( | const Eo * | obj | ) |

Whether the cursor may be looked in the theme or not.

If `false`, the cursor may only come from the render engine, i.e. from the display manager.

Returns the current state of theme cursors search.

Parameters

  [in] | obj | The object.

Returns
  Whether to use theme cursors.

## ◆ elm_object_cursor_unset()

void elm_object_cursor_unset | ( | Evas_Object * | obj | ) |

Unset cursor for object.

Unset cursor for object, and set the cursor to default if the mouse was over this object.

Parameters

  obj | Target object

See also
  elm_object_cursor_set()

References ECORE_COCOA_CURSOR_DEFAULT, ecore_cocoa_window_cursor_set(), ecore_evas_object_cursor_set(), ecore_job_del(), ECORE_WIN32_CURSOR_SHAPE_ARROW, ecore_win32_cursor_shaped_new(), ecore_win32_window_cursor_set(), eina_stringshare_del(), ELM_OBJECT_LAYER_CURSOR, EVAS_CALLBACK_CHANGED_SIZE_HINTS, EVAS_CALLBACK_DEL, EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_OUT, and evas_object_del().