1 #ifndef DATATYPES_DATATYPES_H
2 #define DATATYPES_DATATYPES_H
5 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
10 #include <exec/types.h>
13 #include <exec/lists.h>
16 #include <exec/nodes.h>
18 #ifndef EXEC_LIBRARIES_H
19 #include <exec/libraries.h>
21 #ifndef LIBRARIES_IFFPARSE_H
22 #include <libraries/iffparse.h>
29 #define ID_DTYP MAKE_ID('D','T','Y','P')
30 #define ID_DTHD MAKE_ID('D','T','H','D')
35 STRPTR dth_Name
; /* Name of the data type */
36 STRPTR dth_BaseName
; /* Base name of the data type */
37 STRPTR dth_Pattern
; /* File name match pattern */
38 WORD
*dth_Mask
; /* Comparision mask (binary) */
39 ULONG dth_GroupID
; /* DataType Group */
40 ULONG dth_ID
; /* DataType ID (same as IFF FORM type) */
41 WORD dth_MaskLen
; /* Length of the comparision mask */
42 WORD dth_Pad
; /* Unused at present (must be 0) */
43 UWORD dth_Flags
; /* Flags -- see below */
47 #define DTHSIZE sizeof(struct DataTypeHeader)
50 #define DTF_TYPE_MASK 0x000F
51 #define DTF_BINARY 0x0000
52 #define DTF_ASCII 0x0001
53 #define DTF_IFF 0x0002
54 #define DTF_MISC 0x0003
56 #define DTF_CASE 0x0010 /* Case is important */
58 #define DTF_SYSTEM1 0x1000 /* For system use only */
61 /***** Group ID and ID ************************************************/
63 /* System file -- executable, directory, library, font and so on. */
64 #define GID_SYSTEM MAKE_ID('s','y','s','t')
65 #define ID_BINARY MAKE_ID('b','i','n','a')
66 #define ID_EXECUTABLE MAKE_ID('e','x','e','c')
67 #define ID_DIRECTORY MAKE_ID('d','i','r','e')
68 #define ID_IFF MAKE_ID('i','f','f',0)
70 /* Text, formatted or not */
71 #define GID_TEXT MAKE_ID('t','e','x','t')
72 #define ID_ASCII MAKE_ID('a','s','c','i')
74 /* Formatted text combined with graphics or other DataTypes */
75 #define GID_DOCUMENT MAKE_ID('d','o','c','u')
78 #define GID_SOUND MAKE_ID('s','o','u','n')
80 /* Musical instrument */
81 #define GID_INSTRUMENT MAKE_ID('i','n','s','t')
84 #define GID_MUSIC MAKE_ID('m','u','s','i')
87 #define GID_PICTURE MAKE_ID('p','i','c','t')
89 /* Animated pictures */
90 #define GID_ANIMATION MAKE_ID('a','n','i','m')
92 /* Animation with audio */
93 #define GID_MOVIE MAKE_ID('m','o','v','i')
96 /**************************************************************************/
99 #define ID_CODE MAKE_ID('D','T','C','D')
104 struct Library
*dthc_SysBase
;
105 struct Library
*dthc_DOSBase
;
106 struct Library
*dthc_IFFParseBase
;
107 struct Library
*dthc_UtilityBase
;
111 struct FileInfoBlock
*dthc_FIB
;
112 BPTR dthc_FileHandle
; /* Pointer to file handle
114 struct IFFHandle
*dthc_IFF
; /* Pointer to IFFHandle
116 STRPTR dthc_Buffer
; /* Buffer... */
117 ULONG dthc_BufferLength
; /* ... and corresponding length */
121 #define ID_TOOL MAKE_ID('D','T','T','L')
126 UWORD tn_Flags
; /* Flags -- see below */
127 STRPTR tn_Program
; /* Application to use */
142 #define TF_LAUNCH_MASK 0x000F
143 #define TF_SHELL 0x0001
144 #define TF_WORKBENCH 0x0002
148 /* Tags for use with FindToolNodeA(), GetToolAttrsA() and so on */
150 #define TOOLA_Dummy TAG_USER
151 #define TOOLA_Program (TOOLA_Dummy + 1)
152 #define TOOLA_Which (TOOLA_Dummy + 2)
153 #define TOOLA_LaunchType (TOOLA_Dummy + 3)
156 #define ID_TAGS MAKE_ID('D','T','T','G')
159 /*************************************************************************/
166 struct Node dtn_Node1
; /* These two nodes are for... */
167 struct Node dtn_Node2
; /* ...system use only! */
168 struct DataTypeHeader
*dtn_Header
;
169 struct List dtn_ToolList
; /* Tool nodes */
170 STRPTR dtn_FunctionName
; /* Name of comparision routine */
171 struct TagItem
*dtn_AttrList
; /* Object creation tags */
172 ULONG dtn_Length
; /* Length of the memory block */
176 #define DTNSIZE sizeof(struct DataType)
183 ULONG tn_Length
; /* Length of the memory block */
186 #define TNSIZE sizeof(struct ToolNode)
190 #define ID_NAME MAKE_ID('N','A','M','E')
195 #define DTERROR_UNKNOWN_DATATYPE 2000
196 #define DTERROR_COULDNT_SAVE 2001
197 #define DTERROR_COULDNT_OPEN 2002
198 #define DTERROR_COULDNT_SEND_MESSAGE 2003
201 #define DTERROR_COULDNT_OPEN_CLIPBOARD 2004
202 #define DTERROR_Reserved 2005
203 #define DTERROR_UNKNOWN_COMPRESSION 2006
204 #define DTERROR_NOT_ENOUGH_DATA 2007
205 #define DTERROR_INVALID_DATA 2008
207 #define DTMSG_TYPE_OFFSET 2100
210 #endif /* DATATYPES_DATATYPES_H */