static void _adjust_pos_y(Evas_Coord_Point *pos,
Evas_Coord_Point *base_size,
Evas_Coord_Rectangle *hover_area);
-<<<<<<< HEAD
-static void _ctxpopup_changed_size_hints(void *data __UNUSED__,
- Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__);
-=======
->>>>>>> remotes/origin/upstream
static Elm_Ctxpopup_Direction _calc_base_geometry(Evas_Object *obj,
Evas_Coord_Rectangle *rect);
static void _update_arrow(Evas_Object *obj,
Elm_Ctxpopup_Direction dir,
Evas_Coord_Rectangle rect);
static void _sizing_eval(Evas_Object *obj);
-<<<<<<< HEAD
-=======
static void _hide_signal_emit(Evas_Object *obj,
Elm_Ctxpopup_Direction dir);
static void _show_signal_emit(Evas_Object *obj,
Elm_Ctxpopup_Direction dir);
->>>>>>> remotes/origin/upstream
static void _shift_base_by_arrow(Evas_Object *arrow,
Elm_Ctxpopup_Direction dir,
Evas_Coord_Rectangle *rect);
Evas *e,
Evas_Object *obj,
void *event_info);
-<<<<<<< HEAD
-=======
static void _hide_finished(void *data,
Evas_Object *obj,
const char *emission,
const char *source __UNUSED__);
->>>>>>> remotes/origin/upstream
static void _hide(Evas_Object *obj);
static void _ctxpopup_hide(void *data,
Evas *e,
pos->y = hover_area->y;
}
-<<<<<<< HEAD
-static void
-_ctxpopup_changed_size_hints(void *data __UNUSED__, Evas *e __UNUSED__,
- Evas_Object *obj, void *event_info __UNUSED__)
-{
- Widget_Data *wd;
-
- wd = elm_widget_data_get(obj);
- if (!wd) return;
-
- if (wd->visible)
- _sizing_eval(obj);
-}
-
-=======
->>>>>>> remotes/origin/upstream
static Elm_Ctxpopup_Direction
_calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle *rect)
{
edje_object_part_swallow(wd->base,
"elm.swallow.arrow_left",
wd->arrow);
-<<<<<<< HEAD
-
- // if user does not use dragable part
- arrow_size.y = (y - (arrow_size.h * 0.5));
- arrow_size.x = x;
-
-=======
->>>>>>> remotes/origin/upstream
if (base_size.h > 0)
{
if (y < ((arrow_size.h * 0.5) + base_size.y))
edje_object_part_swallow(wd->base,
"elm.swallow.arrow_right",
wd->arrow);
-<<<<<<< HEAD
-
- // if user does not use dragable part
- arrow_size.y = (y - (arrow_size.h * 0.5));
- arrow_size.x = (x - arrow_size.w);
-
-=======
->>>>>>> remotes/origin/upstream
if (base_size.h > 0)
{
if (y < ((arrow_size.h * 0.5) + base_size.y))
case ELM_CTXPOPUP_DIRECTION_DOWN:
edje_object_signal_emit(wd->arrow, "elm,state,top", "elm");
edje_object_part_swallow(wd->base, "elm.swallow.arrow_up", wd->arrow);
-<<<<<<< HEAD
-
- // if user does not use dragable part
- arrow_size.x = (x - (arrow_size.w * 0.5));
- arrow_size.y = y;
-
-=======
->>>>>>> remotes/origin/upstream
if (base_size.w > 0)
{
if (x < ((arrow_size.w * 0.5) + base_size.x))
edje_object_part_swallow(wd->base,
"elm.swallow.arrow_down",
wd->arrow);
-<<<<<<< HEAD
-
- // if user does not use dragable part
- arrow_size.x = (x - (arrow_size.w * 0.5));
- arrow_size.y = (y - arrow_size.h);
-
-=======
->>>>>>> remotes/origin/upstream
if (base_size.w > 0)
{
if (x < ((arrow_size.w * 0.5) + base_size.x))
default:
break;
}
-<<<<<<< HEAD
-
- // if user does not use dragable part
- evas_object_move(wd->arrow, arrow_size.x, arrow_size.y);
}
//TODO: compress item - different from opensource
EINA_LIST_FOREACH(wd->items, elist, item)
{
edje_object_signal_emit(item->base.view, "elm,state,compress", "elm");
-=======
}
static void
break;
default:
break;
->>>>>>> remotes/origin/upstream
}
}
wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
if (!wd->parent) return;
-=======
->>>>>>> remotes/origin/upstream
//Box, Scroller
EINA_LIST_FOREACH(wd->items, elist, item)
//Base
wd->dir = _calc_base_geometry(obj, &rect);
-<<<<<<< HEAD
//TODO: compress item - different from opensource
if (!wd->horizontal && !wd->content)
_compress_item(obj);
-=======
_show_signal_emit(obj, wd->dir);
->>>>>>> remotes/origin/upstream
_update_arrow(obj, wd->dir, rect);
_shift_base_by_arrow(wd->arrow, wd->dir, &rect);
wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE,
_parent_resize, obj);
evas_object_event_callback_del_full(wd->box, EVAS_CALLBACK_RESIZE,
_content_resize, obj);
-=======
- evas_object_event_callback_del_full(wd->box, EVAS_CALLBACK_RESIZE,
- _content_resize, obj);
->>>>>>> remotes/origin/upstream
_parent_cut_off(obj);
}
Widget_Data *wd;
Eina_List *elist;
Elm_Ctxpopup_Item *item;
-<<<<<<< HEAD
int idx = 0;
-=======
->>>>>>> remotes/origin/upstream
Eina_Bool rtl;
wd = elm_widget_data_get(obj);
if (elm_widget_item_disabled_get(item))
edje_object_signal_emit(VIEW(item), "elm,state,disabled", "elm");
-<<<<<<< HEAD
/*
* For separator, if the first item has visible separator,
* then it should be aligned with edge of the base part.
if (evas_object_visible_get(wd->bg))
edje_object_signal_emit(wd->bg, "elm,state,show", "elm");
-=======
- edje_object_message_signal_process(VIEW(item));
- }
-
->>>>>>> remotes/origin/upstream
if (wd->scr)
{
if (!strncmp(elm_object_style_get(obj), "default", strlen("default")))
static void
_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
-=======
->>>>>>> remotes/origin/upstream
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "default")) return;
-<<<<<<< HEAD
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
if (!wd) return;
static const char *
_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Ctxpopup_Item *ctxpopup_it;
- if (part && strcmp(part, "default")) return NULL;
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "default")) return NULL;
ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
return ctxpopup_it->label;
}
const char *part,
Evas_Object *content)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-=======
->>>>>>> remotes/origin/upstream
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "icon")) return;
-<<<<<<< HEAD
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
if (!wd) return;
static Evas_Object *
_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- Elm_Ctxpopup_Item *ctxpopup_it;
- if (part && strcmp(part, "icon")) return NULL;
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "icon")) return NULL;
ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
return ctxpopup_it->icon;
}
static void
_item_disable_hook(Elm_Object_Item *it)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
- Widget_Data *wd;
- Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
if (!wd) return;
_item_signal_emit_hook(Elm_Object_Item *it, const char *emission,
const char *source)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
edje_object_signal_emit(VIEW(ctxpopup_it), emission, source);
}
_bg_clicked_cb(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__, const char *source __UNUSED__)
{
-<<<<<<< HEAD
- evas_object_hide(data);
-=======
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
_hide_signal_emit(data, wd->dir);
->>>>>>> remotes/origin/upstream
}
static void
void *event_info __UNUSED__)
{
Widget_Data *wd;
-<<<<<<< HEAD
Eina_List *elist;
Elm_Ctxpopup_Item *item;
int idx = 0;
-=======
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_show(wd->arrow);
edje_object_signal_emit(wd->bg, "elm,state,show", "elm");
-<<<<<<< HEAD
EINA_LIST_FOREACH(wd->items, elist, item)
{
edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
}
}
-=======
+
edje_object_signal_emit(wd->base, "elm,state,show", "elm");
->>>>>>> remotes/origin/upstream
_sizing_eval(obj);
}
static void
-<<<<<<< HEAD
-_hide(Evas_Object *obj)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
-
-=======
_hide_finished(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__, const char *source __UNUSED__)
{
void *event_info __UNUSED__)
{
Widget_Data *wd = elm_widget_data_get(obj);
->>>>>>> remotes/origin/upstream
if ((!wd) || (!wd->visible)) return;
evas_object_hide(wd->bg);
_scroller_size_reset(wd);
-<<<<<<< HEAD
- evas_object_smart_callback_call(obj, SIG_DISMISSED, NULL);
-=======
->>>>>>> remotes/origin/upstream
wd->visible = EINA_FALSE;
}
static void
-<<<<<<< HEAD
-_ctxpopup_hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__)
-{
- _hide(obj);
-}
-
-static void
-=======
->>>>>>> remotes/origin/upstream
_content_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
if (elm_widget_item_disabled_get(item)) return;
if (item->func)
-<<<<<<< HEAD
- item->func((void*) item->base.data, WIDGET(item), data);
-=======
item->func((void*)item->base.data, WIDGET(item), data);
->>>>>>> remotes/origin/upstream
}
static void
_item_icon_set(Elm_Ctxpopup_Item *item, Evas_Object *icon)
{
if (item->icon)
-<<<<<<< HEAD
- {
- elm_widget_sub_object_del(VIEW(item), item->icon);
- evas_object_del(item->icon);
- }
-=======
evas_object_del(item->icon);
->>>>>>> remotes/origin/upstream
item->icon = icon;
if (!icon) return;
static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
-
- Widget_Data *wd;
- Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-=======
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
if (!wd) return EINA_FALSE;
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
-<<<<<<< HEAD
- Evas_Coord x, y, w, h;
-=======
->>>>>>> remotes/origin/upstream
ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
ELM_SET_WIDTYPE(widtype, "ctxpopup");
elm_widget_type_set(obj, "ctxpopup");
-<<<<<<< HEAD
- elm_widget_sub_object_add(parent, obj);
-=======
->>>>>>> remotes/origin/upstream
elm_widget_data_set(obj, wd);
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
elm_widget_del_hook_set(obj, _del_hook);
wd->bg = edje_object_add(e);
elm_widget_sub_object_add(obj, wd->bg);
_elm_theme_object_set(obj, wd->bg, "ctxpopup", "bg", "default");
-<<<<<<< HEAD
- evas_object_geometry_get(parent, &x, &y, &w, &h);
- evas_object_move(wd->bg, x, y);
- evas_object_resize(wd->bg, w, h);
- edje_object_signal_callback_add(wd->bg, "elm,action,click", "",
- _bg_clicked_cb, obj);
-
-=======
edje_object_signal_callback_add(wd->bg,
"elm,action,click",
"",
_bg_clicked_cb,
obj);
->>>>>>> remotes/origin/upstream
//Base
wd->base = edje_object_add(e);
elm_widget_sub_object_add(obj, wd->base);
_elm_theme_object_set(obj, wd->base, "ctxpopup", "base", "default");
-<<<<<<< HEAD
-=======
edje_object_signal_callback_add(wd->base, "elm,action,hide,finished", "",
_hide_finished, obj);
->>>>>>> remotes/origin/upstream
//Arrow
wd->arrow = edje_object_add(e);
wd->dir_priority[1] = ELM_CTXPOPUP_DIRECTION_LEFT;
wd->dir_priority[2] = ELM_CTXPOPUP_DIRECTION_RIGHT;
wd->dir_priority[3] = ELM_CTXPOPUP_DIRECTION_DOWN;
-<<<<<<< HEAD
-
- evas_object_event_callback_add(parent, EVAS_CALLBACK_RESIZE, _parent_resize,
- obj);
-=======
->>>>>>> remotes/origin/upstream
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _ctxpopup_show,
NULL);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _ctxpopup_move,
NULL);
-<<<<<<< HEAD
- evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _ctxpopup_changed_size_hints, NULL);
-=======
->>>>>>> remotes/origin/upstream
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESTACK, _restack, obj);
evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
evas_object_smart_callback_add(obj, "scroll-freeze-off", _freeze_off, obj);
return obj;
}
-<<<<<<< HEAD
-EAPI Evas_Object *
-elm_ctxpopup_item_icon_get(const Elm_Object_Item *it)
-{
- return _item_content_get_hook(it, "icon");
-}
-
-EAPI void
-elm_ctxpopup_item_icon_set(Elm_Object_Item *it, Evas_Object *icon)
-{
- _item_content_set_hook(it, "icon", icon);
-}
-
-EAPI const char *
-elm_ctxpopup_item_label_get(const Elm_Object_Item *it)
-{
- return _item_text_get_hook(it, NULL);
-}
-
-EAPI void
-elm_ctxpopup_item_label_set(Elm_Object_Item *it, const char *label)
-{
- _item_text_set_hook(it, NULL, label);
-}
-
-=======
->>>>>>> remotes/origin/upstream
EAPI void
elm_ctxpopup_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
-<<<<<<< HEAD
Eina_List *elist;
Elm_Ctxpopup_Item *item;
int idx = 0;
-=======
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(obj);
if (!wd) return;
{
elm_box_horizontal_set(wd->box, EINA_FALSE);
elm_scroller_bounce_set(wd->scr, EINA_FALSE, EINA_TRUE);
-<<<<<<< HEAD
EINA_LIST_FOREACH(wd->items, elist, item)
{
else
edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
}
-=======
->>>>>>> remotes/origin/upstream
}
else
{
elm_box_horizontal_set(wd->box, EINA_TRUE);
elm_scroller_bounce_set(wd->scr, EINA_TRUE, EINA_FALSE);
-<<<<<<< HEAD
EINA_LIST_FOREACH(wd->items, elist, item)
{
else
edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
}
-=======
->>>>>>> remotes/origin/upstream
}
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
_sizing_eval(obj);
}
-<<<<<<< HEAD
- return (Elm_Object_Item *) item;
-}
-
-EAPI void
-elm_ctxpopup_item_del(Elm_Object_Item *it)
-{
- elm_object_item_del(it);
-}
-
-EAPI void
-elm_ctxpopup_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled)
-{
- elm_object_item_disabled_set(it, disabled);
-}
-
-EAPI Eina_Bool
-elm_ctxpopup_item_disabled_get(const Elm_Object_Item *it)
-{
- return elm_object_item_disabled_get(it);
-}
-
-EAPI void
-elm_ctxpopup_content_set(Evas_Object *obj, Evas_Object *content)
-{
- elm_object_content_set(obj, content);
-}
-
-EAPI Evas_Object *
-elm_ctxpopup_content_unset(Evas_Object *obj)
-{
- return elm_object_content_unset(obj);
-=======
return (Elm_Object_Item *)item;
->>>>>>> remotes/origin/upstream
}
EAPI void
if (!wd) return ELM_CTXPOPUP_DIRECTION_UNKNOWN;
return wd->dir;
}
-<<<<<<< HEAD
-=======
EAPI void
elm_ctxpopup_dismiss(Evas_Object *obj)
if (!wd) return;
_hide_signal_emit(obj, wd->dir);
}
->>>>>>> remotes/origin/upstream
* @image html img/widget/ctxpopup/preview-00.png
* @image latex img/widget/ctxpopup/preview-00.eps
*
-<<<<<<< HEAD
- * @brief Context popup widet.
-=======
* @brief Context popup widget.
->>>>>>> remotes/origin/upstream
*
* A ctxpopup is a widget that, when shown, pops up a list of items.
* It automatically chooses an area inside its parent object's view
* items have a label and/or an icon. It is intended for a small
* number of items (hence the use of list, not genlist).
*
-<<<<<<< HEAD
- * @note Ctxpopup is a especialization of @ref Hover.
-=======
* @note Ctxpopup is a specialization of @ref Hover.
->>>>>>> remotes/origin/upstream
*
* Signals that you can add callbacks for are:
* "dismissed" - the ctxpopup was dismissed
*
-<<<<<<< HEAD
- * Default contents parts of the ctxpopup widget that you can use for are:
- * @li "default" - A content of the ctxpopup
- *
- * Default contents parts of the ctxpopup items that you can use for are:
-=======
* Default content parts of the ctxpopup widget that you can use for are:
* @li "default" - A content of the ctxpopup
*
* Default content parts of the ctxpopup items that you can use for are:
->>>>>>> remotes/origin/upstream
* @li "icon" - An icon in the title area
*
* Default text parts of the ctxpopup items that you can use for are:
* @warning Ctxpopup can't hold both an item list and a content at the same
* time. When an item is added, any previous content will be removed.
*
-<<<<<<< HEAD
- * @see elm_ctxpopup_content_set()
-=======
* @see elm_object_content_set()
->>>>>>> remotes/origin/upstream
*
* @ingroup Ctxpopup
*/
EAPI Elm_Ctxpopup_Direction elm_ctxpopup_direction_get(const Evas_Object *obj);
/**
-<<<<<<< HEAD
-=======
* @brief Dismiss a ctxpopup object
*
* @param obj The ctxpopup object
EAPI void elm_ctxpopup_dismiss(Evas_Object *obj);
/**
->>>>>>> remotes/origin/upstream
* @}
*/
static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
-=======
->>>>>>> remotes/origin/upstream
Elm_Diskselector_Item *item, *item2, *dit;
Eina_List *l;
int i = 0;
Widget_Data *wd;
-<<<<<<< HEAD
- item = (Elm_Diskselector_Item *) it;
-=======
item = (Elm_Diskselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if (!wd) return EINA_FALSE;
_theme_data_get(Widget_Data *wd)
{
const char* str;
-<<<<<<< HEAD
- Evas_Object *parent;
-=======
->>>>>>> remotes/origin/upstream
str = edje_object_data_get(wd->right_blank, "len_threshold");
if (str) wd->len_threshold = MAX(0, atoi(str));
else wd->len_threshold = 0;
}
str = edje_object_data_get(wd->right_blank, "min_width");
-<<<<<<< HEAD
- if (str) wd->minw = MAX(-1, atoi(str)) * elm_scale_get();
- else
- {
- parent = elm_widget_parent_widget_get(wd->self);
- if (!parent) wd->minw = -1;
- else evas_object_geometry_get(parent, NULL, NULL, &wd->minw, NULL);
- }
-
- str = edje_object_data_get(wd->right_blank, "min_height");
- if (str) wd->minh = MAX(-1, atoi(str)) * elm_scale_get();
-=======
if (str) wd->minw = MAX(-1, atoi(str));
else wd->minw = -1;
str = edje_object_data_get(wd->right_blank, "min_height");
if (str) wd->minh = MAX(-1, atoi(str));
->>>>>>> remotes/origin/upstream
else wd->minh = -1;
}
}
evas_object_geometry_get(wd->scroller, NULL, &y, &w, &h);
-<<<<<<< HEAD
//move scroller in two steps for getting smooth launching effect.
if (i > 2)
elm_smart_scroller_child_region_show(wd->scroller, w / wd->display_item_num * (i-2), y, w, h);
elm_smart_scroller_region_bring_in(wd->scroller, w / wd->display_item_num * i, y, w, h);
-=======
- elm_smart_scroller_child_region_show(wd->scroller, w / wd->display_item_num * i, y, w, h);
->>>>>>> remotes/origin/upstream
_select_item(dit);
if (wd->idler)
{
static void
_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Diskselector_Item *item;
- if (part && strcmp(part, "default")) return;
- item = (Elm_Diskselector_Item *) it;
-=======
Elm_Diskselector_Item *item;
if (part && strcmp(part, "default")) return;
item = (Elm_Diskselector_Item *)it;
->>>>>>> remotes/origin/upstream
eina_stringshare_replace(&item->label, label);
edje_object_part_text_set(VIEW(item), "elm.text", item->label);
}
static const char *
_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- if (part && strcmp(part, "default")) return NULL;
- return ((Elm_Diskselector_Item *) it)->label;
-=======
if (part && strcmp(part, "default")) return NULL;
return ((Elm_Diskselector_Item *)it)->label;
->>>>>>> remotes/origin/upstream
}
static void
const char *part,
Evas_Object *content)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- if (part && strcmp(part, "icon")) return;
- _item_icon_set((Elm_Diskselector_Item *) it, content);
- _check_identical_item((Elm_Diskselector_Item *) it, content);
-=======
if (part && strcmp(part, "icon")) return;
_item_icon_set((Elm_Diskselector_Item *)it, content);
_check_identical_item((Elm_Diskselector_Item *)it, content);
->>>>>>> remotes/origin/upstream
}
static Evas_Object *
_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- if (part && strcmp(part, "icon")) return NULL;
- return ((Elm_Diskselector_Item *) it)->icon;
-}
-
-=======
if (part && strcmp(part, "icon")) return NULL;
return ((Elm_Diskselector_Item *)it)->icon;
}
-
->>>>>>> remotes/origin/upstream
EAPI Evas_Object *
elm_diskselector_add(Evas_Object *parent)
{
}
EAPI Eina_Bool
-<<<<<<< HEAD
-elm_diskselector_round_get(const Evas_Object *obj)
-=======
elm_diskselector_round_enabled_get(const Evas_Object *obj)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI void
-<<<<<<< HEAD
-elm_diskselector_round_set(Evas_Object * obj, Eina_Bool round)
-=======
elm_diskselector_round_enabled_set(Evas_Object * obj, Eina_Bool enabled)
->>>>>>> remotes/origin/upstream
{
Eina_List *elist;
Elm_Diskselector_Item *it;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-<<<<<<< HEAD
- if (wd->round == round)
- return;
-
- wd->round = round;
- if (round)
-=======
if (wd->round == enabled)
return;
wd->round = !!enabled;
if (enabled)
->>>>>>> remotes/origin/upstream
{
wd->r_items = eina_list_clone(wd->items);
elm_box_unpack(wd->main_box, wd->left_blank);
}
EAPI int
-<<<<<<< HEAD
-elm_diskselector_side_label_length_get(const Evas_Object *obj)
-=======
elm_diskselector_side_text_max_length_get(const Evas_Object *obj)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI void
-<<<<<<< HEAD
-elm_diskselector_side_label_length_set(Evas_Object *obj, int len)
-=======
elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI void
-<<<<<<< HEAD
-elm_diskselector_side_label_lenght_set(Evas_Object *obj, int len)
-{
- return elm_diskselector_side_label_length_set(obj, len);
-}
-
-EAPI int
-elm_diskselector_side_label_lenght_get(const Evas_Object *obj)
-{
- return elm_diskselector_side_label_length_get(obj);
-}
-
-EAPI void
-=======
->>>>>>> remotes/origin/upstream
elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
{
ELM_CHECK_WIDTYPE(obj, widtype);
if (!wd->idler)
wd->idler = ecore_idle_enterer_before_add(_move_scroller, obj);
_sizing_eval(obj);
-<<<<<<< HEAD
- return (Elm_Object_Item *) it;
-}
-
-EAPI void
-elm_diskselector_item_del(Elm_Object_Item * it)
-{
- elm_object_item_del(it);
-}
-
-EAPI const char *
-elm_diskselector_item_label_get(const Elm_Object_Item * it)
-{
- return _item_text_get_hook(it, NULL);
-}
-
-EAPI void
-elm_diskselector_item_label_set(Elm_Object_Item * it, const char *label)
-{
- _item_text_set_hook(it, NULL, label);
-=======
return (Elm_Object_Item *)it;
->>>>>>> remotes/origin/upstream
}
EAPI Elm_Object_Item *
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Widget_Data *wd;
-<<<<<<< HEAD
- Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it;
-=======
Elm_Diskselector_Item *item = (Elm_Diskselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if (!wd) return;
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
if (!wd) return EINA_FALSE;
-<<<<<<< HEAD
- return (wd->selected_item == ((Elm_Diskselector_Item *) it));
-}
-
-EAPI void
-elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
-{
- elm_object_item_del_cb_set(it, func);
-}
-
-EAPI void *
-elm_diskselector_item_data_get(const Elm_Object_Item *it)
-{
- return elm_object_item_data_get(it);
-}
-
-EAPI Evas_Object *
-elm_diskselector_item_icon_get(const Elm_Object_Item *it)
-{
- return _item_content_get_hook(it, NULL);
-}
-
-EAPI void
-elm_diskselector_item_icon_set(Elm_Object_Item *it, Evas_Object *icon)
-{
- _item_content_set_hook(it, NULL, icon);
-=======
return (wd->selected_item == ((Elm_Diskselector_Item *)it));
->>>>>>> remotes/origin/upstream
}
EAPI Elm_Object_Item *
elm_diskselector_item_prev_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-<<<<<<< HEAD
- Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it;
-=======
Elm_Diskselector_Item *item = (Elm_Diskselector_Item *)it;
->>>>>>> remotes/origin/upstream
if (item->node->prev) return item->node->prev->data;
else return NULL;
}
elm_diskselector_item_next_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-<<<<<<< HEAD
- Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it;
-=======
Elm_Diskselector_Item *item = (Elm_Diskselector_Item *)it;
->>>>>>> remotes/origin/upstream
if (item->node->next) return item->node->next->data;
else return NULL;
}
}
EAPI void
-<<<<<<< HEAD
-elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_tooltip_text_set(it, text);
-}
-
-EAPI void
-elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb);
-}
-
-EAPI void
-elm_diskselector_item_tooltip_unset(Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_tooltip_unset(it);
-}
-
-EAPI void
-elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_tooltip_style_set(it, style);
-}
-
-EAPI const char *
-elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- return elm_widget_item_tooltip_style_get(it);
-}
-
-EAPI void
-elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_cursor_set(it, cursor);
-}
-
-EAPI const char *
-elm_diskselector_item_cursor_get(const Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- return elm_widget_item_cursor_get(it);
-}
-
-EAPI void
-elm_diskselector_item_cursor_unset(Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_cursor_unset(it);
-}
-
-EAPI void
-elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_cursor_style_set(it, style);
-}
-
-EAPI const char *
-elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
- return elm_widget_item_cursor_style_get(it);
-}
-
-EAPI void
-elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- elm_widget_item_cursor_engine_only_set(it, engine_only);
-}
-
-EAPI Eina_Bool
-elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
- return elm_widget_item_cursor_engine_only_get(it);
-}
-
-EAPI void
-=======
->>>>>>> remotes/origin/upstream
elm_diskselector_display_item_num_set(Evas_Object *obj, int num)
{
ELM_CHECK_WIDTYPE(obj, widtype);
* Available styles for it:
* - @c "default"
*
-<<<<<<< HEAD
- * Default contents parts of the diskseletor items that you can use for are:
-=======
* Default content parts of the diskselector items that you can use for are:
->>>>>>> remotes/origin/upstream
* @li "icon" - An icon in the diskselector item
*
* Default text parts of the diskselector items that you can use for are:
* Enable or disable round mode.
*
* @param obj The diskselector object.
-<<<<<<< HEAD
- * @param round @c EINA_TRUE to enable round mode or @c EINA_FALSE to
- * disable it.
- *
- * Disabled by default. If round mode is enabled the items list will
- * work like a circle list, so when the user reaches the last item,
- * the first one will popup.
- *
- * @see elm_diskselector_round_get()
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round);
-=======
* @param enabled @c EINA_TRUE to enable round mode or @c EINA_FALSE to
* disable it.
*
* @ingroup Diskselector
*/
EAPI void elm_diskselector_round_enabled_set(Evas_Object *obj, Eina_Bool enabled);
->>>>>>> remotes/origin/upstream
/**
* Get a value whether round mode is enabled or not.
*
-<<<<<<< HEAD
- * @see elm_diskselector_round_set() for details.
-=======
* @see elm_diskselector_round_enabled_set() for details.
->>>>>>> remotes/origin/upstream
*
* @param obj The diskselector object.
* @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
*
* @ingroup Diskselector
*/
-<<<<<<< HEAD
-EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj);
-=======
EAPI Eina_Bool elm_diskselector_round_enabled_get(const Evas_Object *obj);
->>>>>>> remotes/origin/upstream
/**
* Get the side labels max length.
*
-<<<<<<< HEAD
- * @see elm_diskselector_side_label_length_set() for details.
-=======
* @see elm_diskselector_side_text_max_length_set() for details.
->>>>>>> remotes/origin/upstream
*
* @param obj The diskselector object.
* @return The max length defined for side labels, or 0 if not a valid
*
* @ingroup Diskselector
*/
-<<<<<<< HEAD
-EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj);
-=======
EAPI int elm_diskselector_side_text_max_length_get(const Evas_Object *obj);
->>>>>>> remotes/origin/upstream
/**
* Set the side labels max length.
*
* Default side label max length is 3.
*
-<<<<<<< HEAD
- * This property will be applyed over all items, included before or
-=======
* This property will be applied over all items, included before or
->>>>>>> remotes/origin/upstream
* later this function call.
*
* @ingroup Diskselector
*/
-<<<<<<< HEAD
-EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len);
-=======
EAPI void elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len);
->>>>>>> remotes/origin/upstream
/**
* Set the number of items to be displayed.
* @param obj The diskselector object.
* @param num The number of items the diskselector will display.
*
-<<<<<<< HEAD
- * Default value is 3, and also it's the minimun. If @p num is less
-=======
* Default value is 3, and also it's the minimum. If @p num is less
->>>>>>> remotes/origin/upstream
* than 3, it will be set to 3.
*
* Also, it can be set on theme, using data item @c display_item_num
* axis is reached scrolling.
*
* @param obj The diskselector object.
-<<<<<<< HEAD
- * @param h_bounce Pointer where to store the bounce state of the horizontal
- * axis.
- * @param v_bounce Pointer where to store the bounce state of the vertical
-=======
* @param h_bounce Pointer to store the bounce state of the horizontal
* axis.
* @param v_bounce Pointer to store the bounce state of the vertical
->>>>>>> remotes/origin/upstream
* axis.
*
* @see elm_scroller_bounce_get()
* @see elm_diskselector_scroller_policy_get() for details.
*
* @param obj The diskselector object.
-<<<<<<< HEAD
- * @param policy_h Pointer where to store horizontal scrollbar policy.
- * @param policy_v Pointer where to store vertical scrollbar policy.
-=======
* @param policy_h Pointer to store horizontal scrollbar policy.
* @param policy_v Pointer to store vertical scrollbar policy.
->>>>>>> remotes/origin/upstream
*
* @ingroup Diskselector
*/
* Associated @p data can be properly freed when item is deleted if a
* callback function is set with elm_object_item_del_cb_set().
*
-<<<<<<< HEAD
- * If a function is passed as argument, it will be called everytime this item
-=======
* If a function is passed as argument, it will be called every time this item
->>>>>>> remotes/origin/upstream
* is selected, i.e., the user stops the diskselector with this
* item on center position. If such function isn't needed, just passing
* @c NULL as @p func is enough. The same should be done for @p data.
* disk = elm_diskselector_add(win);
* ic = elm_icon_add(win);
* elm_icon_file_set(ic, "path/to/image", NULL);
-<<<<<<< HEAD
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
-=======
* elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
->>>>>>> remotes/origin/upstream
* elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
* @endcode
*
* diskselector will be selected.
*
* The selected item always will be centered on diskselector, with
-<<<<<<< HEAD
- * full label displayed, i.e., max lenght set to side labels won't
- * apply on the selected item. More details on
- * elm_diskselector_side_label_length_set().
-=======
* full label displayed, i.e., max length set to side labels won't
* apply on the selected item. More details on
* elm_diskselector_side_text_max_length_set().
->>>>>>> remotes/origin/upstream
*
* @ingroup Diskselector
*/
* This sets the selected state of the given item @p it.
* @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
*
-<<<<<<< HEAD
- * If a new item is selected the previosly selected will be unselected.
- * Previoulsy selected item can be get with function
-=======
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
->>>>>>> remotes/origin/upstream
* elm_diskselector_selected_item_get().
*
* If the item @p it is unselected, the first item of diskselector will
*/
EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it);
-<<<<<<< HEAD
-
-/**
- * Set the cursor to be shown when mouse is over the diskselector item
- *
- * @param it Target item
- * @param cursor the cursor name to be used.
- *
- * @see elm_object_cursor_set() for more details.
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor);
-
-/**
- * Get the cursor to be shown when mouse is over the diskselector item
- *
- * @param it diskselector item with cursor already set.
- * @return the cursor name.
- *
- * @see elm_object_cursor_get() for more details.
- * @see elm_diskselector_cursor_set()
- *
- * @ingroup Diskselector
- */
-EAPI const char *elm_diskselector_item_cursor_get(const Elm_Object_Item *it);
-
-/**
- * Unset the cursor to be shown when mouse is over the diskselector item
- *
- * @param it Target item
- *
- * @see elm_object_cursor_unset() for more details.
- * @see elm_diskselector_cursor_set()
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_item_cursor_unset(Elm_Object_Item *it);
-
-/**
- * Sets a different style for this item cursor.
- *
- * @note before you set a style you should define a cursor with
- * elm_diskselector_item_cursor_set()
- *
- * @param it diskselector item with cursor already set.
- * @param style the theme style to use (default, transparent, ...)
- *
- * @see elm_object_cursor_style_set() for more details.
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style);
-
-/**
- * Get the style for this item cursor.
- *
- * @param it diskselector item with cursor already set.
- * @return style the theme style in use, defaults to "default". If the
- * object does not have a cursor set, then @c NULL is returned.
- *
- * @see elm_object_cursor_style_get() for more details.
- * @see elm_diskselector_item_cursor_style_set()
- *
- * @ingroup Diskselector
- */
-EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it);
-
-
-/**
- * Set if the cursor set should be searched on the theme or should use
- * the provided by the engine, only.
- *
- * @note before you set if should look on theme you should define a cursor
- * with elm_diskselector_item_cursor_set().
- * By default it will only look for cursors provided by the engine.
- *
- * @param it widget item with cursor already set.
- * @param engine_only boolean to define if cursors set with
- * elm_diskselector_item_cursor_set() should be searched only
- * between cursors provided by the engine or searched on widget's
- * theme as well.
- *
- * @see elm_object_cursor_engine_only_set() for more details.
- *
- * @ingroup Diskselector
- */
-EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
-
-/**
- * Get the cursor engine only usage for this item cursor.
- *
- * @param it widget item 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 item does not have a cursor set, then @c EINA_FALSE is returned.
- *
- * @see elm_object_cursor_engine_only_get() for more details.
- * @see elm_diskselector_item_cursor_engine_only_set()
- *
- * @ingroup Diskselector
- */
-EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it);
-
-=======
->>>>>>> remotes/origin/upstream
/**
* @}
*/
/* TODO: if one ever wants to extend it to receiving generic widgets
as items, be my guest. in this case, remember to implement the
items tooltip infra. */
-<<<<<<< HEAD
-/* TODO: implement disabled mode -- disable_hook() and stuff. */
-=======
->>>>>>> remotes/origin/upstream
/* TODO: fix default theme image borders for looong strings as item
labels. */
/* TODO: set text elipsis on labels if one enforces mininum size on
const char *part,
const char *label)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
-=======
->>>>>>> remotes/origin/upstream
Widget_Data *wd;
Eina_List *l;
Elm_Flipselector_Item *item;
if (part && strcmp(part ,"default")) return;
-<<<<<<< HEAD
- item = (Elm_Flipselector_Item *) it;
-=======
item = (Elm_Flipselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if ((!wd) || (!wd->items)) return;
static const char *
_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-
- Elm_Flipselector_Item *item, *_item;
- Widget_Data *wd;
- Eina_List *l;
-
- if (part && strcmp(part ,"default")) return NULL;
-
- item = (Elm_Flipselector_Item *) it;
- wd = elm_widget_data_get(WIDGET(item));
- if ((!wd) || (!wd->items)) return NULL;
-
- EINA_LIST_FOREACH(wd->items, l, _item)
- if (_item == item) return item->label;
- return NULL;
-=======
if (part && strcmp(part ,"default")) return NULL;
return ((Elm_Flipselector_Item *)it)->label;
->>>>>>> remotes/origin/upstream
}
static void
const char *emission,
const char *source)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
- Elm_Flipselector_Item *item = (Elm_Flipselector_Item *) it;
-=======
Elm_Flipselector_Item *item = (Elm_Flipselector_Item *)it;
->>>>>>> remotes/origin/upstream
edje_object_signal_emit(VIEW(item), emission, source);
}
}
static void
-<<<<<<< HEAD
-=======
_disable_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
}
static void
->>>>>>> remotes/origin/upstream
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd;
EINA_LIST_FOREACH(wd->items, l, it)
{
-<<<<<<< HEAD
- if (strlen(elm_object_item_text_get((Elm_Object_Item *) it)) >
-=======
if (strlen(elm_object_item_text_get((Elm_Object_Item *)it)) >
->>>>>>> remotes/origin/upstream
strlen(elm_object_item_text_get(DATA_GET(wd->sentinel))))
wd->sentinel = l;
}
static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
-<<<<<<< HEAD
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
-=======
->>>>>>> remotes/origin/upstream
Widget_Data *wd;
Elm_Flipselector_Item *item, *item2;
Eina_List *l;
-<<<<<<< HEAD
- item = (Elm_Flipselector_Item *) it;
-=======
item = (Elm_Flipselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if (!wd) return EINA_FALSE;
wd->self = obj;
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
-<<<<<<< HEAD
- /* TODO: elm_widget_disable_hook_set(obj, _disable_hook); */
-=======
elm_widget_disable_hook_set(obj, _disable_hook);
->>>>>>> remotes/origin/upstream
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
}
if (!wd->sentinel ||
-<<<<<<< HEAD
- (strlen(elm_object_item_text_get((Elm_Object_Item *) item)) >
-=======
(strlen(elm_object_item_text_get((Elm_Object_Item *)item)) >
->>>>>>> remotes/origin/upstream
strlen(elm_object_item_text_get(DATA_GET(wd->sentinel)))))
{
wd->sentinel = eina_list_last(wd->items);
if (eina_list_count(wd->items) >= 2)
edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
-<<<<<<< HEAD
- return (Elm_Object_Item *) item;
-=======
return (Elm_Object_Item *)item;
->>>>>>> remotes/origin/upstream
}
EAPI Elm_Object_Item *
}
if (!wd->sentinel ||
-<<<<<<< HEAD
- (strlen(elm_object_item_text_get((Elm_Object_Item *) item)) >
-=======
(strlen(elm_object_item_text_get((Elm_Object_Item *)item)) >
->>>>>>> remotes/origin/upstream
strlen(elm_object_item_text_get(DATA_GET(wd->sentinel)))))
{
wd->sentinel = wd->items;
if (eina_list_count(wd->items) >= 2)
edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
-<<<<<<< HEAD
- return (Elm_Object_Item *) item;
-}
-
-/* TODO: account for deleted items? */
-=======
return (Elm_Object_Item *)item;
}
->>>>>>> remotes/origin/upstream
EAPI const Eina_List *
elm_flipselector_items_get(const Evas_Object *obj)
{
EINA_LIST_FOREACH(wd->items, l, it)
{
if (it->deleted) continue;
-<<<<<<< HEAD
- return (Elm_Object_Item *) it;
-=======
return (Elm_Object_Item *)it;
->>>>>>> remotes/origin/upstream
}
return NULL;
}
EINA_LIST_REVERSE_FOREACH(wd->items, l, it)
{
if (it->deleted) continue;
-<<<<<<< HEAD
- return (Elm_Object_Item *) it;
-=======
return (Elm_Object_Item *)it;
->>>>>>> remotes/origin/upstream
}
return NULL;
}
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
-<<<<<<< HEAD
- if (!wd || !wd->current) return NULL;
-=======
if (!wd) return NULL;
->>>>>>> remotes/origin/upstream
return DATA_GET(wd->current);
}
Widget_Data *wd;
Eina_List *l;
-<<<<<<< HEAD
- item = (Elm_Flipselector_Item *) it;
-=======
item = (Elm_Flipselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if (!wd) return;
Widget_Data *wd;
Elm_Flipselector_Item *item;
-<<<<<<< HEAD
- item = (Elm_Flipselector_Item *) it;
-=======
item = (Elm_Flipselector_Item *)it;
->>>>>>> remotes/origin/upstream
wd = elm_widget_data_get(WIDGET(item));
if (!wd) return EINA_FALSE;
return (eina_list_data_get(wd->current) == item);
}
-<<<<<<< HEAD
-EAPI void
-elm_flipselector_item_del(Elm_Object_Item *it)
-{
- elm_object_item_del(it);
-}
-
-EAPI const char *
-elm_flipselector_item_label_get(const Elm_Object_Item *it)
-{
- return _item_text_get_hook(it, NULL);
-}
-
-EAPI void
-elm_flipselector_item_label_set(Elm_Object_Item *it, const char *label)
-{
- _item_text_set_hook(it, NULL, label);
-}
-
-EAPI Elm_Object_Item *
-elm_flipselector_item_prev_get(Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-
- Elm_Flipselector_Item *item, *_item;
- Widget_Data *wd;
- Eina_List *l;
-
- item = (Elm_Flipselector_Item *) it;
- wd = elm_widget_data_get(WIDGET(item));
- if ((!wd) || (!wd->items)) return NULL;
-
- EINA_LIST_FOREACH(wd->items, l, _item)
- if (_item == item)
- {
- l = eina_list_prev(l);
- if (!l) return NULL;
- return DATA_GET(l);
- }
-=======
EAPI Elm_Object_Item *
elm_flipselector_item_prev_get(const Elm_Object_Item *it)
{
l = eina_list_data_find_list(wd->items, it);
if (l && l->prev) return DATA_GET(l->prev);
->>>>>>> remotes/origin/upstream
return NULL;
}
EAPI Elm_Object_Item *
-<<<<<<< HEAD
-elm_flipselector_item_next_get(Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-
- Elm_Flipselector_Item *item, *_item;
- Widget_Data *wd;
- Eina_List *l;
-
- item = (Elm_Flipselector_Item *) it;
- wd = elm_widget_data_get(WIDGET(item));
- if ((!wd) || (!wd->items)) return NULL;
-
- EINA_LIST_FOREACH(wd->items, l, _item)
- if (_item == item)
- {
- l = eina_list_next(l);
- if (!l) return NULL;
- return DATA_GET(l);
- }
-=======
elm_flipselector_item_next_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
l = eina_list_data_find_list(wd->items, it);
if (l && l->next) return DATA_GET(l->next);
->>>>>>> remotes/origin/upstream
return NULL;
}
EAPI void
-<<<<<<< HEAD
-elm_flipselector_interval_set(Evas_Object *obj, double interval)
-=======
elm_flipselector_first_interval_set(Evas_Object *obj, double interval)
->>>>>>> remotes/origin/upstream
{
ELM_CHECK_WIDTYPE(obj, widtype);
}
EAPI double
-<<<<<<< HEAD
-elm_flipselector_interval_get(const Evas_Object *obj)
-{
- ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
-=======
elm_flipselector_first_interval_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
->>>>>>> remotes/origin/upstream
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0;
return wd->first_interval;
}
-<<<<<<< HEAD
-=======
EINA_DEPRECATED EAPI void
elm_flipselector_interval_set(Evas_Object *obj, double interval)
{
return elm_flipselector_first_interval_get(obj);
}
-
->>>>>>> remotes/origin/upstream
* (thus, the "flip" in the name).
*
* User clicks to flip sheets which are @b held for some time will
-<<<<<<< HEAD
- * make the flip selector to flip continuosly and automatically for
-=======
* make the flip selector to flip continuously and automatically for
->>>>>>> remotes/origin/upstream
* the user. The interval between flips will keep growing in time,
* so that it helps the user to reach an item which is distant from
* the current selection.
* Default text parts of the flipselector items that you can use for are:
* @li "default" - label of the flipselector item
*
-<<<<<<< HEAD
-=======
* Supported elm_object common APIs.
* @li elm_object_disabled_set
* @li elm_object_disabled_get
*
->>>>>>> remotes/origin/upstream
* Supported elm_object_item common APIs.
* @li elm_object_item_text_set
* @li elm_object_item_part_text_set
*
* @param obj The flipselector object
* @return The selected item or @c NULL, if the widget has no items
-<<<<<<< HEAD
- * (and on erros)
-=======
* (and on errors)
->>>>>>> remotes/origin/upstream
*
* @ingroup Flipselector
*/
* @param selected @c EINA_TRUE to select it, @c EINA_FALSE to unselect.
*
* This sets whether @p item is or not the selected (thus, under
-<<<<<<< HEAD
- * display) one. If @p item is different than one under display,
-=======
* display) one. If @p item is different than the one under display,
->>>>>>> remotes/origin/upstream
* the latter will be unselected. If the @p item is set to be
* unselected, on the other hand, the @b first item in the widget's
* internal members list will be the new selected one.
*
* @ingroup Flipselector
*/
-<<<<<<< HEAD
-EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it);
-
-/**
- * Gets the item before @p item in a flip selector widget's
- * internal list of items.
- *
- * @param it The item to fetch previous from
- * @return The item before the @p item, in its parent's list. If
- * there is no previous item for @p item or there's an
- * error, @c NULL is returned.
-=======
EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it);
/**
* @param it The item to fetch previous from
* @return The item before the @p item, in its parent's list. If there is no
* previous item for @p item or there's an error, @c NULL is returned.
->>>>>>> remotes/origin/upstream
*
* @see elm_flipselector_item_next_get()
*
* @ingroup Flipselector
*/
-<<<<<<< HEAD
-EAPI Elm_Object_Item *elm_flipselector_item_prev_get(Elm_Object_Item *it);
-=======
EAPI Elm_Object_Item *elm_flipselector_item_prev_get(const Elm_Object_Item *it);
->>>>>>> remotes/origin/upstream
/**
* Gets the item after @p item in a flip selector widget's
* internal list of items.
*
* @param it The item to fetch next from
-<<<<<<< HEAD
- * @return The item after the @p item, in its parent's list. If
- * there is no next item for @p item or there's an
- * error, @c NULL is returned.
- *
- * @see elm_flipselector_item_next_get()
- *
- * @ingroup Flipselector
- */
-EAPI Elm_Object_Item *elm_flipselector_item_next_get(Elm_Object_Item *it);
-
-/**
- * Set the interval on time updates for an user mouse button hold
-=======
* @return The item after the @p item, in its parent's list. If there is no next
* item for @p item or there's an error, @c NULL is returned.
*
/**
* Set the interval on time updates for a user mouse button hold
->>>>>>> remotes/origin/upstream
* on a flip selector widget.
*
* @param obj The flip selector object
* @param interval The (first) interval value in seconds
*
* This interval value is @b decreased while the user holds the
-<<<<<<< HEAD
- * mouse pointer either flipping up or flipping doww a given flip
-=======
* mouse pointer either flipping up or flipping down a given flip
->>>>>>> remotes/origin/upstream
* selector.
*
* This helps the user to get to a given item distant from the
* The default starting interval value for automatic flips is
* @b 0.85 seconds.
*
-<<<<<<< HEAD
- * @see elm_flipselector_interval_get()
- *
- * @ingroup Flipselector
- */
-EAPI void elm_flipselector_interval_set(Evas_Object *obj, double interval);
-=======
* @see elm_flipselector_first_interval_get()
*
* @ingroup Flipselector
*/
EAPI void elm_flipselector_first_interval_set(Evas_Object *obj, double interval);
->>>>>>> remotes/origin/upstream
/**
* Get the interval on time updates for an user mouse button hold
* @param obj The flip selector object
* @return The (first) interval value, in seconds, set on it
*
-<<<<<<< HEAD
- * @see elm_flipselector_interval_set() for more details
- *
- * @ingroup Flipselector
- */
-EAPI double elm_flipselector_interval_get(const Evas_Object *obj);
-=======
* @see elm_flipselector_first_interval_set() for more details
*
* @ingroup Flipselector
*/
EAPI double elm_flipselector_first_interval_get(const Evas_Object *obj);
->>>>>>> remotes/origin/upstream
/**
* @}
*/
{
Evas_Object *spinner, *ent;
const char *label;
-<<<<<<< HEAD
- double val, val_min, val_max, orig_val, step;
- double drag_start_pos, spin_speed, interval, first_interval;
-=======
double val, val_min, val_max, orig_val, step, base;
double drag_start_pos, spin_speed, interval, first_interval;
int round;
->>>>>>> remotes/origin/upstream
Ecore_Timer *delay, *spin;
Eina_List *special_values;
Eina_Bool wrap : 1;
Elm_Spinner_Special_Value *sv;
Widget_Data *wd = elm_widget_data_get(obj);
char buf[1024];
-<<<<<<< HEAD
-=======
-
->>>>>>> remotes/origin/upstream
if (!wd) return;
EINA_LIST_FOREACH(wd->special_values, l, sv)
{
}
static Eina_Bool
-<<<<<<< HEAD
-_value_set(Evas_Object *obj, double delta)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
- double new_val;
- if (!wd) return EINA_FALSE;
- new_val = wd->val + delta;
-=======
_value_set(Evas_Object *obj, double new_val)
{
Widget_Data *wd = elm_widget_data_get(obj);
-
+
if (!wd) return EINA_FALSE;
if (wd->round > 0)
- new_val = wd->base +
+ new_val = wd->base +
(double)((((int)(new_val - wd->base)) / wd->round) * wd->round);
->>>>>>> remotes/origin/upstream
if (wd->wrap)
{
while (new_val < wd->val_min)
if (wd->entry_visible) return;
edje_object_part_drag_value_get(wd->spinner, "elm.dragable.slider",
&pos, NULL);
-<<<<<<< HEAD
- offset = wd->step;
- delta = (pos - wd->drag_start_pos) * offset;
- /* If we are on rtl mode, change the delta to be negative on such changes */
- if (elm_widget_mirrored_get(obj))
- delta *= -1;
- if (_value_set(data, delta)) _write_label(data);
- wd->drag_start_pos = pos;
-=======
-
offset = wd->step * _elm_config->scale;
delta = (pos - wd->drag_start_pos) * offset;
/* If we are on rtl mode, change the delta to be negative on such changes */
if (elm_widget_mirrored_get(obj)) delta *= -1;
if (_value_set(data, wd->drag_start_pos + delta)) _write_label(data);
->>>>>>> remotes/origin/upstream
wd->dragging = 1;
}
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return ECORE_CALLBACK_CANCEL;
-<<<<<<< HEAD
- if (_value_set(data, wd->spin_speed)) _write_label(data);
-=======
if (_value_set(data, wd->val + wd->spin_speed)) _write_label(data);
->>>>>>> remotes/origin/upstream
wd->interval = wd->interval / 1.05;
ecore_timer_interval_set(wd->spin, wd->interval);
return ECORE_CALLBACK_RENEW;
if (!wd) return 0.0;
return wd->first_interval;
}
-<<<<<<< HEAD
-=======
EAPI void
elm_spinner_base_set(Evas_Object *obj, double base)
if (!wd) return 0;
return wd->round;
}
->>>>>>> remotes/origin/upstream
* Get the minimum and maximum values of the spinner.
*
* @param obj The spinner object.
-<<<<<<< HEAD
- * @param min Pointer where to store the minimum value.
- * @param max Pointer where to store the maximum value.
-=======
* @param min Pointer to store the minimum value.
* @param max Pointer to store the maximum value.
->>>>>>> remotes/origin/upstream
*
* @note If only one value is needed, the other pointer can be passed
* as @c NULL.
* Spinner objects can have edition @b disabled, in which state they will
* be changed only by arrows.
* Useful for contexts
-<<<<<<< HEAD
- * where you don't want your users to interact with it writting the value.
-=======
* where you don't want your users to interact with it writing the value.
->>>>>>> remotes/origin/upstream
* Specially
* when using special values, the user can see real value instead
* of special label on edition.
EAPI double elm_spinner_interval_get(const Evas_Object *obj);
/**
-<<<<<<< HEAD
-=======
* Set the base for rounding
*
* @param obj The spinner object
EAPI int elm_spinner_round_get(const Evas_Object *obj);
/**
->>>>>>> remotes/origin/upstream
* @}
*/
*/
typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item);
-<<<<<<< HEAD
-// XXX: move to config, rename all config things elm_config_*
-EAPI double elm_tooltip_delay_get(void);
-// XXX: move to config, rename all config things elm_config_*
-EAPI Eina_Bool elm_tooltip_delay_set(double delay);
-
-EAPI void elm_object_tooltip_show(Evas_Object *obj);
-EAPI void elm_object_tooltip_hide(Evas_Object *obj);
-=======
EINA_DEPRECATED EAPI double elm_tooltip_delay_get(void);
EINA_DEPRECATED EAPI Eina_Bool elm_tooltip_delay_set(double delay);
* @param obj The tooltip object.
* @param text The text to be displayed.
*/
->>>>>>> remotes/origin/upstream
EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text);
EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text);
#define elm_object_tooltip_translatable_text_set(obj, text) elm_object_tooltip_domain_translatable_text_set((obj), NULL, (text))
EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
EAPI void elm_object_tooltip_unset(Evas_Object *obj);
-<<<<<<< HEAD
-EAPI void elm_object_tooltip_style_set(Evas_Object *obj, const char *style);
-EAPI const char *elm_object_tooltip_style_get(const Evas_Object *obj);
-EAPI Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable);
-=======
/**
* Sets a different style for this object tooltip.
* its parent window's canvas.
* It will instead be limited only by the size of the display.
*/
->>>>>>> remotes/origin/upstream
EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj);
/**
if (str && (!strcmp(str, "enabled")))
{
elm_win_alpha_set(tt->tt_win, EINA_TRUE);
-<<<<<<< HEAD
- elm_win_transparent_set(tt->tt_win, EINA_TRUE);
-=======
->>>>>>> remotes/origin/upstream
}
else
{
elm_win_alpha_set(tt->tt_win, EINA_FALSE);
-<<<<<<< HEAD
- elm_win_transparent_set(tt->tt_win, EINA_FALSE);
-=======
->>>>>>> remotes/origin/upstream
}
}
}
/**
-<<<<<<< HEAD
- * Get the configured tooltip delay
- *
- * This gets the globally configured tooltip delay in seconds
- *
- * @return The tooltip delay
- * @ingroup Tooltips
- */
-EAPI double
-elm_tooltip_delay_get(void)
-{
- return _elm_config->tooltip_delay;
-}
-
-/**
- * Set the configured tooltip delay
- *
- * This sets the globally configured delay to tooltip
- *
- * @param delay The delay to show the tooltip
- * @return EINA_TRUE if value is valid and setted
- * @ingroup Tooltips
- */
-EAPI Eina_Bool
-elm_tooltip_delay_set(double delay)
-{
- if (delay < 0.0) return EINA_FALSE;
- _elm_config->tooltip_delay = delay;
- return EINA_TRUE;
-}
-
-/**
-=======
->>>>>>> remotes/origin/upstream
* @brief Disable size restrictions on an object's tooltip
* @param obj The tooltip's anchor object
* @param disable If EINA_TRUE, size restrictions are disabled
* @return EINA_FALSE on failure, EINA_TRUE on success
*
-<<<<<<< HEAD
- * This function allows a tooltip to expand beyond its parant window's canvas.
-=======
* This function allows a tooltip to expand beyond its parent window's canvas.
->>>>>>> remotes/origin/upstream
* It will instead be limited only by the size of the display.
*/
EAPI Eina_Bool
* @return If EINA_TRUE, size restrictions are disabled
*
* This function returns whether a tooltip is allowed to expand beyond
-<<<<<<< HEAD
- * its parant window's canvas.
-=======
* its parent window's canvas.
->>>>>>> remotes/origin/upstream
* It will instead be limited only by the size of the display.
*/
EAPI Eina_Bool