home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / libraries / commodities.i < prev    next >
Text File  |  1993-10-15  |  5KB  |  154 lines

  1.        IFND LIBRARIES_COMMODITIES_I
  2. LIBRARIES_COMMODITIES_I SET 1
  3. **    $VER: commodities.i 38.5 (20.10.92)
  4. **    Includes Release 40.15
  5. **
  6. **    Commodities definitions
  7. **
  8. **    (C) Copyright 1990-1993 Commodore-Amiga Inc.
  9. **    All Rights Reserved
  10. **
  11.  
  12. ;---------------------------------------------------------------------------
  13.  
  14.     IFND EXEC_TYPES_I
  15.     INCLUDE "exec/types.i"
  16.     ENDC
  17.  
  18.     IFND DEVICES_INPUTEVENT_I
  19.     INCLUDE "devices/inputevent.i"
  20.     ENDC
  21.  
  22. ;---------------------------------------------------------------------------
  23.  
  24.    STRUCTURE NewBroker,0
  25.     BYTE    nb_Version     ; must be set to NB_VERSION
  26.     BYTE    nb_Reserve1
  27.     APTR    nb_Name
  28.     APTR    nb_Title
  29.     APTR    nb_Descr
  30.     WORD    nb_Unique
  31.     WORD    nb_Flags
  32.     BYTE    nb_Pri
  33.     BYTE    nb_Reserve2
  34.     APTR    nb_Port
  35.     WORD    nb_ReservedChannel
  36.    LABEL NewBroker_SIZEOF
  37.  
  38. ; constant for NewBroker.nb_Version
  39. NB_VERSION equ 5 ; Version of NewBroker structure
  40.  
  41. ; Sizes for various buffers
  42. CBD_NAMELEN  equ 24
  43. CBD_TITLELEN equ 40
  44. CBD_DESCRLEN equ 40
  45.  
  46. ; Flags for NewBroker.nb_Unique
  47. NBU_DUPLICATE equ 0
  48. NBU_UNIQUE    equ 1       ; will not allow duplicates
  49. NBU_NOTIFY    equ 2       ; sends CXM_UNIQUE to existing broker
  50.  
  51. ; Flags for NewBroker.nb_Flags
  52. COF_SHOW_HIDE equ 4
  53.  
  54. ;---------------------------------------------------------------------------
  55.  
  56. ; Commodities object types
  57. CX_INVALID    equ 0    ; not a valid object (probably null)
  58. CX_FILTER     equ 1    ; input event messages only
  59. CX_TYPEFILTER equ 2    ; obsolete, do not use
  60. CX_SEND       equ 3    ; sends a message
  61. CX_SIGNAL     equ 4    ; sends a signal
  62. CX_TRANSLATE  equ 5    ; translates input event into chain
  63. CX_BROKER     equ 6    ; application representative
  64. CX_DEBUG      equ 7    ; dumps info to serial port
  65. CX_CUSTOM     equ 8    ; application provides function
  66. CX_ZERO       equ 9    ; system terminator node
  67.  
  68. ;---------------------------------------------------------------------------
  69.  
  70. ; Commodities message types
  71. CXM_IEVENT  equ $20
  72. CXM_COMMAND equ $40
  73.  
  74. ;* Only CXM_IEVENT messages are passed through the input network. Other types
  75. ;* of messages are sent to an optional port in your broker. This means that
  76. ;* you must test the message type in your message handling, if input messages
  77. ;* an command messages come to the same port.
  78. ;*
  79. ;* CXM_IEVENT: Messages of this type rattle around the Commodities input
  80. ;*           network. They are sent to you by a Sender object, and passed
  81. ;*           to you as a synchronous function call by a Custom object.
  82. ;*
  83. ;*           The message port or function entry point is stored in the
  84. ;*           object, and the ID fied of the message will be set to what
  85. ;*           you arrange issuing object.
  86. ;*
  87. ;*           The data section of the message will point to the input event
  88. ;*           triggering the message.
  89. ;*
  90. ;* CXM_COMMAND: These messages are sent to a port attached to your Broker.
  91. ;*        They are sent to you when the controller program ants your
  92. ;*        program to do something. The ID value identifies the command.
  93. ;*
  94.  
  95. ; ID values associated with a message of type CXM_COMMAND
  96. CXCMD_DISABLE    equ 15    ; please disable yourself
  97. CXCMD_ENABLE    equ 17    ; please enable yourself
  98. CXCMD_APPEAR    equ 19    ; open your window, if you can
  99. CXCMD_DISAPPEAR equ 21    ; go dormant
  100. CXCMD_KILL    equ 23    ; go away for good
  101. CXCMD_LIST_CHG    equ 27    ; Someone changed the broker list
  102. CXCMD_UNIQUE    equ 25    ; someone tried to create a broker              ; with your name. Suggest you appear.
  103.  
  104. ;---------------------------------------------------------------------------
  105.  
  106.    STRUCTURE InputXpression,0
  107.     UBYTE    ix_Version    ; must be set to IX_VERSION
  108.     UBYTE    ix_Class    ; class must match exactly
  109.     UWORD    ix_Code    ; Bits that we want
  110.     UWORD    ix_CodeMask    ; Set bits here to indicate
  111.                 ; which bits in ix_Code are
  112.                 ; don't care bits.
  113.         UWORD   ix_Qualifier    ; Bits that we want
  114.         UWORD   ix_QualMask     ; Set bits here to indicate
  115.                                 ; which bits in ix_Qualifier
  116.                                 ; are don't care bits
  117.     UWORD    ix_QualSame    ; synonyms in qualifier
  118.    LABEL ix_SIZEOF
  119.  
  120. ; constant for InputXpression.ix_Version
  121. IX_VERSION equ 2
  122.  
  123. ; constants for InputXpression.ix_QualSame
  124. IXSYM_SHIFT    equ 1      ; left- and right- shift are equivalent
  125. IXSYM_CAPS    equ 2      ; either shift or caps lock are equivalent
  126. IXSYM_ALT    equ 4      ; left- and right- alt are equivalent
  127.  
  128. IXSYM_SHIFTMASK equ IEQUALIFIER_LSHIFT!IEQUALIFIER_RSHIFT
  129. IXSYM_CAPSMASK    equ IXSYM_SHIFTMASK!IEQUALIFIER_CAPSLOCK
  130. IXSYM_ALTMASK    equ IEQUALIFIER_LALT!IEQUALIFIER_RALT
  131.  
  132. ; onstant for InputXpression.ix_QualMask
  133. IX_NORMALQUALS    equ $7FFF  ; avoid RELATIVEMOUSE
  134.  
  135. ;---------------------------------------------------------------------------
  136.  
  137. ; Error returns from CxBroker()
  138. CBERR_OK      equ 0  ; No error
  139. CBERR_SYSERR  equ 1  ; System error, no memory, etc
  140. CBERR_DUP     equ 2  ; uniqueness violation
  141. CBERR_VERSION equ 3  ; didn't understand NewBroker.nb_Version
  142.  
  143. ;--------------------------------------------------------------------------
  144.  
  145. ; Return values from CxObjError()
  146. COERR_ISNULL     equ 1   ; you called CxObjError(NULL)
  147. COERR_NULLATTACH equ 2   ; someone attahed NULL to my list
  148. COERR_BADFILTER  equ 4   ; a bad filter description was given
  149. COERR_BADTYPE    equ 8   ; unmatched type-specific operation
  150.  
  151. ;---------------------------------------------------------------------------
  152.  
  153.         ENDC    ; LIBRARIES_COMMODITIES_I
  154.