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

  1. #ifndef wimpreadsysinfo_H
  2. #define wimpreadsysinfo_H
  3.  
  4. /* C header file for WimpReadSysInfo
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 22 12:16:10 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 wimp_H
  18. #include "wimp.h"
  19. #endif
  20.  
  21. #ifndef font_H
  22. #include "font.h"
  23. #endif
  24.  
  25. #ifndef osspriteop_H
  26. #include "osspriteop.h"
  27. #endif
  28.  
  29. /**********************************
  30.  * SWI names and SWI reason codes *
  31.  **********************************/
  32. #undef  Wimp_ReadSysInfo
  33. #define Wimp_ReadSysInfo                        0x400F2
  34. #undef  XWimp_ReadSysInfo
  35. #define XWimp_ReadSysInfo                       0x600F2
  36. #undef  WimpReadSysInfo_TaskCount
  37. #define WimpReadSysInfo_TaskCount               0x0
  38. #undef  WimpReadSysInfo_WimpMode
  39. #define WimpReadSysInfo_WimpMode                0x1
  40. #undef  WimpReadSysInfo_SpriteSuffix
  41. #define WimpReadSysInfo_SpriteSuffix            0x2
  42. #undef  WimpReadSysInfo_DesktopState
  43. #define WimpReadSysInfo_DesktopState            0x3
  44. #undef  WimpReadSysInfo_WriteDir
  45. #define WimpReadSysInfo_WriteDir                0x4
  46. #undef  WimpReadSysInfo_Task
  47. #define WimpReadSysInfo_Task                    0x5
  48. #undef  WimpReadSysInfo_Version
  49. #define WimpReadSysInfo_Version                 0x7
  50. #undef  WimpReadSysInfo_Font
  51. #define WimpReadSysInfo_Font                    0x8
  52. #undef  WimpReadSysInfo_ToolSprites
  53. #define WimpReadSysInfo_ToolSprites             0x9
  54. #undef  WimpReadSysInfo_ApplicationLimit
  55. #define WimpReadSysInfo_ApplicationLimit        0xB
  56.  
  57. /********************
  58.  * Type definitions *
  59.  ********************/
  60. typedef int wimpreadsysinfo_state;
  61.  
  62. typedef int wimpreadsysinfo_direction;
  63.  
  64. /************************
  65.  * Constant definitions *
  66.  ************************/
  67. #define wimpreadsysinfo_STATE_COMMANDS          ((wimpreadsysinfo_state) 0x0u)
  68. #define wimpreadsysinfo_STATE_DESKTOP           ((wimpreadsysinfo_state) 0x1u)
  69. #define wimpreadsysinfo_DIR_LEFT_TO_RIGHT       ((wimpreadsysinfo_direction) 0x0u)
  70. #define wimpreadsysinfo_DIR_RIGHT_TO_LEFT       ((wimpreadsysinfo_direction) 0x1u)
  71.  
  72. /*************************
  73.  * Function declarations *
  74.  *************************/
  75.  
  76. #ifdef __cplusplus
  77.    extern "C" {
  78. #endif
  79.  
  80. /* ------------------------------------------------------------------------
  81.  * Function:      wimpreadsysinfo_task_count()
  82.  *
  83.  * Description:   Reads the number of active tasks
  84.  *
  85.  * Output:        task_count - value of R0 on exit (X version only)
  86.  *
  87.  * Returns:       R0 (non-X version only)
  88.  *
  89.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x0.
  90.  */
  91.  
  92. extern os_error *xwimpreadsysinfo_task_count (int *task_count);
  93. extern int wimpreadsysinfo_task_count (void);
  94.  
  95. /* ------------------------------------------------------------------------
  96.  * Function:      wimpreadsysinfo_wimp_mode()
  97.  *
  98.  * Description:   Reads the current Wimp mode
  99.  *
  100.  * Output:        mode - value of R0 on exit (X version only)
  101.  *
  102.  * Returns:       R0 (non-X version only)
  103.  *
  104.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x1.
  105.  */
  106.  
  107. extern os_error *xwimpreadsysinfo_wimp_mode (os_mode *mode);
  108. extern os_mode wimpreadsysinfo_wimp_mode (void);
  109.  
  110. /* ------------------------------------------------------------------------
  111.  * Function:      wimpreadsysinfo_sprite_suffix()
  112.  *
  113.  * Description:   Reads the *IconSprites file name suffix for the
  114.  *                configured mode
  115.  *
  116.  * Output:        suffix - value of R0 on exit (X version only)
  117.  *
  118.  * Returns:       R0 (non-X version only)
  119.  *
  120.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x2.
  121.  */
  122.  
  123. extern os_error *xwimpreadsysinfo_sprite_suffix (char **suffix);
  124. extern char *wimpreadsysinfo_sprite_suffix (void);
  125.  
  126. /* ------------------------------------------------------------------------
  127.  * Function:      wimpreadsysinfo_desktop_state()
  128.  *
  129.  * Description:   Reads the Wimp state
  130.  *
  131.  * Output:        state - value of R0 on exit (X version only)
  132.  *
  133.  * Returns:       R0 (non-X version only)
  134.  *
  135.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x3.
  136.  */
  137.  
  138. extern os_error *xwimpreadsysinfo_desktop_state (wimpreadsysinfo_state *state);
  139. extern wimpreadsysinfo_state wimpreadsysinfo_desktop_state (void);
  140.  
  141. /* ------------------------------------------------------------------------
  142.  * Function:      wimpreadsysinfo_write_dir()
  143.  *
  144.  * Description:   Reads the current writing direction
  145.  *
  146.  * Output:        write_dir - value of R0 on exit (X version only)
  147.  *
  148.  * Returns:       R0 (non-X version only)
  149.  *
  150.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x4.
  151.  */
  152.  
  153. extern os_error *xwimpreadsysinfo_write_dir (wimpreadsysinfo_direction *write_dir);
  154. extern wimpreadsysinfo_direction wimpreadsysinfo_write_dir (void);
  155.  
  156. /* ------------------------------------------------------------------------
  157.  * Function:      wimpreadsysinfo_task()
  158.  *
  159.  * Description:   Reads the current task handle
  160.  *
  161.  * Output:        task - value of R0 on exit (X version only)
  162.  *                version - value of R1 on exit
  163.  *
  164.  * Returns:       R0 (non-X version only)
  165.  *
  166.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x5.
  167.  */
  168.  
  169. extern os_error *xwimpreadsysinfo_task (wimp_t *task,
  170.       wimp_version_no *version);
  171. extern wimp_t wimpreadsysinfo_task (wimp_version_no *version);
  172.  
  173. /* ------------------------------------------------------------------------
  174.  * Function:      wimpreadsysinfo_version()
  175.  *
  176.  * Description:   Reads the Wimp version
  177.  *
  178.  * Output:        version - value of R0 on exit (X version only)
  179.  *
  180.  * Returns:       R0 (non-X version only)
  181.  *
  182.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x7.
  183.  */
  184.  
  185. extern os_error *xwimpreadsysinfo_version (wimp_version_no *version);
  186. extern wimp_version_no wimpreadsysinfo_version (void);
  187.  
  188. /* ------------------------------------------------------------------------
  189.  * Function:      wimpreadsysinfo_font()
  190.  *
  191.  * Description:   Reads the desktop and symbol font handles
  192.  *
  193.  * Output:        font - value of R0 on exit (X version only)
  194.  *                symbol_font - value of R1 on exit
  195.  *
  196.  * Returns:       R0 (non-X version only)
  197.  *
  198.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x8.
  199.  */
  200.  
  201. extern os_error *xwimpreadsysinfo_font (font_f *font,
  202.       font_f *symbol_font);
  203. extern font_f wimpreadsysinfo_font (font_f *symbol_font);
  204.  
  205. /* ------------------------------------------------------------------------
  206.  * Function:      wimpreadsysinfo_tool_sprites()
  207.  *
  208.  * Description:   Reads the toolsprite control block pointer
  209.  *
  210.  * Output:        toolsprites - value of R0 on exit (X version only)
  211.  *
  212.  * Returns:       R0 (non-X version only)
  213.  *
  214.  * Other notes:   Calls SWI 0x400F2 with R0 = 0x9.
  215.  */
  216.  
  217. extern os_error *xwimpreadsysinfo_tool_sprites (osspriteop_area **toolsprites);
  218. extern osspriteop_area *wimpreadsysinfo_tool_sprites (void);
  219.  
  220. /* ------------------------------------------------------------------------
  221.  * Function:      wimpreadsysinfo_application_limit()
  222.  *
  223.  * Description:   Reads the maximum size of application space
  224.  *
  225.  * Output:        size_limit - value of R0 on exit (X version only)
  226.  *
  227.  * Returns:       R0 (non-X version only)
  228.  *
  229.  * Other notes:   Calls SWI 0x400F2 with R0 = 0xB.
  230.  */
  231.  
  232. extern os_error *xwimpreadsysinfo_application_limit (int *size_limit);
  233. extern int wimpreadsysinfo_application_limit (void);
  234.  
  235. #ifdef __cplusplus
  236.    }
  237. #endif
  238.  
  239. #endif
  240.