aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-03-07 16:01:37 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-03-07 16:01:37 +0000
commitaa78786616ac9e3c3353c9fa421b67ef9306f5a1 (patch)
treef91fbca7ccdff777e738681cd31cbe325147293d /legacy/elementary
parentxxx-- -> we need these as genlist/grid items hold data for these due (diff)
downloadefl-aa78786616ac9e3c3353c9fa421b67ef9306f5a1.tar.gz
rename elm object select mode values: whoever wrote this deserves spankies
SVN revision: 68982
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c2
-rw-r--r--legacy/elementary/src/bin/test_genlist.c12
-rw-r--r--legacy/elementary/src/bin/test_toolbar.c2
-rw-r--r--legacy/elementary/src/lib/elm_gen_common.h2
-rw-r--r--legacy/elementary/src/lib/elm_general.h8
-rw-r--r--legacy/elementary/src/lib/elm_gengrid.c30
-rw-r--r--legacy/elementary/src/lib/elm_gengrid.h10
-rw-r--r--legacy/elementary/src/lib/elm_genlist.c34
-rw-r--r--legacy/elementary/src/lib/elm_genlist.h10
-rw-r--r--legacy/elementary/src/lib/elm_toolbar.c42
-rw-r--r--legacy/elementary/src/lib/elm_toolbar.h10
11 files changed, 81 insertions, 81 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 88624f005d..7fb13e46b2 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -71,7 +71,7 @@ set_api_state(api_data *api)
break;
case GRID_NO_SELECT_MODE: /* 2 */
- elm_gengrid_select_mode_set(grid, ELM_OBJECT_NO_SELECT);
+ elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_NONE);
break;
case GRID_NO_BOUNCE: /* 3 */
diff --git a/legacy/elementary/src/bin/test_genlist.c b/legacy/elementary/src/bin/test_genlist.c
index b3c05ee0c5..3952cbf0f6 100644
--- a/legacy/elementary/src/bin/test_genlist.c
+++ b/legacy/elementary/src/bin/test_genlist.c
@@ -42,12 +42,12 @@ set_api_state(api_data *api)
break;
case NO_SELECT_MODE_SET: /* 1 */
- elm_genlist_select_mode_set(gl, ELM_OBJECT_NO_SELECT);
+ elm_genlist_select_mode_set(gl, ELM_OBJECT_SELECT_MODE_NONE);
elm_genlist_mode_set(gl, ELM_LIST_SCROLL); /* Back to default */
break;
case COMPRESS_MODE_SET: /* 2 */
- elm_genlist_select_mode_set(gl, ELM_OBJECT_NORMAL_SELECT);
+ elm_genlist_select_mode_set(gl, ELM_OBJECT_SELECT_MODE_DEFAULT);
elm_genlist_compress_mode_set(gl, EINA_TRUE);
break;
@@ -1055,7 +1055,7 @@ test_genlist5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_show(bx);
gl = elm_genlist_add(win);
- elm_genlist_select_mode_set(gl, ELM_OBJECT_ALWAYS_SELECT);
+ elm_genlist_select_mode_set(gl, ELM_OBJECT_SELECT_MODE_ALWAYS);
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(gl);
@@ -2401,14 +2401,14 @@ static void
gl15_edit_mode(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
elm_genlist_edit_mode_set(data, EINA_TRUE);
- elm_genlist_select_mode_set(data, ELM_OBJECT_ALWAYS_SELECT);
+ elm_genlist_select_mode_set(data, ELM_OBJECT_SELECT_MODE_ALWAYS);
}
static void
gl15_normal_mode(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
elm_genlist_edit_mode_set(data, EINA_FALSE);
- elm_genlist_select_mode_set(data, ELM_OBJECT_NORMAL_SELECT);
+ elm_genlist_select_mode_set(data, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
void gl15_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__)
@@ -2564,7 +2564,7 @@ test_genlist16(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
/* note: flip mode can be used with/without edit mode */
elm_genlist_edit_mode_set(gl, EINA_TRUE);
- elm_genlist_select_mode_set(gl, ELM_OBJECT_ALWAYS_SELECT);
+ elm_genlist_select_mode_set(gl, ELM_OBJECT_SELECT_MODE_ALWAYS);
itc15 = elm_genlist_item_class_new();
itc15->item_style = "default";
diff --git a/legacy/elementary/src/bin/test_toolbar.c b/legacy/elementary/src/bin/test_toolbar.c
index 2b91fdb56b..30755018f0 100644
--- a/legacy/elementary/src/bin/test_toolbar.c
+++ b/legacy/elementary/src/bin/test_toolbar.c
@@ -529,7 +529,7 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
evas_object_size_hint_weight_set(tb, 0.0, 0.0);
evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
- elm_toolbar_select_mode_set(tb, ELM_OBJECT_NO_SELECT);
+ elm_toolbar_select_mode_set(tb, ELM_OBJECT_SELECT_MODE_NONE);
ph1 = elm_photo_add(win);
ph2 = elm_photo_add(win);
diff --git a/legacy/elementary/src/lib/elm_gen_common.h b/legacy/elementary/src/lib/elm_gen_common.h
index ad6c1c1f69..1d3864de9e 100644
--- a/legacy/elementary/src/lib/elm_gen_common.h
+++ b/legacy/elementary/src/lib/elm_gen_common.h
@@ -93,7 +93,7 @@ struct _Widget_Data
int minw, minh;
unsigned int item_count;
Evas_Coord pan_x, pan_y;
- Elm_Object_Select_Mode_Type select_mode;
+ Elm_Object_Select_Mode select_mode;
Eina_Bool reorder_mode : 1; /**< a flag for reorder mode enable/disable */
Eina_Bool on_hold : 1;
Eina_Bool multi : 1; /**< a flag for item multi selection */
diff --git a/legacy/elementary/src/lib/elm_general.h b/legacy/elementary/src/lib/elm_general.h
index 8d3de4995a..4d04ff2bfc 100644
--- a/legacy/elementary/src/lib/elm_general.h
+++ b/legacy/elementary/src/lib/elm_general.h
@@ -96,12 +96,12 @@ typedef enum
typedef enum
{
- ELM_OBJECT_NORMAL_SELECT = 0, /**< default select mode */
- ELM_OBJECT_ALWAYS_SELECT, /**< always select mode */
- ELM_OBJECT_NO_SELECT, /**< no select mode */
+ ELM_OBJECT_SELECT_MODE_DEFAULT = 0, /**< default select mode */
+ ELM_OBJECT_SELECT_MODE_ALWAYS, /**< always select mode */
+ ELM_OBJECT_SELECT_MODE_NONE, /**< no select mode */
ELM_OBJECT_SELECT_MODE_MAX
-} Elm_Object_Select_Mode_Type;
+} Elm_Object_Select_Mode;
/**
* @typedef Elm_Object_Item
diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c
index 2ab46d72b2..f9206d8acb 100644
--- a/legacy/elementary/src/lib/elm_gengrid.c
+++ b/legacy/elementary/src/lib/elm_gengrid.c
@@ -917,7 +917,7 @@ _mouse_up(void *data,
static void
_item_highlight(Elm_Gen_Item *it)
{
- if ((it->wd->select_mode == ELM_OBJECT_NO_SELECT) ||
+ if ((it->wd->select_mode == ELM_OBJECT_SELECT_MODE_NONE) ||
(it->wd->no_highlight) || (it->highlighted) ||
(it->generation < it->wd->generation)) return;
edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
@@ -2646,20 +2646,20 @@ elm_gengrid_always_select_mode_set(Evas_Object *obj,
Eina_Bool always_select)
{
if (always_select)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_ALWAYS_SELECT);
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
EINA_DEPRECATED EAPI Eina_Bool
elm_gengrid_always_select_mode_get(const Evas_Object *obj)
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
return EINA_TRUE;
else
return EINA_FALSE;
@@ -2670,20 +2670,20 @@ elm_gengrid_no_select_mode_set(Evas_Object *obj,
Eina_Bool no_select)
{
if (no_select)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NO_SELECT);
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_NONE);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
EINA_DEPRECATED EAPI Eina_Bool
elm_gengrid_no_select_mode_get(const Evas_Object *obj)
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
return EINA_TRUE;
else
return EINA_FALSE;
@@ -2951,12 +2951,12 @@ elm_gengrid_item_class_unref(Elm_Gengrid_Item_Class *itc)
}
EAPI void
-elm_gengrid_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode)
+elm_gengrid_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode)
{
elm_genlist_select_mode_set(obj, mode);
}
-EAPI Elm_Object_Select_Mode_Type
+EAPI Elm_Object_Select_Mode
elm_gengrid_select_mode_get(const Evas_Object *obj)
{
return elm_genlist_select_mode_get(obj);
diff --git a/legacy/elementary/src/lib/elm_gengrid.h b/legacy/elementary/src/lib/elm_gengrid.h
index 3216799c09..a057eddbd0 100644
--- a/legacy/elementary/src/lib/elm_gengrid.h
+++ b/legacy/elementary/src/lib/elm_gengrid.h
@@ -1507,12 +1507,12 @@ EAPI Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj
* @param mode The select mode
*
* elm_gengrid_select_mode_set() changes item select mode in the gengrid widget.
- * - ELM_OBJECT_NORMAL_SELECT : Items will only call their selection func and
+ * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
* callback when first becoming selected. Any further clicks will
* do nothing, unless you set always select mode.
- * - ELM_OBJECT_ALWAYS_SELECT : This means that, even if selected,
+ * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
* every click will make the selected callbacks be called.
- * - ELM_OBJECT_NO_SELECT : This will turn off the ability to select items
+ * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
* entirely and they will neither appear selected nor call selected
* callback functions.
*
@@ -1520,7 +1520,7 @@ EAPI Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj
*
* @ingroup Gengrid
*/
-EAPI void elm_gengrid_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode);
+EAPI void elm_gengrid_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
/**
* Get the gengrid select mode.
@@ -1533,7 +1533,7 @@ EAPI void elm_gengrid_select_mode_set(Evas_Object *obj,
*
* @ingroup Gengrid
*/
-EAPI Elm_Object_Select_Mode_Type elm_gengrid_select_mode_get(const Evas_Object *obj);
+EAPI Elm_Object_Select_Mode elm_gengrid_select_mode_get(const Evas_Object *obj);
/**
* Set whether the gengrid items' should be highlighted when item selected.
diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c
index e471905a97..8b69bbc8fc 100644
--- a/legacy/elementary/src/lib/elm_genlist.c
+++ b/legacy/elementary/src/lib/elm_genlist.c
@@ -688,7 +688,7 @@ static void
_item_highlight(Elm_Gen_Item *it)
{
const char *selectraise;
- if ((it->wd->select_mode == ELM_OBJECT_NO_SELECT) ||
+ if ((it->wd->select_mode == ELM_OBJECT_SELECT_MODE_NONE) ||
(it->wd->no_highlight) ||
(it->generation < it->wd->generation) ||
(it->highlighted) || elm_widget_item_disabled_get(it) ||
@@ -3506,14 +3506,14 @@ void
_item_select(Elm_Gen_Item *it)
{
if ((it->generation < it->wd->generation) || (it->mode_set) ||
- (it->wd->select_mode == ELM_OBJECT_NO_SELECT))
+ (it->wd->select_mode == ELM_OBJECT_SELECT_MODE_NONE))
return;
if (!it->selected)
{
it->selected = EINA_TRUE;
it->wd->selected = eina_list_append(it->wd->selected, it);
}
- else if (it->wd->select_mode == ELM_OBJECT_ALWAYS_SELECT) return;
+ else if (it->wd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) return;
evas_object_ref(WIDGET(it));
it->walking++;
@@ -5259,12 +5259,12 @@ elm_genlist_always_select_mode_set(Evas_Object *obj,
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (always_select)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_ALWAYS_SELECT);
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
@@ -5274,8 +5274,8 @@ elm_genlist_always_select_mode_get(const Evas_Object *obj)
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
return EINA_TRUE;
return EINA_FALSE;
}
@@ -5288,12 +5288,12 @@ elm_genlist_no_select_mode_set(Evas_Object *obj,
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (no_select)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NO_SELECT);
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_NONE);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
- elm_genlist_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
+ elm_genlist_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
@@ -5303,8 +5303,8 @@ elm_genlist_no_select_mode_get(const Evas_Object *obj)
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- Elm_Object_Select_Mode_Type oldmode = elm_genlist_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_genlist_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
return EINA_TRUE;
return EINA_FALSE;
}
@@ -5720,7 +5720,7 @@ elm_genlist_item_flip_get(const Elm_Object_Item *it)
}
EAPI void
-elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode)
+elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
@@ -5731,7 +5731,7 @@ elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode)
wd->select_mode = mode;
}
-EAPI Elm_Object_Select_Mode_Type
+EAPI Elm_Object_Select_Mode
elm_genlist_select_mode_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_OBJECT_SELECT_MODE_MAX;
diff --git a/legacy/elementary/src/lib/elm_genlist.h b/legacy/elementary/src/lib/elm_genlist.h
index 6c8d4492d5..67c390e265 100644
--- a/legacy/elementary/src/lib/elm_genlist.h
+++ b/legacy/elementary/src/lib/elm_genlist.h
@@ -1856,12 +1856,12 @@ EAPI Eina_Bool elm_genlist_tree_effect_enabled_get(const Evas_Object *o
* @param mode The select mode
*
* elm_genlist_select_mode_set() changes item select mode in the genlist widget.
- * - ELM_OBJECT_NORMAL_SELECT : Items will only call their selection func and
+ * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
* callback when first becoming selected. Any further clicks will
* do nothing, unless you set always select mode.
- * - ELM_OBJECT_ALWAYS_SELECT : This means that, even if selected,
+ * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
* every click will make the selected callbacks be called.
- * - ELM_OBJECT_NO_SELECT : This will turn off the ability to select items
+ * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
* entirely and they will neither appear selected nor call selected
* callback functions.
*
@@ -1869,7 +1869,7 @@ EAPI Eina_Bool elm_genlist_tree_effect_enabled_get(const Evas_Object *o
*
* @ingroup Genlist
*/
-EAPI void elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode);
+EAPI void elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
/**
* Get the genlist select mode.
@@ -1882,7 +1882,7 @@ EAPI void elm_genlist_select_mode_set(Evas_Object *obj, Elm_Object
*
* @ingroup Genlist
*/
-EAPI Elm_Object_Select_Mode_Type elm_genlist_select_mode_get(const Evas_Object *obj);
+EAPI Elm_Object_Select_Mode elm_genlist_select_mode_get(const Evas_Object *obj);
/**
* Set whether the genlist items' should be highlighted when item selected.
diff --git a/legacy/elementary/src/lib/elm_toolbar.c b/legacy/elementary/src/lib/elm_toolbar.c
index 7a83f8643a..50ec7f1b20 100644
--- a/legacy/elementary/src/lib/elm_toolbar.c
+++ b/legacy/elementary/src/lib/elm_toolbar.c
@@ -18,7 +18,7 @@ struct _Widget_Data
int icon_size;
unsigned int item_count;
double align;
- Elm_Object_Select_Mode_Type select_mode;
+ Elm_Object_Select_Mode select_mode;
Eina_Bool homogeneous : 1;
Eina_Bool vertical : 1;
Eina_Bool long_press : 1;
@@ -173,11 +173,11 @@ _item_select(Elm_Toolbar_Item *it)
if (elm_widget_item_disabled_get(it) || (it->separator) || (it->object)) return;
sel = it->selected;
- if (wd->select_mode != ELM_OBJECT_NO_SELECT)
+ if (wd->select_mode != ELM_OBJECT_SELECT_MODE_NONE)
{
if (sel)
{
- if (wd->select_mode == ELM_OBJECT_ALWAYS_SELECT) return;
+ if (wd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) return;
_item_unselect(it);
}
else
@@ -907,7 +907,7 @@ _item_del_pre_hook(Elm_Object_Item *it)
wd->items = eina_inlist_remove(wd->items, EINA_INLIST_GET(item));
wd->item_count--;
if (!next) next = ELM_TOOLBAR_ITEM_FROM_INLIST(wd->items);
- if ((wd->select_mode == ELM_OBJECT_ALWAYS_SELECT) &&
+ if ((wd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) &&
item->selected && next) _item_select(next);
_item_del(item);
_theme_hook(obj2);
@@ -1022,7 +1022,7 @@ _item_new(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb f
evas_object_size_hint_max_set(VIEW(it), -1, -1);
evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_RESIZE,
_resize_item, obj);
- if ((!wd->items) && (wd->select_mode == ELM_OBJECT_ALWAYS_SELECT))
+ if ((!wd->items) && (wd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS))
_item_select(it);
wd->item_count++;
return it;
@@ -2107,12 +2107,12 @@ elm_toolbar_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (always_select)
- elm_toolbar_select_mode_set(obj, ELM_OBJECT_ALWAYS_SELECT);
+ elm_toolbar_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_ALWAYS);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_toolbar_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
- elm_toolbar_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_toolbar_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
+ elm_toolbar_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
@@ -2122,8 +2122,8 @@ elm_toolbar_always_select_mode_get(const Evas_Object *obj)
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- Elm_Object_Select_Mode_Type oldmode = elm_toolbar_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_ALWAYS_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_toolbar_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_ALWAYS)
return EINA_TRUE;
else
return EINA_FALSE;
@@ -2136,12 +2136,12 @@ elm_toolbar_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (no_select)
- elm_toolbar_select_mode_set(obj, ELM_OBJECT_NO_SELECT);
+ elm_toolbar_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_NONE);
else
{
- Elm_Object_Select_Mode_Type oldmode = elm_toolbar_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
- elm_toolbar_select_mode_set(obj, ELM_OBJECT_NORMAL_SELECT);
+ Elm_Object_Select_Mode oldmode = elm_toolbar_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
+ elm_toolbar_select_mode_set(obj, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
}
@@ -2151,8 +2151,8 @@ elm_toolbar_no_select_mode_get(const Evas_Object *obj)
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- Elm_Object_Select_Mode_Type oldmode = elm_toolbar_select_mode_get(obj);
- if (oldmode == ELM_OBJECT_NO_SELECT)
+ Elm_Object_Select_Mode oldmode = elm_toolbar_select_mode_get(obj);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_NONE)
return EINA_TRUE;
else
return EINA_FALSE;
@@ -2239,22 +2239,22 @@ elm_toolbar_mode_shrink_get(const Evas_Object *obj)
}
EAPI void
-elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode)
+elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (mode >= ELM_OBJECT_SELECT_MODE_MAX)
return;
- if ((mode == ELM_OBJECT_ALWAYS_SELECT) &&
- (wd->select_mode != ELM_OBJECT_ALWAYS_SELECT) &&
+ if ((mode == ELM_OBJECT_SELECT_MODE_ALWAYS) &&
+ (wd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) &&
wd->items)
_item_select(ELM_TOOLBAR_ITEM_FROM_INLIST(wd->items));
if (wd->select_mode != mode)
wd->select_mode = mode;
}
-EAPI Elm_Object_Select_Mode_Type
+EAPI Elm_Object_Select_Mode
elm_toolbar_select_mode_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_OBJECT_SELECT_MODE_MAX;
diff --git a/legacy/elementary/src/lib/elm_toolbar.h b/legacy/elementary/src/lib/elm_toolbar.h
index f78a86b57b..bfeb795bf2 100644
--- a/legacy/elementary/src/lib/elm_toolbar.h
+++ b/legacy/elementary/src/lib/elm_toolbar.h
@@ -864,12 +864,12 @@ EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj
* @param mode The select mode
*
* elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
- * - ELM_OBJECT_NORMAL_SELECT : Items will only call their selection func and
+ * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
* callback when first becoming selected. Any further clicks will
* do nothing, unless you set always select mode.
- * - ELM_OBJECT_ALWAYS_SELECT : This means that, even if selected,
+ * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
* every click will make the selected callbacks be called.
- * - ELM_OBJECT_NO_SELECT : This will turn off the ability to select items
+ * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
* entirely and they will neither appear selected nor call selected
* callback functions.
*
@@ -878,7 +878,7 @@ EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj
* @ingroup Toolbar
*/
EAPI void
-elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode);
+elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
/**
* Get the toolbar select mode.
@@ -891,7 +891,7 @@ elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode_Type mode);
*
* @ingroup Toolbar
*/
-EAPI Elm_Object_Select_Mode_Type
+EAPI Elm_Object_Select_Mode
elm_toolbar_select_mode_get(const Evas_Object *obj);
/**