e_object_ref(E_OBJECT(ec));
e_comp_object_frame_icon_geometry_get(ec->frame, &x, &y, &w, &h);
- client_drag = e_drag_new(e_comp,
- output->x, output->y,
+ client_drag = e_drag_new(output->x, output->y,
drag_types, 1, ec, -1,
NULL,
_e_client_cb_drag_finished);
}
EAPI E_Drag *
-e_drag_new(E_Comp *comp, int x, int y,
+e_drag_new(int x, int y,
const char **types, unsigned int num_types,
void *data, int size,
void *(*convert_cb)(E_Drag * drag, const char *type),
drag->w = 24;
drag->h = 24;
drag->layer = E_LAYER_CLIENT_DRAG;
- drag->comp = comp;
- e_object_ref(E_OBJECT(drag->comp));
- drag->evas = comp->evas;
+ drag->evas = e_comp->evas;
drag->type = E_DRAG_NONE;
ecore_x_window_shadow_tree_flush();
#endif
- _drag_win_root = drag->comp->man->root;
+ _drag_win_root = e_comp->man->root;
drag->cb.key_down = NULL;
drag->cb.key_up = NULL;
if (_drag_win) return 0;
#ifndef HAVE_WAYLAND_ONLY
- _drag_win = ecore_x_window_input_new(drag->comp->win,
- drag->comp->man->x, drag->comp->man->y,
- drag->comp->man->w, drag->comp->man->h);
- ecore_event_window_register(_drag_win, drag->comp->ee, drag->comp->evas,
+ _drag_win = ecore_x_window_input_new(e_comp->win,
+ e_comp->man->x, e_comp->man->y,
+ e_comp->man->w, e_comp->man->h);
+ ecore_event_window_register(_drag_win, e_comp->ee, e_comp->evas,
NULL, NULL, NULL, NULL);
ecore_x_window_show(_drag_win);
#endif
- _drag_win_root = drag->comp->man->root;
+ _drag_win_root = e_comp->man->root;
if (!e_grabinput_get(_drag_win, 1, _drag_win))
{
#ifndef HAVE_WAYLAND_ONLY
if (_drag_win) return 0;
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return 0;
- _drag_win = ecore_x_window_input_new(drag->comp->win,
- drag->comp->man->x, drag->comp->man->y,
- drag->comp->man->w, drag->comp->man->h);
+ _drag_win = ecore_x_window_input_new(e_comp->win,
+ e_comp->man->x, e_comp->man->y,
+ e_comp->man->w, e_comp->man->h);
ecore_x_window_show(_drag_win);
#endif
_drag_list = eina_list_remove(_drag_list, drag);
- e_object_unref(E_OBJECT(drag->comp));
evas_object_hide(drag->comp_object);
E_FREE_FUNC(drag->comp_object, evas_object_del);
for (i = 0; i < drag->num_types; i++)
void (*key_up)(E_Drag *drag, Ecore_Event_Key *e);
} cb;
- E_Comp *comp;
Evas *evas;
Evas_Object *comp_object;
Evas_Object *object;
EAPI E_Drag *e_drag_current_get(void);
/* x and y are the top left coords of the object that is to be dragged */
-EAPI E_Drag *e_drag_new(E_Comp *comp, int x, int y,
+EAPI E_Drag *e_drag_new(int x, int y,
const char **types, unsigned int num_types,
void *data, int size,
void *(*convert_cb)(E_Drag * drag, const char *type),
sel = (char*)eina_binbuf_string_steal(sbuf);
eina_binbuf_free(sbuf);
- d = e_drag_new(e_comp, 0, 0, drag_types, 1,
+ d = e_drag_new(0, 0, drag_types, 1,
sel, sel_length, NULL, _e_fm2_cb_drag_finished);
if (layout)
d->x = ic->sd->x, d->y = ic->sd->y;
ecore_evas_pointer_xy_get(zone->comp->ee, &x, &y);
- gcc->drag.drag = drag = e_drag_new(zone->comp, x, y,
+ gcc->drag.drag = drag = e_drag_new(x, y,
drag_types, 1, gcc, -1, NULL,
e_gadcon_drag_finished_cb);
if (!drag) return;
*/
static void
-_e_int_menus_apps_drag(void *data, E_Menu *m, E_Menu_Item *mi)
+_e_int_menus_apps_drag(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
{
Efreet_Desktop *desktop;
evas_object_geometry_get(mi->icon_object, &x, &y, &w, &h);
efreet_desktop_ref(desktop);
- drag = e_drag_new(m->zone->comp, x, y, drag_types, 1, desktop, -1,
+ drag = e_drag_new(x, y, drag_types, 1, desktop, -1,
NULL, NULL);
size = MIN(w, h);
drag_gcc->dx = mx - ox;
drag_gcc->dy = my - oy;
- drag_gcc->drag.drag = drag = e_drag_new(gc->zone->comp, mx, my,
+ drag_gcc->drag.drag = drag = e_drag_new(mx, my,
drag_types, 1, drag_gcc, -1, NULL,
e_gadcon_drag_finished_cb);
if (!drag) return;
if (ic->ibar->inst->ci->lock_move) return;
evas_object_geometry_get(ic->o_icon, &x, &y, &w, &h);
- d = e_drag_new(ic->ibar->inst->gcc->gadcon->zone->comp,
- x, y, drag_types, 1,
+ d = e_drag_new(x, y, drag_types, 1,
ic->app, -1, NULL, _ibar_cb_drag_finished);
efreet_desktop_ref(ic->app);
size = MAX(w, h);
ic->drag.start = 0;
evas_object_geometry_get(ic->o_icon, &x, &y, &w, &h);
- d = e_drag_new(ic->ibox->inst->gcc->gadcon->zone->comp,
- x, y, drag_types, 1,
+ d = e_drag_new(x, y, drag_types, 1,
ic->client, -1, NULL, _ibox_cb_drag_finished);
o = e_client_icon_add(ic->client, e_drag_evas_get(d));
e_drag_object_set(d, o);
evas_object_geometry_get(pw->o_mirror, &x, &y, &w, &h);
evas_object_hide(pw->o_mirror);
- drag = e_drag_new(e_comp,
- x, y, drag_types, 2, pw->desk->pager, -1,
+ drag = e_drag_new(x, y, drag_types, 2, pw->desk->pager, -1,
_pager_window_cb_drag_convert,
_pager_window_cb_drag_finished);
if (pd->drag.in_pager && pd->pager)
{
evas_object_geometry_get(pd->o_desk, &x, &y, &w, &h);
- drag = e_drag_new(pd->pager->zone->comp,
- x, y, drag_types, 1, pd, -1,
+ drag = e_drag_new(x, y, drag_types, 1, pd, -1,
NULL, _pager_desk_cb_drag_finished);
/* redraw the desktop theme above */
evas_object_geometry_get(pw->o_window, &x, &y, &w, &h);
evas_object_hide(pw->o_window);
- drag = e_drag_new(pw->desk->pager->zone->comp,
- x, y, drag_types, 2, pw, -1,
+ drag = e_drag_new(x, y, drag_types, 2, pw, -1,
_pager_window_cb_drag_convert,
_pager_window_cb_drag_finished);
if (pd->drag.in_pager && pd->pager)
{
evas_object_geometry_get(pd->o_desk, &x, &y, &w, &h);
- drag = e_drag_new(pd->pager->zone->comp,
- x, y, drag_types, 1, pd, -1,
+ drag = e_drag_new(x, y, drag_types, 1, pd, -1,
NULL, _pager_desk_cb_drag_finished);
/* redraw the desktop theme above */