static void ro_treeview_drag_end(wimp_dragged *drag, void *data) { os_error *error; error = xwimp_drag_box((wimp_drag *) -1); if (error) { LOG(("xwimp_drag_box: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } error = xwimp_auto_scroll(0, NULL, NULL); if (error) { LOG(("xwimp_auto_scroll: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } }
void ro_treeview_drag_end(wimp_dragged *drag) { os_error *error; error = xwimp_drag_box((wimp_drag *) -1); if (error) { LOG(("xwimp_drag_box: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } error = xwimp_auto_scroll(0, NULL, NULL); if (error) { LOG(("xwimp_auto_scroll: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } gui_current_drag_type = GUI_DRAG_NONE; }
void ro_gui_drag_box_cancel(void) { if (dragbox_active) { os_error *error; if (using_dragasprite) { error = xdragasprite_stop(); if (error) { LOG(("xdragasprite_stop: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } } else { error = xwimp_drag_box(NULL); if (error) { LOG(("xwimp_drag_box: 0x%x: %s", error->errnum, error->errmess)); warn_user("WimpError", error->errmess); } } dragbox_active = false; } }
void ro_gui_drag_icon(int x, int y, const char *sprite) { os_error *error; wimp_drag drag; int r2; drag.initial.x0 = x - 34; drag.initial.y0 = y - 34; drag.initial.x1 = x + 34; drag.initial.y1 = y + 34; if (sprite && (xosbyte2(osbyte_READ_CMOS, 28, 0, &r2) || (r2 & 2))) { osspriteop_area *area = (osspriteop_area*)1; /* first try our local sprite area in case it's a thumbnail sprite */ if (saveas_area) { error = xosspriteop_select_sprite(osspriteop_USER_AREA, saveas_area, (osspriteop_id)sprite, NULL); if (error) { if (error->errnum != error_SPRITE_OP_DOESNT_EXIST) { LOG(("xosspriteop_select_sprite: 0x%x: %s", error->errnum, error->errmess)); warn_user("MiscError", error->errmess); } } else area = saveas_area; } error = xdragasprite_start(dragasprite_HPOS_CENTRE | dragasprite_VPOS_CENTRE | dragasprite_BOUND_POINTER | dragasprite_DROP_SHADOW, area, sprite, &drag.initial, 0); if (!error) { using_dragasprite = true; dragbox_active = true; return; } LOG(("xdragasprite_start: 0x%x: %s", error->errnum, error->errmess)); } drag.type = wimp_DRAG_USER_FIXED; drag.bbox.x0 = -0x8000; drag.bbox.y0 = -0x8000; drag.bbox.x1 = 0x7fff; drag.bbox.y1 = 0x7fff; using_dragasprite = false; error = xwimp_drag_box(&drag); if (error) { LOG(("xwimp_drag_box: 0x%x: %s", error->errnum, error->errmess)); warn_user("DragError", error->errmess); } else dragbox_active = true; }