Evas_Coord_Rectangle *hover_area);
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 _update_arrow(Evas_Object *obj,
+ Elm_Ctxpopup_Direction dir,
+ Evas_Coord_Rectangle rect);
static void _sizing_eval(Evas_Object *obj);
+static void _hide_signal_emit(Evas_Object *obj,
+ Elm_Ctxpopup_Direction dir);
+static void _show_signal_emit(Evas_Object *obj,
+ Elm_Ctxpopup_Direction dir);
static void _shift_base_by_arrow(Evas_Object *arrow,
Elm_Ctxpopup_Direction dir,
Evas_Coord_Rectangle *rect);
Evas_Object *content);
static Evas_Object * _item_content_get_hook(const Elm_Object_Item *it,
const char *part);
-static void _item_disable_set_hook(Elm_Object_Item *it);
+static void _item_disable_hook(Elm_Object_Item *it);
static void _item_signal_emit_hook(Elm_Object_Item *it,
const char *emission,
const char *source);
Evas *e,
Evas_Object *obj,
void *event_info);
-static void _hide(Evas_Object *obj);
+static void _hide_finished(void *data,
+ Evas_Object *obj,
+ const char *emission,
+ const char *source __UNUSED__);
static void _ctxpopup_hide(void *data,
Evas *e,
Evas_Object *obj,
void *event_info);
+static void _content_resize(void *data,
+ Evas *e,
+ Evas_Object *obj,
+ void *event_info);
static void _scroller_resize(void *data,
Evas *e,
Evas_Object *obj,
Evas *e,
Evas_Object *obj,
void *event_info);
+static void _restack(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _item_select_cb(void *data, Evas_Object *obj,
const char *emission,
const char *source);
static void _list_del(Widget_Data *wd);
static void _list_new(Evas_Object *obj);
static void _remove_items(Widget_Data * wd);
+static void _disable_hook(Evas_Object *obj);
+static void _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source);
+static void _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data);
+static void _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data);
static const char SIG_DISMISSED[] = "dismissed";
}
static Eina_Bool
-_event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info)
+_event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__,
+ Evas_Callback_Type type, void *event_info)
{
Evas_Event_Key_Down *ev;
Widget_Data *wd;
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
- _hide(data);
+ evas_object_hide(data);
}
static void
}
static void
-_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir, Evas_Coord_Rectangle base_size)
+_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir,
+ Evas_Coord_Rectangle base_size)
{
Evas_Coord x, y;
Evas_Coord_Rectangle arrow_size;
}
}
+//TODO: compress item - different from opensource
+static void
+_compress_item(Evas_Object *obj)
+{
+ Widget_Data *wd;
+ Eina_List *elist;
+ Elm_Ctxpopup_Item *item;
+
+ wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ EINA_LIST_FOREACH(wd->items, elist, item)
+ {
+ edje_object_signal_emit(item->base.view, "elm,state,compress", "elm");
+ }
+}
+
+static void
+_hide_signal_emit(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
+{
+ Widget_Data *wd;
+
+ wd = elm_widget_data_get(obj);
+ if (!wd->visible) return;
+
+ switch (dir)
+ {
+ case ELM_CTXPOPUP_DIRECTION_UP:
+ edje_object_signal_emit(wd->base, "elm,state,hide,up", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_LEFT:
+ edje_object_signal_emit(wd->base, "elm,state,hide,left", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_RIGHT:
+ edje_object_signal_emit(wd->base, "elm,state,hide,right", "elm");
+ break;
+ case ELM_CTXPOPUP_DIRECTION_DOWN:
+ edje_object_signal_emit(wd->base, "elm,state,hide,down", "elm");
+ break;
+ default:
+ break;
+ }
+
+ edje_object_signal_emit(wd->bg, "elm,state,hide", "elm");
+}
+
static void
_show_signal_emit(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
{
Widget_Data *wd;
wd = elm_widget_data_get(obj);
- if (!wd || wd->visible) return;
+ if (wd->visible) return;
switch (dir)
{
wd = elm_widget_data_get(obj);
if (!wd) return;
+ if (!wd->parent) return;
//Box, Scroller
EINA_LIST_FOREACH(wd->items, elist, item)
//Base
wd->dir = _calc_base_geometry(obj, &rect);
+
+ //TODO: compress item - different from opensource
+ if (!wd->horizontal && !wd->content)
+ _compress_item(obj);
+
_show_signal_emit(obj, wd->dir);
_update_arrow(obj, wd->dir, rect);
_shift_base_by_arrow(wd->arrow, wd->dir, &rect);
wd = elm_widget_data_get(obj);
if (!wd) return;
+ 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);
+
_parent_cut_off(obj);
}
Widget_Data *wd;
Eina_List *elist;
Elm_Ctxpopup_Item *item;
+ int idx = 0;
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");
+ /*
+ * For separator, if the first item has visible separator,
+ * then it should be aligned with edge of the base part.
+ * In some cases, it gives improper display. Ex) rounded corner
+ * So the first item separator should be invisible.
+ */
+ if ((idx++) == 0)
+ edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
+ else
+ {
+ if(!wd->horizontal)
+ edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
+ else
+ edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
+ }
+
edje_object_message_signal_process(VIEW(item));
}
+ if (evas_object_visible_get(wd->bg))
+ edje_object_signal_emit(wd->bg, "elm,state,show", "elm");
+
if (wd->scr)
{
if (!strncmp(elm_object_style_get(obj), "default", strlen("default")))
}
static void
-_content_set_hook(Evas_Object *obj, const char *part,
- Evas_Object *content)
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
+ Evas_Coord min_w = -1, min_h = -1;
Widget_Data *wd;
if (wd->items) elm_ctxpopup_clear(obj);
if (wd->content) evas_object_del(wd->content);
- evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _content_del,
- obj);
+ //Use Box
+ wd->box = elm_box_add(obj);
+ evas_object_size_hint_weight_set(wd->box, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(content, EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_show(content);
+ evas_object_size_hint_min_get(content, &min_w, &min_h);
+ evas_object_size_hint_min_set(wd->box, min_w, min_h);
+ elm_box_pack_end(wd->box, content);
- elm_widget_sub_object_add(obj, content);
- edje_object_part_swallow(wd->base, "elm.swallow.content", content);
+ evas_object_event_callback_add(wd->box, EVAS_CALLBACK_RESIZE,
+ _content_resize, obj);
+ evas_object_event_callback_add(wd->box, EVAS_CALLBACK_DEL,
+ _content_del, obj);
- wd->content = content;
+ elm_widget_sub_object_add(obj, wd->box);
+ edje_object_part_swallow(wd->base, "elm.swallow.content", wd->box);
+ wd->content = content;
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
if (wd->visible)
if (!wd) return NULL;
content = wd->content;
- if (!content) return NULL;
+ if (!content || !wd->box) return NULL;
- edje_object_part_unswallow(wd->base, content);
- elm_widget_sub_object_del(obj, content);
- evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _content_del);
+ edje_object_part_unswallow(wd->base, wd->box);
+ elm_widget_sub_object_del(obj, wd->box);
+ evas_object_event_callback_del(wd->box, EVAS_CALLBACK_DEL, _content_del);
edje_object_signal_emit(wd->base, "elm,state,content,disable", "elm");
+ evas_object_del(wd->box);
+ wd->box = NULL;
wd->content = NULL;
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
return content;
-
}
static Evas_Object *
}
static void
-_item_text_set_hook(Elm_Object_Item *it,
- const char *part,
- const char *label)
+_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "default")) return;
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
+ ctxpopup_it = (Elm_Ctxpopup_Item *)it;
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)
{
- 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;
+ ctxpopup_it = (Elm_Ctxpopup_Item *)it;
return ctxpopup_it->label;
}
const char *part,
Evas_Object *content)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it;
if (part && strcmp(part, "icon")) return;
- ctxpopup_it = (Elm_Ctxpopup_Item *) it;
+ ctxpopup_it = (Elm_Ctxpopup_Item *)it;
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)
{
- 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;
+ ctxpopup_it = (Elm_Ctxpopup_Item *)it;
return ctxpopup_it->icon;
}
static void
-_item_disable_set_hook(Elm_Object_Item *it)
+_item_disable_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
Widget_Data *wd;
- Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
+ Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *)it;
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
if (!wd) return;
}
static void
-_item_signal_emit_hook(Elm_Object_Item *it,
- const char *emission,
+_item_signal_emit_hook(Elm_Object_Item *it, const char *emission,
const char *source)
{
- 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;
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__)
{
- evas_object_hide(data);
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+ _hide_signal_emit(data, wd->dir);
}
static void
void *event_info __UNUSED__)
{
Widget_Data *wd;
+ Eina_List *elist;
+ Elm_Ctxpopup_Item *item;
+ int idx = 0;
wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_show(wd->arrow);
edje_object_signal_emit(wd->bg, "elm,state,show", "elm");
+
+ EINA_LIST_FOREACH(wd->items, elist, item)
+ {
+ if (idx++ == 0)
+ edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
+ else
+ {
+ if(!wd->horizontal)
+ edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
+ else
+ edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
+ }
+ }
+
edje_object_signal_emit(wd->base, "elm,state,show", "elm");
_sizing_eval(obj);
}
static void
-_hide(Evas_Object *obj)
+_hide_finished(void *data, Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__, const char *source __UNUSED__)
{
- Widget_Data *wd = elm_widget_data_get(obj);
+ evas_object_hide(data);
+ evas_object_smart_callback_call(data, SIG_DISMISSED, NULL);
+}
+static void
+_ctxpopup_hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
+ void *event_info __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
if ((!wd) || (!wd->visible)) return;
evas_object_hide(wd->bg);
_scroller_size_reset(wd);
- evas_object_smart_callback_call(obj, SIG_DISMISSED, NULL);
wd->visible = EINA_FALSE;
}
static void
-_ctxpopup_hide(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__)
+_content_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
+ void *event_info __UNUSED__)
{
- _hide(obj);
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
+ elm_box_recalculate(wd->box);
+ _sizing_eval(data);
}
static void
}
static void
+_restack(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ evas_object_layer_set(wd->bg,
+ evas_object_layer_get(obj));
+ evas_object_layer_set(wd->base,
+ evas_object_layer_get(obj));
+}
+
+static void
_item_select_cb(void *data, Evas_Object *obj __UNUSED__,
const char *emission __UNUSED__, const char *source __UNUSED__)
{
if (elm_widget_item_disabled_get(item)) return;
if (item->func)
- item->func((void*) item->base.data, WIDGET(item), data);
+ item->func((void*)item->base.data, WIDGET(item), data);
}
static void
if (item->icon)
evas_object_del(item->icon);
wd->items = eina_list_remove(wd->items, item);
- free(item);
+ elm_widget_item_free(item);
}
wd->items = NULL;
}
+static Eina_Bool
+_item_del_pre_hook(Elm_Object_Item *it)
+{
+ Widget_Data *wd;
+ Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *)it;
+
+ wd = elm_widget_data_get(WIDGET(ctxpopup_it));
+ if (!wd) return EINA_FALSE;
+
+ if (ctxpopup_it->icon)
+ evas_object_del(ctxpopup_it->icon);
+ if (VIEW(ctxpopup_it))
+ evas_object_del(VIEW(ctxpopup_it));
+
+ eina_stringshare_del(ctxpopup_it->label);
+
+ wd->items = eina_list_remove(wd->items, ctxpopup_it);
+
+ wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
+
+ if (eina_list_count(wd->items) < 1)
+ {
+ evas_object_hide(WIDGET(ctxpopup_it));
+ return EINA_TRUE;
+ }
+
+ if (wd->visible)
+ _sizing_eval(WIDGET(ctxpopup_it));
+
+ return EINA_TRUE;
+}
+
+static void
+_disable_hook(Evas_Object *obj)
+{
+ Eina_List *l;
+ Elm_Object_Item *it;
+
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+
+ EINA_LIST_FOREACH(wd->items, l, it)
+ elm_object_item_disabled_set(it, elm_widget_disabled_get(obj));
+}
+
+static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ edje_object_signal_emit(wd->base, emission, source);
+}
+
+static void
+_signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ edje_object_signal_callback_add(wd->base, emission, source, func_cb, data);
+}
+
+static void
+_signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ edje_object_signal_callback_del_full(wd->base, emission, source, func_cb, data);
+}
+
EAPI Evas_Object *
elm_ctxpopup_add(Evas_Object *parent)
{
elm_widget_content_set_hook_set(obj, _content_set_hook);
elm_widget_content_unset_hook_set(obj, _content_unset_hook);
elm_widget_content_get_hook_set(obj, _content_get_hook);
+ elm_widget_disable_hook_set(obj, _disable_hook);
+ elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
+ elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
+ elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
//Background
wd->bg = edje_object_add(e);
wd->base = edje_object_add(e);
elm_widget_sub_object_add(obj, wd->base);
_elm_theme_object_set(obj, wd->base, "ctxpopup", "base", "default");
+ edje_object_signal_callback_add(wd->base, "elm,action,hide,finished", "",
+ _hide_finished, obj);
//Arrow
wd->arrow = edje_object_add(e);
NULL);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _ctxpopup_move,
NULL);
+ 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);
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
return obj;
}
-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);
-}
-
EAPI void
elm_ctxpopup_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd;
+ Eina_List *elist;
+ Elm_Ctxpopup_Item *item;
+ int idx = 0;
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);
+
+ EINA_LIST_FOREACH(wd->items, elist, item)
+ {
+ if (idx++ == 0)
+ edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
+ else
+ edje_object_signal_emit(VIEW(item), "elm,state,vertical", "elm");
+ }
}
else
{
elm_box_horizontal_set(wd->box, EINA_TRUE);
elm_scroller_bounce_set(wd->scr, EINA_TRUE, EINA_FALSE);
+
+ EINA_LIST_FOREACH(wd->items, elist, item)
+ {
+ if (idx++ == 0)
+ edje_object_signal_emit(VIEW(item), "elm,state,default", "elm");
+ else
+ edje_object_signal_emit(VIEW(item), "elm,state,horizontal", "elm");
+ }
}
wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
item = elm_widget_item_new(obj, Elm_Ctxpopup_Item);
if (!item) return NULL;
- elm_widget_item_disable_set_hook_set(item, _item_disable_set_hook);
+ elm_widget_item_del_pre_hook_set(item, _item_del_pre_hook);
+ elm_widget_item_disable_hook_set(item, _item_disable_hook);
elm_widget_item_text_set_hook_set(item, _item_text_set_hook);
elm_widget_item_text_get_hook_set(item, _item_text_get_hook);
elm_widget_item_content_set_hook_set(item, _item_content_set_hook);
_sizing_eval(obj);
}
- return (Elm_Object_Item *) item;
-}
-
-EAPI void
-elm_ctxpopup_item_del(Elm_Object_Item *it)
-{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-
- Widget_Data *wd;
- Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
-
- wd = elm_widget_data_get(WIDGET(ctxpopup_it));
- if (!wd) return;
-
- if (ctxpopup_it->icon)
- evas_object_del(ctxpopup_it->icon);
- if (VIEW(ctxpopup_it))
- evas_object_del(VIEW(ctxpopup_it));
-
- eina_stringshare_del(ctxpopup_it->label);
-
- wd->items = eina_list_remove(wd->items, ctxpopup_it);
-
- wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
-
- elm_widget_item_del(ctxpopup_it);
-
- if (eina_list_count(wd->items) < 1)
- {
- evas_object_hide(WIDGET(ctxpopup_it));
- return;
- }
-
- if (wd->visible)
- _sizing_eval(WIDGET(ctxpopup_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;
}
EAPI void
if (!wd) return ELM_CTXPOPUP_DIRECTION_UNKNOWN;
return wd->dir;
}
+
+EAPI void
+elm_ctxpopup_dismiss(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ _hide_signal_emit(obj, wd->dir);
+}