home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / dragasprit < prev    next >
Encoding:
Text File  |  1994-09-07  |  3.5 KB  |  113 lines

  1. #ifndef dragasprite_H
  2. #define dragasprite_H
  3.  
  4. /* C header file for DragASprite
  5.  * written by DefMod (Sep  7 1994) on Wed Sep  7 21:24:42 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. #ifndef osspriteop_H
  24.    #include "osspriteop.h"
  25. #endif
  26.  
  27. /**********************************
  28.  * SWI names and SWI reason codes *
  29.  **********************************/
  30. #undef  DragASprite_Start
  31. #define DragASprite_Start                       0x42400
  32. #undef  XDragASprite_Start
  33. #define XDragASprite_Start                      0x62400
  34. #undef  DragASprite_Stop
  35. #define DragASprite_Stop                        0x42401
  36. #undef  XDragASprite_Stop
  37. #define XDragASprite_Stop                       0x62401
  38.  
  39. /************************
  40.  * Constant definitions *
  41.  ************************/
  42. #define dragasprite_HPOS_LEFT                   0x0u
  43. #define dragasprite_HPOS_CENTRE                 0x1u
  44. #define dragasprite_HPOS_RIGHT                  0x2u
  45. #define dragasprite_VPOS_BOTTOM                 0x0u
  46. #define dragasprite_VPOS_CENTRE                 0x4u
  47. #define dragasprite_VPOS_TOP                    0x8u
  48. #define dragasprite_NO_BOUND                    0x0u
  49. #define dragasprite_BOUND_TO_WINDOW             0x10u
  50. #define dragasprite_GIVEN_BBOX                  0x20u
  51. #define dragasprite_BOUND_SPRITE                0x0u
  52. #define dragasprite_BOUND_POINTER               0x40u
  53. #define dragasprite_DROP_SHADOW                 0x80u
  54. #define dragasprite_NO_DITHER                   0x100u
  55.  
  56. /*************************
  57.  * Function declarations *
  58.  *************************/
  59.  
  60. #ifdef __cplusplus
  61.    extern "C" {
  62. #endif
  63.  
  64. /*************************************************************
  65.  * NOTE: The following functions provide direct access to    *
  66.  *       the SWI's noted in the function description.        *
  67.  *       Please read the relevant PRM section for more       *
  68.  *       information on their input/output parameters.       *
  69.  *************************************************************/
  70.  
  71. /* ------------------------------------------------------------------------
  72.  * Function:      dragasprite_start()
  73.  *
  74.  * Description:   Takes a copy of a sprite and starts a Wimp drag
  75.  *
  76.  * Input:         flags - value of R0 on entry
  77.  *                area - value of R1 on entry
  78.  *                sprite_name - value of R2 on entry
  79.  *                box - value of R3 on entry
  80.  *                bbox - value of R4 on entry
  81.  *
  82.  * Other notes:   Calls SWI 0x42400.
  83.  */
  84.  
  85. extern os_error *xdragasprite_start (bits flags,
  86.       osspriteop_area *area,
  87.       char *sprite_name,
  88.       os_box *box,
  89.       os_box *bbox);
  90. extern void dragasprite_start (bits flags,
  91.       osspriteop_area *area,
  92.       char *sprite_name,
  93.       os_box *box,
  94.       os_box *bbox);
  95.  
  96. /* ------------------------------------------------------------------------
  97.  * Function:      dragasprite_stop()
  98.  *
  99.  * Description:   Terminates any current drag operation, and releases
  100.  *                workspace
  101.  *
  102.  * Other notes:   Calls SWI 0x42401.
  103.  */
  104.  
  105. extern os_error *xdragasprite_stop (void);
  106. extern void dragasprite_stop (void);
  107.  
  108. #ifdef __cplusplus
  109.    }
  110. #endif
  111.  
  112. #endif
  113.