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

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