static void _e_shelf_free(E_Shelf *es);
static void _e_shelf_config_port(E_Config_Shelf_Config *cf1, E_Config_Shelf_Config *cf2);
+static void _e_shelf_cb_signal_all(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _e_shelf_cb_signal_move_start(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _e_shelf_cb_signal_move_go(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _e_shelf_cb_signal_move_stop(void *data, Evas_Object *obj, const char *emission, const char *source);
static Evas_List *shelves = NULL;
static int shelf_id = 0;
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
evas_object_layer_set(es->o_base, layer);
}
+
+ edje_object_signal_callback_add(es->o_base, "*", "*",
+ _e_shelf_cb_signal_all, es);
+ edje_object_signal_callback_add(es->o_base, "mouse,down,1", "drag*",
+ _e_shelf_cb_signal_move_start, es);
+ edje_object_signal_callback_add(es->o_base, "mouse,move", "drag*",
+ _e_shelf_cb_signal_move_go, es);
+ edje_object_signal_callback_add(es->o_base, "mouse,up,1", "drag*",
+ _e_shelf_cb_signal_move_stop, es);
+
snprintf(buf, sizeof(buf), "%i", shelf_id);
shelf_id++;
cf2->w = px[3] - px[0] + 1;
cf2->h = py[3] = py[0] + 1;
}
+
+static void
+_e_shelf_cb_signal_all(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ E_Shelf *es;
+
+ es = data;
+ printf("SIG: %s %s\n", emission, source);
+}
+
+static void
+_e_shelf_cb_signal_move_start(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ E_Shelf *es;
+
+ es = data;
+ printf("MV start\n");
+ es->moveresize.pos.x = es->x;
+ es->moveresize.pos.y = es->y;
+ es->moveresize.move = 1;
+ ecore_x_pointer_last_xy_get(&(es->moveresize.x), &(es->moveresize.y));
+}
+
+static void
+_e_shelf_cb_signal_move_go(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ E_Shelf *es;
+ int x, y;
+
+ es = data;
+ if (es->moveresize.move)
+ {
+ int x, y, nx, ny, nw, nh;
+
+ printf("MV go\n");
+ ecore_x_pointer_last_xy_get(&x, &y);
+ nx = x = es->moveresize.pos.x + (x - es->moveresize.x);
+ ny = y = es->moveresize.pos.y + (y - es->moveresize.y);
+ e_resist_container_border_position(es->zone->container,
+ NULL,
+ es->x, es->y, es->w, es->h,
+ x, y, es->w, es->h,
+ &nx, &ny, &nw, &nh);
+ e_shelf_move(es, nx, ny);
+ }
+}
+
+static void
+_e_shelf_cb_signal_move_stop(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ E_Shelf *es;
+
+ es = data;
+ if (es->moveresize.move)
+ {
+ printf("MV stop\n");
+ es->moveresize.move = 0;
+ }
+}