##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
- AC_INIT([elementary], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net])
+ AC_INIT([elementary], [v_ver]-beta, [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
have_windows="no"
have_dlopen="no"
case "$host_os" in
- mingw32ce*)
+ mingw32ce* | cegcc*)
PKG_CHECK_MODULES([EVIL], [evil])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
lt_enable_auto_import="-Wl,--enable-auto-import"
AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
fi
-
have_elementary_fb="no"
want_elementary_fb="auto"
AC_ARG_ENABLE([ecore-fb],
src/modules/datetime_input_ctxpopup/Makefile
src/modules/test_entry/Makefile
src/modules/test_map/Makefile
+src/modules/ctxpopup_copypasteUI/Makefile
src/edje_externals/Makefile
src/examples/Makefile
data/Makefile
config/default/Makefile
config/standard/Makefile
config/illume/Makefile
+config/slp/Makefile
$po_makefile_in
])
_view_update(data);
elm_entry_input_panel_show(wd->entry);
+ elm_object_focus_set(wd->entry, EINA_TRUE);
evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
}
Evas_Coord width, height, sum_width = 0;
evas_object_size_hint_min_set(wd->label, 0, 0);
evas_object_resize(wd->label, 0, 0);
- edje_object_part_text_set(wd->label, "mbe.label", str);
+ edje_object_part_text_escaped_set(wd->label, "mbe.label", str);
if (!strcmp(str, ""))
{
evas_object_size_hint_weight_set(wd->guidetext, 0.0, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(wd->guidetext, EVAS_HINT_FILL,
EVAS_HINT_FILL);
- edje_object_part_text_set(wd->guidetext, "elm.text", str);
+ edje_object_part_text_escaped_set(wd->guidetext, "elm.text", str);
_view_update(obj);
}
}
Elm_Multibuttonentry_Item *item = NULL;
if (!wd || wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) return;
- _change_current_button(data, obj);
+ _select_button(data, obj);
if (wd->selected_it)
if ((item = (Elm_Multibuttonentry_Item *)wd->selected_it) != NULL)
elm_object_text_set(wd->entry, "");
_elm_theme_object_set(obj, btn, "multibuttonentry", "btn", elm_widget_style_get(obj));
- edje_object_part_text_set(btn, "elm.btn.text", str_utf8);
+ edje_object_part_text_escaped_set(btn, "elm.btn.text", str_utf8);
edje_object_part_geometry_get(btn, "elm.btn.text", NULL, NULL, &width, &height);
evas_object_size_hint_min_set(btn, width, height);
_entry_resized_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Coord en_x, en_y, en_w, en_h;
- Evas_Coord bx_x, bx_y;
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
evas_object_geometry_get(wd->entry, &en_x, &en_y, &en_w, &en_h);
- evas_object_geometry_get(wd->box, &bx_x, &bx_y, NULL, NULL);
if (wd->focused)
- elm_widget_show_region_set(wd->box, en_x - bx_x, en_y - bx_y, en_w,
- en_h, EINA_TRUE);
+ elm_widget_show_region_set(wd->entry, en_x, en_y, en_w, en_h, EINA_TRUE);
}
static void
{
wd->entry = elm_entry_add(obj);
if (!wd->entry) return;
+ elm_entry_scrollable_set(wd->entry, EINA_TRUE);
elm_entry_single_line_set(wd->entry, EINA_TRUE);
elm_object_text_set(wd->entry, "");
elm_entry_input_panel_enabled_set(wd->entry, EINA_FALSE);
if (wx)
{
+ if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1))
+ mnw = MIN_W_ENTRY;
+
if (mnw != -1 && (w - cw) >= mnw)
ww = w - cw;
else
if (wx)
{
+ if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1))
+ mnw = MIN_W_ENTRY;
+
if (mnw != -1 && (w - cw) >= mnw)
ww = w - cw;
else
if (wx)
{
+ if ((elm_widget_is(obj)) && (!(strcmp(elm_widget_type_get(obj), "entry"))) && (mnw == -1))
+ mnw = MIN_W_ENTRY;
+
if (mnw != -1 && (w - cw) >= mnw)
ww = w - cw;
else
if (part && strcmp(part, "default")) return;
if (!label) return;
item = (Elm_Multibuttonentry_Item *)it;
- edje_object_part_text_set(item->button, "elm.btn.text", label);
+ edje_object_part_text_escaped_set(item->button, "elm.btn.text", label);
_resize_button(item->button, &item->rw, &item->vw);
}
static void
_theme_hook(Evas_Object *obj)
{
+ unsigned int counter = 0;
+ unsigned int i = 1;
+ unsigned int length = 0;
+ const char *str = NULL;
+ char labels[128] ;
+ char buffer[PATH_MAX]={'\0',};
+ char s1[PATH_MAX] = {'\0',};
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_elm_widget_mirrored_reload(obj);
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
else
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
- edje_object_part_text_set(wd->chk, "elm.text", wd->label);
- edje_object_part_text_set(wd->chk, "elm.ontext", wd->ontext);
- edje_object_part_text_set(wd->chk, "elm.offtext", wd->offtext);
+ edje_object_part_text_escaped_set(wd->chk, "elm.text", wd->label);
+ edje_object_part_text_escaped_set(wd->chk, "elm.ontext", wd->ontext);
+ edje_object_part_text_escaped_set(wd->chk, "elm.offtext", wd->offtext);
if (elm_widget_disabled_get(obj))
edje_object_signal_emit(wd->chk, "elm,state,disabled", "elm");
edje_object_message_signal_process(wd->chk);
edje_object_scale_set(wd->chk, elm_widget_scale_get(obj) * _elm_config->scale);
+ //introduced internationalization of additional text parts used in style
+ while (1)
+ {
+ // s1 is used to store part name while buffer is used to store the part's value string
+ snprintf(labels,sizeof(labels),"label_%d",i++);
+ str = edje_object_data_get(wd->chk,labels);
+ if (!str) break;
+ length = strlen(str);
+ while ((str[counter]!= ' ') && (counter < length))
+ counter++;
+ if (counter == length)
+ continue;
+ strncpy(s1, str, counter);
+ s1[counter] = '\0';
+ strncpy(buffer, str + counter, sizeof(buffer));
+ edje_object_part_text_set(wd->chk, s1, E_(buffer));
+ }
_sizing_eval(obj);
}
else
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
edje_object_message_signal_process(wd->chk);
- edje_object_part_text_set(wd->chk, "elm.text", label);
+ edje_object_part_text_escaped_set(wd->chk, "elm.text", label);
}
else if ((item) && (!strcmp(item, "on")))
{
eina_stringshare_replace(&wd->ontext, label);
- edje_object_part_text_set(wd->chk, "elm.ontext", wd->ontext);
+ edje_object_part_text_escaped_set(wd->chk, "elm.ontext", wd->ontext);
}
else if ((item) && (!strcmp(item, "off")))
{
eina_stringshare_replace(&wd->offtext, label);
- edje_object_part_text_set(wd->chk, "elm.offtext", wd->offtext);
+ edje_object_part_text_escaped_set(wd->chk, "elm.offtext", wd->offtext);
}
_sizing_eval(obj);
}
// cut it off at byte mark returned form _check_letter
strncpy(buf, it->label, length);
buf[length] = '\0';
- edje_object_part_text_set(VIEW(it), "elm.text", buf);
+ edje_object_part_text_escaped_set(VIEW(it), "elm.text", buf);
}
if (wd->check_idler)
if (dit)
{
eina_stringshare_replace(&wd->first->label, dit->label);
- edje_object_part_text_set(wd->VIEW(first), "elm.text",
+ edje_object_part_text_escaped_set(wd->VIEW(first), "elm.text",
wd->first->label);
}
dit = eina_list_nth(wd->items, 1);
if (dit)
{
eina_stringshare_replace(&wd->second->label, dit->label);
- edje_object_part_text_set(wd->VIEW(second), "elm.text",
+ edje_object_part_text_escaped_set(wd->VIEW(second), "elm.text",
wd->second->label);
}
// if more than 3 itmes should be displayed
dit = eina_list_nth(wd->items, i);
item2 = eina_list_nth(wd->over_items, i - 2);
eina_stringshare_replace(&item2->label, dit->label);
- edje_object_part_text_set(VIEW(item2), "elm.text", item2->label);
+ edje_object_part_text_escaped_set(VIEW(item2), "elm.text", item2->label);
}
dit = eina_list_nth(wd->items, eina_list_count(wd->items) - 1);
if (dit)
{
eina_stringshare_replace(&wd->last->label, dit->label);
- edje_object_part_text_set(wd->VIEW(last), "elm.text",
+ edje_object_part_text_escaped_set(wd->VIEW(last), "elm.text",
wd->last->label);
}
dit = eina_list_nth(wd->items, eina_list_count(wd->items) - 2);
if (dit)
{
eina_stringshare_replace(&wd->s_last->label, dit->label);
- edje_object_part_text_set(wd->VIEW(s_last), "elm.text",
+ edje_object_part_text_escaped_set(wd->VIEW(s_last), "elm.text",
wd->s_last->label);
}
// if more than 3 itmes should be displayed
dit = eina_list_nth(wd->items, wd->item_count - i);
item2 = eina_list_nth(wd->under_items, i - 3);
eina_stringshare_replace(&item2->label, dit->label);
- edje_object_part_text_set(VIEW(item2), "elm.text",
+ edje_object_part_text_escaped_set(VIEW(item2), "elm.text",
item2->label);
}
}
if (it->label)
{
- edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+ edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
edje_object_signal_callback_add(VIEW(it), "elm,action,click", "", _item_click_cb, it);
}
if (it->icon)
_theme_data_get(Widget_Data *wd)
{
const char* str;
+ Evas_Object *parent;
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");
- if (str) wd->minw = MAX(-1, atoi(str));
- else wd->minw = -1;
+ 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));
+ if (str) wd->minh = MAX(-1, atoi(str)) * elm_scale_get();
else wd->minh = -1;
}
{
_elm_theme_object_set(obj, VIEW(it), "diskselector", "item",
elm_widget_style_get(obj));
- edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+ edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
}
}
else
{
_elm_theme_object_set(obj, VIEW(it), "diskselector", "item",
elm_widget_style_get(obj));
- edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+ edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
}
}
_elm_theme_object_set(obj, wd->right_blank, "diskselector", "item",
}
evas_object_geometry_get(wd->scroller, NULL, &y, &w, &h);
- elm_smart_scroller_child_region_show(wd->scroller, w / wd->display_item_num * i, y, w, h);
+ //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);
+
_select_item(dit);
if (wd->idler)
{
if (part && strcmp(part, "default")) return;
item = (Elm_Diskselector_Item *)it;
eina_stringshare_replace(&item->label, label);
- edje_object_part_text_set(VIEW(item), "elm.text", item->label);
+ edje_object_part_text_escaped_set(VIEW(item), "elm.text", item->label);
}
static const char *
return ((Elm_Diskselector_Item *)it)->icon;
}
-
EAPI Evas_Object *
elm_diskselector_add(Evas_Object *parent)
{
Eina_Bool realized : 1;
Eina_Bool changed : 1;
Eina_Bool updateme : 1;
+ Eina_Bool changeme : 1;
Eina_Bool showme : 1;
Eina_Bool must_recalc : 1;
};
static void _calc_job(void *data);
static void _on_focus_hook(void *data,
Evas_Object *obj);
+static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _changed_job(void *data);
static Eina_Bool _item_multi_select_up(Widget_Data *wd);
static Eina_Bool _item_multi_select_down(Widget_Data *wd);
static Eina_Bool _item_single_select_up(Widget_Data *wd);
static void _decorate_all_item_position(Elm_Gen_Item *it, int itx, int ity);
static void _decorate_all_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on);
static void _decorate_all_item_unrealize(Elm_Gen_Item *it);
+//FIXME: group raise
+#if 0
static void _group_items_recalc(void *data);
+#endif
static void _item_move_after(Elm_Gen_Item *it,
Elm_Gen_Item *after);
static void _item_move_before(Elm_Gen_Item *it,
{
elm_object_signal_emit(wd->obj, "elm,action,focus", "elm");
evas_object_focus_set(wd->obj, EINA_TRUE);
- if ((wd->selected) && (!wd->last_selected_item))
+ if ((wd->items) && (wd->selected) && (!wd->last_selected_item))
wd->last_selected_item = eina_list_data_get(wd->selected);
}
else
if (wd->calc_job) ecore_job_del(wd->calc_job);
if (wd->update_job) ecore_job_del(wd->update_job);
if (wd->queue_idle_enterer) ecore_idle_enterer_del(wd->queue_idle_enterer);
+ if (wd->changed_job) ecore_job_del(wd->changed_job);
if (wd->must_recalc_idler) ecore_idler_del(wd->must_recalc_idler);
if (wd->multi_timer) ecore_timer_del(wd->multi_timer);
if (wd->decorate_it_type) eina_stringshare_del(wd->decorate_it_type);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base",
elm_widget_style_get(obj));
- edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
+ //edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
wd->item_width = wd->item_height = 0;
wd->group_item_width = wd->group_item_height = 0;
wd->minw = wd->minh = wd->realminw = 0;
if (wd->calc_job) ecore_job_del(wd->calc_job);
wd->calc_job = ecore_job_add(_calc_job, wd);
}
+ edje_object_size_min_calc
+ (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
minw = vmw;
minh = vmh;
}
{
if (it->deco_all_view) evas_object_raise(it->deco_all_view);
else evas_object_raise(VIEW(it));
+//FIXME: group raise
+#if 0
if ((it->item->group_item) && (it->item->group_item->realized))
evas_object_raise(it->item->VIEW(group_item));
+#endif
}
it->highlighted = EINA_TRUE;
}
{
if ((it->item->order_num_in & 0x1) ^ it->item->stacking_even)
{
- if (it->deco_all_view) evas_object_lower(it->deco_all_view);
- else evas_object_lower(VIEW(it));
+ if (it->deco_all_view) evas_object_lower(it->deco_all_view);
+ else evas_object_lower(VIEW(it));
}
else
{
- if (it->deco_all_view) evas_object_raise(it->deco_all_view);
- else evas_object_raise(VIEW(it));
+ if (it->deco_all_view) evas_object_raise(it->deco_all_view);
+ else evas_object_raise(VIEW(it));
}
}
it->highlighted = EINA_FALSE;
{
Eina_Inlist *il;
Item_Block *itb = it->item->block;
+ Eina_Bool block_changed;
itb->items = eina_list_remove(itb->items, it);
itb->count--;
itb->changed = EINA_TRUE;
- if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
- it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
+ if (!it->wd->reorder_deleted)
+ {
+ if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
+ it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
+ }
if (itb->count < 1)
{
il = EINA_INLIST_GET(itb);
it->wd->blocks = eina_inlist_remove(it->wd->blocks,
EINA_INLIST_GET(itb));
free(itb);
+ block_changed = EINA_TRUE;
}
else if ((itbn) && ((itbn->count + itb->count) < itb->wd->max_items_per_block + itb->wd->max_items_per_block/2))
{
it->wd->blocks =
eina_inlist_remove(it->wd->blocks, EINA_INLIST_GET(itb));
free(itb);
+ block_changed = EINA_TRUE;
}
}
}
+ if (block_changed)
+ {
+ it->wd->pan_changed = EINA_TRUE;
+ evas_object_smart_changed(it->wd->pan_smart);
+ if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
+ it->wd->calc_job = NULL;
+ }
}
static void
_item_del(Elm_Gen_Item *it)
{
Evas_Object *obj = WIDGET(it);
+ Widget_Data *wd = it->wd;
evas_event_freeze(evas_object_evas_get(obj));
elm_genlist_item_subitems_clear((Elm_Object_Item *)it);
- if (it->wd->show_item == it) it->wd->show_item = NULL;
+ if (wd->show_item == it) wd->show_item = NULL;
if (it->realized) _elm_genlist_item_unrealize(it, EINA_FALSE);
if (it->item->decorate_all_item_realized) _decorate_all_item_unrealize(it);
if (it->item->block) _item_block_del(it);
if (it->item->queued)
- it->wd->queue = eina_list_remove(it->wd->queue, it);
- if (it->wd->anchor_item == it)
+ wd->queue = eina_list_remove(wd->queue, it);
+ if (wd->anchor_item == it)
+ {
+ wd->anchor_item = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
+ if (!wd->anchor_item)
+ wd->anchor_item = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
+ }
+ if (wd->expanded_item == it)
{
- it->wd->anchor_item = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
- if (!it->wd->anchor_item)
- it->wd->anchor_item = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
+ wd->expanded_item = NULL;
+ if (wd->tree_effect_animator)
+ {
+ ecore_animator_del(wd->tree_effect_animator);
+ wd->tree_effect_animator = NULL;
+ }
+ wd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_NONE;
}
- if (it->wd->expanded_item == it) it->wd->expanded_item = NULL;
- if (it->wd->expanded_next_item == it) it->wd->expanded_next_item = NULL;
+ if (wd->expanded_next_item == it) wd->expanded_next_item = NULL;
+ if (wd->move_items) wd->move_items = eina_list_remove(wd->move_items, it);
if (it->parent)
it->parent->item->items = eina_list_remove(it->parent->item->items, it);
if (it->item->swipe_timer)
ecore_timer_del(it->long_timer);
it->long_timer = NULL;
}
- if (!it->wd->wasselected)
+ if ((!it->wd->wasselected) && (!it->flipped))
{
_item_unhighlight(it);
_item_unselect(it);
}
if (dy < 0)
{
- if (ady > adx)
+ if ((ady > adx) && (!it->wd->drag_started))
evas_object_smart_callback_call(WIDGET(it),
SIG_DRAG_START_UP, it);
else
}
else
{
- if (ady > adx)
+ if ((ady > adx) && (!it->wd->drag_started))
evas_object_smart_callback_call(WIDGET(it),
SIG_DRAG_START_DOWN, it);
else
{
if (it != it_tmp) _item_unselect(it_tmp);
}
+ if (it->item->items)
+ {
+ EINA_LIST_FOREACH(it->item->items, l, it_tmp)
+ {
+ if (elm_genlist_item_expanded_get((Elm_Object_Item *) it_tmp))
+ {
+ elm_genlist_item_expanded_set((Elm_Object_Item *)it_tmp,
+ EINA_FALSE);
+ return ECORE_CALLBACK_RENEW;
+ }
+ }
+ }
if (elm_genlist_item_expanded_get((Elm_Object_Item *)it))
{
elm_genlist_item_expanded_set((Elm_Object_Item *)it, EINA_FALSE);
Elm_Gen_Item *it = data;
Evas_Event_Mouse_Down *ev = event_info;
Evas_Coord x, y;
+ Eina_List *l;
+ Evas_Object *item_obj;
if (ev->button != 1) return;
+ if (!it->can_focus)
+ {
+ EINA_LIST_FOREACH(it->content_objs, l, item_obj)
+ {
+ elm_widget_tree_unfocusable_set(item_obj, EINA_FALSE);
+ }
+ if (elm_widget_type_get(obj) == _genlist)
+ {
+ EINA_LIST_FOREACH(it->item->flip_content_objs, l, item_obj)
+ {
+ elm_widget_tree_unfocusable_set(item_obj, EINA_FALSE);
+ }
+ EINA_LIST_FOREACH(it->item->deco_all_content_objs, l, item_obj)
+ {
+ elm_widget_tree_unfocusable_set(item_obj, EINA_FALSE);
+ }
+ }
+ it->can_focus = EINA_TRUE;
+ }
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
{
it->wd->on_hold = EINA_TRUE;
evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it);
evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);
}
+ if (it->long_timer) ecore_timer_del(it->long_timer);
if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer);
it->item->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it);
- if (it->long_timer) ecore_timer_del(it->long_timer);
if (it->realized)
it->long_timer = ecore_timer_add(it->wd->longpress_timeout, _long_press,
it);
if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
}
+ it->wd->reorder_deleted = EINA_FALSE;
edje_object_signal_emit(VIEW(it), "elm,state,reorder,disabled", "elm");
it->wd->reorder_it = it->wd->reorder_rel = NULL;
elm_smart_scroller_hold_set(it->wd->scr, EINA_FALSE);
_multi_move, it);
}
+
+static void
+_mouse_down_scroller(void *data,
+ Evas *evas __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+
+ if (!wd) return;
+ wd->drag_started = EINA_FALSE;
+}
+
+static void
+_mouse_up_scroller(void *data,
+ Evas *evas __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+
+ if (!wd) return;
+ wd->drag_started = EINA_FALSE;
+}
+
+static void
+_mouse_move_scroller(void *data,
+ Evas *evas __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ Evas_Event_Mouse_Move *ev = event_info;
+ Evas_Coord minw = 0, minh = 0, dx, dy, adx, ady;
+
+ if (!wd) return;
+ if (wd->drag_started) return;
+
+ elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+ dx = ev->cur.canvas.x - ev->prev.canvas.x;
+ dy = ev->cur.canvas.y - ev->prev.canvas.y;
+ adx = dx;
+ ady = dy;
+ if (adx < 0) adx = -dx;
+ if (ady < 0) ady = -dy;
+ if (((ady < minh) && (ady > minh / 2)) && (ady > adx))
+ {
+ if (dy < 0)
+ {
+ evas_object_smart_callback_call(data, SIG_DRAG_START_UP, NULL);
+ wd->drag_started = EINA_TRUE;
+ }
+ else
+ {
+ evas_object_smart_callback_call(data, SIG_DRAG_START_DOWN, NULL);
+ wd->drag_started = EINA_TRUE;
+ }
+ }
+}
+
static void
_signal_expand_toggle(void *data,
Evas_Object *obj __UNUSED__,
evas_event_freeze(te);
it->item->nocache_once = EINA_FALSE;
_decorate_item_unrealize(it);
+//FIXME: group raise
+#if 0
if (it->item->group_item)
evas_object_raise(it->item->VIEW(group_item));
+#endif
snprintf(buf, sizeof(buf), "elm,state,%s,passive,finished", it->wd->decorate_it_type);
edje_object_signal_callback_del_full(obj, buf, "elm", _decorate_item_finished_signal_cb, it);
evas_event_thaw(te);
edje_object_signal_emit(it->deco_all_view,
"elm,state,selected", "elm");
}
-
if (elm_widget_item_disabled_get(it))
{
edje_object_signal_emit(VIEW(it),
}
}
-static Eina_List*
+static void
+_content_focused(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Elm_Gen_Item *it = data;
+ if (it) it->defer_unrealize = EINA_TRUE;
+}
+
+static void
+_content_unfocused(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Elm_Gen_Item *it = data;
+ if (it) it->defer_unrealize = EINA_FALSE;
+}
+
+
+static Eina_List *
_item_mode_content_realize(Elm_Gen_Item *it,
Evas_Object *target,
Eina_List **source,
{
const Eina_List *l;
const char *key;
+ Evas_Object *ic;
EINA_LIST_FOREACH(*source, l, key)
{
if (parts && fnmatch(parts, key, FNM_PERIOD))
continue;
- Evas_Object *ic = it->itc->func.content_get
- ((void *)it->base.data, WIDGET(it), l->data);
+ ic = it->itc->func.content_get
+ ((void *)it->base.data, WIDGET(it), key);
if (ic)
{
edje_object_part_swallow(target, key, ic);
evas_object_show(ic);
elm_widget_sub_object_add(WIDGET(it), ic);
- if (it->item->deco_it_view || it->wd->decorate_all_mode)
+ if (it->flipped)
{
- if (elm_widget_item_disabled_get(it))
- elm_widget_disabled_set(ic, EINA_TRUE);
+ // FIXME: if entry calcuates its cursor position correctly and conformant works,
+ // genlist does not need to handle this focus thing.
+ evas_object_smart_callback_add(ic, "focused", _content_focused, it);
+ evas_object_smart_callback_add(ic, "unfocused", _content_unfocused, it);
}
+ if (elm_widget_item_disabled_get(it))
+ elm_widget_disabled_set(ic, EINA_TRUE);
}
}
}
if (s)
{
- edje_object_part_text_set(target, key, s);
+ edje_object_part_text_escaped_set(target, key, s);
free(s);
}
else
edje_object_part_swallow(target, key, ic);
evas_object_show(ic);
elm_widget_sub_object_add(WIDGET(it), ic);
+ evas_object_event_callback_add(ic,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints, it);
+ if (it->flipped)
+ {
+ // FIXME: if entry calcuates its cursor position correctly and conformant works,
+ // genlist does not need to handle this focus thing.
+ evas_object_smart_callback_add(ic, "focused", _content_focused, it);
+ evas_object_smart_callback_add(ic, "unfocused", _content_unfocused, it);
+ }
+
if (elm_widget_item_disabled_get(it))
elm_widget_disabled_set(ic, EINA_TRUE);
}
static void
_item_realize(Elm_Gen_Item *it,
- int in,
- Eina_Bool calc)
+ int in,
+ Eina_Bool calc)
{
const char *treesize;
char buf[1024];
}
it->item->order_num_in = in;
- if (it->item->nocache_once)
+ if ((it->item->nocache_once) && (!it->flipped))
it->item->nocache_once = EINA_FALSE;
else if (!it->item->nocache)
itc = _item_cache_find(it);
&it->item->flip_content_objs);
}
- if (!it->item->mincalcd)
+ if (!it->item->mincalcd || ((it->wd->mode == ELM_LIST_COMPRESS) && (it->item->w != it->item->minw)))
{
Evas_Coord mw = -1, mh = -1;
static void
_item_unrealize_cb(Elm_Gen_Item *it)
{
+ Evas_Object *content;
+ elm_widget_stringlist_free(it->item->flip_contents);
+ it->item->flip_contents = NULL;
+ EINA_LIST_FREE(it->item->flip_content_objs, content)
+ evas_object_del(content);
+
if (it->item->nocache_once || it->item->nocache)
{
evas_object_del(VIEW(it));
_item_position(it, it->deco_all_view, it->item->scrl_x, it->item->old_scrl_y);
else
_item_position(it, VIEW(it), it->item->scrl_x, it->item->old_scrl_y);
+//FIXME : group raise
+#if 0
_group_items_recalc(it->wd);
+#endif
if ((it->wd->reorder_pan_move) ||
(down && it->item->old_scrl_y >= it->item->scrl_y) ||
{
const Eina_List *l;
Elm_Gen_Item *it;
+//FIXME : group raise
+#if 0
Elm_Gen_Item *git;
+#endif
Evas_Coord y = 0, ox, oy, ow, oh, cvx, cvy, cvw, cvh;
Eina_Bool vis = EINA_FALSE;
+ Evas_Coord minh = 0;
evas_event_freeze(evas_object_evas_get(itb->wd->obj));
evas_object_geometry_get(itb->wd->pan_smart, &ox, &oy, &ow, &oh);
vis = (ELM_RECTS_INTERSECT(it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
cvx, cvy, cvw, cvh));
+//FIXME : group raise
+#if 0
if (!it->group)
+#endif
{
if ((itb->realized) && (!it->realized))
{
{
if (it->wd->reorder_mode)
y += _get_space_for_reorder_item(it);
+//FIXME : group raise
+#if 0
git = it->item->group_item;
if (git)
{
git->item->scrl_y = (it->item->scrl_y + it->item->h) - git->item->h;
git->item->want_realize = EINA_TRUE;
}
+#endif
if ((it->wd->reorder_it) && (it->item->old_scrl_y != it->item->scrl_y))
{
if (!it->item->move_effect_enabled)
else
{
if (!it->wd->tree_effect_animator)
- _elm_genlist_item_unrealize(it, EINA_FALSE);
+ {
+ it->want_unrealize = EINA_TRUE;
+ _elm_genlist_item_unrealize(it, EINA_FALSE);
+ }
}
}
in++;
}
+//FIXME : group raise
+#if 0
else
{
if (vis) it->item->want_realize = EINA_TRUE;
}
+#endif
y += it->item->h;
+ minh += it->item->minh;
}
+ if (!itb->wd->reorder_it) itb->minh = minh;
evas_event_thaw(evas_object_evas_get(itb->wd->obj));
evas_event_thaw_eval(evas_object_evas_get(itb->wd->obj));
}
+//FIXME: group raise
+#if 0
static void
_group_items_recalc(void *data)
{
evas_event_thaw(evas_object_evas_get(wd->obj));
evas_event_thaw_eval(evas_object_evas_get(wd->obj));
}
+#endif
+
+static void
+_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Elm_Gen_Item *it = data;
+ if (!it) return;
+ if (it->want_unrealize) return;
+ it->item->mincalcd = EINA_FALSE;
+ it->item->block->changeme = EINA_TRUE;
+ if (it->wd->changed_job) ecore_job_del(it->wd->changed_job);
+ it->wd->changed_job = ecore_job_add(_changed_job, it->wd);
+}
static Eina_Bool
_must_recalc_idler(void *data)
_scroll_item(Widget_Data *wd)
{
Elm_Gen_Item *it = NULL;
+//FIXME: group raise
+#if 0
Evas_Coord gith = 0;
+#endif
Evas_Coord ow, oh, dx = 0, dy = 0, dw = 0, dh = 0;
if (!wd->show_item) return;
switch (wd->scrollto_type)
{
case ELM_GENLIST_ITEM_SCROLLTO_TOP:
+//FIXME: group raise
+#if 0
if (it->item->group_item) gith = it->item->group_item->item->h;
dy -= gith;
+#endif
break;
case ELM_GENLIST_ITEM_SCROLLTO_MIDDLE:
dy += ((it->item->h / 2) - (oh / 2));
- (wd->expanded_item->y + wd->expanded_item->item->block->y) > oh))
{
it = wd->expanded_item;
+ dx = it->x + it->item->block->x;
+ dy = it->y + it->item->block->y;
+//FIXME: group raise
+#if 0
if (it->item->group_item) gith = it->item->group_item->item->h;
dx = it->x + it->item->block->x;
dy = it->y + it->item->block->y - gith;
+#endif
dw = it->item->block->w;
}
else
{
+//FIXME: group raise
+#if 0
if ((it->item->group_item) && (wd->pan_y > (it->y + it->item->block->y)))
gith = it->item->group_item->item->h;
dy -= gith;
+#endif
dh = it->item->h;
}
break;
itminw = it->item->minw;
itminh = it->item->minh;
- it->item->updateme = EINA_FALSE;
if (it->realized)
{
_elm_genlist_item_unrealize(it, EINA_FALSE);
}
if ((it->item->minw != itminw) || (it->item->minh != itminh))
recalc = EINA_TRUE;
+ it->item->updateme = EINA_FALSE;
}
num++;
}
}
static void
+_changed_job(void *data)
+{
+ Widget_Data *wd = data; Eina_List *l2;
+ Item_Block *itb;
+ int num, num0, position = 0;
+ Eina_Bool width_changed = EINA_FALSE, height_changed = EINA_FALSE;
+ if (!wd) return;
+ wd->changed_job = NULL;
+ num = 0;
+ EINA_INLIST_FOREACH(wd->blocks, itb)
+ {
+ Evas_Coord itminw, itminh;
+ Elm_Gen_Item *it;
+
+ if (!itb->changeme)
+ {
+ num += itb->count;
+ if (position)
+ _item_block_position(itb, num);
+ continue;
+ }
+ num0 = num;
+ width_changed = height_changed = EINA_FALSE;
+ EINA_LIST_FOREACH(itb->items, l2, it)
+ {
+ if ((!it->item->mincalcd) && (it->realized))
+ {
+ Evas_Coord mw = -1, mh = -1;
+ itminw = it->item->minw;
+ itminh = it->item->minh;
+
+ if (it->wd->mode == ELM_LIST_COMPRESS) mw = it->wd->w;
+ if (it->select_mode != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
+ elm_coords_finger_size_adjust(1, &mw, 1, &mh);
+ if (it->wd->mode == ELM_LIST_COMPRESS) mw = it->wd->prev_viewport_w;
+ edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
+ if (it->select_mode != ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
+ elm_coords_finger_size_adjust(1, &mw, 1, &mh);
+ if (mw > itb->w)
+ width_changed = EINA_TRUE;
+ else
+ mw = itb->w;
+ it->item->w = it->item->minw = mw;
+ it->item->h = it->item->minh = mh;
+ it->item->mincalcd = EINA_TRUE;
+
+ //if ((it->item->minw != itminw) || (it->item->minh != itminh))
+ //if ((it->item->minh != itminh))
+ // recalc = 1;
+ if ((it->item->minw != itminw))
+ width_changed = EINA_TRUE;
+ if ((it->item->minh != itminh))
+ height_changed = EINA_TRUE;
+
+ if ((!it->wd->group_item_width) && (it->group))
+ {
+ it->wd->group_item_width = mw;
+ it->wd->group_item_height = mh;
+ }
+ else if ((!it->wd->item_width) && (it->item->type == ELM_GENLIST_ITEM_NONE))
+ {
+ it->wd->item_width = mw;
+ it->wd->item_height = mh;
+ }
+ }
+ num++;
+ }
+ itb->changeme = EINA_FALSE;
+ // TODO: why this is separated.
+ if (height_changed)
+ {
+ position = 1;
+ itb->changed = EINA_TRUE;
+ _item_block_recalc(itb, num0, 0);
+ _item_block_position(itb, num0);
+ }
+ else if (width_changed)
+ {
+ _item_block_position(itb, num0);
+ }
+ }
+ if (position)
+ {
+ if (wd->calc_job) ecore_job_del(wd->calc_job);
+ wd->calc_job = ecore_job_add(_calc_job, wd);
+ }
+}
+
+static void
_pan_set(Evas_Object *obj,
Evas_Coord x,
Evas_Coord y)
Item_Block *itb;
if (!sd) return;
+ // Evas_Coord ow, oh;
+ // evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
+ // ow = sd->wd->minw - ow;
+ // if (ow < 0) ow = 0;
+ // oh = sd->wd->minh - oh;
+ // if (oh < 0) oh = 0;
+ // if (x < 0) x = 0;
+ // if (y < 0) y = 0;
+ // if (x > ow) x = ow;
+ // if (y > oh) y = oh;
if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return;
sd->wd->pan_x = x;
sd->wd->pan_y = y;
Item_Block *itb;
Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
int in = 0;
+//FIXME: group raise
+#if 0
Elm_Gen_Item *git;
Eina_List *l;
+#endif
if (!sd) return;
evas_event_freeze(evas_object_evas_get(obj));
}
evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
+ sd->wd->prev_viewport_w = ow;
evas_output_viewport_get(evas_object_evas_get(obj), &cvx, &cvy, &cvw, &cvh);
+//FIXME: group raise
+#if 0
EINA_LIST_FOREACH(sd->wd->group_items, l, git)
{
git->item->want_realize = EINA_FALSE;
}
+#endif
if (sd->wd->tree_effect_enabled && (sd->wd->move_effect_mode != ELM_GENLIST_TREE_EFFECT_NONE))
{
cvx, cvy, cvw, cvh))
{
if ((!itb->realized) || (itb->changed))
- _item_block_realize(itb);
+ {
+ _item_block_realize(itb);
+
+ if (sd->wd->calc_job) ecore_job_del(sd->wd->calc_job);
+ sd->wd->calc_job = NULL;
+ _calc_job(sd->wd);
+ }
_item_block_position(itb, in);
}
else
}
in += itb->count;
}
+//FIXME: group raise
+#if 0
if ((!sd->wd->reorder_it) || (sd->wd->reorder_pan_move))
_group_items_recalc(sd->wd);
+#endif
if ((sd->wd->reorder_mode) && (sd->wd->reorder_it))
{
if (sd->wd->pan_y != sd->wd->reorder_old_pan_y)
if (it->flipped) edje_object_signal_emit(it->deco_all_view, "elm,state,flip,enabled", "elm");
if (!it->item->deco_all_contents)
it->item->deco_all_contents =
- elm_widget_stringlist_get(edje_object_data_get(it->deco_all_view, "contents"));
+ elm_widget_stringlist_get(edje_object_data_get(it->deco_all_view, "decorate_contents"));
it->item->deco_all_content_objs =
_item_mode_content_realize(it, it->deco_all_view,
&it->item->deco_all_contents, NULL,
_decorate_all_item_position(it, it->item->scrl_x, it->item->scrl_y);
evas_object_show(it->deco_all_view);
+ if (it->selected) edje_object_signal_emit(it->deco_all_view, "elm,state,selected", "elm");
+
it->item->decorate_all_item_realized = EINA_TRUE;
it->want_unrealize = EINA_FALSE;
}
wd->generation = 1;
wd->scr = elm_smart_scroller_add(e);
+ evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_DOWN,
+ _mouse_down_scroller, obj);
+ evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_UP,
+ _mouse_up_scroller, obj);
+ evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_MOUSE_MOVE,
+ _mouse_move_scroller, obj);
elm_smart_scroller_widget_set(wd->scr, obj);
elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base",
elm_widget_style_get(obj));
wd->item_cache_max = wd->max_items_per_block * 2;
wd->longpress_timeout = _elm_config->longpress_timeout;
wd->highlight = EINA_TRUE;
+ wd->tree_effect_enabled = _elm_config->effect_enable;
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
void
_item_select(Elm_Gen_Item *it)
{
+ Eina_List *l;
Evas_Object *obj = WIDGET(it);
+ Evas_Object *item_obj;
if ((it->generation < it->wd->generation) || (it->decorate_it_set) ||
(it->select_mode == ELM_OBJECT_SELECT_MODE_NONE) ||
evas_object_ref(obj);
it->walking++;
it->wd->walking++;
+ if (it->wd->last_selected_item &&
+ (it != (Elm_Gen_Item *) it->wd->last_selected_item))
+ {
+ Elm_Gen_Item *_lsit = (Elm_Gen_Item *)it->wd->last_selected_item;
+
+ EINA_LIST_FOREACH(_lsit->content_objs, l, item_obj)
+ {
+ elm_widget_focused_object_clear(item_obj);
+ elm_widget_tree_unfocusable_set(item_obj, EINA_TRUE);
+ }
+ if (elm_widget_type_get(obj) == _genlist)
+ {
+ EINA_LIST_FOREACH(_lsit->item->flip_content_objs, l, item_obj)
+ {
+ elm_widget_focused_object_clear(item_obj);
+ elm_widget_tree_unfocusable_set(item_obj, EINA_TRUE);
+ }
+ EINA_LIST_FOREACH(_lsit->item->deco_all_content_objs, l, item_obj)
+ {
+ elm_widget_focused_object_clear(item_obj);
+ elm_widget_tree_unfocusable_set(item_obj, EINA_TRUE);
+ }
+ }
+ _lsit->can_focus = EINA_FALSE;
+ }
if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), it);
if (it->generation == it->wd->generation)
evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, it);
return edje_object_part_swallow_get(VIEW(it), part);
}
+static void
+_item_content_set_hook(Elm_Gen_Item *it, const char *part, Evas_Object *content)
+{
+ if (content && part)
+ {
+ it->content_objs = eina_list_append(it->content_objs, content);
+ edje_object_part_swallow(VIEW(it), part, content);
+ }
+}
+
+static Evas_Object *
+_item_content_unset_hook(Elm_Gen_Item *it, const char *part)
+{
+ Evas_Object *obj;
+ obj = edje_object_part_swallow_get(VIEW(it), part);
+ if (!obj) return NULL;
+ it->content_objs = eina_list_remove(it->content_objs, obj);
+ edje_object_part_unswallow(VIEW(it), obj);
+ return obj;
+}
+
static const char *
_item_text_get_hook(Elm_Gen_Item *it, const char *part)
{
it->func.func = func;
it->func.data = func_data;
elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
+ elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
+ elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
elm_widget_item_disable_hook_set(it, _item_disable_hook);
elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
if (type & ELM_GENLIST_ITEM_GROUP) it->group++;
it->item->expanded_depth = 0;
ELM_GEN_ITEM_SETUP(it);
+ it->mouse_cursor = NULL;
+ it->can_focus = EINA_TRUE;
if (it->parent)
{
if (it->parent->group)
static void
_elm_genlist_move_items_set(Elm_Gen_Item *it)
{
- Eina_List *l;
+ Eina_List *l, *ll;
Elm_Gen_Item *it2 = NULL;
Evas_Coord ox, oy, ow, oh, dh = 0;
if (it->item->expanded)
{
it->wd->move_items = elm_genlist_realized_items_get(it->wd->obj);
- EINA_LIST_FOREACH(it->wd->move_items, l, it2)
+ EINA_LIST_FOREACH_SAFE(it->wd->move_items, l, ll, it2)
{
if (it2 == it->wd->expanded_next_item) break;
it->wd->move_items = eina_list_remove(it->wd->move_items, it2);
return ((Elm_Gen_Item *)it)->item->expanded_depth;
}
+EINA_DEPRECATED EAPI void
+elm_genlist_item_display_only_set(Elm_Object_Item *it,
+ Eina_Bool display_only)
+{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ display_only = !!display_only;
+
+ if (display_only)
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ else
+ {
+ Elm_Object_Select_Mode oldmode = elm_genlist_item_select_mode_get(it);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ }
+}
+
+EINA_DEPRECATED EAPI Eina_Bool
+elm_genlist_item_display_only_get(const Elm_Object_Item *it)
+{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *)it;
+ if (_it->generation < _it->wd->generation) return EINA_FALSE;
+ Elm_Object_Select_Mode oldmode = elm_genlist_item_select_mode_get(it);
+ if (oldmode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
+ return EINA_TRUE;
+ return EINA_FALSE;
+}
+
static Eina_Bool
_elm_genlist_item_compute_coordinates(Elm_Object_Item *it,
Elm_Genlist_Item_Scrollto_Type type,
{
if (it->item->type != ELM_GENLIST_ITEM_GROUP)
{
- if (it->selected) _item_unselect(it);
if (it->itc->decorate_all_item_style)
_decorate_all_item_realize(it, EINA_TRUE);
}
if (!it->realized) return;
if (it->wd->reorder_it == it) return;
+ if (it->defer_unrealize && !it->item->updateme) return;
evas_event_freeze(evas_object_evas_get(WIDGET(it)));
if (!calc)
EINA_LIST_FREE(it->content_objs, content)
evas_object_del(content);
- if (elm_widget_type_get(WIDGET(it)) == _genlist)
- {
- elm_widget_stringlist_free(it->item->flip_contents);
- it->item->flip_contents = NULL;
- EINA_LIST_FREE(it->item->flip_content_objs, content)
- evas_object_del(content);
- }
-
it->unrealize_cb(it);
it->realized = EINA_FALSE;
if (wd->tree_effect_animator)
{
if (wd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_CONTRACT)
- _item_subitems_clear(wd->expanded_item);
+ _item_subitems_clear(wd->expanded_item);
EINA_LIST_FOREACH(wd->expanded_item->item->items, l, it)
{
it->item->tree_effect_finished = EINA_TRUE;
_tree_effect_animator_cb(void *data)
{
Widget_Data *wd = data;
- if (!wd) return EINA_FALSE;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
Elm_Gen_Item *it = NULL, *it2, *expanded_next_it;
const Eina_List *l;
const char *stacking;
if (it->level != level) continue;
+
+//FIXME: Need to check. This cause one less items show up.
+// if(i > wd->max_supp_items_count) break;
+
o = edje_object_add(evas_object_evas_get(obj));
VIEW(it) = o;
edje_object_mirrored_set(VIEW(it), rtl);
elm_widget_style_get(obj));
}
- edje_object_part_text_set(o, "elm.text", it->letter);
+ edje_object_part_text_escaped_set(o, "elm.text", it->letter);
edje_object_size_min_restricted_calc(o, &mw, &mh, 0, 0);
evas_object_size_hint_min_set(o, mw, mh);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
}
if (!label) label = strdup("");
if (!last) last = strdup("");
- edje_object_part_text_set(wd->base, "elm.text.body", label);
- edje_object_part_text_set(wd->base, "elm.text", last);
+ edje_object_part_text_escaped_set(wd->base, "elm.text.body", label);
+ edje_object_part_text_escaped_set(wd->base, "elm.text", last);
free(label);
free(last);
}
if (!wd) return EINA_FALSE;
return wd->horizontal;
}
-
-
struct _Overlay_Group
{
Widget_Data *wd;
+ double lon, lat;
Elm_Map_Overlay *overlay; // virtual group type overlay
Elm_Map_Overlay *clas; // class overlay for this virtual group
Overlay_Default *ovl; // rendered overlay
{
Widget_Data *wd;
+ Eina_Bool visible : 1;
Eina_Bool paused : 1;
Eina_Bool hide : 1;
Evas_Coord zoom_min;
Eina_List *names;
Eina_List *overlays;
+ Eina_List *group_overlays;
+ Eina_List *all_overlays;
};
static char *_mapnik_url_cb(const Evas_Object *obj __UNUSED__, int x, int y, int zoom);
static const char SIG_ZOOM_START[] = "zoom,start";
static const char SIG_ZOOM_STOP[] = "zoom,stop";
static const char SIG_ZOOM_CHANGE[] = "zoom,change";
+static const char SIG_LOADED[] = "loaded";
static const char SIG_TILE_LOAD[] = "tile,load";
static const char SIG_TILE_LOADED[] = "tile,loaded";
static const char SIG_TILE_LOADED_FAIL[] = "tile,loaded,fail";
{SIG_ZOOM_START, ""},
{SIG_ZOOM_STOP, ""},
{SIG_ZOOM_CHANGE, ""},
+ {SIG_LOADED, ""},
{SIG_TILE_LOAD, ""},
{SIG_TILE_LOADED, ""},
{SIG_TILE_LOADED_FAIL, ""},
{
if (wd->src_tile->geo_to_coord(wd->obj, zoom, lon, lat, size, x, y)) return;
}
-
if (x) *x = floor((lon + 180.0) / 360.0 * size);
if (y)
*y = floor((1.0 - log(tan(lat * ELM_PI / 180.0) + (1.0 / cos(lat * ELM_PI / 180.0)))
gi->job = NULL;
gi->wd->download_num--;
if (!gi->wd->download_num)
- edje_object_signal_emit(elm_smart_scroller_edje_object_get(gi->wd->scr),
- "elm,state,busy,stop", "elm");
+ {
+ edje_object_signal_emit(elm_smart_scroller_edje_object_get(gi->wd->scr),
+ "elm,state,busy,stop", "elm");
+ evas_object_smart_callback_call(gi->wd->obj, SIG_LOADED, NULL);
+ }
}
static Eina_Bool
wd->download_list = eina_list_remove(wd->download_list, gi);
wd->try_num++;
wd->download_num++;
- evas_object_smart_callback_call(gi->wd->obj, SIG_TILE_LOAD,
+ evas_object_smart_callback_call(wd->obj, SIG_TILE_LOAD,
NULL);
if (wd->download_num == 1)
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
if (!wd->paused)
{
- Evas_Event_Mouse_Wheel *ev = (Evas_Event_Mouse_Wheel*) event_info;
+ Evas_Event_Mouse_Wheel *ev = event_info;
zoom_do(wd, wd->zoom_detail - ((double)ev->z / 10));
}
}
_overlay_default_layout_text_update(Overlay_Default *ovl, const char *text)
{
if (!ovl->content && !ovl->icon && !ovl->clas_content && !ovl->clas_icon)
- edje_object_part_text_set(elm_layout_edje_get(ovl->layout), "elm.text",
+ edje_object_part_text_escaped_set(elm_layout_edje_get(ovl->layout), "elm.text",
text);
}
{
EINA_SAFETY_ON_NULL_RETURN(grp);
if (!grp->ovl) return;
- char text[32];
+ char text[32];
_overlay_default_coord_set(grp->ovl, x, y);
+ _coord_to_region_convert(grp->wd, x, y, grp->wd->size.w, &grp->lon, &grp->lat);
+
if (grp->members) eina_list_free(grp->members);
grp->members = members;
snprintf(text, sizeof(text), "%d", eina_list_count(members));
}
static void
-_overlay_group_region_get(Overlay_Group *grp, double *lon, double *lat)
-{
- EINA_SAFETY_ON_NULL_RETURN(grp);
- Evas_Coord xx, yy;
- _overlay_default_coord_get(grp->ovl, &xx, &yy, NULL, NULL);
- _coord_to_canvas(grp->wd, xx, yy, &xx, &yy);
- elm_map_canvas_to_region_convert(grp->wd->obj, xx, yy, lon, lat);
-}
-
-static void
_overlay_group_icon_update(Overlay_Group *grp, const Evas_Object *icon)
{
EINA_SAFETY_ON_NULL_RETURN(grp);
}
static void
-_overlay_bubble_hide(Overlay_Bubble *bubble)
-{
- EINA_SAFETY_ON_NULL_RETURN(bubble);
- if (bubble->obj) evas_object_hide(bubble->obj);
-}
-
-static void
_overlay_bubble_coord_update(Overlay_Bubble *bubble)
{
EINA_SAFETY_ON_NULL_RETURN(bubble);
- if (!(bubble->pobj))
+ if (bubble->pobj)
+ {
+ Evas_Coord x, y, w, h;
+ evas_object_geometry_get(bubble->pobj, &x, &y, &w, &h);
+ bubble->x = x + (w / 2);
+ bubble->y = y - (bubble->h / 2);
+ _canvas_to_coord(bubble->wd, bubble->x, bubble->y,
+ &(bubble->x), &(bubble->y));
+ _coord_to_region_convert(bubble->wd, bubble->x, bubble->y,
+ bubble->wd->size.w,
+ &(bubble->lon), &(bubble->lat));
+ }
+ else
{
_region_to_coord_convert(bubble->wd, bubble->lon, bubble->lat,
bubble->wd->size.w, &bubble->x, &bubble->y);
}
}
-static void
-_overlay_bubble_show(Overlay_Bubble *bubble)
+static Eina_Bool
+_overlay_bubble_show_hide(Overlay_Bubble *bubble, Eina_Bool visible)
{
- EINA_SAFETY_ON_NULL_RETURN(bubble);
- if (!(bubble->pobj))
+ EINA_SAFETY_ON_NULL_RETURN_VAL(bubble, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(bubble->obj, EINA_FALSE);
+
+ if (!visible) evas_object_hide(bubble->obj);
+ else if (bubble->pobj && !evas_object_visible_get(bubble->pobj))
+ {
+ evas_object_hide(bubble->obj);
+ visible = EINA_FALSE;
+ }
+ else
{
_coord_to_canvas(bubble->wd, bubble->x, bubble->y,
- &(bubble->x), &(bubble->y));
+ &(bubble->x), &(bubble->y));
_obj_place(bubble->obj, bubble->x - (bubble->w /2),
bubble->y - (bubble->h /2), bubble->w, bubble->h);
+ evas_object_raise(bubble->obj);
}
-}
-
-static void
-_overlay_bubble_chase(Overlay_Bubble *bubble)
-{
- EINA_SAFETY_ON_NULL_RETURN(bubble);
- EINA_SAFETY_ON_NULL_RETURN(bubble->pobj);
-
- Evas_Coord x, y, w;
- evas_object_geometry_get(bubble->pobj, &x, &y, &w, NULL);
- x = x + (w / 2) - (bubble->w / 2);
- y = y - bubble->h;
- _obj_place(bubble->obj, x, y, bubble->w, bubble->h);
- evas_object_raise(bubble->obj);
-}
-
-static void
-_overlay_bubble_hide_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- EINA_SAFETY_ON_NULL_RETURN(data);
- _overlay_bubble_hide(data);
-}
-
-static void
-_overlay_bubble_chase_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
- EINA_SAFETY_ON_NULL_RETURN(data);
- _overlay_bubble_chase(data);
+ return visible;
}
static void
evas_object_del(bubble->bx);
evas_object_del(bubble->sc);
evas_object_del(bubble->obj);
- if (bubble->pobj)
- {
- evas_object_event_callback_del_full(bubble->pobj, EVAS_CALLBACK_HIDE,
- _overlay_bubble_hide_cb, bubble);
- evas_object_event_callback_del_full(bubble->pobj, EVAS_CALLBACK_SHOW,
- _overlay_bubble_chase_cb, bubble);
- evas_object_event_callback_del_full(bubble->pobj, EVAS_CALLBACK_MOVE,
- _overlay_bubble_chase_cb, bubble);
- }
free(bubble);
}
bubble->obj = edje_object_add(evas_object_evas_get(overlay->wd->obj));
_elm_theme_object_set(overlay->wd->obj, bubble->obj , "map", "marker_bubble",
elm_widget_style_get(overlay->wd->obj));
- evas_object_event_callback_add(bubble->obj, EVAS_CALLBACK_MOUSE_UP,
- _overlay_bubble_chase_cb, bubble);
evas_object_event_callback_add(bubble->obj, EVAS_CALLBACK_MOUSE_DOWN,
_overlay_clicked_cb, overlay);
if (text < 1) snprintf(buf, sizeof(buf), "%d m", (int)(text * 1000));
else snprintf(buf, sizeof(buf), "%d km", (int)text);
- edje_object_part_text_set(elm_layout_edje_get(ovl->obj), "elm.text", buf);
+ edje_object_part_text_escaped_set(elm_layout_edje_get(ovl->obj), "elm.text", buf);
_obj_place(ovl->obj, ovl->x, ovl->y, w, ovl->h);
}
sum_y = (sum_y + by) / (cnt + 1);
grp_membs = eina_list_append(grp_membs, boss);
_overlay_group_coord_member_update(boss->grp, sum_x, sum_y, grp_membs);
+
+ // Append group to all overlay list
+ boss->wd->group_overlays = eina_list_append(boss->wd->group_overlays,
+ boss->grp->overlay);
}
}
_overlay_show(Elm_Map_Overlay *overlay)
{
Widget_Data *wd = overlay->wd;
- Eina_Bool hide = EINA_FALSE;
-
- if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) return;
if (overlay->paused) return;
- if ((overlay->grp->clas) && (overlay->grp->clas->paused)) return;
+ if ((overlay->grp) && (overlay->grp->clas) &&
+ (overlay->grp->clas->paused)) return;
- if (((overlay->grp->in) || (overlay->hide) ||
- (overlay->zoom_min > wd->zoom)))
- hide = EINA_TRUE;
- if ((overlay->grp->clas) && ((overlay->grp->clas->hide) ||
- (overlay->grp->clas->zoom_min > wd->zoom)))
- hide = EINA_TRUE;
+ overlay->visible = EINA_TRUE;
+ if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
+ {
+ overlay->visible = EINA_FALSE;
+ return;
+ }
+ if (overlay->grp)
+ {
+ if ((overlay->grp->in) ||
+ (overlay->hide) || (overlay->zoom_min > wd->zoom))
+ overlay->visible = EINA_FALSE;
+
+ if ((overlay->grp->clas) &&
+ ((overlay->grp->clas->hide) ||
+ (overlay->grp->clas->zoom_min > wd->zoom)))
+ overlay->visible = EINA_FALSE;
+ }
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
{
- if (hide) _overlay_default_hide(overlay->ovl);
- else _overlay_default_show(overlay->ovl);
+ if (overlay->visible) _overlay_default_show(overlay->ovl);
+ else _overlay_default_hide(overlay->ovl);
+ }
+ else if (overlay->type == ELM_MAP_OVERLAY_TYPE_GROUP)
+ {
+ if (overlay->visible) _overlay_group_show(overlay->ovl);
+ else _overlay_group_hide(overlay->ovl);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
{
- if (hide) _overlay_bubble_hide(overlay->ovl);
- else _overlay_bubble_show(overlay->ovl);
+ overlay->visible = _overlay_bubble_show_hide(overlay->ovl,
+ overlay->visible);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_ROUTE)
{
- if (hide) _overlay_route_hide(overlay->ovl);
- else _overlay_route_show(overlay->ovl);
+ if (overlay->visible) _overlay_route_show(overlay->ovl);
+ else _overlay_route_hide(overlay->ovl);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_LINE)
{
- if (hide) _overlay_line_hide(overlay->ovl);
- else _overlay_line_show(overlay->ovl);
+ if (overlay->visible) _overlay_line_show(overlay->ovl);
+ else _overlay_line_hide(overlay->ovl);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_POLYGON)
{
- if (hide) _overlay_polygon_hide(overlay->ovl);
- else _overlay_polygon_show(overlay->ovl);
+ if (overlay->visible) _overlay_polygon_show(overlay->ovl);
+ else _overlay_polygon_hide(overlay->ovl);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CIRCLE)
{
- if (hide) _overlay_circle_hide(overlay->ovl);
- else _overlay_circle_show(overlay->ovl);
+ if (overlay->visible) _overlay_circle_show(overlay->ovl);
+ else _overlay_circle_hide(overlay->ovl);
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_SCALE)
{
- if (hide) _overlay_scale_hide(overlay->ovl);
- else _overlay_scale_show(overlay->ovl);
+ if (overlay->visible) _overlay_scale_show(overlay->ovl);
+ else _overlay_scale_hide(overlay->ovl);
}
}
Eina_List *l, *ll;
Elm_Map_Overlay *overlay;
- // Reset group & Update overlays coord
+ eina_list_free(wd->group_overlays);
+ wd->group_overlays = NULL;
+
EINA_LIST_FOREACH(wd->overlays, l, overlay)
{
- if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) continue;
+ // Reset groups
+ if ((overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) ||
+ (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)) continue;
overlay->grp->in = EINA_FALSE;
overlay->grp->boss = EINA_FALSE;
+ _overlay_group_hide(overlay->grp);
+ // Update overlays' coord
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
_overlay_default_coord_update(overlay->ovl);
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
}
}
- // Place overlays
+ // Place group overlays and overlays
+ EINA_LIST_FOREACH(wd->group_overlays, l, overlay) _overlay_show(overlay);
EINA_LIST_FOREACH(wd->overlays, l, overlay) _overlay_show(overlay);
-
- // Place group overlays on top of overlays
- EINA_LIST_FOREACH(wd->overlays, l, overlay)
- {
- if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) continue;
- if (overlay->grp->boss) _overlay_group_show(overlay->grp);
- else _overlay_group_hide(overlay->grp);
- }
}
static Evas_Object *
EINA_LIST_FOREACH_SAFE(wd->overlays, l, ll, overlay)
elm_map_overlay_del(overlay);
eina_list_free(wd->overlays);
+ eina_list_free(wd->group_overlays);
+ eina_list_free(wd->all_overlays);
EINA_LIST_FREE(wd->track, track) evas_object_del(track);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
_mouse_up, wd);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_WHEEL,
- _mouse_wheel_cb,wd);
+ _mouse_wheel_cb, wd);
wd->obj = obj;
wd->scr = elm_smart_scroller_add(e);
#endif
}
+EAPI Eina_List *
+elm_map_overlays_get(Evas_Object *obj)
+{
+#ifdef HAVE_ELEMENTARY_ECORE_CON
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(wd, NULL);
+
+ Eina_List *l;
+ Elm_Map_Overlay *ovl;
+
+ eina_list_free(wd->all_overlays);
+ wd->all_overlays = NULL;
+
+ EINA_LIST_FOREACH(wd->overlays, l, ovl)
+ wd->all_overlays = eina_list_append(wd->all_overlays, ovl);
+ EINA_LIST_FOREACH(wd->group_overlays, l, ovl)
+ wd->all_overlays = eina_list_append(wd->all_overlays, ovl);
+
+ return wd->all_overlays;
+#else
+ (void) obj;
+ return NULL;
+#endif
+}
+
EAPI void
elm_map_overlay_del(Elm_Map_Overlay *overlay)
{
#endif
}
+EAPI Eina_Bool
+elm_map_overlay_visible_get(const Elm_Map_Overlay *overlay)
+{
+#ifdef HAVE_ELEMENTARY_ECORE_CON
+ EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wd, EINA_FALSE);
+ ELM_CHECK_WIDTYPE(overlay->wd->obj, widtype) EINA_FALSE;
+
+ return overlay->visible;
+#else
+ (void) overlay;
+ return EINA_FALSE;
+#endif
+}
+
EAPI void
elm_map_overlay_show(Elm_Map_Overlay *overlay)
{
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
{
Overlay_Bubble *ovl = overlay->ovl;
+ ovl->pobj = NULL;
ovl->lon = lon;
ovl->lat = lat;
}
if (overlay->type == ELM_MAP_OVERLAY_TYPE_GROUP)
{
Overlay_Group *ovl = overlay->ovl;
- _overlay_group_region_get(ovl, lon, lat);
+ if (lon) *lon = ovl->lon;
+ if (lat) *lat = ovl->lat;
}
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
{
Evas_Object *pobj = _overlay_obj_get(parent);
if (!pobj) return;
- if (ovl->pobj)
- {
- evas_object_event_callback_del_full(ovl->pobj, EVAS_CALLBACK_HIDE,
- _overlay_bubble_hide_cb, ovl);
- evas_object_event_callback_del_full(ovl->pobj, EVAS_CALLBACK_SHOW,
- _overlay_bubble_chase_cb, ovl);
- evas_object_event_callback_del_full(ovl->pobj, EVAS_CALLBACK_MOVE,
- _overlay_bubble_chase_cb, ovl);
- }
-
ovl->pobj = pobj;
- evas_object_event_callback_add(ovl->pobj, EVAS_CALLBACK_HIDE,
- _overlay_bubble_hide_cb, ovl);
- evas_object_event_callback_add(ovl->pobj, EVAS_CALLBACK_SHOW,
- _overlay_bubble_chase_cb, ovl);
- evas_object_event_callback_add(ovl->pobj, EVAS_CALLBACK_MOVE,
- _overlay_bubble_chase_cb, ovl);
-
- _overlay_bubble_chase(ovl);
evas_object_smart_changed(bubble->wd->pan_smart);
#else
(void) bubble;
{
Widget_Data *wd = fdata;
- edje_object_part_text_set(wd->slider, key, data);
+ edje_object_part_text_escaped_set(wd->slider, key, data);
return 1;
}
_elm_theme_object_set(obj, wd->slider, "slider", "horizontal", elm_widget_style_get(obj));
else
_elm_theme_object_set(obj, wd->slider, "slider", "vertical", elm_widget_style_get(obj));
+ if (elm_widget_disabled_get(obj))
+ edje_object_signal_emit(wd->slider, "elm,state,disabled", "elm");
+ else
+ edje_object_signal_emit(wd->slider, "elm,state,enabled", "elm");
if (wd->icon)
{
edje_object_part_swallow(wd->slider, "elm.swallow.content", wd->icon);
{
char *buf;
buf = wd->units_format_func(wd->val);
- edje_object_part_text_set(wd->slider, "elm.units", buf);
+ edje_object_part_text_escaped_set(wd->slider, "elm.units", buf);
if (wd->units_format_free) wd->units_format_free(buf);
}
else if (wd->units)
char buf[1024];
snprintf(buf, sizeof(buf), wd->units, wd->val);
- edje_object_part_text_set(wd->slider, "elm.units", buf);
+ edje_object_part_text_escaped_set(wd->slider, "elm.units", buf);
}
else
- edje_object_part_text_set(wd->slider, "elm.units", NULL);
+ edje_object_part_text_escaped_set(wd->slider, "elm.units", NULL);
}
static void
{
char *buf;
buf = wd->indicator_format_func(wd->val);
- edje_object_part_text_set(wd->slider, "elm.dragable.slider:elm.indicator", buf);
+ edje_object_part_text_escaped_set(wd->slider, "elm.dragable.slider:elm.indicator", buf);
if (wd->indicator_format_free) wd->indicator_format_free(buf);
}
else if (wd->indicator)
{
char buf[1024];
snprintf(buf, sizeof(buf), wd->indicator, wd->val);
- edje_object_part_text_set(wd->slider, "elm.dragable.slider:elm.indicator", buf);
+ edje_object_part_text_escaped_set(wd->slider, "elm.dragable.slider:elm.indicator", buf);
}
else
- edje_object_part_text_set(wd->slider, "elm.dragable.slider:elm.indicator", NULL);
+ edje_object_part_text_escaped_set(wd->slider, "elm.dragable.slider:elm.indicator", NULL);
}
static void
_drag(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ Widget_Data *wd = elm_widget_data_get((Evas_Object*)data);
+ if (elm_widget_disabled_get(data)) return;
_val_fetch(data);
_units_set(data);
_indicator_set(data);
+ edje_object_signal_emit(wd->slider, "elm,state,drag", "elm");
+ edje_object_message_signal_process(wd->slider);
}
static void
_drag_start(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ Widget_Data *wd = elm_widget_data_get((Evas_Object*)data);
+ if (elm_widget_disabled_get(data)) return;
_val_fetch(data);
evas_object_smart_callback_call(data, SIG_DRAG_START, NULL);
_units_set(data);
_indicator_set(data);
elm_widget_scroll_freeze_push(data);
+ edje_object_signal_emit(wd->slider, "elm,state,drag", "elm");
+ edje_object_message_signal_process(wd->slider);
}
static void
_drag_stop(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ if (elm_widget_disabled_get(data)) return;
_val_fetch(data);
evas_object_smart_callback_call(data, SIG_DRAG_STOP, NULL);
_units_set(data);
static void
_drag_step(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
+ if (elm_widget_disabled_get(data)) return;
_val_fetch(data);
_units_set(data);
_indicator_set(data);
{
double step;
Widget_Data *wd;
+ if (elm_widget_disabled_get(data)) return;
wd = elm_widget_data_get(data);
step = 0.05;
{
double step;
Widget_Data *wd;
+ if (elm_widget_disabled_get(data)) return;
wd = elm_widget_data_get(data);
step = -0.05;
Evas_Event_Mouse_Down *ev = event_info;
Evas_Coord x, y, w, h;
double button_x = 0.0, button_y = 0.0;
+ if (elm_widget_disabled_get(data)) return;
wd->spacer_down = EINA_TRUE;
wd->val2 = wd->val;
evas_object_geometry_get(wd->spacer, &x, &y, &w, &h);
wd->downx = ev->canvas.x - x;
wd->downy = ev->canvas.y - y;
+ edje_object_part_drag_value_get(wd->slider, "elm.dragable.slider", &button_x, &button_y);
if (wd->horizontal)
{
button_x = ((double)ev->canvas.x - (double)x) / (double)w;
_units_set(data);
_indicator_set(data);
edje_object_signal_emit(wd->slider, "elm,state,indicator,show", "elm");
+ edje_object_signal_emit(wd->slider, "elm,state,drag", "elm");
+ edje_object_message_signal_process(wd->slider);
}
static void
Evas_Event_Mouse_Move *ev = event_info;
Evas_Coord x, y, w, h;
double button_x = 0.0, button_y = 0.0;
+ if (elm_widget_disabled_get(data)) return;
if (wd->spacer_down)
{
if (!wd->frozen)
{
elm_widget_scroll_freeze_push(data);
- wd->frozen = 1;
+ wd->frozen = EINA_TRUE;
}
ev->event_flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
}
if (wd->frozen)
{
elm_widget_scroll_freeze_pop(data);
- wd->frozen = 0;
+ wd->frozen = EINA_FALSE;
}
edje_object_signal_emit(wd->slider, "elm,state,indicator,hide", "elm");
elm_slider_value_set(data, wd->val2);
_val_fetch(data);
_units_set(data);
_indicator_set(data);
+ edje_object_signal_emit(wd->slider, "elm,state,drag", "elm");
+ edje_object_message_signal_process(wd->slider);
}
}
_spacer_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Widget_Data *wd = elm_widget_data_get(data);
-
+ if (elm_widget_disabled_get(data)) return;
if (!wd->spacer_down) return;
- if (wd->spacer_down) wd->spacer_down = EINA_FALSE;
+
+ wd->spacer_down = EINA_FALSE;
_val_fetch(data);
evas_object_smart_callback_call(data, SIG_DRAG_STOP, NULL);
_units_set(data);
if (wd->frozen)
{
elm_widget_scroll_freeze_pop(data);
- wd->frozen = 0;
+ wd->frozen = EINA_FALSE;
}
edje_object_signal_emit(wd->slider, "elm,state,indicator,hide", "elm");
}
edje_object_message_signal_process(wd->slider);
}
- edje_object_part_text_set(wd->slider, real_part, label);
+ edje_object_part_text_escaped_set(wd->slider, real_part, label);
_sizing_eval(obj);
}
snprintf((char*) buf_max, length + 128, wd->units, wd->val_max);
}
- edje_object_part_text_set(wd->slider, "elm.units.min", buf_min);
- edje_object_part_text_set(wd->slider, "elm.units.max", buf_max);
+ edje_object_part_text_escaped_set(wd->slider, "elm.units.min", buf_min);
+ edje_object_part_text_escaped_set(wd->slider, "elm.units.max", buf_max);
if (wd->units_format_func && wd->units_format_free)
{
wd->val = val;
if (wd->val < wd->val_min) wd->val = wd->val_min;
if (wd->val > wd->val_max) wd->val = wd->val_max;
+ edje_object_signal_emit(wd->slider, "elm,state,drag", "elm");
_val_set(obj);
_units_set(obj);
_indicator_set(obj);
snprintf(buf, sizeof(buf), "%.0f", wd->val);
apply:
- edje_object_part_text_set(wd->spinner, "elm.text", buf);
+ edje_object_part_text_escaped_set(wd->spinner, "elm.text", buf);
if (wd->entry_visible) _entry_show(wd);
}
if (wd->entry_visible) return;
edje_object_part_drag_value_get(wd->spinner, "elm.dragable.slider",
&pos, NULL);
-
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 */
evas_object_size_hint_max_set(it->icon, ms, ms);
edje_object_part_swallow(view, "elm.swallow.icon", it->icon);
}
- edje_object_part_text_set(view, "elm.text", it->label);
+ edje_object_part_text_escaped_set(view, "elm.text", it->label);
}
else
{
Evas_Object *content)
{
double scale;
+
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
if (part && strcmp(part, "object")) return;
Elm_Toolbar_Item *item = (Elm_Toolbar_Item *) it;
Evas_Object *obj = WIDGET(item);
static Evas_Object *
_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
if (part && strcmp(part, "object")) return NULL;
return ((Elm_Toolbar_Item *) it)->object;
}
Evas_Object *o;
double scale;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
if (part && strcmp(part, "object")) return NULL;
Elm_Toolbar_Item *item = (Elm_Toolbar_Item *) it;
Evas_Object *obj = WIDGET(item);
evas_object_size_hint_min_set(it->icon, ms, ms);
evas_object_size_hint_max_set(it->icon, ms, ms);
edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon);
+ edje_object_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
evas_object_show(it->icon);
elm_widget_sub_object_add(obj, it->icon);
}
- edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
+ if (it->label)
+ {
- edje_object_part_text_set(VIEW(it), "elm.text", it->label);
++ edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
+ edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
+ }
mw = mh = -1;
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
{
Evas_Coord mw = -1, mh = -1;
Widget_Data *wd = elm_widget_data_get(WIDGET(item));
- edje_object_part_text_set(VIEW(item), "elm.text", item->label);
+ edje_object_part_text_escaped_set(VIEW(item), "elm.text", item->label);
+ edje_object_signal_emit(VIEW(item), "elm,state,text,visible", "elm");
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
edje_object_size_min_restricted_calc(VIEW(item), &mw, &mh, mw, mh);
s = edje_object_data_get(VIEW(item), "transition_animation_on");
if ((s) && (atoi(s)))
{
- edje_object_part_text_set(VIEW(item), "elm.text_new", item->label);
+ edje_object_part_text_escaped_set(VIEW(item), "elm.text_new", item->label);
edje_object_signal_emit (VIEW(item), sig, "elm");
edje_object_signal_callback_add(VIEW(item),
"elm,state,label_set,done", "elm",
elm_widget_sub_object_del(VIEW(item), old_icon);
evas_object_hide(old_icon);
edje_object_part_swallow(VIEW(item), "elm.swallow.icon", item->icon);
+ edje_object_signal_emit(VIEW(item), "elm,state,icon,visible", "elm");
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
edje_object_size_min_restricted_calc(VIEW(item), &mw, &mh, mw, mh);
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
eina_stringshare_replace(&(win->title), title);
ecore_evas_title_set(win->ee, win->title);
if (win->frame_obj)
- edje_object_part_text_set(win->frame_obj, "elm.text.title", win->title);
+ edje_object_part_text_escaped_set(win->frame_obj, "elm.text.title", win->title);
}
EAPI const char *
return EINA_FALSE;
}
+// WRAPPER: Temperary added.
+EAPI void
+elm_win_indicator_state_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode)
+{
+ elm_win_indicator_mode_set(obj, mode);
+}
+
EAPI void
elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode)
{
#endif
}
+// WRAPPER: Temperary added.
+EAPI Elm_Win_Indicator_Mode
+elm_win_indicator_state_get(const Evas_Object *obj)
+{
+ return elm_win_indicator_mode_get(obj);
+}
+
EAPI Elm_Win_Indicator_Mode
elm_win_indicator_mode_get(const Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !item) return;
- edje_object_part_text_set(wd->frm, item, text);
+ edje_object_part_text_escaped_set(wd->frm, item, text);
_sizing_eval(obj);
}