home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / h / hourglass < prev    next >
Encoding:
Text File  |  1995-08-29  |  4.5 KB  |  166 lines

  1. #ifndef hourglass_H
  2. #define hourglass_H
  3.  
  4. /* C header file for Hourglass
  5.  * written by DefMod (Jul 24 1995) on Tue Aug 29 10:37:29 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. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  Hourglass_On
  21. #define Hourglass_On                            0x406C0
  22. #undef  XHourglass_On
  23. #define XHourglass_On                           0x606C0
  24. #undef  Hourglass_Off
  25. #define Hourglass_Off                           0x406C1
  26. #undef  XHourglass_Off
  27. #define XHourglass_Off                          0x606C1
  28. #undef  Hourglass_Smash
  29. #define Hourglass_Smash                         0x406C2
  30. #undef  XHourglass_Smash
  31. #define XHourglass_Smash                        0x606C2
  32. #undef  Hourglass_Start
  33. #define Hourglass_Start                         0x406C3
  34. #undef  XHourglass_Start
  35. #define XHourglass_Start                        0x606C3
  36. #undef  Hourglass_Percentage
  37. #define Hourglass_Percentage                    0x406C4
  38. #undef  XHourglass_Percentage
  39. #define XHourglass_Percentage                   0x606C4
  40. #undef  Hourglass_LEDs
  41. #define Hourglass_LEDs                          0x406C5
  42. #undef  XHourglass_LEDs
  43. #define XHourglass_LEDs                         0x606C5
  44. #undef  Hourglass_Colours
  45. #define Hourglass_Colours                       0x406C6
  46. #undef  XHourglass_Colours
  47. #define XHourglass_Colours                      0x606C6
  48.  
  49. /*************************
  50.  * Function declarations *
  51.  *************************/
  52.  
  53. #ifdef __cplusplus
  54.    extern "C" {
  55. #endif
  56.  
  57. /* ------------------------------------------------------------------------
  58.  * Function:      hourglass_on()
  59.  *
  60.  * Description:   Turns on the hourglass
  61.  *
  62.  * Other notes:   Calls SWI 0x406C0.
  63.  */
  64.  
  65. extern os_error *xhourglass_on (void);
  66. __swi (0x406C0) void hourglass_on (void);
  67.  
  68. /* ------------------------------------------------------------------------
  69.  * Function:      hourglass_off()
  70.  *
  71.  * Description:   Turns off the hourglass
  72.  *
  73.  * Other notes:   Calls SWI 0x406C1.
  74.  */
  75.  
  76. extern os_error *xhourglass_off (void);
  77. __swi (0x406C1) void hourglass_off (void);
  78.  
  79. /* ------------------------------------------------------------------------
  80.  * Function:      hourglass_smash()
  81.  *
  82.  * Description:   Turns off the hourglass immediately
  83.  *
  84.  * Other notes:   Calls SWI 0x406C2.
  85.  */
  86.  
  87. extern os_error *xhourglass_smash (void);
  88. __swi (0x406C2) void hourglass_smash (void);
  89.  
  90. /* ------------------------------------------------------------------------
  91.  * Function:      hourglass_start()
  92.  *
  93.  * Description:   Turns on the hourglass after a given delay
  94.  *
  95.  * Input:         delay - value of R0 on entry
  96.  *
  97.  * Other notes:   Calls SWI 0x406C3.
  98.  */
  99.  
  100. extern os_error *xhourglass_start (int delay);
  101. __swi (0x406C3) void hourglass_start (int delay);
  102.  
  103. /* ------------------------------------------------------------------------
  104.  * Function:      hourglass_percentage()
  105.  *
  106.  * Description:   Displays a percentage below the hourglass
  107.  *
  108.  * Input:         percent - value of R0 on entry
  109.  *
  110.  * Other notes:   Calls SWI 0x406C4.
  111.  */
  112.  
  113. extern os_error *xhourglass_percentage (int percent);
  114. __swi (0x406C4) void hourglass_percentage (int percent);
  115.  
  116. /* ------------------------------------------------------------------------
  117.  * Function:      hourglass_leds()
  118.  *
  119.  * Description:   Controls the display indicators above and below the
  120.  *                hourglass
  121.  *
  122.  * Input:         eor_mask - value of R0 on entry
  123.  *                and_mask - value of R1 on entry
  124.  *
  125.  * Output:        old_leds - value of R0 on exit (X version only)
  126.  *
  127.  * Returns:       R0 (non-X version only)
  128.  *
  129.  * Other notes:   Calls SWI 0x406C5.
  130.  */
  131.  
  132. extern os_error *xhourglass_leds (bits eor_mask,
  133.       bits and_mask,
  134.       bits *old_leds);
  135. __swi (0x406C5) bits hourglass_leds (bits eor_mask,
  136.       bits and_mask);
  137.  
  138. /* ------------------------------------------------------------------------
  139.  * Function:      hourglass_colours()
  140.  *
  141.  * Description:   Sets the colours used to display the hourglass
  142.  *
  143.  * Input:         sand - value of R0 on entry
  144.  *                glass - value of R1 on entry
  145.  *
  146.  * Output:        old_sand - value of R0 on exit
  147.  *                old_glass - value of R1 on exit
  148.  *
  149.  * Other notes:   Calls SWI 0x406C6.
  150.  */
  151.  
  152. extern os_error *xhourglass_colours (os_colour sand,
  153.       os_colour glass,
  154.       os_colour *old_sand,
  155.       os_colour *old_glass);
  156. extern void hourglass_colours (os_colour sand,
  157.       os_colour glass,
  158.       os_colour *old_sand,
  159.       os_colour *old_glass);
  160.  
  161. #ifdef __cplusplus
  162.    }
  163. #endif
  164.  
  165. #endif
  166.