#ifndef ELM_LIB_QUICKLAUNCH
static void drop_cb(void *mydata, Evas_Object *obj, void *evdata);
+static void drag_stop_cb(void *mydata, Evas_Object *obj, void *evdata);
+static void drag_start_cb(void *mydata, Evas_Object *obj, void *evdata);
void
test_photo(void *data, Evas_Object *obj, void *event_info)
EVAS_HINT_FILL);
evas_object_smart_callback_add(ph, "drop",
drop_cb, NULL);
+ evas_object_smart_callback_add(ph, "drag,start",
+ drag_start_cb, NULL);
+ evas_object_smart_callback_add(ph, "drag,stop",
+ drag_stop_cb, NULL);
+
if(n == 2 || n == 3) {
elm_photo_fill_inside_set(ph, EINA_TRUE);
elm_widget_style_set(ph, "shadow");
printf("Drop on obj %p: Image: %s\n",obj,evdata);
}
+static void
+drag_start_cb(void *mydata, Evas_Object *obj, void *evdata){
+
+}
+
+static void
+drag_stop_cb(void *mydata, Evas_Object *obj, void *evdata){
+
+}
+
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
#endif
int size;
Eina_Bool fill;
Ecore_Timer *longtimer;
- struct {
- int x,y;
- } press;
};
static const char *widtype = NULL;
}
+static void
+_drag_done_cb(void *unused __UNUSED__, Evas_Object *obj)
+{
+ elm_object_scroll_freeze_pop(obj);
+ evas_object_smart_callback_call(obj, "drag,end", NULL);
+}
+
static Eina_Bool
_longpress(void *objv)
{
Evas_Object *tmp;
const char *file;
char *buf;
- int len;
printf("Long press: start drag!\n");
wd->longtimer = NULL; /* clear: must return NULL now */
/* FIXME: Deal with relative paths */
buf = malloc(strlen(file) + strlen("file://") + 1);
sprintf(buf, "%s%s","file://",file);
- elm_drag_start(objv, ELM_SEL_FORMAT_IMAGE, buf);
+ elm_drag_start(objv, ELM_SEL_FORMAT_IMAGE, buf, _drag_done_cb, NULL);
free(buf);
}
+ elm_object_scroll_freeze_push(objv);
evas_object_smart_callback_call(objv, "drag,start", NULL);