lib/elementary/efl_ui_textpath_legacy.eo \
lib/elementary/efl_ui_l10n.eo \
lib/elementary/efl_ui_clock.eo \
- lib/elementary/efl_ui_cursor.eo \
lib/elementary/efl_ui_image_factory.eo \
lib/elementary/efl_ui_focus_manager.eo \
lib/elementary/efl_ui_focus_manager_calc.eo \
+++ /dev/null
-interface @beta Efl.Ui.Cursor
-{
- [[An interface to define mouse cursors to use when hovering
- over UI widgets.
-
- 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
- is running on. These engines may provide different decorations for cursors,
- and Elementary provides functions to choose them for instance
- X11 cursors.
-
- By default, Elementary searches cursors only from the engine. Besides
- using cursors provided by the you can also use those
- coming from Edje theme files. Both globally and per widget, Elementary
- can help you store cursors in engines
- only or in Elementary's theme file. To set cursor's hot spot two data
- items must be added to the cursor's theme: "hot_x" and "hot_y" are the
- offset from the upper-left corner of the cursor (coordinates 0,0).
- ]]
- legacy_prefix: elm_object;
- methods {
- @property 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
- @.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.
- ]]
- set {
- [[Sets or unsets the current cursor.
-
- If $cursor is $null this function will reset the cursor
- to the default one.
- ]]
- return: bool; [[$true if successful.]]
- }
- get {
- [[Returns the current cursor name.]]
- }
- values {
- cursor: string @nullable; [[The cursor name, defined either
- by the display system or the theme.]]
- }
- }
- @property cursor_style {
- [[A different style for the cursor.
-
- This only makes sense if theme cursors are used.
- The cursor should be set with @.cursor.set first before
- setting its style with this property.
- ]]
- set {
- [[Sets a style for the current cursor. Call after @.cursor.set.]]
- return: bool; [[$true if successful.]]
- }
- get {
- [[Returns the current cursor style name.]]
- }
- values {
- style: string; [[A specific style to use, eg. default,
- transparent, ....]]
- }
- }
- @property cursor_theme_search_enabled {
- [[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.
- ]]
- set {
- [[Enables or disables theme cursors.]]
- return: bool; [[$true if successful.]]
- }
- get {
- [[Returns the current state of theme cursors search.]]
- }
- values {
- allow: bool(true); [[Whether to use theme cursors.]]
- }
- }
- }
-}
return part;
}
-/* Efl.Ui.Layout_Part (common) */
-
-EOLIAN static Eina_Bool
-_efl_ui_layout_part_efl_ui_cursor_cursor_set(Eo *obj, void *_pd EINA_UNUSED, const char *cursor)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return _efl_ui_layout_part_cursor_set(sd, pd->part, cursor);
-}
-
-EOLIAN static const char *
-_efl_ui_layout_part_efl_ui_cursor_cursor_get(const Eo *obj, void *_pd EINA_UNUSED)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return _efl_ui_layout_part_cursor_get(sd, pd->part);
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_layout_part_efl_ui_cursor_cursor_style_set(Eo *obj, void *_pd EINA_UNUSED, const char *style)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return _efl_ui_layout_part_cursor_style_set(sd, pd->part, style);
-}
-
-EOLIAN static const char *
-_efl_ui_layout_part_efl_ui_cursor_cursor_style_get(const Eo *obj, void *_pd EINA_UNUSED)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return _efl_ui_layout_part_cursor_style_get(sd, pd->part);
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_layout_part_efl_ui_cursor_cursor_theme_search_enabled_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool allow)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return _efl_ui_layout_part_cursor_engine_only_set(sd, pd->part, !allow);
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_layout_part_efl_ui_cursor_cursor_theme_search_enabled_get(const Eo *obj, void *_pd EINA_UNUSED)
-{
- Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
- Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
- return !_efl_ui_layout_part_cursor_engine_only_get(sd, pd->part);
-}
-
//TIZEN_ONLY(20161213): apply screen_reader_changed callback
EOLIAN static void
_efl_ui_layout_efl_ui_widget_screen_reader(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader)
EAPI Eina_Bool
elm_layout_part_cursor_engine_only_set(Eo *obj, const char *part, Eina_Bool engine_only)
{
- return efl_ui_cursor_theme_search_enabled_set(efl_part(obj, part), !engine_only);
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
+ return _efl_ui_layout_part_cursor_engine_only_set(sd, part, engine_only);
}
EAPI Eina_Bool
elm_layout_part_cursor_engine_only_get(const Eo *obj, const char *part)
{
- return !efl_ui_cursor_theme_search_enabled_get(efl_part(obj, part));
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
+ return _efl_ui_layout_part_cursor_engine_only_get(sd, part);
}
EAPI Eina_Bool
elm_layout_part_cursor_set(Eo *obj, const char *part, const char *cursor)
{
- return efl_ui_cursor_set(efl_part(obj, part), cursor);
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
+ return _efl_ui_layout_part_cursor_set(sd, part, cursor);
}
EAPI const char *
elm_layout_part_cursor_get(const Eo *obj, const char *part)
{
- return efl_ui_cursor_get(efl_part(obj, part));
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
+ return _efl_ui_layout_part_cursor_get(sd, part);
}
EAPI Eina_Bool
elm_layout_part_cursor_style_set(Eo *obj, const char *part, const char *style)
{
- return efl_ui_cursor_style_set(efl_part(obj, part), style);
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
+ return _efl_ui_layout_part_cursor_style_set(sd, part, style);
}
EAPI const char *
elm_layout_part_cursor_style_get(const Eo *obj, const char *part)
{
- return efl_ui_cursor_style_get(efl_part(obj, part));
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, NULL);
+ return _efl_ui_layout_part_cursor_style_get(sd, part);
}
EAPI Eina_Bool
elm_layout_part_cursor_unset(Eo *obj, const char *part)
{
- return efl_ui_cursor_set(efl_part(obj, part), NULL);
+ Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE);
+ return _efl_ui_layout_part_cursor_set(sd, part, NULL);
}
EAPI int
-class @beta Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part implements Efl.Ui.Cursor
+class @beta Efl.Ui.Layout_Part extends Efl.Ui.Widget_Part
{
[[Elementary layout internal part class]]
data: null;
- implements {
- Efl.Ui.Cursor.cursor { get; set; }
- Efl.Ui.Cursor.cursor_style { get; set; }
- Efl.Ui.Cursor.cursor_theme_search_enabled { get; set; }
- }
}
abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
Efl.Access.Component, Efl.Part, Efl.Ui.Focus.Object,
- Efl.Ui.Cursor, Efl.Ui.L10n,
+ Efl.Ui.L10n,
Efl.Ui.Selection, Efl.Ui.Dnd,
//TIZEN_ONLY(20160527): widget: add AtspiAction interface to all widgets
Efl.Access.Widget.Action
event_prefix: efl_ui_widget;
data: Efl_Ui_Widget_Data;
methods {
+ @property 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
+ @.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.
+ ]]
+ set {
+ [[Sets or unsets the current cursor.
+
+ If $cursor is $null this function will reset the cursor
+ to the default one.
+ ]]
+ return: bool; [[$true if successful.]]
+ }
+ get {
+ [[Returns the current cursor name.]]
+ }
+ values {
+ cursor: string @nullable; [[The cursor name, defined either
+ by the display system or the theme.]]
+ }
+ }
+ @property cursor_style {
+ [[A different style for the cursor.
+
+ This only makes sense if theme cursors are used.
+ The cursor should be set with @.cursor.set first before
+ setting its style with this property.
+ ]]
+ set {
+ [[Sets a style for the current cursor. Call after @.cursor.set.]]
+ return: bool; [[$true if successful.]]
+ }
+ get {
+ [[Returns the current cursor style name.]]
+ }
+ values {
+ style: string; [[A specific style to use, eg. default,
+ transparent, ....]]
+ }
+ }
+ @property cursor_theme_search_enabled {
+ [[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.
+ ]]
+ set {
+ [[Enables or disables theme cursors.]]
+ return: bool; [[$true if successful.]]
+ }
+ get {
+ [[Returns the current state of theme cursors search.]]
+ }
+ values {
+ allow: bool(true); [[Whether to use theme cursors.]]
+ }
+ }
@property resize_object @protected {
[[This is the internal canvas object managed by a widget.
Efl.Ui.Focus.Object.focus { set; }
Efl.Ui.I18n.mirrored { get; set; }
Efl.Ui.I18n.mirrored_automatic { get; set; }
- Efl.Ui.Cursor.cursor { get; set; }
- Efl.Ui.Cursor.cursor_style { get; set; }
- Efl.Ui.Cursor.cursor_theme_search_enabled { get; set; }
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.L10n.translation_update; [[This implements the calls to $gettext() and $text_set().]]
Efl.Part.part_get; [[Returns @Efl.Ui.Widget_Part.]]
* @ingroup Elementary
*/
-#ifdef EFL_EO_API_SUPPORT
-#include "efl_ui_cursor.eo.h"
-#endif
-
#ifndef EFL_NOLEGACY_API_SUPPORT
-#include "efl_ui_cursor.eo.legacy.h"
+
+
+/**
+ * @brief 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 @ref 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 @c cursor is @c null this function will reset the cursor to the default
+ * one.
+ *
+ * @param[in] obj The object.
+ * @param[in] cursor The cursor name, defined either by the display system or
+ * the theme.
+ *
+ * @return @c true if successful.
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI Eina_Bool elm_object_cursor_set(Eo *obj, const char *cursor);
+
+/**
+ * @brief 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 @ref 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.
+ *
+ * @param[in] obj The object.
+ *
+ * @return The cursor name, defined either by the display system or the theme.
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI const char *elm_object_cursor_get(const Eo *obj);
+
+/**
+ * @brief A different style for the cursor.
+ *
+ * This only makes sense if theme cursors are used. The cursor should be set
+ * with @ref elm_object_cursor_set first before setting its style with this
+ * property.
+ *
+ * Sets a style for the current cursor. Call after @ref elm_object_cursor_set.
+ *
+ * @param[in] obj The object.
+ * @param[in] style A specific style to use, eg. default, transparent, ....
+ *
+ * @return @c true if successful.
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI Eina_Bool elm_object_cursor_style_set(Eo *obj, const char *style);
+
+/**
+ * @brief A different style for the cursor.
+ *
+ * This only makes sense if theme cursors are used. The cursor should be set
+ * with @ref elm_object_cursor_set first before setting its style with this
+ * property.
+ *
+ * Returns the current cursor style name.
+ *
+ * @param[in] obj The object.
+ *
+ * @return A specific style to use, eg. default, transparent, ....
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI const char *elm_object_cursor_style_get(const Eo *obj);
+
+/**
+ * @brief Whether the cursor may be looked in the theme or not.
+ *
+ * If @c false, the cursor may only come from the render engine, i.e. from the
+ * display manager.
+ *
+ * Enables or disables theme cursors.
+ *
+ * @param[in] obj The object.
+ * @param[in] allow Whether to use theme cursors.
+ *
+ * @return @c true if successful.
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI Eina_Bool elm_object_cursor_theme_search_enabled_set(Eo *obj, Eina_Bool allow);
+
+/**
+ * @brief Whether the cursor may be looked in the theme or not.
+ *
+ * If @c false, the cursor may only come from the render engine, i.e. from the
+ * display manager.
+ *
+ * Returns the current state of theme cursors search.
+ *
+ * @param[in] obj The object.
+ *
+ * @return Whether to use theme cursors.
+ *
+ * @ingroup Elm_Cursors
+ */
+EAPI Eina_Bool elm_object_cursor_theme_search_enabled_get(const Eo *obj);
/**
* Unset cursor for object
item->on_deletion = EINA_TRUE;
}
+EAPI Eina_Bool
+elm_object_cursor_set(Eo *obj, const char *cursor)
+{
+ return efl_ui_widget_cursor_set(obj, cursor);
+}
+
+EAPI const char *
+elm_object_cursor_get(const Eo *obj)
+{
+ return efl_ui_widget_cursor_get(obj);
+}
+
+EAPI Eina_Bool
+elm_object_cursor_style_set(Eo *obj, const char *style)
+{
+ return efl_ui_widget_cursor_style_set(obj, style);
+}
+
+EAPI const char *
+elm_object_cursor_style_get(const Eo *obj)
+{
+ return efl_ui_widget_cursor_style_get(obj);
+}
+
+EAPI Eina_Bool
+elm_object_cursor_theme_search_enabled_set(Eo *obj, Eina_Bool allow)
+{
+ return efl_ui_widget_cursor_theme_search_enabled_set(obj, allow);
+}
+
+EAPI Eina_Bool
+elm_object_cursor_theme_search_enabled_get(const Eo *obj)
+{
+ return efl_ui_widget_cursor_theme_search_enabled_get(obj);
+}
+
//TIZEN_ONLY(20171108): bring HIGHLIGHT related changes
EAPI void
elm_object_accessibility_highlight_set(void *obj, Eina_Bool visible)
/*******
* END *
*******/
-
}
EOLIAN Eina_Bool
-_efl_ui_widget_efl_ui_cursor_cursor_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
+_efl_ui_widget_cursor_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
const char *cursor)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
}
EOLIAN const char *
-_efl_ui_widget_efl_ui_cursor_cursor_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
+_efl_ui_widget_cursor_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
{
return elm_object_sub_cursor_get(obj);
}
}
EOLIAN Eina_Bool
-_efl_ui_widget_efl_ui_cursor_cursor_style_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
+_efl_ui_widget_cursor_style_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
const char *style)
{
return elm_object_sub_cursor_style_set(obj, style);
}
EOLIAN const char *
-_efl_ui_widget_efl_ui_cursor_cursor_style_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
+_efl_ui_widget_cursor_style_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
{
return elm_object_sub_cursor_style_get(obj);
}
}
EOLIAN Eina_Bool
-_efl_ui_widget_efl_ui_cursor_cursor_theme_search_enabled_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
+_efl_ui_widget_cursor_theme_search_enabled_set(Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED,
Eina_Bool theme_search)
{
return elm_object_sub_cursor_theme_search_enabled_set(obj, theme_search);
}
EOLIAN Eina_Bool
-_efl_ui_widget_efl_ui_cursor_cursor_theme_search_enabled_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
+_efl_ui_widget_cursor_theme_search_enabled_get(const Evas_Object *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
{
return elm_object_sub_cursor_theme_search_enabled_get(obj);
}
-
-#include "efl_ui_cursor.eo.c"
'efl_ui_textpath.eo',
'efl_ui_l10n.eo',
'efl_ui_clock.eo',
- 'efl_ui_cursor.eo',
'efl_ui_image_factory.eo',
'efl_ui_focus_manager.eo',
'efl_ui_focus_manager_calc.eo',