1 #ifndef LIBRARIES_NOTIFYINTUITION_H 2 #define LIBRARIES_NOTIFYINTUITION_H 3 4 /* 5 notifyintuition library include 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_TYPES_H 11 # include <exec/types.h> 12 #endif 13 14 #ifndef EXEC_PORTS_H 15 #include <exec/ports.h> 16 #endif 17 18 #ifndef EXEC_TASKS_H 19 #include <exec/tasks.h> 20 #endif 21 22 #pragma pack(2) 23 24 25 #define NOTIFYINTUITIONNAME "notifyintuition.library" 26 #define NOTIFYINTUITION_VMIN 2 27 28 29 struct IntNotifyRequest 30 { 31 UBYTE *inr_Name; 32 33 UBYTE *inr_Tokenstring; 34 ULONG inr_UserData; 35 ULONG inr_Flags; 36 37 union 38 { 39 struct 40 { 41 struct Task *inr_Task; 42 } inr_Signal; 43 struct 44 { 45 struct MsgPort *inr_Port; 46 } inr_Msg; 47 struct 48 { 49 APTR inr_Hook; 50 } inr_Hook; 51 } inr_stuff; 52 53 UBYTE inr_SignalNum; 54 BYTE inr_Error; 55 56 BYTE inr_Pri; 57 BYTE inr_pad; 58 59 ULONG inr_UniqueID; 60 61 ULONG inr_Reserved[3]; 62 63 ULONG inr_MsgCount; 64 APTR inr_ReqSemaphore; 65 }; 66 67 #define inr_Task inr_stuff.inr_Signal.inr_Task 68 #define inr_Port inr_stuff.inr_Msg.inr_Task 69 #define inr_Hook inr_stuff.inr_Hook.inr_Task 70 71 72 struct IntNotifyMessage 73 { 74 struct Message inm_Message; 75 76 ULONG inm_Class; 77 UWORD inm_Code; 78 79 struct IntNotifyRequest *inm_NReq; 80 81 APTR inm_IntObject; 82 APTR inm_TagListPtr; 83 84 struct Task *inm_Task; 85 ULONG inm_DoNotTouch1; 86 }; 87 88 89 #define INTNOTIFY_CLASS 0x43210000 90 91 #define INRF_SEND_MESSAGE (1UL << 0) 92 #define INRF_SEND_SIGNAL (1UL << 1) 93 #define INRF_USE_HOOK (1UL << 2) 94 #define INRF_WAIT_REPLY (1UL << 4) 95 #define INRF_NOTIFY_INITIAL (1UL << 5) 96 #define INRF_BEFORE_OPENSCREEN (1UL << 6) 97 #define INRF_AFTER_OPENSCREEN (1UL << 7) 98 #define INRF_BEFORE_CLOSESCREEN (1UL << 8) 99 #define INRF_AFTER_CLOSEWINDOW_ON_SCREEN (1UL << 9) 100 #define INRF_AFTER_PUBSCREENMODE (1UL << 10) 101 #define INRF_BEFORE_OPENWINDOW (1UL << 11) 102 #define INRF_AFTER_OPENWINDOW (1UL << 12) 103 #define INRF_BEFORE_CLOSEWINDOW (1UL << 13) 104 #define INRF_AFTER_OPENWORKBENCH (1UL << 14) 105 #define INRF_BEFORE_CLOSEWORKBENCH (1UL << 15) 106 #define INRF_BEFORE_LOCKPUBSCREEN (1UL << 16) 107 #define INRF_AFTER_SCREENTOFRONT (1UL << 17) 108 #define INRF_AFTER_SCREENTOBACK (1UL << 18) 109 #define INRF_NOT_MYOWNREQUEST (1UL << 23) 110 111 #define INR_LIBRARY_FLAGS 0xff000000 112 113 #define INRCODE_BEFORE_OPENSCREEN 0x0001 114 #define INRCODE_AFTER_OPENSCREEN 0x0002 115 #define INRCODE_BEFORE_CLOSESCREEN 0x0004 116 #define INRCODE_AFTER_CLOSEWINSCREEN 0x0008 117 #define INRCODE_AFTER_CHANGEPUBMODE 0x0010 118 #define INRCODE_BEFORE_OPENWINDOW 0x0020 119 #define INRCODE_AFTER_OPENWINDOW 0x0040 120 #define INRCODE_BEFORE_CLOSEWINDOW 0x0080 121 #define INRCODE_AFTER_OPENWORKBENCH 0x0100 122 #define INRCODE_BEFORE_CLOSEWORKBENCH 0x0200 123 #define INRCODE_BEFORE_LOCKPUBSCREEN 0x0400 124 #define INRCODE_AFTER_SCREENTOFRONT 0x0800 125 #define INRCODE_AFTER_SCREENTOBACK 0x1000 126 127 #define INRERROR_UNIQUE 98 128 #define INRERROR_NOFLAGS 99 129 #define INRERROR_WRONGTYPE 100 130 #define INRERROR_NOSIGNAL 101 131 #define INRERROR_NOTHINGTODO 102 132 #define INRERROR_LOWMEM 103 133 #define INRERROR_OUTSTANDING_MSGS -1 134 #define INRERROR_ISLOCKED -2 135 #define INRERROR_UNKNOWN -3 136 #define INRERROR_INUSE -4 137 138 139 #pragma pack() 140 141 #endif /* LIBRARIES_NOTIFYINTUITION_H */