revert between 56095 -> 55830 in arch
[AROS.git] / compiler / include / libraries / commodities.h
blob7bf9281553f0e5b8ff1b44f1d7cd93eeaf63dfc0
1 #ifndef LIBRARIES_COMMODITIES_H
2 #define LIBRARIES_COMMODITIES_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Includes for commodities.library.
9 */
11 #ifndef EXEC_PORTS_H
12 # include <exec/ports.h>
13 #endif
14 #ifndef EXEC_TYPES_H
15 # include <exec/types.h>
16 #endif
18 #ifndef COMMODITIES_BASE_H
19 typedef LONG CxObj;
20 typedef LONG CxMsg;
21 #endif /* COMMODITIES_BASE_H */
23 typedef LONG (*PFL)();
25 struct NewBroker
27 BYTE nb_Version; /* see below */
28 CONST_STRPTR nb_Name;
29 CONST_STRPTR nb_Title;
30 CONST_STRPTR nb_Descr;
31 WORD nb_Unique; /* see below */
32 WORD nb_Flags; /* see below */
33 BYTE nb_Pri;
34 struct MsgPort * nb_Port;
35 WORD nb_ReservedChannel;
38 /* nb_Version */
39 #define NB_VERSION 5
41 /* nb_Unique */
42 #define NBU_DUPLICATE 0
43 #define NBU_UNIQUE (1<<0)
44 #define NBU_NOTIFY (1<<1)
46 /* nb_Flags */
47 #define COF_SHOW_HIDE (1<<2)
48 #define COF_ACTIVE (1<<1) /* Object is active - undocumented in AmigaOS */
50 #define CBD_NAMELEN 24 /* length of nb_Name */
51 #define CBD_TITLELEN 40 /* length of nb_Title */
52 #define CBD_DESCRLEN 40 /* length of nb_Descr */
54 /* return values of CxBroker() */
55 #define CBERR_OK 0
56 #define CBERR_SYSERR 1
57 #define CBERR_DUP 2
58 #define CBERR_VERSION 3
60 /* return values of CxObjError() */
61 #define COERR_ISNULL (1<<0)
62 #define COERR_NULLATTACH (1<<1)
63 #define COERR_BADFILTER (1<<2)
64 #define COERR_BADTYPE (1<<3)
66 #define CXM_IEVENT (1<<5)
67 #define CXM_COMMAND (1<<6)
69 #define CXCMD_DISABLE (15)
70 #define CXCMD_ENABLE (17)
71 #define CXCMD_APPEAR (19)
72 #define CXCMD_DISAPPEAR (21)
73 #define CXCMD_KILL (23)
74 #define CXCMD_UNIQUE (25)
75 #define CXCMD_LIST_CHG (27)
77 #define CX_INVALID 0
78 #define CX_FILTER 1
79 #define CX_TYPEFILTER 2
80 #define CX_SEND 3
81 #define CX_SIGNAL 4
82 #define CX_TRANSLATE 5
83 #define CX_BROKER 6
84 #define CX_DEBUG 7
85 #define CX_CUSTOM 8
86 #define CX_ZERO 9
88 /* Macros */
89 #define CxFilter(d) CreateCxObj((LONG)CX_FILTER, (IPTR)(d), 0L)
90 #define CxSender(port,id) CreateCxObj((LONG)CX_SEND, (IPTR)(port), (LONG)(id))
91 #define CxSignal(task,sig) CreateCxObj((LONG)CX_SIGNAL, (IPTR)(task), (LONG)(sig))
92 #define CxTranslate(ie) CreateCxObj((LONG)CX_TRANSLATE, (IPTR)(ie), 0L)
93 #define CxDebug(id) CreateCxObj((LONG)CX_DEBUG, (IPTR)(id), 0L)
94 #define CxCustom(action,id) CreateCxObj((LONG)CX_CUSTOM, (IPTR)(action), (LONG)(id))
96 struct InputXpression
98 UBYTE ix_Version; /* see below */
99 UBYTE ix_Class;
100 UWORD ix_Code;
101 UWORD ix_CodeMask;
102 UWORD ix_Qualifier;
103 UWORD ix_QualMask; /* see below */
104 UWORD ix_QualSame; /* see below */
106 typedef struct InputXpression IX;
108 /* ix_Version */
109 #define IX_VERSION 2
111 /* ix_QualMask */
112 #define IX_NORMALQUALS 0x7FFF
114 /* ix_QualSame */
115 #define IXSYM_SHIFT (1<<0)
116 #define IXSYM_CAPS (1<<1)
117 #define IXSYM_ALT (1<<2)
118 #define IXSYM_SHIFTMASK (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT)
119 #define IXSYM_CAPSMASK (IXSYM_SHIFTMASK | IEQUALIFIER_CAPSLOCK)
120 #define IXSYM_ALTMASK (IEQUALIFIER_LALT | IEQUALIFIER_RALT)
122 #define NULL_IX(ix) ((ix)->ix_Class == IECLASS_NULL)
124 /* Nodes of the list got from CopyBrokerList(). This function is used by
125 * Exchange to get the current brokers. This structure is the same as
126 * in AmigaOS and MorphOS, but it is undocumented there. */
127 struct BrokerCopy
129 struct Node bc_Node;
130 char bc_Name[CBD_NAMELEN];
131 char bc_Title[CBD_TITLELEN];
132 char bc_Descr[CBD_DESCRLEN];
133 struct Task *bc_Task; /* Private, do not use this */
134 struct MsgPort *bc_Port; /* Private, do not use this */
135 UWORD bc_Dummy;
136 ULONG bc_Flags;
139 #endif /* LIBRARIES_COMMODITIES_H */