home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / datatypes / datatypes.i < prev    next >
Text File  |  1993-10-15  |  6KB  |  213 lines

  1.     IFND DATATYPES_DATATYPES_I
  2. DATATYPES_DATATYPES_I    SET    1
  3. **
  4. **    $VER: datatypes.i 39.4 (22.4.93)
  5. **    Includes Release 40.15
  6. **
  7. **    (C) Copyright 1991-1993 Commodore-Amiga, Inc.
  8. **        All Rights Reserved
  9. **
  10.  
  11. ;------------------------------------------------------------------------------
  12.  
  13.     IFND  EXEC_TYPES_I
  14.     INCLUDE "exec/types.i"
  15.     ENDC
  16.  
  17.     IFND  EXEC_LISTS_I
  18.     INCLUDE "exec/lists.i"
  19.     ENDC
  20.  
  21.     IFND  EXEC_NODES_I
  22.     INCLUDE "exec/nodes.i"
  23.     ENDC
  24.  
  25.     IFND  EXEC_LIBRARIES_I
  26.     INCLUDE "exec/libraries.i"
  27.     ENDC
  28.  
  29.     IFND  LIBRARIES_IFFPARSE_I
  30.     INCLUDE "libraries/iffparse.i"
  31.     ENDC
  32.  
  33.     IFND    DOS_DOS_I
  34.     INCLUDE "dos/dos.i"
  35.     ENDC
  36.  
  37. ;------------------------------------------------------------------------------
  38.  
  39. ID_DTYP        equ    'DTYP'
  40.  
  41. ;------------------------------------------------------------------------------
  42.  
  43. ID_DTHD        equ    'DTHD'
  44.  
  45.     STRUCTURE DataTypeHeader,0
  46.  
  47.     ULONG    dth_Name                ; Descriptive name of the data type
  48.     ULONG    dth_BaseName                ; Base name of the data type
  49.     ULONG    dth_Pattern                ; Match pattern for the file name.
  50.     APTR    dth_Mask                ; Comparision mask
  51.     ULONG    dth_GroupID                ; Group that the data type is in
  52.     ULONG    dth_ID                    ; ID for data type (same as IFF FORM type
  53.     WORD    dth_MaskLen                ; Length of comparision mask
  54.     WORD    dth_Pad                    ; Unused at present (must be 0)
  55.     UWORD    dth_Flags                ; Flags
  56.     UWORD    dth_Priority                ; Priority
  57.  
  58.     LABEL DataTypeHeader_SIZEOF
  59.  
  60. ; Basic data type
  61. DTF_TYPE_MASK    equ    $000F
  62. DTF_BINARY    equ    $0000
  63. DTF_ASCII    equ    $0001
  64. DTF_IFF        equ    $0002
  65. DTF_MISC    equ    $0003
  66.  
  67. ; Set if case in mask is important
  68. DTF_CASE    equ    $0010
  69.  
  70. ; Reserved for system use
  71. DTF_SYSTEM1    equ    $1000
  72.  
  73. ;------------------------------------------------------------------------------
  74. ;
  75. ; GROUP ID and ID
  76. ;
  77. ; This is used for filtering out objects that you don't want.  For
  78. ; example, you could make a filter for the ASL file requester so
  79. ; that it only showed the files that were pictures, or even to
  80. ; narrow it down to only show files that were ILBM pictures.
  81. ;
  82. ; Note that the Group ID's are in lower case, and always the first
  83. ; four characters of the word.
  84. ;
  85. ; For ID's; If it is an IFF file, then the ID is the same as the
  86. ; FORM type.  If it isn't an IFF file, then the ID would be the
  87. ; first four characters of name for the file type.
  88. ;
  89. ;------------------------------------------------------------------------------
  90.  
  91. ; System file, such as; directory, executable, library, device, font, etc.
  92. GID_SYSTEM    equ    'syst'
  93.  
  94. ; Formatted or unformatted text
  95. GID_TEXT    equ    'text'
  96.  
  97. ; Formatted text with graphics or other DataTypes
  98. GID_DOCUMENT    equ    'docu'
  99.  
  100. ; Sound
  101. GID_SOUND    equ    'soun'
  102.  
  103. ; Musical instruments used for musical scores
  104. GID_INSTRUMENT    equ    'inst'
  105.  
  106. ; Musical score
  107. GID_MUSIC    equ    'musi'
  108.  
  109. ; Still picture
  110. GID_PICTURE    equ    'pict'
  111.  
  112. ; Animated picture
  113. GID_ANIMATION    equ    'anim'
  114.  
  115. ; Animation with audio track
  116. GID_MOVIE    equ    'movi'
  117.  
  118. ;------------------------------------------------------------------------------
  119.  
  120. ; A code chunk contains an embedded executable that can be loaded with InternalLoadSeg.
  121. ID_CODE        equ    'DTCD'
  122.  
  123. ; DataTypes comparision hook context (Read-Only).  This is the
  124. ; argument that is passed to a custom comparision routine.
  125.     STRUCTURE DTHookContext,0
  126.  
  127.     ; Libraries that are already opened for your use
  128.     APTR    dthc_SysBase                ; exec.library
  129.     APTR    dthc_DOSBase                ; dos.library
  130.     APTR    dthc_IFFParseBase            ; iffparse.library
  131.     APTR    dthc_UtilityBase            ; utility.library
  132.  
  133.     ; File context
  134.     BPTR    dthc_Lock;                ; Lock on the file
  135.     APTR    dthc_FIB;                ; Pointer to a FileInfoBlock
  136.     BPTR    dthc_FileHandle                ; Pointer to the file handle (may be NULL)
  137.     APTR    dthc_IFF                ; Pointer to an IFFHandle (may be NULL)
  138.     APTR    dthc_Buffer                ; Pointer to a prefilled buffer
  139.     ULONG    dthc_BufferLength            ; Length of the buffer
  140.  
  141.     LABEL DTHookContext_SIZEOF
  142.  
  143. ;------------------------------------------------------------------------------
  144.  
  145. ID_TOOL        equ    'DTTL'
  146.  
  147.     STRUCTURE Tool,0
  148.     UWORD    tn_Which                ; Which tool is this
  149.     UWORD    tn_Flags                ; Flags
  150.     APTR    tn_Program                ; Application to use
  151.  
  152.     LABEL Tool_SIZEOF
  153.  
  154. TW_INFO        equ    1
  155. TW_BROWSE    equ    2
  156. TW_EDIT        equ    3
  157. TW_PRINT    equ    4
  158. TW_MAIL        equ    5
  159.  
  160. TF_LAUNCH_MASK    equ    $000F
  161. TF_SHELL    equ    $0001
  162. TF_WORKBENCH    equ    $0002
  163. TF_RX        equ    $0003
  164.  
  165. ;------------------------------------------------------------------------------
  166.  
  167. ID_TAGS        equ    'DTTG'
  168.  
  169.     STRUCTURE DataType,0
  170.     STRUCT    dtn_Node1,(LN_SIZE)            ; Reserved for system use
  171.     STRUCT    dtn_Node2,(LN_SIZE)            ; Reserved for system use
  172.     APTR    dtn_Header                ; Pointer to DataTypeHeader
  173.     STRUCT    dtn_ToolList,(LH_SIZE)            ; List of tool nodes
  174.     APTR    dtn_FunctionName            ; Name of comparision routine
  175.     APTR    dtn_AttrList                ; Object creation tags
  176.     ULONG    dtn_Length                ; Length of the memory block
  177.  
  178.     LABEL DataType_SIZEOF
  179.  
  180. ;------------------------------------------------------------------------------
  181.  
  182.     STRUCTURE ToolNode,0
  183.     STRUCT    tn_Node,(LN_SIZE)            ; Embedded node
  184.     STRUCT    tn_Tool,(Tool_SIZEOF)            ; Embedded tool
  185.     ULONG    tn_Length                ; Length of memory block
  186.     LABEL ToolNode_SIZEOF
  187.  
  188. ;------------------------------------------------------------------------------
  189.  
  190. ID_NAME        equ    'NAME'
  191.  
  192. ;------------------------------------------------------------------------------
  193.  
  194. ; text ID's
  195. DTERROR_UNKNOWN_DATATYPE    equ    2000
  196. DTERROR_COULDNT_SAVE        equ    2001
  197. DTERROR_COULDNT_OPEN        equ    2002
  198. DTERROR_COULDNT_SEND_MESSAGE    equ    2003
  199.  
  200. ; new for V40
  201. DTERROR_COULDNT_OPEN_CLIPBOARD    equ    2004
  202. DTERROR_Reserved        equ    2005
  203. DTERROR_UNKNOWN_COMPRESSION    equ    2006
  204. DTERROR_NOT_ENOUGH_DATA        equ    2007
  205. DTERROR_INVALID_DATA        equ    2008
  206.  
  207. ; Offset for types
  208. DTMSG_TYPE_OFFSET        equ    2100
  209.  
  210. ;------------------------------------------------------------------------------
  211.  
  212.     ENDC    ; DATATYPES_DATATYPES_I
  213.