typedef struct _Elm_Params_Genlist
{
Elm_Params base;
- const char *horizontal_mode;
+ const char *horizontal;
Eina_Bool multi:1;
Eina_Bool multi_exists:1;
Eina_Bool always_select:1;
Eina_Bool v_bounce_exists:1;
} Elm_Params_Genlist;
-static const char* list_horizontal_mode_choices[] = {"compress", "scroll", "limit", "expand", NULL};
+static const char* list_horizontal_choices[] = {"compress", "scroll", "limit", "expand", NULL};
static Elm_List_Mode
-_list_horizontal_mode_setting_get(const char *horizontal_mode_str)
+_list_horizontal_setting_get(const char *horizontal_str)
{
unsigned int i;
- assert(sizeof(list_horizontal_mode_choices)/sizeof(list_horizontal_mode_choices[0]) == ELM_LIST_LAST + 1);
+ assert(sizeof(list_horizontal_choices)/sizeof(list_horizontal_choices[0]) == ELM_LIST_LAST + 1);
- for (i = 0; i < sizeof(list_horizontal_mode_choices); i++)
+ for (i = 0; i < sizeof(list_horizontal_choices); i++)
{
- if (!strcmp(horizontal_mode_str, list_horizontal_mode_choices[i]))
+ if (!strcmp(horizontal_str, list_horizontal_choices[i]))
return i;
}
return ELM_LIST_LAST;
else if (from_params) p = from_params;
else return;
- if (p->horizontal_mode)
+ if (p->horizontal)
{
- Elm_List_Mode set = _list_horizontal_mode_setting_get(p->horizontal_mode);
+ Elm_List_Mode set = _list_horizontal_setting_get(p->horizontal);
if (set != ELM_LIST_LAST)
- elm_genlist_horizontal_mode_set(obj, set);
+ elm_genlist_horizontal_set(obj, set);
}
if (p->multi_exists)
elm_genlist_multi_select_set(obj, p->multi);
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
{
- Elm_List_Mode set = _list_horizontal_mode_setting_get(param->s);
+ Elm_List_Mode set = _list_horizontal_setting_get(param->s);
if (set == ELM_LIST_LAST) return EINA_FALSE;
- elm_genlist_horizontal_mode_set(obj, set);
+ elm_genlist_horizontal_set(obj, set);
return EINA_TRUE;
}
}
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
{
- Elm_List_Mode list_horizontal_mode_set = elm_genlist_horizontal_mode_get(obj);
+ Elm_List_Mode list_horizontal_set = elm_genlist_horizontal_get(obj);
- if (list_horizontal_mode_set == ELM_LIST_LAST)
+ if (list_horizontal_set == ELM_LIST_LAST)
return EINA_FALSE;
- param->s = list_horizontal_mode_choices[list_horizontal_mode_set];
+ param->s = list_horizontal_choices[list_horizontal_set];
return EINA_TRUE;
}
}
EINA_LIST_FOREACH(params, l, param)
{
if (!strcmp(param->name, "horizontal mode"))
- mem->horizontal_mode = eina_stringshare_add(param->s);
+ mem->horizontal = eina_stringshare_add(param->s);
else if (!strcmp(param->name, "multi select"))
{
mem->multi = !!param->i;
{
Elm_Params_Genlist *mem = params;
- if (mem->horizontal_mode)
- eina_stringshare_del(mem->horizontal_mode);
+ if (mem->horizontal)
+ eina_stringshare_del(mem->horizontal);
free(mem);
}
static Edje_External_Param_Info external_genlist_params[] = {
DEFINE_EXTERNAL_COMMON_PARAMS,
- EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal mode", "scroll", list_horizontal_mode_choices),
+ EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("horizontal mode", "scroll", list_horizontal_choices),
EDJE_EXTERNAL_PARAM_INFO_BOOL("multi select"),
EDJE_EXTERNAL_PARAM_INFO_BOOL("always select"),
EDJE_EXTERNAL_PARAM_INFO_BOOL("no select"),
* elm_genlist_item_disabled_get() to get the disabled state.
*
* In general to indicate how the genlist should expand items horizontally to
- * fill the list area, use elm_genlist_horizontal_mode_set(). Valid modes are
+ * fill the list area, use elm_genlist_horizontal_set(). Valid modes are
* ELM_LIST_LIMIT and ELM_LIST_SCROLL . The default is ELM_LIST_SCROLL. This
* mode means that if items are too wide to fit, the scroller will scroll
* horizontally. Otherwise items are expanded to fill the width of the
* ELM_LIST_LIMIT, items will be expanded to the viewport width and
* limited to that size.
*
- * @see elm_genlist_horizontal_mode_get()
+ * @see elm_genlist_horizontal_get()
*
* @ingroup Genlist
*/
- EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1);
+ EAPI void elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) EINA_ARG_NONNULL(1);
/**
* Gets the horizontal stretching mode.
*
* @return The mode to use
* (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL)
*
- * @see elm_genlist_horizontal_mode_set()
+ * @see elm_genlist_horizontal_set()
*
* @ingroup Genlist
*/
- EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EAPI Elm_List_Mode elm_genlist_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Set the always select mode.
*
* This will enable the compress mode where items are "compressed"
* horizontally to fit the genlist scrollable viewport width. This is
* special for genlist. Do not rely on
- * elm_genlist_horizontal_mode_set() being set to @c ELM_LIST_COMPRESS to
+ * elm_genlist_horizontal_set() being set to @c ELM_LIST_COMPRESS to
* work as genlist needs to handle it specially.
*
* @see elm_genlist_compress_mode_get()
}
EAPI void
-elm_genlist_horizontal_mode_set(Evas_Object *obj,
+elm_genlist_horizontal_set(Evas_Object *obj,
Elm_List_Mode mode)
{
ELM_CHECK_WIDTYPE(obj, widtype);
_sizing_eval(obj);
}
+EAPI void
+elm_genlist_horizontal_mode_set(Evas_Object *obj,
+ Elm_List_Mode mode)
+{
+ elm_genlist_horizontal_set(obj, mode);
+}
+
EAPI Elm_List_Mode
-elm_genlist_horizontal_mode_get(const Evas_Object *obj)
+elm_genlist_horizontal_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) ELM_LIST_LAST;
Widget_Data *wd = elm_widget_data_get(obj);
return wd->mode;
}
+EAPI Elm_List_Mode
+elm_genlist_horizontal_mode_get(const Evas_Object *obj)
+{
+ return elm_genlist_horizontal_get(obj);
+}
+
EAPI void
elm_genlist_always_select_mode_set(Evas_Object *obj,
Eina_Bool always_select)