elm cursor: theme_search means opposition to engine_only.
theme_search_enabled API was introduced instead of engine_only API, but the meaning is opposition.
This commit is contained in:
parent
4ff2af7335
commit
5685b1607b
|
@ -1315,3 +1315,8 @@
|
|||
2013-04-30 Jaehwan Kim
|
||||
|
||||
* The momentum animation time is changed as the amount of flick.
|
||||
|
||||
2012-05-01 Ryuan Choi (ryuan)
|
||||
|
||||
* Fix elm_object_cursor_theme_search_enabled_set to do as it's name described.
|
||||
|
||||
|
|
|
@ -220,6 +220,7 @@ Fixes:
|
|||
* Fix the scrolled entry in scroller is located wrong position when the cursor is changed.
|
||||
* Fix null pointer access on naviframe item deletion.
|
||||
* Fix the toolbar item clipped problem on reordering items.
|
||||
* Fix elm_object_cursor_theme_search_enabled_set to do as it's name described.
|
||||
|
||||
Removals:
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
|
||||
o = elm_button_add(win);
|
||||
elm_object_cursor_set(o, ELM_CURSOR_HAND1);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
|
||||
elm_object_text_set(o, "hand1");
|
||||
elm_box_pack_end(bx, o);
|
||||
evas_object_show(o);
|
||||
|
@ -313,21 +313,21 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
|
||||
o = elm_button_add(win);
|
||||
elm_object_cursor_set(o, ELM_CURSOR_HAND2);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
|
||||
elm_object_text_set(o, "hand2");
|
||||
elm_box_pack_end(bx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_button_add(win);
|
||||
elm_object_cursor_set(o, "hand3");
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
|
||||
elm_object_text_set(o, "hand3");
|
||||
elm_box_pack_end(bx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_button_add(win);
|
||||
elm_object_cursor_set(o, "hand3");
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
|
||||
elm_object_cursor_style_set(o, "transparent");
|
||||
elm_object_text_set(o, "hand3 transparent");
|
||||
elm_box_pack_end(bx, o);
|
||||
|
@ -335,7 +335,7 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
|
||||
o = elm_button_add(win);
|
||||
elm_object_cursor_set(o, "hand3");
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_FALSE);
|
||||
elm_object_cursor_theme_search_enabled_set(o, EINA_TRUE);
|
||||
elm_object_cursor_unset(o);
|
||||
elm_object_text_set(o, "unset");
|
||||
elm_box_pack_end(bx, o);
|
||||
|
|
|
@ -92,26 +92,24 @@ EAPI const char *elm_object_cursor_style_get(const Evas_Object *obj);
|
|||
* Set if the cursor set should be searched on the theme or should use
|
||||
* the provided by the engine, only.
|
||||
*
|
||||
* @note before you set engine_only you should define a cursor with
|
||||
* @note before you set theme_search you should define a cursor with
|
||||
* elm_object_cursor_set(). By default it will only look for cursors
|
||||
* provided by the engine.
|
||||
*
|
||||
* @param obj an object with cursor already set.
|
||||
* @param theme_search boolean to define if cursors should be looked only
|
||||
* between the provided by the engine or searched on widget's theme as well.
|
||||
* @param theme_search boolean to define if cursors should be searched
|
||||
* on widget's theme.
|
||||
*
|
||||
* @ingroup Cursors
|
||||
*/
|
||||
EAPI void elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search);
|
||||
|
||||
/**
|
||||
* Get the cursor engine only usage for this object cursor.
|
||||
* Get if the cursor set should be searched on the theme for this object cursor.
|
||||
*
|
||||
* @param obj an object with cursor already set.
|
||||
* @return engine_only boolean to define it cursors should be
|
||||
* looked only between the provided by the engine or searched on
|
||||
* widget's theme as well. If the object does not have a cursor
|
||||
* set, then EINA_FALSE is returned.
|
||||
* @return EINA_TRUE if the cursor set should be searched on widget's theme,
|
||||
* EINA_FALSE otherwise.
|
||||
*
|
||||
* @ingroup Cursors
|
||||
*/
|
||||
|
|
|
@ -215,7 +215,7 @@ _part_cursor_part_apply(const Elm_Layout_Sub_Object_Cursor *pc)
|
|||
{
|
||||
elm_object_cursor_set(pc->obj, pc->cursor);
|
||||
elm_object_cursor_style_set(pc->obj, pc->style);
|
||||
elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only);
|
||||
elm_object_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2037,7 +2037,7 @@ _elm_layout_smart_part_cursor_engine_only_set(Eo *obj EINA_UNUSED, void *_pd, va
|
|||
EINA_SAFETY_ON_NULL_RETURN(pc->obj);
|
||||
|
||||
pc->engine_only = !!engine_only;
|
||||
elm_object_cursor_theme_search_enabled_set(pc->obj, pc->engine_only);
|
||||
elm_object_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
@ -2066,7 +2066,7 @@ _elm_layout_smart_part_cursor_engine_only_get(Eo *obj EINA_UNUSED, void *_pd, va
|
|||
EINA_SAFETY_ON_NULL_RETURN(pc);
|
||||
EINA_SAFETY_ON_NULL_RETURN(pc->obj);
|
||||
|
||||
*ret = elm_object_cursor_theme_search_enabled_get(pc->obj);
|
||||
*ret = !elm_object_cursor_theme_search_enabled_get(pc->obj);
|
||||
}
|
||||
|
||||
static const Elm_Layout_Part_Alias_Description _text_aliases[] =
|
||||
|
|
|
@ -5512,7 +5512,7 @@ _elm_widget_item_cursor_engine_only_set(Elm_Widget_Item *item,
|
|||
Eina_Bool engine_only)
|
||||
{
|
||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
|
||||
elm_object_cursor_theme_search_enabled_set(item->view, engine_only);
|
||||
elm_object_cursor_theme_search_enabled_set(item->view, !engine_only);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5531,7 +5531,7 @@ EAPI Eina_Bool
|
|||
_elm_widget_item_cursor_engine_only_get(const Elm_Widget_Item *item)
|
||||
{
|
||||
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, EINA_FALSE);
|
||||
return elm_object_cursor_theme_search_enabled_get(item->view);
|
||||
return !elm_object_cursor_theme_search_enabled_get(item->view);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -148,7 +148,7 @@ struct _Elm_Cursor
|
|||
|
||||
Eina_Bool visible:1;
|
||||
Eina_Bool use_engine:1;
|
||||
Eina_Bool engine_only:1;
|
||||
Eina_Bool theme_search:1;
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -212,7 +212,7 @@ _elm_cursor_mouse_in(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSE
|
|||
if (cur->visible) return;
|
||||
evas_event_freeze(cur->evas);
|
||||
cur->visible = EINA_TRUE;
|
||||
if ((!cur->engine_only) && (!cur->use_engine))
|
||||
if (!cur->use_engine)
|
||||
{
|
||||
if (!cur->obj)
|
||||
_elm_cursor_obj_add(cur->eventarea, cur);
|
||||
|
@ -261,7 +261,7 @@ _elm_cursor_mouse_out(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUS
|
|||
return;
|
||||
}
|
||||
|
||||
if ((!cur->engine_only) || (!cur->use_engine))
|
||||
if (!cur->use_engine)
|
||||
ecore_evas_object_cursor_set(cur->ee, NULL, ELM_OBJECT_LAYER_CURSOR,
|
||||
cur->hot_x, cur->hot_y);
|
||||
else
|
||||
|
@ -297,7 +297,7 @@ _elm_cursor_strcmp(const void *data1, const void *data2)
|
|||
static void
|
||||
_elm_cursor_cur_set(Elm_Cursor *cur)
|
||||
{
|
||||
if (cur->engine_only)
|
||||
if (!cur->theme_search)
|
||||
{
|
||||
INF("Using only engine cursors");
|
||||
cur->use_engine = EINA_TRUE;
|
||||
|
@ -383,7 +383,7 @@ elm_object_sub_cursor_set(Evas_Object *eventarea, Evas_Object *owner, const char
|
|||
|
||||
cur->owner = owner;
|
||||
cur->eventarea = eventarea;
|
||||
cur->engine_only = _elm_config->cursor_engine_only;
|
||||
cur->theme_search = !_elm_config->cursor_engine_only;
|
||||
cur->visible = EINA_FALSE;
|
||||
|
||||
cur->cursor_name = eina_stringshare_add(cursor);
|
||||
|
@ -512,7 +512,7 @@ EAPI void
|
|||
elm_object_cursor_theme_search_enabled_set(Evas_Object *obj, Eina_Bool theme_search)
|
||||
{
|
||||
ELM_CURSOR_GET_OR_RETURN(cur, obj);
|
||||
cur->engine_only = theme_search;
|
||||
cur->theme_search = theme_search;
|
||||
if (cur->obj)
|
||||
{
|
||||
evas_object_del(cur->obj);
|
||||
|
@ -526,5 +526,5 @@ EAPI Eina_Bool
|
|||
elm_object_cursor_theme_search_enabled_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CURSOR_GET_OR_RETURN(cur, obj, EINA_FALSE);
|
||||
return cur->engine_only;
|
||||
return cur->theme_search;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue