home *** CD-ROM | disk | FTP | other *** search
- #ifndef taskwindow_H
- #define taskwindow_H
-
- /* C header file for TaskWindow
- * written by DefMod (Jun 20 1995) on Thu Jun 22 12:16:11 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #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
-
- /* ------------------------------------------------------------------------
- * 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 (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x33 with R0 = 0x6.
- */
-
- extern os_error *xupcall_sleep (int *pollword,
- bool *claimed);
- extern bool upcall_sleep (int *pollword);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-