added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / compiler / include / datatypes / datatypesclass.h
blobcda26aa69207615ffc0ad42eae8e4fdbc591d67d
1 #ifndef DATATYPES_DATATYPESCLASS_H
2 #define DATATYPES_DATATYPESCLASS_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc:
9 Lang: English
12 #ifndef UTILITY_TAGITEM_H
13 #include <utility/tagitem.h>
14 #endif
15 #ifndef DATATYPES_DATATYPES_H
16 #include <datatypes/datatypes.h>
17 #endif
18 #ifndef INTUITION_INTUITION_H
19 #include <intuition/intuition.h>
20 #endif
21 #ifndef INTUITION_IMAGECLASS_H
22 #include <intuition/imageclass.h>
23 #endif
25 #ifndef DEVICES_PRINTER_H
26 #include <devices/printer.h>
27 #endif
28 #ifndef DEVICES_PRTBASE_H
29 #include <devices/prtbase.h>
30 #endif
32 #define DATATYPESCLASS "datatypesclass"
34 #define DTA_Dummy (TAG_USER + 0x1000)
36 /* Default TextAttr to use for text within the object (struct TextAttr *) */
37 #define DTA_TextAttr (DTA_Dummy+10)
39 /* Top vertical unit (LONG) */
40 #define DTA_TopVert (DTA_Dummy + 11)
42 /* Number of visible vertical units (LONG) */
43 #define DTA_VisibleVert (DTA_Dummy + 12)
45 /* Total number of vertical units */
46 #define DTA_TotalVert (DTA_Dummy + 13)
48 /* Number of pixels per vertical unit (LONG) */
49 #define DTA_VertUnit (DTA_Dummy + 14)
51 /* Top horizontal unit (LONG) */
52 #define DTA_TopHoriz (DTA_Dummy + 15)
54 /* Number of visible horizontal units (LONG) */
55 #define DTA_VisibleHoriz (DTA_Dummy + 16)
57 /* Total number of horiziontal units */
58 #define DTA_TotalHoriz (DTA_Dummy + 17)
60 /* Number of pixels per horizontal unit (LONG) */
61 #define DTA_HorizUnit (DTA_Dummy + 18)
63 /* Name of the current element within the object (UBYTE *) */
64 #define DTA_NodeName (DTA_Dummy + 19)
66 /* Object's title */
67 #define DTA_Title (DTA_Dummy + 20)
69 /* Pointer to a NULL terminated array of trigger methods (struct DTMethod *) */
70 #define DTA_TriggerMethods (DTA_Dummy + 21)
72 /* Object data (APTR) */
73 #define DTA_Data (DTA_Dummy + 22)
75 /* Default font to use (struct TextFont *) */
76 #define DTA_TextFont (DTA_Dummy + 23)
78 /* Pointer to an array (terminated with ~0) of methods that the object
79 supports (ULONG *) */
80 #define DTA_Methods (DTA_Dummy + 24)
82 /* Printer error message -- numbers are defined in <devices/printer.h>
83 (LONG) */
84 #define DTA_PrinterStatus (DTA_Dummy + 25)
86 /* PRIVATE! Pointer to the print process (struct Process *) */
87 #define DTA_PrinterProc (DTA_Dummy + 26)
89 /* PRIVATE! Pointer to the layout process (struct Process *) */
90 #define DTA_LayoutProc (DTA_Dummy + 27)
92 /* Turns the application's busy pointer on and off */
93 #define DTA_Busy (DTA_Dummy + 28)
95 /* Indicate that new information has been loaded into an object.
96 (This is used for models that cache the DTA_TopVert-like tags.) */
97 #define DTA_Sync (DTA_Dummy + 29)
99 /* Base name of the class */
100 #define DTA_BaseName (DTA_Dummy + 30)
102 /* Group that the object must belong to */
103 #define DTA_GroupID (DTA_Dummy + 31)
105 /* Error level */
106 #define DTA_ErrorLevel (DTA_Dummy + 32)
108 /* datatypes.library error number */
109 #define DTA_ErrorNumber (DTA_Dummy + 33)
111 /* Argument for datatypes.library error */
112 #define DTA_ErrorString (DTA_Dummy + 34)
114 /* Name of a realtime.library conductor -- defaults to "Main" (UBYTE *) */
115 #define DTA_Conductor (DTA_Dummy + 35)
117 /* Specify whether a control panel should be embedded into the object or not
118 (for example in the animation datatype) -- defaults to TRUE (BOOL) */
119 #define DTA_ControlPanel (DTA_Dummy + 36)
121 /* Should the object begin playing immediately? -- defaults to FALSE (BOOL) */
122 #define DTA_Immediate (DTA_Dummy + 37)
124 /* Indicate that the object should repeat playing -- defaults to FALSE (BOOL)*/
125 #define DTA_Repeat (DTA_Dummy + 38)
127 /* V44: Address of object if of type DTST_MEMORY */
128 #define DTA_SourceAddress (DTA_Dummy + 39)
130 /* V44: Size of object if of type DTST_MEMORY */
131 #define DTA_SourceSize (DTA_Dummy + 40)
133 /* DTObject attributes */
134 #define DTA_Name (DTA_Dummy + 100)
135 #define DTA_SourceType (DTA_Dummy + 101)
136 #define DTA_Handle (DTA_Dummy + 102)
137 #define DTA_DataType (DTA_Dummy + 103)
138 #define DTA_Domain (DTA_Dummy + 104)
140 #if 0
141 /* These should not be used, and is therefore not available -- use the
142 corresponding tags in <intuition/gadgetclass> instead */
143 #define DTA_Left (DTA_Dummy + 105)
144 #define DTA_Top (DTA_Dummy + 106)
145 #define DTA_Width (DTA_Dummy + 107)
146 #define DTA_Height (DTA_Dummy + 108)
147 #endif
150 #define DTA_ObjName (DTA_Dummy + 109)
151 #define DTA_ObjAuthor (DTA_Dummy + 110)
152 #define DTA_ObjAnnotation (DTA_Dummy + 111)
153 #define DTA_ObjCopyright (DTA_Dummy + 112)
154 #define DTA_ObjVersion (DTA_Dummy + 113)
155 #define DTA_ObjectID (DTA_Dummy + 114)
156 #define DTA_UserData (DTA_Dummy + 115)
157 #define DTA_FrameInfo (DTA_Dummy + 116)
160 #if 0
161 /* These should not be used, and is therefore not available -- use the
162 corresponding tags in <intuition/gadgetclass> instead */
163 #define DTA_RelRight (DTA_Dummy + 117)
164 #define DTA_RelBottom (DTA_Dummy + 118)
165 #define DTA_RelWidth (DTA_Dummy + 119)
166 #define DTA_RelHeight (DTA_Dummy + 120)
167 #endif
170 #define DTA_SelectDomain (DTA_Dummy + 121)
171 #define DTA_TotalPVert (DTA_Dummy + 122)
172 #define DTA_TotalPHoriz (DTA_Dummy + 123)
173 #define DTA_NominalVert (DTA_Dummy + 124)
174 #define DTA_NominalHoriz (DTA_Dummy + 125)
177 /* Printing attributes */
179 /* Destination x width (LONG) */
180 #define DTA_DestCols (DTA_Dummy + 400)
182 /* Destination y width (LONG) */
183 #define DTA_DestRows (DTA_Dummy + 401)
185 /* Option flags (UWORD) */
186 #define DTA_Special (DTA_Dummy + 402)
188 /* RastPort used when printing (struct RastPort *) */
189 #define DTA_RastPort (DTA_Dummy + 403)
191 /* Pointer to base name for ARexx port */
192 #define DTA_ARexxPortName (DTA_Dummy + 404)
195 /**************************************************************************/
197 #define DTST_RAM 1
198 #define DTST_FILE 2
199 #define DTST_CLIPBOARD 3
200 #define DTST_HOTLINK 4
201 #define DTST_MEMORY 5 /* V44 */
203 /* This structure is attached to the Gadget.SpecialInfo field of the gadget.
204 Use Get/Set calls to access it. */
205 struct DTSpecialInfo
207 struct SignalSemaphore si_Lock;
208 ULONG si_Flags;
209 LONG si_TopVert; /* Top row (in units) */
210 LONG si_VisVert; /* Number of visible rows (in
211 units) */
212 LONG si_TotVert; /* Total number of rows (in units) */
213 LONG si_OTopVert; /* Previous top (in units) */
214 LONG si_VertUnit; /* Number of pixels in vertical
215 unit */
216 LONG si_TopHoriz; /* Top column (in units) */
217 LONG si_VisHoriz; /* Number of visible columns (in
218 units) */
219 LONG si_TotHoriz; /* Total number of columns (in
220 units) */
221 LONG si_OTopHoriz; /* Previous top (in units) */
222 LONG si_HorizUnit; /* Number of pixels in horizontal
223 unit */
227 /* Object is in layout processing */
228 #define DTSIF_LAYOUT (1L << 0)
230 /* Object needs to be layed out */
231 #define DTSIF_NEWSIZE (1L << 1)
233 #define DTSIF_DRAGGING (1L << 2)
234 #define DTSIF_DRAGSELECT (1L << 3)
236 #define DTSIF_HIGHLIGHT (1L << 4)
238 /* Object is being printed */
239 #define DTSIF_PRINTING (1L << 5)
241 /* Object is in layout process */
242 #define DTSIF_LAYOUTPROC (1L << 6)
246 struct DTMethod
248 STACKED STRPTR dtm_Label;
249 STACKED STRPTR dtm_Command;
250 STACKED ULONG dtm_Method;
255 #define DTM_Dummy (0x600)
257 /* Get the environment an object requires */
258 #define DTM_FRAMEBOX (0x601)
260 #define DTM_PROCLAYOUT (0x602)
261 #define DTM_ASYNCLAYOUT (0x603)
263 /* When RemoveDTObject() is called */
264 #define DTM_REMOVEDTOBJECT (0x604)
266 #define DTM_SELECT (0x605)
267 #define DTM_CLEARSELECTED (0x606)
269 #define DTM_COPY (0x607)
270 #define DTM_PRINT (0x608)
271 #define DTM_ABORTPRINT (0x609)
273 #define DTM_NEWMEMBER (0x610)
274 #define DTM_DISPOSEMEMBER (0x611)
276 #define DTM_GOTO (0x630)
277 #define DTM_TRIGGER (0x631)
279 #define DTM_OBTAINDRAWINFO (0x640)
280 #define DTM_DRAW (0x641)
281 #define DTM_RELEASEDRAWINFO (0x642)
283 #define DTM_WRITE (0x650)
286 struct FrameInfo
288 ULONG fri_PropertyFlags; /* DisplayInfo (graphics/displayinfo.h) */
289 Point fri_Resolution; /* DisplayInfo */
291 UBYTE fri_RedBits;
292 UBYTE fri_GreenBits;
293 UBYTE fri_BlueBits;
295 struct
297 ULONG Width;
298 ULONG Height;
299 ULONG Depth;
301 } fri_Dimensions;
303 struct Screen *fri_Screen;
304 struct ColorMap *fri_ColorMap;
306 ULONG fri_Flags; /* See below */
309 #define FIF_SCALABLE 0x1
310 #define FIF_SCROLLABLE 0x2
311 #define FIF_REMAPPABLE 0x4
314 /* DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT */
315 struct dtGeneral
317 STACKED ULONG MethodID;
318 STACKED struct GadgetInfo *dtg_GInfo;
321 /* DTM_SELECT */
322 struct dtSelect
324 STACKED ULONG MethodID;
325 STACKED struct GadgetInfo *dts_GInfo;
326 STACKED struct Rectangle dts_Select;
329 /* DTM_FRAMEBOX */
330 struct dtFrameBox
332 STACKED ULONG MethodID;
333 STACKED struct GadgetInfo *dtf_GInfo;
334 STACKED struct FrameInfo *dtf_ContentsInfo; /* Input */
335 STACKED struct FrameInfo *dtf_FrameInfo; /* Output */
336 STACKED ULONG dtf_SizeFrameInfo;
337 STACKED ULONG dtf_FrameFlags;
340 /* DTM_GOTO */
341 struct dtGoto
343 STACKED ULONG MethodID;
344 STACKED struct GadgetInfo *dtg_GInfo;
345 STACKED STRPTR dtg_NodeName; /* Node to goto */
346 STACKED struct TagItem *dtg_AttrList; /* Additional attributes */
349 /* DTM_TRIGGER */
350 struct dtTrigger
352 STACKED ULONG MethodID;
353 STACKED struct GadgetInfo *dtt_GInfo;
354 STACKED ULONG dtt_Function;
355 STACKED APTR dtt_Data;
359 #define STMF_METHOD_MASK 0x0000ffff
360 #define STMF_DATA_MASK 0x00ff0000
361 #define STMF_RESERVED_MASK 0xff000000
363 #define STMD_VOID 0x00010000
364 #define STMD_ULONG 0x00020000
365 #define STMD_STRPTR 0x00030000
366 #define STMD_TAGLIST 0x00040000
368 #define STM_DONE 0
369 #define STM_PAUSE 1
370 #define STM_PLAY 2
371 #define STM_CONTENTS 3
372 #define STM_INDEX 4
373 #define STM_RETRACE 5
374 #define STM_BROWSE_PREV 6
375 #define STM_BROWSE_NEXT 7
377 #define STM_NEXT_FIELD 8
378 #define STM_PREV_FIELD 9
379 #define STM_ACTIVATE_FIELD 10
381 #define STM_COMMAND 11
383 #define STM_REWIND 12
384 #define STM_FASTFORWARD 13
385 #define STM_STOP 14
386 #define STM_RESUME 15
387 #define STM_LOCATE 16
388 /* 17 is reserved for help */
389 #define STM_SEARCH 18
390 #define STM_SEARCH_NEXT 19
391 #define STM_SEARCH_PREV 20
394 #define STM_USER 100
396 /* Printer IO request */
397 union printerIO
399 struct IOStdReq ios;
400 struct IODRPReq iodrp;
401 struct IOPrtCmdReq iopc;
405 /* DTM_PRINT */
406 struct dtPrint
408 STACKED ULONG MethodID;
409 STACKED struct GadgetInfo *dtp_GInfo; /* Gadget information */
410 STACKED union printerIO *dtp_PIO; /* Printer IO request */
411 STACKED struct TagItem *dtp_AttrList; /* Additional attributes */
414 /* DTM_DRAW */
415 struct dtDraw
417 STACKED ULONG MethodID;
418 STACKED struct RastPort *dtd_RPort;
419 STACKED LONG dtd_Left;
420 STACKED LONG dtd_Top;
421 STACKED LONG dtd_Width;
422 STACKED LONG dtd_Height;
423 STACKED LONG dtd_TopHoriz;
424 STACKED LONG dtd_TopVert;
425 STACKED struct TagItem *dtd_AttrList; /* Additional attributes */
428 /* DTM_RELEASEDRAWINFO */
429 struct dtReleaseDrawInfo
432 STACKED ULONG MethodID;
433 STACKED APTR dtr_Handle; /* Handle as returned by DTM_OBTAINDRAWINFO */
437 /* DTM_WRITE */
438 struct dtWrite
440 STACKED ULONG MethodID;
441 STACKED struct GadgetInfo *dtw_GInfo; /* Gadget information */
442 STACKED BPTR dtw_FileHandle; /* File handle to write to */
443 STACKED ULONG dtw_Mode;
444 STACKED struct TagItem *dtw_AttrList; /* Additional attributes */
448 /* Save data as IFF data */
449 #define DTWM_IFF 0
451 /* Save data as local data format */
452 #define DTWM_RAW 1
455 #endif /* DATATYPES_DATATYPESCLASS_H */