}
}
+static Eina_Bool
+_ctxpopup_raise_timer_cb(void *data)
+{
+ printf("Timer Called\n");
+ Evas_Object *ctxpopup = (Evas_Object *) data;
+ evas_object_raise(ctxpopup);
+ return EINA_FALSE;
+}
+
+static void
+_btn_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ printf("Button Clicked\n");
+ Evas_Object *ctxpopup = (Evas_Object *) data;
+ Evas_Object *lb = elm_label_add(ctxpopup);
+ elm_label_line_wrap_set(lb, ELM_WRAP_CHAR);
+ elm_object_text_set(lb,
+ "<b>"
+ "This is more text designed to line-wrap here as "
+ "This object is resized horizontally. As it is "
+ "resized vertically though, nothing should change. "
+ "The amount of space allocated vertically should "
+ "change as horizontal size changes."
+ "This is more text designed to line-wrap here as "
+ "This object is resized horizontally. As it is "
+ "resized vertically though, nothing should change. "
+ "The amount of space allocated vertically should "
+ "change as horizontal size changes."
+ "</b>"
+ );
+ evas_object_resize(lb, 200, 400);
+ evas_object_show(lb);
+
+ ecore_timer_add(1.5, _ctxpopup_raise_timer_cb, ctxpopup);
+}
+
static void
-_ctxpopup_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
+_ctxpopup_item_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info)
{
printf("ctxpopup item selected: %s\n",
elm_object_item_text_get(event_info));
evas_object_move(ctxpopup, x, y);
evas_object_show(ctxpopup);
_print_current_dir(ctxpopup);
+
+ evas_object_smart_callback_add(btn, "clicked", _btn_clicked, ctxpopup);
}
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
+_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__)
{
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);