home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / libraries / commodities.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  2.7 KB  |  161 lines

  1. #ifndef LIBRARIES_COMMODITIES_H
  2. #define LIBRARIES_COMMODITIES_H
  3.  
  4. /*
  5. ** $Filename: libraries/commodities.h $
  6. ** $Release: 2.04 Includes, V37.4 $
  7. ** $Revision: 37.1 $
  8. ** $Date: 91/04/15 $
  9. **
  10. ** Commodities definitions.
  11. **
  12. ** (C) Copyright 1988-1991 Commodore-Amiga Inc.
  13. ** All Rights Reserved
  14. */
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20.  
  21. #define CxFilter(d) CreateCxObj((LONG)CX_FILTER, (LONG) d, 0)
  22. #define CxTypeFilter(type) CreateCxObj((LONG)CX_TYPEFILTER, (LONG) type, 0)
  23. #define CxSender(port,id) CreateCxObj((LONG)CX_SEND, (LONG) port, (LONG) id)
  24. #define CxSignal(task,sig) CreateCxObj((LONG)CX_SIGNAL,(LONG) task, (LONG) sig)
  25. #define CxTranslate(ie) CreateCxObj((LONG)CX_TRANSLATE, (LONG) ie, 0)
  26. #define CxDebug(id) CreateCxObj((LONG)CX_DEBUG, (LONG) id, 0)
  27. #define CxCustom(action,id) CreateCxObj((LONG)CX_CUSTOM,(LONG)action,(LONG)id)
  28.  
  29.  
  30.  
  31.  
  32. #define CBD_NAMELEN 24
  33. #define CBD_TITLELEN 40
  34. #define CBD_DESCRLEN 40
  35.  
  36.  
  37. #define CBERR_OK 0 
  38. #define CBERR_SYSERR 1 
  39. #define CBERR_DUP 2 
  40. #define CBERR_VERSION 3 
  41.  
  42. #define NB_VERSION 5 
  43.  
  44. struct NewBroker {
  45.  BYTE nb_Version; 
  46.  BYTE *nb_Name;
  47.  BYTE *nb_Title;
  48.  BYTE *nb_Descr;
  49.  SHORT nb_Unique;
  50.  SHORT nb_Flags;
  51.  BYTE nb_Pri;
  52.  struct MsgPort *nb_Port;
  53.  WORD nb_ReservedChannel; 
  54. };
  55.  
  56.  
  57. #define NBU_DUPLICATE 0
  58. #define NBU_UNIQUE 1 
  59. #define NBU_NOTIFY 2 
  60.  
  61.  
  62. #define COF_SHOW_HIDE 4
  63.  
  64.  
  65.  
  66.  
  67. #ifndef CX_H
  68. typedef LONG CxObj;
  69. typedef LONG CxMsg;
  70. #endif
  71.  
  72.  
  73. typedef LONG (*PFL)();
  74.  
  75.  
  76.  
  77.  
  78. #define CX_INVALID 0 
  79. #define CX_FILTER 1 
  80. #define CX_TYPEFILTER 2 
  81. #define CX_SEND 3 
  82. #define CX_SIGNAL 4 
  83. #define CX_TRANSLATE 5 
  84. #define CX_BROKER 6 
  85. #define CX_DEBUG 7 
  86. #define CX_CUSTOM 8 
  87. #define CX_ZERO 9 
  88.  
  89.  
  90.  
  91.  
  92. #define CXM_UNIQUE (1 << 4) 
  93.  
  94.  
  95.  
  96. #define CXM_IEVENT (1 << 5)
  97.  
  98.  
  99. #define CXM_COMMAND (1 << 6)
  100.  
  101.  
  102. #define CXCMD_DISABLE (15) 
  103. #define CXCMD_ENABLE (17) 
  104. #define CXCMD_APPEAR (19) 
  105. #define CXCMD_DISAPPEAR (21) 
  106. #define CXCMD_KILL (23) 
  107. #define CXCMD_UNIQUE (25) 
  108. #define CXCMD_LIST_CHG (27) 
  109.  
  110.  
  111.  
  112. #define CMDE_OK (0)
  113. #define CMDE_NOBROKER (-1)
  114. #define CMDE_NOPORT (-2)
  115. #define CMDE_NOMEM (-3)
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122. #define COERR_ISNULL 1 
  123. #define COERR_NULLATTACH 2 
  124. #define COERR_BADFILTER 4 
  125. #define COERR_BADTYPE 8 
  126.  
  127.  
  128.  
  129.  
  130. #define IX_VERSION 2
  131.  
  132. struct InputXpression {
  133.  UBYTE ix_Version; 
  134.  UBYTE ix_Class; 
  135.  
  136.  UWORD ix_Code;
  137.  UWORD ix_CodeMask; 
  138.  
  139.  UWORD ix_Qualifier;
  140.  UWORD ix_QualMask;
  141.  UWORD ix_QualSame; 
  142.  };
  143. typedef struct InputXpression IX;
  144.  
  145.  
  146. #define IXSYM_SHIFT 1 
  147. #define IXSYM_CAPS 2 
  148. #define IXSYM_ALT 4 
  149.  
  150.  
  151. #define IXSYM_SHIFTMASK (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT)
  152. #define IXSYM_CAPSMASK (IXSYM_SHIFTMASK | IEQUALIFIER_CAPSLOCK)
  153. #define IXSYM_ALTMASK (IEQUALIFIER_LALT | IEQUALIFIER_RALT)
  154.  
  155. #define IX_NORMALQUALS 0x7FFF;
  156.  
  157.  
  158. #define NULL_IX(I) ((I)->ix_Class == IECLASS_NULL)
  159.  
  160. #endif
  161.