DeskLib 2.90a:DragASpr.h


Contents


Introduction and Overview

This header defines some veneers to the DragASprite SWIs.


Functions


DragASprite_Start

os_error * DragASprite_Start(int flags, void *spritearea, const char *name, wimp_rect *bound, wimp_rect *parent);

This function calls the DragASprite_Start SWI with the arguments places in the appropriate registers. This should cause a sprite drag to start.

spritearea is a pointer to the sprite area holding the sprite you want to drag, or 1 for the Wimp sprite pool. name is the name of the sprite.

bbox is the bounding box of the sprite, and parent is the bounding box of the drag (the mouse pointer will be constrained to this box during the drag) if the appropriate flag is set.

See the PRMs for full details of the flags. Bits 4 & 5 of the flags decide what defines the bounding box: 00 means the whole-screen, 01 means the display area of the window the pointer is over, and 10 means it is user specified (by passing a parent rectangle). Set bit 7 to use a drop-shadow and bit 8 to make the drag solid rather than transparent on RISC OS 3.5 and later.


DragASprite_Stop

os_error * DragASprite_Stop(void );

This terminates any sprite drag begun with DragASprite_Start.


DragASprite_DragIcon

os_error * DragASprite_DragIcon(window_handle window, icon_handle icon);

This is a simple interface for DragASpr. Simply call it when you want to start a drag operation of a sprite icon, and it starts a DragASprite drag if possible, or a normal Wimp_DragBox if not.