1 #ifndef LIBRARIES_COMMODITIES_H
    2 #define LIBRARIES_COMMODITIES_H
    3 
    4 /*
    5 	commodities.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 #pragma pack(2)
   19 
   20 
   21 #define CxFilter(d)          CreateCxObj((LONG) CX_FILTER,     (LONG) d,      0)
   22 #define CxSender(port,id)    CreateCxObj((LONG) CX_SEND,       (LONG) port,   (LONG) id)
   23 #define CxSignal(task,sig)   CreateCxObj((LONG) CX_SIGNAL,     (LONG) task,   (LONG) sig)
   24 #define CxTranslate(ie)      CreateCxObj((LONG) CX_TRANSLATE,  (LONG) ie,     0)
   25 #define CxDebug(id)          CreateCxObj((LONG) CX_DEBUG,      (LONG) id,     0)
   26 #define CxCustom(action,id)  CreateCxObj((LONG) CX_CUSTOM,     (LONG) action, (LONG) id)
   27 
   28 
   29 struct NewBroker
   30 {
   31 	BYTE            nb_Version;
   32 	STRPTR          nb_Name;
   33 	STRPTR          nb_Title;
   34 	STRPTR          nb_Descr;
   35 	WORD            nb_Unique;
   36 	WORD            nb_Flags;
   37 	BYTE            nb_Pri;
   38 	struct MsgPort *nb_Port;
   39 	WORD            nb_ReservedChannel;
   40 };
   41 
   42 #define NB_VERSION  5
   43 
   44 #define CBD_NAMELEN   24
   45 #define CBD_TITLELEN  40
   46 #define CBD_DESCRLEN  40
   47 
   48 #define NBU_DUPLICATE  0
   49 #define NBU_UNIQUE     1
   50 #define NBU_NOTIFY     2
   51 
   52 #define COF_SHOW_HIDE  4
   53 
   54 
   55 #ifndef COMMODITIES_BASE_H
   56 typedef LONG CxObj;
   57 typedef LONG CxMsg;
   58 #endif
   59 
   60 typedef LONG (*PFL)(VOID);
   61 
   62 
   63 #define CX_INVALID     0
   64 #define CX_FILTER      1
   65 #define CX_TYPEFILTER  2
   66 #define CX_SEND        3
   67 #define CX_SIGNAL      4
   68 #define CX_TRANSLATE   5
   69 #define CX_BROKER      6
   70 #define CX_DEBUG       7
   71 #define CX_CUSTOM      8
   72 #define CX_ZERO        9
   73 
   74 
   75 #define CXM_IEVENT  (1<<5)
   76 #define CXM_COMMAND (1<<6)
   77 
   78 #define CXCMD_DISABLE    (15)
   79 #define CXCMD_ENABLE     (17)
   80 #define CXCMD_APPEAR     (19)
   81 #define CXCMD_DISAPPEAR  (21)
   82 #define CXCMD_KILL       (23)
   83 #define CXCMD_LIST_CHG   (27)
   84 #define CXCMD_UNIQUE     (25)
   85 
   86 
   87 struct InputXpression
   88 {
   89 	UBYTE ix_Version;
   90 	UBYTE ix_Class;
   91 
   92 	UWORD ix_Code;
   93 	UWORD ix_CodeMask;
   94 
   95 	UWORD ix_Qualifier;
   96 	UWORD ix_QualMask;
   97 	UWORD ix_QualSame;
   98 };
   99 
  100 typedef struct InputXpression IX;
  101 
  102 #define IX_VERSION  2
  103 
  104 #define IXSYM_SHIFT  1
  105 #define IXSYM_CAPS   2
  106 #define IXSYM_ALT    4
  107 
  108 #define IXSYM_SHIFTMASK  (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT)
  109 #define IXSYM_CAPSMASK   (IXSYM_SHIFTMASK | IEQUALIFIER_CAPSLOCK)
  110 #define IXSYM_ALTMASK    (IEQUALIFIER_LALT | IEQUALIFIER_RALT)
  111 
  112 #define IX_NORMALQUALS  0x7FFF
  113 
  114 #define NULL_IX(ix)  ((ix)->ix_Class == IECLASS_NULL)
  115 
  116 
  117 #define CBERR_OK       0
  118 #define CBERR_SYSERR   1
  119 #define CBERR_DUP      2
  120 #define CBERR_VERSION  3
  121 
  122 
  123 #define COERR_ISNULL      1
  124 #define COERR_NULLATTACH  2
  125 #define COERR_BADFILTER   4
  126 #define COERR_BADTYPE     8
  127 
  128 
  129 #pragma pack()
  130 
  131 #endif /* LIBRARIES_COMMODITIES_H */