home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / h / dragasprit < prev    next >
Encoding:
Text File  |  1995-06-28  |  3.7 KB  |  119 lines

  1. #ifndef dragasprite_H
  2. #define dragasprite_H
  3.  
  4. /* C header file for DragASprite
  5.  * written by DefMod (Jun 20 1995) on Wed Jun 28 18:56:46 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef osspriteop_H
  18. #include "osspriteop.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  DragASprite_Start
  25. #define DragASprite_Start                       0x42400
  26. #undef  XDragASprite_Start
  27. #define XDragASprite_Start                      0x62400
  28. #undef  DragASprite_Stop
  29. #define DragASprite_Stop                        0x42401
  30. #undef  XDragASprite_Stop
  31. #define XDragASprite_Stop                       0x62401
  32.  
  33. /********************
  34.  * Type definitions *
  35.  ********************/
  36. typedef bits dragasprite_flags;
  37.       /*Flags word for DragASprite_Start*/
  38.  
  39. /************************
  40.  * Constant definitions *
  41.  ************************/
  42. #define dragasprite_HPOS_LEFT                   ((dragasprite_flags) 0x0u)
  43.       /*Sprite at left of box*/
  44. #define dragasprite_HPOS_CENTRE                 ((dragasprite_flags) 0x1u)
  45.       /*Sprite horizontally centred in box*/
  46. #define dragasprite_HPOS_RIGHT                  ((dragasprite_flags) 0x2u)
  47.       /*Sprite at right of box*/
  48. #define dragasprite_VPOS_BOTTOM                 ((dragasprite_flags) 0x0u)
  49.       /*Sprite at bottom of box*/
  50. #define dragasprite_VPOS_CENTRE                 ((dragasprite_flags) 0x4u)
  51.       /*Sprite vertically centred in box*/
  52. #define dragasprite_VPOS_TOP                    ((dragasprite_flags) 0x8u)
  53.       /*Sprite at top of box*/
  54. #define dragasprite_NO_BOUND                    ((dragasprite_flags) 0x0u)
  55.       /*Drag not bounded*/
  56. #define dragasprite_BOUND_TO_WINDOW             ((dragasprite_flags) 0x10u)
  57.       /*Drag bounded to window containing pointer*/
  58. #define dragasprite_GIVEN_BBOX                  ((dragasprite_flags) 0x20u)
  59.       /*Drag bounded to given OS_Box*/
  60. #define dragasprite_BOUND_SPRITE                ((dragasprite_flags) 0x0u)
  61.       /*Box is bounded*/
  62. #define dragasprite_BOUND_POINTER               ((dragasprite_flags) 0x40u)
  63.       /*Pointer is bounded*/
  64. #define dragasprite_DROP_SHADOW                 ((dragasprite_flags) 0x80u)
  65.       /*Make a sprite with a drop-shadow*/
  66. #define dragasprite_NO_DITHER                   ((dragasprite_flags) 0x100u)
  67.       /*Do not make a semi-transparent sprite*/
  68.  
  69. /*************************
  70.  * Function declarations *
  71.  *************************/
  72.  
  73. #ifdef __cplusplus
  74.    extern "C" {
  75. #endif
  76.  
  77. /* ------------------------------------------------------------------------
  78.  * Function:      dragasprite_start()
  79.  *
  80.  * Description:   Takes a copy of a sprite and starts a Wimp drag
  81.  *
  82.  * Input:         flags - flags 
  83.  *                area - sprite area holding sprite
  84.  *                sprite_name - pointer to sprite name
  85.  *                box - pointer to box
  86.  *                bbox - pointer to optional bounding box
  87.  *
  88.  * Other notes:   Calls SWI 0x42400.
  89.  */
  90.  
  91. extern os_error *xdragasprite_start (dragasprite_flags flags,
  92.       osspriteop_area const *area,
  93.       char const *sprite_name,
  94.       os_box const *box,
  95.       os_box const *bbox);
  96. extern void dragasprite_start (dragasprite_flags flags,
  97.       osspriteop_area const *area,
  98.       char const *sprite_name,
  99.       os_box const *box,
  100.       os_box const *bbox);
  101.  
  102. /* ------------------------------------------------------------------------
  103.  * Function:      dragasprite_stop()
  104.  *
  105.  * Description:   Terminates any current drag operation, and releases
  106.  *                workspace
  107.  *
  108.  * Other notes:   Calls SWI 0x42401.
  109.  */
  110.  
  111. extern os_error *xdragasprite_stop (void);
  112. __swi (0x42401) void dragasprite_stop (void);
  113.  
  114. #ifdef __cplusplus
  115.    }
  116. #endif
  117.  
  118. #endif
  119.