home *** CD-ROM | disk | FTP | other *** search
- #ifndef wimpreadsysinfo_H
- #define wimpreadsysinfo_H
-
- /* C header file for WimpReadSysInfo
- * written by DefMod (Sep 16 1994) on Mon Sep 26 15:58:22 1994
- * Copyright © Acorn Computers Ltd, 1994
- */
-
- /*************************************************************************
- * This source file was written by Acorn Computers Limited. It is part *
- * of the OSLib library for writing applications for RISC OS. It may be *
- * used freely in the creation of programs for RISC OS. *
- *************************************************************************/
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.h"
- #endif
-
- #ifndef wimp_H
- #include "wimp.h"
- #endif
-
- #ifndef font_H
- #include "font.h"
- #endif
-
- #ifndef osspriteop_H
- #include "osspriteop.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef Wimp_ReadSysInfo
- #define Wimp_ReadSysInfo 0x400F2
- #undef XWimp_ReadSysInfo
- #define XWimp_ReadSysInfo 0x600F2
- #undef WimpReadSysInfo_TaskCount
- #define WimpReadSysInfo_TaskCount 0x0
- #undef WimpReadSysInfo_WimpMode
- #define WimpReadSysInfo_WimpMode 0x1
- #undef WimpReadSysInfo_SpriteSuffix
- #define WimpReadSysInfo_SpriteSuffix 0x2
- #undef WimpReadSysInfo_DesktopState
- #define WimpReadSysInfo_DesktopState 0x3
- #undef WimpReadSysInfo_WriteDir
- #define WimpReadSysInfo_WriteDir 0x4
- #undef WimpReadSysInfo_Task
- #define WimpReadSysInfo_Task 0x5
- #undef WimpReadSysInfo_Version
- #define WimpReadSysInfo_Version 0x7
- #undef WimpReadSysInfo_Font
- #define WimpReadSysInfo_Font 0x8
- #undef WimpReadSysInfo_ToolSprites
- #define WimpReadSysInfo_ToolSprites 0x9
- #undef WimpReadSysInfo_ApplicationLimit
- #define WimpReadSysInfo_ApplicationLimit 0xB
-
- /************************
- * Constant definitions *
- ************************/
- #define wimpreadsysinfo_STATE_COMMANDS 0
- #define wimpreadsysinfo_STATE_DESKTOP 1
- #define wimpreadsysinfo_DIR_LEFT_TO_RIGHT 0
- #define wimpreadsysinfo_DIR_RIGHT_TO_LEFT 1
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*************************************************************
- * NOTE: The following functions provide direct access to *
- * the SWI's noted in the function description. *
- * Please read the relevant PRM section for more *
- * information on their input/output parameters. *
- *************************************************************/
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_task_count()
- *
- * Description: Reads the number of active tasks
- *
- * Output: task_count - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x0.
- */
-
- extern os_error *xwimpreadsysinfo_task_count (int *task_count);
- extern int wimpreadsysinfo_task_count (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_wimp_mode()
- *
- * Description: Reads the current Wimp mode
- *
- * Output: mode - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x1.
- */
-
- extern os_error *xwimpreadsysinfo_wimp_mode (os_mode *mode);
- extern os_mode wimpreadsysinfo_wimp_mode (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_sprite_suffix()
- *
- * Description: Reads the *IconSprites file name suffix for the
- * configured mode
- *
- * Output: suffix - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x2.
- */
-
- extern os_error *xwimpreadsysinfo_sprite_suffix (char **suffix);
- extern char *wimpreadsysinfo_sprite_suffix (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_desktop_state()
- *
- * Description: Reads the Wimp state
- *
- * Output: state - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x3.
- */
-
- extern os_error *xwimpreadsysinfo_desktop_state (int *state);
- extern int wimpreadsysinfo_desktop_state (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_write_dir()
- *
- * Description: Reads the current writing direction
- *
- * Output: write_dir - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x4.
- */
-
- extern os_error *xwimpreadsysinfo_write_dir (int *write_dir);
- extern int wimpreadsysinfo_write_dir (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_task()
- *
- * Description: Reads the current task handle
- *
- * Output: task - value of R0 on exit (X version only)
- * version - value of R1 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x5.
- */
-
- extern os_error *xwimpreadsysinfo_task (wimp_t *task,
- int *version);
- extern wimp_t wimpreadsysinfo_task (int *version);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_version()
- *
- * Description: Reads the Wimp version
- *
- * Output: version - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x7.
- */
-
- extern os_error *xwimpreadsysinfo_version (int *version);
- extern int wimpreadsysinfo_version (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_font()
- *
- * Description: Reads the desktop and symbol font handles
- *
- * Output: font - value of R0 on exit (X version only)
- * symbol_font - value of R1 on exit
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x8.
- */
-
- extern os_error *xwimpreadsysinfo_font (font_f *font,
- font_f *symbol_font);
- extern font_f wimpreadsysinfo_font (font_f *symbol_font);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_tool_sprites()
- *
- * Description: Reads the toolsprite control block pointer
- *
- * Output: toolsprites - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0x9.
- */
-
- extern os_error *xwimpreadsysinfo_tool_sprites (osspriteop_area **toolsprites);
- extern osspriteop_area *wimpreadsysinfo_tool_sprites (void);
-
- /* ------------------------------------------------------------------------
- * Function: wimpreadsysinfo_application_limit()
- *
- * Description: Reads the maximum size of application space
- *
- * Output: size_limit - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x400F2 with R0 = 0xB.
- */
-
- extern os_error *xwimpreadsysinfo_application_limit (int *size_limit);
- extern int wimpreadsysinfo_application_limit (void);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-