2 This file is part of the Free Pascal run time library.
4 A file in Amiga system run time library.
5 Copyright (c) 1998 by Nils Sjoholm
6 member of the Amiga RTL development team.
8 See the file COPYING.FPC, included in this distribution,
9 for details about the copyright.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 **********************************************************************}
21 uses exec
, amigados
, intuition
, utility
,
22 graphics
, iffparse
, amigaprinter
, prtbase
;
25 {***************************************************************************}
29 {***************************************************************************}
34 pDataTypeHeader
= ^tDataTypeHeader
;
35 tDataTypeHeader
= record
36 dth_Name
, { Descriptive name of the data type }
37 dth_BaseName
, { Base name of the data type }
38 dth_Pattern
: STRPTR
; { Match pattern for file name. }
39 dth_Mask
: Pointer; { Comparision mask }
40 dth_GroupID
, { Group that the DataType is in }
41 dth_ID
: ULONG
; { ID for DataType (same as IFF FORM type) }
42 dth_MaskLen
, { Length of comparision mask }
43 dth_Pad
: Integer; { Unused at present (must be 0) }
45 dth_Priority
: WORD; { Priority }
51 {***************************************************************************}
54 DTF_TYPE_MASK
= $000F;
60 { Set if case is important }
63 { Reserved for system use }
66 {****************************************************************************
70 * This is used for filtering out objects that you don't want. For
71 * example, you could make a filter for the ASL file requester so
72 * that it only showed the files that were pictures, or even to
73 * narrow it down to only show files that were ILBM pictures.
75 * Note that the Group ID's are in lower case, and always the first
76 * four characters of the word.
78 * For ID's; If it is an IFF file, then the ID is the same as the
79 * FORM type. If it isn't an IFF file, then the ID would be the
80 * first four characters of name for the file type.
82 ****************************************************************************}
84 { System file, such as; directory, executable, library, device, font, etc. }
85 GID_SYSTEM
= 1937339252;
87 { Formatted or unformatted text }
88 GID_TEXT
= 1952807028;
90 { Formatted text with graphics or other DataTypes }
91 GID_DOCUMENT
= 1685021557;
94 GID_SOUND
= 1936684398;
96 { Musical instruments used for musical scores }
97 GID_INSTRUMENT
= 1768846196;
100 GID_MUSIC
= 1836413801;
103 GID_PICTURE
= 1885954932;
106 GID_ANIMATION
= 1634625901;
108 { Animation with audio track }
109 GID_MOVIE
= 1836021353;
111 {***************************************************************************}
113 { A code chunk contains an embedded executable that can be loaded
114 * with InternalLoadSeg. }
115 ID_CODE
= 1146372932;
118 { DataTypes comparision hook context (Read-Only). This is the
119 * argument that is passed to a custom comparision routine. }
121 pDTHookContext
= ^tDTHookContext
;
122 tDTHookContext
= record
123 { Libraries that are already opened for your use }
127 dthc_UtilityBase
: pLibrary
;
130 dthc_Lock
: BPTR
; { Lock on the file }
131 dthc_FIB
: pFileInfoBlock
; { Pointer to a FileInfoBlock }
132 dthc_FileHandle
: BPTR
; { Pointer to the file handle (may be NULL) }
133 dthc_IFF
: pIFFHandle
; { Pointer to an IFFHandle (may be NULL) }
134 dthc_Buffer
: STRPTR
; { Buffer }
135 dthc_BufferLength
: ULONG
; { Length of the buffer }
138 {***************************************************************************}
141 ID_TOOL
= 1146377292;
146 tn_Which
, { Which tool is this }
147 tn_Flags
: WORD; { Flags }
148 tn_Program
: STRPTR
; { Application to use }
154 { defines for tn_Which }
161 { defines for tn_Flags }
162 TF_LAUNCH_MASK
= $000F;
164 TF_WORKBENCH
= $0002;
167 {***************************************************************************}
169 ID_TAGS
= 1146377287;
171 {***************************************************************************}
174 pDataType
= ^tDataType
;
176 dtn_Node1
, { Reserved for system use }
177 dtn_Node2
: tNode
; { Reserved for system use }
178 dtn_Header
: pDataTypeHeader
; { Pointer to the DataTypeHeader }
179 dtn_ToolList
: tList
; { List of tool nodes }
180 dtn_FunctionName
: STRPTR
; { Name of comparision routine }
181 dtn_AttrList
: pTagItem
; { Object creation tags }
182 dtn_Length
: ULONG
; { Length of the memory block }
185 {***************************************************************************}
187 pToolNode
= ^tToolNode
;
189 tn_Node
: tNode
; { Embedded node }
190 tn_Tool
: tTool
; { Embedded tool }
191 tn_Length
: ULONG
; { Length of the memory block }
194 {***************************************************************************}
197 ID_NAME
= 1312902469;
199 {***************************************************************************}
202 DTERROR_UNKNOWN_DATATYPE
= 2000;
203 DTERROR_COULDNT_SAVE
= 2001;
204 DTERROR_COULDNT_OPEN
= 2002;
205 DTERROR_COULDNT_SEND_MESSAGE
= 2003;
208 DTERROR_COULDNT_OPEN_CLIPBOARD
= 2004;
209 DTERROR_Reserved
= 2005;
210 DTERROR_UNKNOWN_COMPRESSION
= 2006;
211 DTERROR_NOT_ENOUGH_DATA
= 2007;
212 DTERROR_INVALID_DATA
= 2008;
215 DTMSG_TYPE_OFFSET
= 2100;
217 {***************************************************************************}
219 DATATYPESCLASS
: Pchar
= 'datatypesclass';
221 {***************************************************************************}
223 DTA_Dummy
= (TAG_USER
+$1000);
225 { Generic attributes }
226 DTA_TextAttr
= (DTA_Dummy
+10);
227 { (struct TextAttr ) Pointer to the default TextAttr to use for
228 * the text within the object. }
230 DTA_TopVert
= (DTA_Dummy
+11);
231 { (LONG) Current top vertical unit }
233 DTA_VisibleVert
= (DTA_Dummy
+12);
234 { (LONG) Number of visible vertical units }
236 DTA_TotalVert
= (DTA_Dummy
+13);
237 { (LONG) Total number of vertical units }
239 DTA_VertUnit
= (DTA_Dummy
+14);
240 { (LONG) Number of pixels per vertical unit }
242 DTA_TopHoriz
= (DTA_Dummy
+15);
243 { (LONG) Current top horizontal unit }
245 DTA_VisibleHoriz
= (DTA_Dummy
+16);
246 { (LONG) Number of visible horizontal units }
248 DTA_TotalHoriz
= (DTA_Dummy
+17);
249 { (LONG) Total number of horizontal units }
251 DTA_HorizUnit
= (DTA_Dummy
+18);
252 { (LONG) Number of pixels per horizontal unit }
254 DTA_NodeName
= (DTA_Dummy
+19);
255 { (UBYTE ) Name of the current element within the object. }
257 DTA_Title
= (DTA_Dummy
+20);
258 { (UBYTE ) Title of the object. }
260 DTA_TriggerMethods
= (DTA_Dummy
+21);
261 { (struct DTMethod ) Pointer to a NULL terminated array of
262 * supported trigger methods. }
264 DTA_Data
= (DTA_Dummy
+22);
265 { (APTR) Object specific data. }
267 DTA_TextFont
= (DTA_Dummy
+23);
268 { (struct TextFont ) Default font to use for text within the
271 DTA_Methods
= (DTA_Dummy
+24);
272 { (ULONG ) Pointer to a ~0 terminated array of supported
275 DTA_PrinterStatus
= (DTA_Dummy
+25);
276 { (LONG) Printer error message. Error numbers are defined in
277 * <devices/printer.h> }
279 DTA_PrinterProc
= (DTA_Dummy
+26);
280 { PRIVATE (struct Process ) Pointer to the print process. }
282 DTA_LayoutProc
= (DTA_Dummy
+27);
283 { PRIVATE (struct Process ) Pointer to the layout process. }
285 DTA_Busy
= (DTA_Dummy
+28);
286 { Used to turn the applications' busy pointer off and on }
288 DTA_Sync
= (DTA_Dummy
+29);
289 { Used to indicate that new information has been loaded into
290 * an object. This is for models that cache the DTA_TopVert-
293 DTA_BaseName
= (DTA_Dummy
+30);
294 { The base name of the class }
296 DTA_GroupID
= (DTA_Dummy
+31);
297 { Group that the object must belong in }
299 DTA_ErrorLevel
= (DTA_Dummy
+32);
302 DTA_ErrorNumber
= (DTA_Dummy
+33);
303 { datatypes.library error number }
305 DTA_ErrorString
= (DTA_Dummy
+34);
306 { Argument for datatypes.library error }
308 DTA_Conductor
= (DTA_Dummy
+35);
309 { New for V40. (UBYTE ) specifies the name of the
310 * realtime.library conductor. Defaults to "Main". }
312 DTA_ControlPanel
= (DTA_Dummy
+36);
313 { New for V40. (BOOL) Indicate whether a control panel should be
314 * embedded within the object (in the animation datatype, for
315 * example). Defaults to TRUE. }
317 DTA_Immediate
= (DTA_Dummy
+37);
318 { New for V40. (BOOL) Indicate whether the object should
319 * immediately begin playing. Defaults to FALSE. }
321 DTA_Repeat
= (DTA_Dummy
+38);
322 { New for V40. (BOOL) Indicate that the object should repeat
323 * playing. Defaults to FALSE. }
326 { DTObject attributes }
327 DTA_Name
= (DTA_Dummy
+100);
328 DTA_SourceType
= (DTA_Dummy
+101);
329 DTA_Handle
= (DTA_Dummy
+102);
330 DTA_DataType
= (DTA_Dummy
+103);
331 DTA_Domain
= (DTA_Dummy
+104);
333 { DON'T USE THE FOLLOWING FOUR TAGS. USE THE CORRESPONDING TAGS IN
334 * <intuition/gadgetclass.h> }
335 DTA_Left
= (DTA_Dummy
+105);
336 DTA_Top
= (DTA_Dummy
+106);
337 DTA_Width
= (DTA_Dummy
+107);
338 DTA_Height
= (DTA_Dummy
+108);
340 DTA_ObjName
= (DTA_Dummy
+109);
341 DTA_ObjAuthor
= (DTA_Dummy
+110);
342 DTA_ObjAnnotation
= (DTA_Dummy
+111);
343 DTA_ObjCopyright
= (DTA_Dummy
+112);
344 DTA_ObjVersion
= (DTA_Dummy
+113);
345 DTA_ObjectID
= (DTA_Dummy
+114);
346 DTA_UserData
= (DTA_Dummy
+115);
347 DTA_FrameInfo
= (DTA_Dummy
+116);
349 { DON'T USE THE FOLLOWING FOUR TAGS. USE THE CORRESPONDING TAGS IN
350 * <intuition/gadgetclass.h> }
351 DTA_RelRight
= (DTA_Dummy
+117);
352 DTA_RelBottom
= (DTA_Dummy
+118);
353 DTA_RelWidth
= (DTA_Dummy
+119);
354 DTA_RelHeight
= (DTA_Dummy
+120);
356 DTA_SelectDomain
= (DTA_Dummy
+121);
357 DTA_TotalPVert
= (DTA_Dummy
+122);
358 DTA_TotalPHoriz
= (DTA_Dummy
+123);
359 DTA_NominalVert
= (DTA_Dummy
+124);
360 DTA_NominalHoriz
= (DTA_Dummy
+125);
362 { Printing attributes }
363 DTA_DestCols
= (DTA_Dummy
+400);
364 { (LONG) Destination X width }
366 DTA_DestRows
= (DTA_Dummy
+401);
367 { (LONG) Destination Y height }
369 DTA_Special
= (DTA_Dummy
+402);
370 { (UWORD) Option flags }
372 DTA_RastPort
= (DTA_Dummy
+403);
373 { (struct RastPort ) RastPort to use when printing. (V40) }
375 DTA_ARexxPortName
= (DTA_Dummy
+404);
376 { (STRPTR) Pointer to base name for ARexx port (V40) }
379 {***************************************************************************}
386 {***************************************************************************}
388 { Attached to the Gadget.SpecialInfo field of the gadget. Don't access directly,
389 * use the Get/Set calls instead.
393 pDTSpecialInfo
= ^tDTSpecialInfo
;
394 tDTSpecialInfo
= record
395 si_Lock
: tSignalSemaphore
; { Locked while in DoAsyncLayout() }
398 si_TopVert
, { Top row (in units) }
399 si_VisVert
, { Number of visible rows (in units) }
400 si_TotVert
, { Total number of rows (in units) }
401 si_OTopVert
, { Previous top (in units) }
402 si_VertUnit
, { Number of pixels in vertical unit }
404 si_TopHoriz
, { Top column (in units) }
405 si_VisHoriz
, { Number of visible columns (in units) }
406 si_TotHoriz
, { Total number of columns (in units) }
407 si_OTopHoriz
, { Previous top (in units) }
408 si_HorizUnit
: Longint; { Number of pixels in horizontal unit }
413 { Object is in layout processing }
416 { Object needs to be layed out }
420 DTSIF_DRAGSELECT
= 8;
422 DTSIF_HIGHLIGHT
= 16;
424 { Object is being printed }
427 { Object is in layout process }
428 DTSIF_LAYOUTPROC
= 64;
430 {***************************************************************************}
433 pDTMethod
= ^tDTMethod
;
436 dtm_Command
: STRPTR
;
440 {***************************************************************************}
445 { Inquire what environment an object requires }
446 DTM_FRAMEBOX
= ($601);
448 { Same as GM_LAYOUT except guaranteed to be on a process already }
449 DTM_PROCLAYOUT
= ($602);
451 { Layout that is occurring on a process }
452 DTM_ASYNCLAYOUT
= ($603);
454 { When a RemoveDTObject() is called }
455 DTM_REMOVEDTOBJECT
= ($604);
458 DTM_CLEARSELECTED
= ($606);
462 DTM_ABORTPRINT
= ($609);
464 DTM_NEWMEMBER
= ($610);
465 DTM_DISPOSEMEMBER
= ($611);
468 DTM_TRIGGER
= ($631);
470 DTM_OBTAINDRAWINFO
= ($640);
472 DTM_RELEASEDRAWINFO
= ($642);
476 { Used to ask the object about itself }
478 pFrameInfo
= ^tFrameInfo
;
480 fri_PropertyFlags
: ULONG
;
481 fri_Resolution
: tPoint
;
483 fri_GreenBits
: BYTE;
485 fri_Dimensions
: record
490 fri_Screen
: pScreen
;
491 fri_ColorMap
: pColorMap
;
502 { DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT }
505 pdtGeneral
= ^tdtGeneral
;
508 dtg_GInfo
: pGadgetInfo
;
512 pdtSelect
= ^tdtSelect
;
515 dts_GInfo
: pGadgetInfo
;
516 dts_Select
: tRectangle
;
521 pdtFrameBox
= ^tdtFrameBox
;
524 dtf_GInfo
: pGadgetInfo
;
525 dtf_ContentsInfo
, { Input }
526 dtf_FrameInfo
: pFrameInfo
; { Output }
528 dtf_FrameFlags
: ULONG
;
535 dtg_GInfo
: pGadgetInfo
;
536 dtg_NodeName
: STRPTR
; { Node to goto }
537 dtg_AttrList
: pTagItem
; { Additional attributes }
542 pdtTrigger
= ^tdtTrigger
;
545 dtt_GInfo
: pGadgetInfo
;
546 dtt_Function
: ULONG
;
556 STM_BROWSE_PREV
= 6 ;
557 STM_BROWSE_NEXT
= 7 ;
561 STM_ACTIVATE_FIELD
= 10;
567 STM_FASTFORWARD
= 13;
573 { Printer IO request }
574 pprinterIO
= ^tprinterIO
;
582 pdtPrint
= ^tdtPrint
;
585 dtp_GInfo
: pGadgetInfo
;
586 dtp_PIO
: pprinterIO
;
587 dtp_AttrList
: pTagItem
;
595 dtd_RPort
: pRastPort
;
601 dtd_TopVert
: Longint;
602 dtd_AttrList
: pTagItem
; { Additional attributes }
606 pdtWrite
= ^tdtWrite
;
609 dtw_GInfo
: pGadgetInfo
; { Gadget information }
610 dtw_FileHandle
: BPTR
; { File handle to write to }
612 dtw_AttrList
: pTagItem
; { Additional attributes }
616 { Save data as IFF data }
619 { Save data as local data format }
622 {***************************************************************************}
624 PICTUREDTCLASS
: PChar
= 'picture.datatype';
626 {***************************************************************************}
628 { Picture attributes }
629 PDTA_ModeID
= (DTA_Dummy
+ 200);
630 { Mode ID of the picture }
632 PDTA_BitMapHeader
= (DTA_Dummy
+ 201);
634 PDTA_BitMap
= (DTA_Dummy
+ 202);
635 { Pointer to a class-allocated bitmap, that will end
636 * up being freed by picture.class when DisposeDTObject()
639 PDTA_ColorRegisters
= (DTA_Dummy
+ 203);
640 PDTA_CRegs
= (DTA_Dummy
+ 204);
641 PDTA_GRegs
= (DTA_Dummy
+ 205);
642 PDTA_ColorTable
= (DTA_Dummy
+ 206);
643 PDTA_ColorTable2
= (DTA_Dummy
+ 207);
644 PDTA_Allocated
= (DTA_Dummy
+ 208);
645 PDTA_NumColors
= (DTA_Dummy
+ 209);
646 PDTA_NumAlloc
= (DTA_Dummy
+ 210);
648 PDTA_Remap
= (DTA_Dummy
+ 211);
649 { Boolean : Remap picture (defaults to TRUE) }
651 PDTA_Screen
= (DTA_Dummy
+ 212);
652 { Screen to remap to }
654 PDTA_FreeSourceBitMap
= (DTA_Dummy
+ 213);
655 { Boolean : Free the source bitmap after remapping }
657 PDTA_Grab
= (DTA_Dummy
+ 214);
658 { Pointer to a Point structure }
660 PDTA_DestBitMap
= (DTA_Dummy
+ 215);
661 { Pointer to the destination (remapped) bitmap }
663 PDTA_ClassBitMap
= (DTA_Dummy
+ 216);
664 { Pointer to class-allocated bitmap, that will end
665 * up being freed by the class after DisposeDTObject()
668 PDTA_NumSparse
= (DTA_Dummy
+ 217);
669 { (UWORD) Number of colors used for sparse remapping }
671 PDTA_SparseTable
= (DTA_Dummy
+ 218);
672 { (UBYTE *) Pointer to a table of pen numbers indicating
673 * which colors should be used when remapping the image.
674 * This array must contain as many entries as there
675 * are colors specified with PDTA_NumSparse }
677 {***************************************************************************}
679 { Masking techniques }
682 mskHasTransparentColor
= 2;
686 { Compression techniques }
692 { Bitmap header (BMHD) structure }
693 pBitMapHeader
= ^tBitMapHeader
;
694 tBitMapHeader
= record
695 bmh_Width
, { Width in pixels }
696 bmh_Height
: Word; { Height in pixels }
697 bmh_Left
, { Left position }
698 bmh_Top
: Integer; { Top position }
699 bmh_Depth
, { Number of planes }
700 bmh_Masking
, { Masking type }
701 bmh_Compression
, { Compression type }
703 bmh_Transparent
: WORD; { Transparent color }
707 bmh_PageHeight
: Integer;
710 {***************************************************************************}
712 { Color register structure }
713 pColorRegister
= ^tColorRegister
;
714 tColorRegister
= record
715 red
, green
, blue
: Byte;
718 {***************************************************************************}
721 { IFF types that may be in pictures }
722 ID_ILBM
= 1229734477;
723 ID_BMHD
= 1112361028;
724 ID_BODY
= 1112491097;
725 ID_CMAP
= 1129136464;
726 ID_CRNG
= 1129467463;
727 ID_GRAB
= 1196572994;
728 ID_SPRT
= 1397772884;
729 ID_DEST
= 1145394004;
730 ID_CAMG
= 1128353095;
732 {***************************************************************************}
734 SOUNDDTCLASS
: PChar
= 'sound.datatype';
736 {***************************************************************************}
739 SDTA_Dummy
= (DTA_Dummy
+ 500);
740 SDTA_VoiceHeader
= (SDTA_Dummy
+ 1);
741 SDTA_Sample
= (SDTA_Dummy
+ 2);
742 { (UBYTE *) Sample data }
744 SDTA_SampleLength
= (SDTA_Dummy
+ 3);
745 { (ULONG) Length of the sample data in UBYTEs }
747 SDTA_Period
= (SDTA_Dummy
+ 4);
750 SDTA_Volume
= (SDTA_Dummy
+ 5);
751 { (UWORD) Volume. Range from 0 to 64 }
753 SDTA_Cycles
= (SDTA_Dummy
+ 6);
755 { The following tags are new for V40 }
756 SDTA_SignalTask
= (SDTA_Dummy
+ 7);
757 { (struct Task *) Task to signal when sound is complete or
758 next buffer needed. }
760 SDTA_SignalBit
= (SDTA_Dummy
+ 8);
761 { (BYTE) Signal bit to use on completion or -1 to disable }
763 SDTA_Continuous
= (SDTA_Dummy
+ 9);
764 { (ULONG) Playing a continuous stream of data. Defaults to
767 {***************************************************************************}
773 pVoiceHeader
= ^tVoiceHeader
;
774 tVoiceHeader
= record
777 vh_SamplesPerHiCycle
: ULONG
;
778 vh_SamplesPerSec
: WORD;
780 vh_Compression
: Byte;
784 {***************************************************************************}
789 ID_VHDR
= 1447576658;
791 {***************************************************************************}
793 { ***************************************************************************}
795 TEXTDTCLASS
: PChar
= 'text.datatype';
797 { ***************************************************************************}
800 TDTA_Buffer
= (DTA_Dummy
+ 300);
801 TDTA_BufferLen
= (DTA_Dummy
+ 301);
802 TDTA_LineList
= (DTA_Dummy
+ 302);
803 TDTA_WordSelect
= (DTA_Dummy
+ 303);
804 TDTA_WordDelim
= (DTA_Dummy
+ 304);
805 TDTA_WordWrap
= (DTA_Dummy
+ 305);
806 { Boolean. Should the text be word wrapped. Defaults to false. }
808 { ***************************************************************************}
811 { There is one Line structure for every line of text in our document. }
814 ln_Link
: tMinNode
; { to link the lines together }
815 ln_Text
: STRPTR
; { pointer to the text for this line }
816 ln_TextLen
: ULONG
; { the character length of the text for this line }
817 ln_XOffset
, { where in the line the text starts }
818 ln_YOffset
, { line the text is on }
819 ln_Width
, { Width of line in pixels }
820 ln_Height
, { Height of line in pixels }
821 ln_Flags
: WORD; { info on the line }
822 ln_FgPen
, { foreground pen }
823 ln_BgPen
: Shortint
; { background pen }
824 ln_Style
: ULONG
; { Font style }
825 ln_Data
: Pointer; { Link data... }
828 { ***************************************************************************}
836 { Segment is a link }
839 { ln_Data is a pointer to an DataTypes object }
842 { Object is selected }
845 { ***************************************************************************}
847 { IFF types that may be text }
848 ID_FTXT
= 1179932756;
849 ID_CHRS
= 1128813139;
851 { ***************************************************************************}
853 ANIMATIONDTCLASS
: PChar
= 'animation.datatype';
855 { ***************************************************************************}
857 { Animation attributes }
858 ADTA_Dummy
= (DTA_Dummy
+ 600);
859 ADTA_ModeID
= PDTA_ModeID
;
860 ADTA_KeyFrame
= PDTA_BitMap
;
861 { (struct BitMap *) Key frame (first frame) bitmap }
863 ADTA_ColorRegisters
= PDTA_ColorRegisters
;
864 ADTA_CRegs
= PDTA_CRegs
;
865 ADTA_GRegs
= PDTA_GRegs
;
866 ADTA_ColorTable
= PDTA_ColorTable
;
867 ADTA_ColorTable2
= PDTA_ColorTable2
;
868 ADTA_Allocated
= PDTA_Allocated
;
869 ADTA_NumColors
= PDTA_NumColors
;
870 ADTA_NumAlloc
= PDTA_NumAlloc
;
872 ADTA_Remap
= PDTA_Remap
;
873 { (BOOL) : Remap animation (defaults to TRUE) }
875 ADTA_Screen
= PDTA_Screen
;
876 { (struct Screen *) Screen to remap to }
878 ADTA_NumSparse
= PDTA_NumSparse
;
879 { (UWORD) Number of colors used for sparse remapping }
881 ADTA_SparseTable
= PDTA_SparseTable
;
882 { (UBYTE *) Pointer to a table of pen numbers indicating
883 * which colors should be used when remapping the image.
884 * This array must contain as many entries as there
885 * are colors specified with ADTA_NumSparse }
887 ADTA_Width
= (ADTA_Dummy
+ 1);
888 ADTA_Height
= (ADTA_Dummy
+ 2);
889 ADTA_Depth
= (ADTA_Dummy
+ 3);
890 ADTA_Frames
= (ADTA_Dummy
+ 4);
891 { (ULONG) Number of frames in the animation }
893 ADTA_Frame
= (ADTA_Dummy
+ 5);
894 { (ULONG) Current frame }
896 ADTA_FramesPerSecond
= (ADTA_Dummy
+ 6);
897 { (ULONG) Frames per second }
899 ADTA_FrameIncrement
= (ADTA_Dummy
+ 7);
900 { (LONG) Amount to change frame by when fast forwarding or
901 * rewinding. Defaults to 10. }
904 ADTA_Sample
= SDTA_Sample
;
905 ADTA_SampleLength
= SDTA_SampleLength
;
906 ADTA_Period
= SDTA_Period
;
907 ADTA_Volume
= SDTA_Volume
;
908 ADTA_Cycles
= SDTA_Cycles
;
910 { ***************************************************************************}
912 ID_ANIM
= 1095649613;
913 ID_ANHD
= 1095649348;
914 ID_DLTA
= 1145852993;
916 { ***************************************************************************}
918 { Required ANHD structure describes an ANIM frame }
920 pAnimHeader
= ^tAnimHeader
;
922 ah_Operation
: Byte; { The compression method:
923 0 set directly (normal ILBM BODY),
927 4 Generalized short/long Delta mode,
928 5 Byte Vertical Delta mode
929 6 Stereo op 5 (third party)
930 74 (ascii 'J') reserved for Eric Graham's
931 compression technique (details to be
934 ah_Mask
: Byte; { (XOR mode only - plane mask where each
935 bit is set =1 if there is data and =0
938 ah_Width
, { (XOR mode only - width and height of the }
939 ah_Height
, { area represented by the BODY to eliminate }
940 { unnecessary un-changed data) }
943 ah_Left
, { (XOR mode only - position of rectangular }
944 ah_Top
: WORD; { area representd by the BODY) }
947 ah_AbsTime
, { Timing for a frame relative to the time
948 the first frame was displayed, in
951 ah_RelTime
: ULONG
; { Timing for frame relative to time
952 previous frame was displayed - in
955 ah_Interleave
, { Indicates how may frames back this data is to
956 modify. 0 defaults to indicate two frames back
957 (for double buffering). n indicates n frames back.
958 The main intent here is to allow values
959 of 1 for special applications where
960 frame data would modify the immediately
963 ah_Pad0
: Byte; { Pad byte, not used at present. }
965 ah_Flags
: ULONG
; { 32 option bits used by options=4 and 5.
966 At present only 6 are identified, but the
967 rest are set =0 so they can be used to
968 implement future ideas. These are defined
969 for option 4 only at this point. It is
970 recommended that all bits be set =0 for
971 option 5 and that any bit settings
972 used in the future (such as for XOR mode)
973 be compatible with the option 4
974 bit settings. Player code should check
975 undefined bits in options 4 and 5 to assure
978 The six bits for current use are:
981 ===============================================
982 0 short data long data
984 2 separate info one info list
985 for each plane for all planes
986 3 not RLC RLC (run length coded)
987 4 horizontal vertical
988 5 short info offsets long info offsets
991 ah_Pad
: Array[0..15] of Byte; { This is a pad for future use for future
995 { ***************************************************************************}
1000 ADTM_LOADFRAME
= ($701);
1001 { Used to load a frame of the animation }
1003 ADTM_UNLOADFRAME
= ($702);
1004 { Used to unload a frame of the animation }
1006 ADTM_START
= ($703);
1007 { Used to start the animation }
1009 ADTM_PAUSE
= ($704);
1010 { Used to pause the animation (don't reset the timer) }
1013 { Used to stop the animation }
1015 ADTM_LOCATE
= ($706);
1016 { Used to locate a frame in the animation (as set by a slider...) }
1018 { ***************************************************************************}
1020 { ADTM_LOADFRAME, ADTM_UNLOADFRAME }
1022 padtFrame
= ^tadtFrame
;
1025 alf_TimeStamp
, { Timestamp of frame to load }
1027 { The following fields are filled in by the ADTM_LOADFRAME method, }
1028 { and are read-only for any other methods. }
1030 alf_Frame
, { Frame number }
1031 alf_Duration
: ULONG
; { Duration of frame }
1033 alf_BitMap
: pBitMap
; { Loaded BitMap }
1034 alf_CMap
: pColorMap
; { Colormap, if changed }
1036 alf_Sample
: Pointer; { Sound data }
1040 alf_UserData
: Pointer; { Used by load frame for extra data }
1043 { ADTM_START, ADTM_PAUSE, ADTM_STOP, ADTM_LOCATE }
1044 padtStart
= ^tadtStart
;
1047 asa_Frame
: ULONG
; { Frame # to start at }
1050 { ***************************************************************************}
1052 VAR DataTypesBase
: pLibrary
;
1054 FUNCTION AddDTObject(win
: pWindow
; req
: pRequester
; o
: pObject_
; pos
: LONGINT) : LONGINT;
1055 PROCEDURE DisposeDTObject(o
: pObject_
);
1056 FUNCTION DoAsyncLayout(o
: pObject_
; gpl
: pgpLayout
) : ULONG
;
1057 FUNCTION DoDTMethodA(o
: pObject_
; win
: pWindow
; req
: pRequester
; msg
: pLONGINT
) : ULONG
;
1058 FUNCTION GetDTAttrsA(o
: pObject_
; attrs
: pTagItem
) : ULONG
;
1059 FUNCTION GetDTMethods(obj
: pObject_
) : Pointer;
1060 FUNCTION GetDTString(id
: ULONG
) : pCHAR
;
1061 FUNCTION GetDTTriggerMethods(obj
: pObject_
) : pDTMethod
;
1062 FUNCTION NewDTObjectA(name
: POINTER; attrs
: pTagItem
): POINTER;
1063 FUNCTION ObtainDataTypeA(typ
: ULONG
; handle
: POINTER; attrs
: pTagItem
) : pDataType
;
1064 FUNCTION PrintDTObjectA(o
: pObject_
; w
: pWindow
; r
: pRequester
; msg
: pdtPrint
) : ULONG
;
1065 PROCEDURE RefreshDTObjectA(o
: pObject_
; win
: pWindow
; req
: pRequester
; attrs
: pTagItem
);
1066 PROCEDURE ReleaseDataType(dt
: pDataType
);
1067 FUNCTION RemoveDTObject(win
: pWindow
; o
: pObject_
) : LONGINT;
1068 FUNCTION SetDTAttrsA(o
: pObject_
; win
: pWindow
; req
: pRequester
; attrs
: pTagItem
) : ULONG
;
1072 FUNCTION AddDTObject(win
: pWindow
; req
: pRequester
; o
: pObject_
; pos
: LONGINT) : LONGINT;
1080 MOVEA
.L DataTypesBase
,A6
1087 PROCEDURE DisposeDTObject(o
: pObject_
);
1092 MOVEA
.L DataTypesBase
,A6
1098 FUNCTION DoAsyncLayout(o
: pObject_
; gpl
: pgpLayout
) : ULONG
;
1104 MOVEA
.L DataTypesBase
,A6
1111 FUNCTION DoDTMethodA(o
: pObject_
; win
: pWindow
; req
: pRequester
; msg
: pLONGINT
) : ULONG
;
1119 MOVEA
.L DataTypesBase
,A6
1126 FUNCTION GetDTAttrsA(o
: pObject_
; attrs
: pTagItem
) : ULONG
;
1132 MOVEA
.L DataTypesBase
,A6
1139 FUNCTION GetDTMethods(obj
: pObject_
) : POINTER;
1144 MOVEA
.L DataTypesBase
,A6
1151 FUNCTION GetDTString(id
: ULONG
) : pCHAR
;
1156 MOVEA
.L DataTypesBase
,A6
1163 FUNCTION GetDTTriggerMethods(obj
: pObject_
) : pDTMethod
;
1168 MOVEA
.L DataTypesBase
,A6
1175 FUNCTION NewDTObjectA(name
: POINTER; attrs
: pTagItem
) : POINTER;
1181 MOVEA
.L DataTypesBase
,A6
1188 FUNCTION ObtainDataTypeA(typ
: ULONG
; handle
: POINTER; attrs
: pTagItem
) : pDataType
;
1195 MOVEA
.L DataTypesBase
,A6
1202 FUNCTION PrintDTObjectA(o
: pObject_
; w
: pWindow
; r
: pRequester
; msg
: pdtPrint
) : ULONG
;
1210 MOVEA
.L DataTypesBase
,A6
1217 PROCEDURE RefreshDTObjectA(o
: pObject_
; win
: pWindow
; req
: pRequester
; attrs
: pTagItem
);
1225 MOVEA
.L DataTypesBase
,A6
1231 PROCEDURE ReleaseDataType(dt
: pDataType
);
1236 MOVEA
.L DataTypesBase
,A6
1242 FUNCTION RemoveDTObject(win
: pWindow
; o
: pObject_
) : LONGINT;
1248 MOVEA
.L DataTypesBase
,A6
1255 FUNCTION SetDTAttrsA(o
: pObject_
; win
: pWindow
; req
: pRequester
; attrs
: pTagItem
) : ULONG
;
1263 MOVEA
.L DataTypesBase
,A6
1270 END. (* UNIT DATATYPES *)