home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #4 / amigamamagazinepolishissue1998.iso / airi / executive_v2.10 / data / developers.lha / ExecutiveAPI / Assembler / ExecutiveAPI.i
Text File  |  1997-02-23  |  3KB  |  95 lines

  1.     IFND EXECUTIVEAPI_I
  2. EXECUTIVEAPI_I  SET 1
  3.  
  4. *
  5. *       $VER: ExecutiveAPI.i 1.00 (16.12.96)
  6. *       ExecutiveAPI Release 1.00
  7. *
  8. *       ExecutiveAPI definitions
  9. *
  10. *       Copyright © 1996-97 Petri Nordlund. All rights reserved.
  11. *
  12. *       $Id: ExecutiveAPI.i 1.1 1996/12/16 16:00:00 akil Exp akil $
  13. *
  14.  
  15.     IFND    EXEC_TYPES_I
  16.     INCLUDE "exec/types.i"
  17.     ENDC ; EXEC_TYPES_I
  18.  
  19.     IFND    EXEC_PORTS_I
  20.     INCLUDE "exec/ports.i"
  21.     ENDC ; EXEC_PORTS_I
  22.  
  23. *
  24. * Public message port to send messages to
  25. *
  26.  
  27. EXECUTIVEAPI_PORTNAME MACRO
  28.     DC.B 'Executive_server',0
  29.     ENDM
  30.  
  31. *
  32. * ExecutiveMessage
  33. *
  34.  
  35.  STRUCTURE ExecutiveMessage,0
  36.     STRUCT  em_message,MN_SIZE
  37.     WORD    em_ident                    ; This must always be 0
  38.  
  39.     WORD    em_command                  ; Command to be sent, see below
  40.     APTR    em_task                     ; Task address
  41.     APTR    em_taskname                 ; Task name
  42.     LONG    em_value1                   ; Depends on command
  43.     LONG    em_value2                   ; Depends on command
  44.     LONG    em_value3                   ; Depends on command
  45.     LONG    em_value4                   ; Depends on command
  46.     WORD    em_error                    ; Non-zero if error, see below
  47.     STRUCT  em_reserved,16              ; Reserved for future use
  48.     LABEL   em_SIZEOF
  49.  
  50.  
  51. *
  52. * Commands
  53. *
  54.  
  55. EXAPI_CMD_ADD_CLIENT    EQU 0           ; Add new client
  56. EXAPI_CMD_REM_CLIENT    EQU 1           ; Remove client
  57. EXAPI_CMD_GET_NICE      EQU 2           ; Get nice-value
  58. EXAPI_CMD_SET_NICE      EQU 3           ; Set nice-value
  59. EXAPI_CMD_GET_PRIORITY  EQU 4           ; Get the correct (not scheduling priority of the task
  60. EXAPI_CMD_WATCH         EQU 5           ; Schedule, don't schedule etc. See below
  61.  
  62. *
  63. * These are used with EXAPI_CMD_WATCH
  64. *
  65.  
  66. * --> value1
  67.  
  68. EXAPI_WHICH_TASK        EQU 0           ; Current task
  69. EXAPI_WHICH_CHILDTASKS  EQU 1           ; Childtasks of this task
  70.  
  71. * --> value2
  72.  
  73. EXAPI_TYPE_SCHEDULE     EQU 0           ; Schedule      this task / child tasks
  74. EXAPI_TYPE_NOSCHEDULE   EQU 1           ; Dont' schedule this task / child tasks
  75. EXAPI_TYPE_RELATIVE     EQU 2           ; The priority of the child tasks relative to parent's
  76.                                         ; priority
  77. * --> value3
  78.  
  79. EXAPI_PRI_LEAVE_ALONE   EQU 0           ; Ignore task priority
  80. EXAPI_PRI_ABOVE         EQU 1           ; Task's priority kept above scheduled tasks
  81. EXAPI_PRI_BELOW         EQU 2           ; Task's priority kept below scheduled tasks
  82. EXAPI_PRI_SET           EQU 3           ; Set priority to given value (value4)
  83.  
  84. *
  85. * Errors
  86. *
  87.  
  88. EXAPI_OK                    EQU 0       ; No error
  89. EXAPI_ERROR_TASK_NOT_FOUND  EQU 1       ; Specified tass wasn't found
  90. EXAPI_ERROR_NO_SERVER       EQU 2       ; Server not available (quitting)
  91. EXAPI_ERROR_INTERNAL        EQU 3       ; Misc. error (e.g. no memory)
  92. EXAPI_ERROR_ALREADY_WATCHED EQU 4       ; Task is already being watched, meaning that
  93.                                         ; user has put the task to "Executive.prefs".
  94.     ENDC ; EXECUTIVEAPI_I
  95.