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

  1. #ifndef taskwindow_H
  2. #define taskwindow_H
  3.  
  4. /* C header file for TaskWindow
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 22 12:16:11 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. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  TaskWindow_TaskInfo
  21. #define TaskWindow_TaskInfo                     0x43380
  22. #undef  XTaskWindow_TaskInfo
  23. #define XTaskWindow_TaskInfo                    0x63380
  24. #undef  TaskWindowTaskInfo_WindowTask
  25. #define TaskWindowTaskInfo_WindowTask           0x0
  26. #undef  UpCall_Sleep
  27. #define UpCall_Sleep                            0x6
  28.  
  29. /************************************
  30.  * Structure and union declarations *
  31.  ************************************/
  32. typedef struct taskwindow_message_data          taskwindow_message_data;
  33. typedef struct taskwindow_message_ego           taskwindow_message_ego;
  34. typedef struct taskwindow_message_new_task      taskwindow_message_new_task;
  35.  
  36. /********************
  37.  * Type definitions *
  38.  ********************/
  39. struct taskwindow_message_data
  40.    {  int size;
  41.       char data [232];
  42.    };
  43.  
  44. struct taskwindow_message_ego
  45.    {  int txt;
  46.    };
  47.  
  48. struct taskwindow_message_new_task
  49.    {  char command [236];
  50.    };
  51.  
  52. /************************
  53.  * Constant definitions *
  54.  ************************/
  55. #define error_TASK_WINDOW_CANT_KILL             0xA80u
  56. #define error_TASK_WINDOW_BAD_SWI_ENTRY         0xA81u
  57. #define error_TASK_WINDOW_BAD_TASK_HANDLE       0xA82u
  58. #define error_TASK_WINDOW_DYING                 0xA83u
  59. #define error_TASK_WINDOW_FILE_SLEEP            0xA84u
  60. #define error_TASK_WINDOW_NO_EDITOR             0xA85u
  61. #define error_TASK_WINDOW_NO_REDIRECTION        0xA86u
  62. #define message_TASK_WINDOW_INPUT               0x808C0u
  63. #define message_TASK_WINDOW_OUTPUT              0x808C1u
  64. #define message_TASK_WINDOW_EGO                 0x808C2u
  65. #define message_TASK_WINDOW_MORIO               0x808C3u
  66. #define message_TASK_WINDOW_MORITE              0x808C4u
  67. #define message_TASK_WINDOW_NEW_TASK            0x808C5u
  68. #define message_TASK_WINDOW_SUSPEND             0x808C6u
  69. #define message_TASK_WINDOW_RESUME              0x808C7u
  70.  
  71. /*************************
  72.  * Function declarations *
  73.  *************************/
  74.  
  75. #ifdef __cplusplus
  76.    extern "C" {
  77. #endif
  78.  
  79. /* ------------------------------------------------------------------------
  80.  * Function:      taskwindowtaskinfo_window_task()
  81.  *
  82.  * Description:   Obtains whether the calling task is running in a task
  83.  *                window
  84.  *
  85.  * Output:        window_task - value of R0 on exit (X version only)
  86.  *
  87.  * Returns:       R0 (non-X version only)
  88.  *
  89.  * Other notes:   Calls SWI 0x43380 with R0 = 0x0.
  90.  */
  91.  
  92. extern os_error *xtaskwindowtaskinfo_window_task (bool *window_task);
  93. extern bool taskwindowtaskinfo_window_task (void);
  94.  
  95. /* ------------------------------------------------------------------------
  96.  * Function:      upcall_sleep()
  97.  *
  98.  * Description:   Informs the TaskWindow module that a task wants to sleep
  99.  *                until some termination condition is met
  100.  *
  101.  * Input:         pollword - value of R1 on entry
  102.  *
  103.  * Output:        claimed - value of R0 on exit (X version only)
  104.  *
  105.  * Returns:       R0 (non-X version only)
  106.  *
  107.  * Other notes:   Calls SWI 0x33 with R0 = 0x6.
  108.  */
  109.  
  110. extern os_error *xupcall_sleep (int *pollword,
  111.       bool *claimed);
  112. extern bool upcall_sleep (int *pollword);
  113.  
  114. #ifdef __cplusplus
  115.    }
  116. #endif
  117.  
  118. #endif
  119.