home *** CD-ROM | disk | FTP | other *** search
- #ifndef taskwindow_H
- #define taskwindow_H
-
- /* C header file for TaskWindow
- * written by DefMod (Sep 7 1994) on Wed Sep 7 21:19:03 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
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef TaskWindow_TaskInfo
- #define TaskWindow_TaskInfo 0x43380
- #undef XTaskWindow_TaskInfo
- #define XTaskWindow_TaskInfo 0x63380
- #undef TaskWindowTaskInfo_WindowTask
- #define TaskWindowTaskInfo_WindowTask 0x0
- #undef UpCall_Sleep
- #define UpCall_Sleep 0x6
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct taskwindow_message_data taskwindow_message_data;
- typedef struct taskwindow_message_ego taskwindow_message_ego;
- typedef struct taskwindow_message_new_task taskwindow_message_new_task;
-
- /********************
- * Type definitions *
- ********************/
- struct taskwindow_message_data
- { int size;
- char data [232];
- };
-
- struct taskwindow_message_ego
- { int txt;
- };
-
- struct taskwindow_message_new_task
- { char command [236];
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define error_TASK_WINDOW_CANT_KILL 0xA80u
- #define error_TASK_WINDOW_BAD_SWI_ENTRY 0xA81u
- #define error_TASK_WINDOW_BAD_TASK_HANDLE 0xA82u
- #define error_TASK_WINDOW_DYING 0xA83u
- #define error_TASK_WINDOW_FILE_SLEEP 0xA84u
- #define error_TASK_WINDOW_NO_EDITOR 0xA85u
- #define error_TASK_WINDOW_NO_REDIRECTION 0xA86u
- #define message_TASK_WINDOW_INPUT 0x808C0u
- #define message_TASK_WINDOW_OUTPUT 0x808C1u
- #define message_TASK_WINDOW_EGO 0x808C2u
- #define message_TASK_WINDOW_MORIO 0x808C3u
- #define message_TASK_WINDOW_MORITE 0x808C4u
- #define message_TASK_WINDOW_NEW_TASK 0x808C5u
- #define message_TASK_WINDOW_SUSPEND 0x808C6u
- #define message_TASK_WINDOW_RESUME 0x808C7u
-
- /*************************
- * 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: taskwindowtaskinfo_window_task()
- *
- * Description: Obtains whether the calling task is running in a task
- * window
- *
- * Output: window_task - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x43380 with R0 = 0x0.
- */
-
- extern os_error *xtaskwindowtaskinfo_window_task (bool *window_task);
- extern bool taskwindowtaskinfo_window_task (void);
-
- /* ------------------------------------------------------------------------
- * Function: upcall_sleep()
- *
- * Description: Informs the TaskWindow module that a task wants to sleep
- * until some termination condition is met
- *
- * Input: pollword - value of R1 on entry
- *
- * Output: claimed - value of R0 on exit
- *
- * Other notes: Calls SWI 0x33 with R0 = 0x6.
- */
-
- extern os_error *xupcall_sleep (int *pollword,
- bool *claimed);
- extern void upcall_sleep (int *pollword,
- bool *claimed);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-