1 { 2 This file is part of the Free Pascal run time library. 3 4 A file in Amiga system run time library. 5 Copyright (c) 1998-2002 by Nils Sjoholm 6 member of the Amiga RTL development team. 7 8 See the file COPYING.FPC, included in this distribution, 9 for details about the copyright. 10 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. 14 15 **********************************************************************} 16 17 { 18 History: 19 20 Added functions and procedures with array of const. 21 For use with fpc 1.0.7. They are in systemvartags. 22 11 Nov 2001. 23 24 Update for AmigaOs 3.9. 25 Added some new const. 26 tadtNewFormatFrame is a new record. 27 New procedures and functions. 28 FUNCTION ObtainDTDrawInfoA 29 FUNCTION DrawDTObjectA 30 PROCEDURE ReleaseDTDrawInfo 31 32 New varargs procedures and function, they are 33 in systemvartags. 34 PROCEDURE RefreshDTObjects 35 FUNCTION DoDTMethod 36 FUNCTION PrintDTObject 37 FUNCTION ObtainDTDrawInfo 38 FUNCTION DrawDTObject 39 Changed startcode for library. 40 28 Jan 2003. 41 42 Changed integer > smallint, 43 cardinal > longword. 44 09 Feb 2003. 45 46 nils.sjoholm@mailbox.swipnet.se 47 } 48 {$PACKRECORDS 2} 49 50 unit datatypes; 51 52 interface 53 54 uses 55 exec, amigados, intuition, utility, 56 agraphics, iffparse, amigaprinter, prtbase; 57 58 // datatypes 59 const 60 ID_DTYP = Ord('D') shl 24 + Ord('T') shl 16 + Ord('Y') shl 8 + Ord('P'); // DTYP 61 ID_DTHD = Ord('D') shl 24 + Ord('T') shl 16 + Ord('H') shl 8 + Ord('D'); // DTHD 62 63 Type 64 PDataTypeHeader = ^TDataTypeHeader; 65 TDataTypeHeader = record 66 dth_Name: STRPTR; // Descriptive name of the data type 67 dth_BaseName: STRPTR; // Base name of the data type 68 dth_Pattern: STRPTR; // Match pattern for file name. 69 dth_Mask: PSmallInt; // Comparision mask 70 dth_GroupID: LongWord; // Group that the DataType is in 71 dth_ID: LongWord; // ID for DataType (same as IFF FORM type) 72 dth_MaskLen: SmallInt; // Length of comparision mask 73 dth_Pad: SmallInt; // Unused at present (must be 0) 74 dth_Flags: Word; // Flags 75 dth_Priority: Word; // Priority 76 end; 77 const 78 DTHSIZE = SizeOf(TDataTypeHeader); 79 80 // Basic type - TDataTypeHeader.dth_Flags 81 DTF_TYPE_MASK = $000F; 82 DTF_BINARY = $0000; 83 DTF_ASCII = $0001; 84 DTF_IFF = $0002; 85 DTF_MISC = $0003; 86 DTF_CASE = $0010; // Set if case is important 87 DTF_SYSTEM1 = $1000; // Reserved for system use 88 89 {**************************************************************************** 90 * 91 * GROUP ID and ID 92 * 93 * This is used for filtering out objects that you don't want. For 94 * example, you could make a filter for the ASL file requester so 95 * that it only showed the files that were pictures, or even to 96 * narrow it down to only show files that were ILBM pictures. 97 * 98 * Note that the Group ID's are in lower case, and always the first 99 * four characters of the word. 100 * 101 * For ID's; If it is an IFF file, then the ID is the same as the 102 * FORM type. If it isn't an IFF file, then the ID would be the 103 * first four characters of name for the file type. 104 * 105 ****************************************************************************} 106 107 // System file, such as; directory, executable, library, device, font, etc. 108 GID_SYSTEM = Ord('s') shl 24 + Ord('y') shl 16 + Ord('s') shl 8 + Ord('t'); // syst 109 // Formatted or unformatted text 110 GID_TEXT = Ord('t') shl 24 + Ord('e') shl 16 + Ord('x') shl 8 + Ord('t'); // text 111 // Formatted text combined with graphics or other DataTypes 112 GID_DOCUMENT = Ord('d') shl 24 + Ord('o') shl 16 + Ord('c') shl 8 + Ord('u'); // docu 113 // Sound 114 GID_SOUND = Ord('s') shl 24 + Ord('o') shl 16 + Ord('u') shl 8 + Ord('n'); // soun 115 // Musical instrument 116 GID_INSTRUMENT = Ord('i') shl 24 + Ord('n') shl 16 + Ord('s') shl 8 + Ord('t'); // inst 117 // Musical score 118 GID_MUSIC = Ord('m') shl 24 + Ord('u') shl 16 + Ord('s') shl 8 + Ord('i'); // musi 119 // Picture 120 GID_PICTURE = Ord('p') shl 24 + Ord('i') shl 16 + Ord('c') shl 8 + Ord('t'); // pict 121 //* Animated pictures */ 122 GID_ANIMATION = Ord('a') shl 24 + Ord('n') shl 16 + Ord('i') shl 8 + Ord('m'); // anim 123 //* Animation with audio */ 124 GID_MOVIE = Ord('m') shl 24 + Ord('o') shl 16 + Ord('v') shl 8 + Ord('i'); // movi 125 126 // A code chunk contains an embedded executable that can be loaded with InternalLoadSeg. 127 ID_CODE = Ord('D') shl 24 + Ord('T') shl 16 + Ord('C') shl 8 + Ord('D'); // DTCD 128 129 // DataTypes comparision hook context (Read-Only). This is the argument that is passed to a custom comparision routine. 130 type 131 PTHookContext = ^TDTHookContext; 132 TDTHookContext = record 133 dthc_SysBase: PLibrary; 134 dthc_DOSBase: PLibrary; 135 dthc_IFFParseBase: PLibrary; 136 dthc_UtilityBase: PLibrary; 137 // File context 138 dthc_Lock: BPTR; // Lock on the file 139 dthc_FIB: PFileInfoBlock; // Pointer to a FileInfoBlock 140 dthc_FileHandle: BPTR; // Pointer to file handle (may be nil) 141 dthc_IFF: PIFFHandle; // Pointer to IFFHandle (may be nil) 142 dthc_Buffer: STRPTR; // Buffer... 143 dthc_BufferLength: LongWord; // ... and corresponding length 144 end; 145 146 const 147 ID_TOOL = Ord('D') shl 24 + Ord('T') shl 16 + Ord('T') shl 8 + Ord('L'); // DTTL 148 149 type 150 PTool = ^TTool; 151 TTool = record 152 tn_Which: Word; // Which tool is this TW_* 153 tn_Flags: Word; // Flags TF_* 154 tn_Program: STRPTR; // Application to use 155 end; 156 157 const 158 TOOLSIZE = SizeOf(TTool); // orig TSIZE but clash with type TSize 159 160 // defines for tn_Which 161 TW_INFO = 1; 162 TW_BROWSE = 2; 163 TW_EDIT = 3; 164 TW_PRINT = 4; 165 TW_MAIL = 5; 166 167 // defines for tn_Flags 168 TF_LAUNCH_MASK = $000F; 169 TF_SHELL = $0001; 170 TF_WORKBENCH = $0002; 171 TF_RX = $0003; 172 173 ID_TAGS = Ord('D') shl 24 + Ord('T') shl 16 + Ord('T') shl 8 + Ord('G'); // DTTG 174 175 type 176 PDataType = ^TDataType; 177 TDataType = record 178 dtn_Node1: TNode; // Reserved for system use 179 dtn_Node2: TNode; // Reserved for system use 180 dtn_Header: PDataTypeHeader; // Pointer to the DataTypeHeader 181 dtn_ToolList: TList; // List of tool nodes 182 dtn_FunctionName: STRPTR; // Name of comparison routine 183 dtn_AttrList: PTagItem; // Object creation tags 184 dtn_Length: LongWord; // Length of the memory block 185 end; 186 187 const 188 DTNSIZE = SizeOf(TDataType); 189 190 type 191 PToolNode = ^TToolNode; 192 TToolNode = record 193 tn_Node: TNode; // Embedded node 194 tn_Tool: TTool; // Embedded tool 195 tn_Length: LongWord; // Length of the memory block 196 end; 197 const 198 TNSIZE = SizeOf(TToolNode); 199 200 ID_NAME = Ord('N') shl 24 + Ord('A') shl 16 + Ord('M') shl 8 + Ord('E'); 201 202 // Text ID's 203 DTERROR_UNKNOWN_DATATYPE = 2000; 204 DTERROR_COULDNT_SAVE = 2001; 205 DTERROR_COULDNT_OPEN = 2002; 206 DTERROR_COULDNT_SEND_MESSAGE = 2003; 207 // new for V40 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; 213 // New for V44 214 DTERROR_NOT_AVAILABLE = 2009; 215 // Offset for types } 216 DTMSG_TYPE_OFFSET = 2100; 217 218 // datatypesclass 219 const 220 DATATYPESCLASS = 'datatypesclass'; 221 222 DTA_Dummy = TAG_USER + $1000; 223 224 DTA_TextAttr = DTA_Dummy + 10; // (PTextAttr) Default TextAttr to use for text within the object 225 DTA_TopVert = DTA_Dummy + 11; // (LongInt) Top vertical unit 226 DTA_VisibleVert = DTA_Dummy + 12; // (LongInt) Number of visible vertical units 227 DTA_TotalVert = DTA_Dummy + 13; // (LongInt) Total number of vertical units 228 DTA_VertUnit = DTA_Dummy + 14; // (LongInt) Number of pixels per vertical unit 229 DTA_TopHoriz = DTA_Dummy + 15; // (LongInt) Top horizontal unit 230 DTA_VisibleHoriz = DTA_Dummy + 16; // (LongInt) Number of visible horizontal units 231 DTA_TotalHoriz = DTA_Dummy + 17; // (LongInt) Total number of horiziontal units 232 DTA_HorizUnit = DTA_Dummy + 18; // (LongInt) Number of pixels per horizontal unit 233 DTA_NodeName = DTA_Dummy + 19; // (PByte) Name of the current element within the object 234 DTA_Title = DTA_Dummy + 20; // (STRPTR) Object's title 235 DTA_TriggerMethods = DTA_Dummy + 21; // (PDTMethod) Pointer to a nil terminated array of trigger methods 236 DTA_Data = DTA_Dummy + 22; // (APTR) Object data 237 DTA_TextFont = DTA_Dummy + 23; // (PTextFont) Default font to use 238 DTA_Methods = DTA_Dummy + 24; // (PLongWord) Pointer to an array (terminated with #0) of methods that the object supports 239 DTA_PrinterStatus = DTA_Dummy + 25; // (LongInt) Printer error message 240 DTA_PrinterProc = DTA_Dummy + 26; // (PProcess) PRIVATE! Pointer to the print process 241 DTA_LayoutProc = DTA_Dummy + 27; // (PProcess) PRIVATE! Pointer to the print process 242 DTA_Busy = DTA_Dummy + 28; // Turns the application's busy pointer on and off 243 DTA_Sync = DTA_Dummy + 29; // Indicate that new information has been loaded into an object. 244 // (This is used for models that cache the DTA_TopVert-like tags.) 245 DTA_BaseName = DTA_Dummy + 30; // Base name of the class 246 DTA_GroupID = DTA_Dummy + 31; // Group that the object must belong to 247 DTA_ErrorLevel = DTA_Dummy + 32; // Error level 248 DTA_ErrorNumber = DTA_Dummy + 33; // datatypes.library error number 249 DTA_ErrorString = DTA_Dummy + 34; // Argument for datatypes.library error 250 DTA_Conductor = DTA_Dummy + 35; // (PByte) Name of a realtime.library conductor -- defaults to "Main" 251 DTA_ControlPanel = DTA_Dummy + 36; // (LongBool) Specify whether a control panel should be embedded into the object or not 252 // (for example in the animation datatype) -- defaults to True 253 DTA_Immediate = DTA_Dummy + 37; // (LongBool) Should the object begin playing immediately? -- defaults to False 254 DTA_Repeat = DTA_Dummy + 38; // (LongBool) Indicate that the object should repeat playing -- defaults to False 255 // V44 256 DTA_SourceAddress = DTA_Dummy + 39; // (APTR) V44: Address of object if of type DTST_MEMORY 257 DTA_SourceSize = DTA_Dummy + 40; // (LongWord) V44: Size of object if of type DTST_MEMORY 258 259 DTA_Reserved = DTA_Dummy + 41; // Reserved tag; DO NOT USE (V44) 260 261 // DTObject attributes 262 DTA_Name = DTA_Dummy + 100; 263 DTA_SourceType = DTA_Dummy + 101; 264 DTA_Handle = DTA_Dummy + 102; 265 DTA_DataType = DTA_Dummy + 103; 266 DTA_Domain = DTA_Dummy + 104; 267 // Left, Top, Width, Height -> use the Gadgetclass Tags 268 DTA_ObjName = DTA_Dummy + 109; 269 DTA_ObjAuthor = DTA_Dummy + 110; 270 DTA_ObjAnnotation = DTA_Dummy + 111; 271 DTA_ObjCopyright = DTA_Dummy + 112; 272 DTA_ObjVersion = DTA_Dummy + 113; 273 DTA_ObjectID = DTA_Dummy + 114; 274 DTA_UserData = DTA_Dummy + 115; 275 // RelLeft, RelTop, RelWidth, RelHeight -> use the Gadgetclass Tags 276 DTA_FrameInfo = DTA_Dummy + 116; 277 DTA_SelectDomain = DTA_Dummy + 121; 278 DTA_TotalPVert = DTA_Dummy + 122; 279 DTA_TotalPHoriz = DTA_Dummy + 123; 280 DTA_NominalVert = DTA_Dummy + 124; 281 DTA_NominalHoriz = DTA_Dummy + 125; 282 283 // Printing attributes 284 DTA_DestCols = DTA_Dummy + 400; // (LongInt) Destination x width 285 DTA_DestRows = DTA_Dummy + 401; // (LongInt) Destination y height 286 DTA_Special = DTA_Dummy + 402; // (Word) Option flags 287 DTA_RastPort = DTA_Dummy + 403; // (PRastPort) RastPort used when printing 288 DTA_ARexxPortName = DTA_Dummy + 404; // (STRPTR) Pointer to base name for ARexx port 289 290 DTST_RAM = 1; 291 DTST_FILE = 2; 292 DTST_CLIPBOARD = 3; 293 DTST_HOTLINK = 4; 294 DTST_MEMORY = 5; // V44 295 296 // This structure is attached to the Gadget.SpecialInfo field of the gadget. Use Get/Set calls to access it. 297 type 298 PDTSpecialInfo = ^TDTSpecialInfo; 299 TDTSpecialInfo = record 300 si_Lock: TSignalSemaphore; 301 si_Flags: LongWord; 302 303 si_TopVert: LongInt; // Top row (in units) 304 si_VisVert: LongInt; // Number of visible rows (in units) 305 si_TotVert: LongInt; // Total number of rows (in units) 306 si_OTopVert: LongInt; // Previous top (in units) 307 si_VertUnit: LongInt; // Number of pixels in vertical unit 308 309 si_TopHoriz: LongInt; // Top column (in units) 310 si_VisHoriz: LongInt; // Number of visible columns (in units) 311 si_TotHoriz: LongInt; // Total number of columns (in units) 312 si_OTopHoriz: LongInt; // Previous top (in units) 313 si_HorizUnit: LongInt; // Number of pixels in horizontal unit 314 end; 315 316 const 317 DTSIF_LAYOUT = 1 shl 0; // Object is in layout processing 318 DTSIF_NEWSIZE = 1 shl 1; // Object needs to be layed out 319 DTSIF_DRAGGING = 1 shl 2; 320 DTSIF_DRAGSELECT = 1 shl 3; 321 DTSIF_HIGHLIGHT = 1 shl 4; 322 DTSIF_PRINTING = 1 shl 5; // Object is being printed 323 DTSIF_LAYOUTPROC = 1 shl 6; // Object is in layout process 324 325 type 326 PDTMethod = ^TDTMethod; 327 TDTMethod = record 328 dtm_Label: STRPTR; 329 dtm_Command: STRPTR; 330 dtm_Method: LongWord; 331 end; 332 333 const 334 DTM_Dummy = $600; 335 336 DTM_FRAMEBOX = $601; // Inquire what environment an object requires 337 DTM_PROCLAYOUT = $602; // Same as GM_LAYOUT except guaranteed to be on a process already 338 DTM_ASYNCLAYOUT = $603; // Layout that is occurring on a process 339 DTM_REMOVEDTOBJECT = $604; // When RemoveDTObject() is called 340 341 DTM_SELECT = $605; 342 DTM_CLEARSELECTED = $606; 343 344 DTM_COPY = $607; 345 DTM_PRINT = $608; 346 DTM_ABORTPRINT = $609; 347 348 DTM_NEWMEMBER = $610; 349 DTM_DISPOSEMEMBER = $611; 350 351 DTM_GOTO = $630; 352 DTM_TRIGGER = $631; 353 354 DTM_OBTAINDRAWINFO = $640; 355 DTM_DRAW = $641; 356 DTM_RELEASEDRAWINFO = $642; 357 358 DTM_WRITE = $650; 359 360 type 361 // Used to ask the object about itself 362 PFrameInfo = ^TFrameInfo; 363 TFrameInfo = record 364 fri_PropertyFlags: LongWord; // DisplayInfo 365 fri_Resolution: TPoint; // DisplayInfo 366 367 fri_RedBits: Byte; 368 fri_GreenBits: Byte; 369 fri_BlueBits: Byte; 370 371 fri_Dimensions: record 372 Width: LongWord; 373 Height: LongWord; 374 Depth: LongWord; 375 end; 376 377 fri_Screen: PScreen; 378 fri_ColorMap: PColorMap; 379 380 fri_Flags: LongWord; // FIF_* 381 end; 382 383 const 384 FIF_SCALABLE = $1; 385 FIF_SCROLLABLE = $2; 386 FIF_REMAPPABLE = $4; 387 388 type 389 // DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT 390 PdtGeneral = ^TdtGeneral; 391 TdtGeneral = record 392 MethodID: LongWord; 393 dtg_GInfo: PGadgetInfo; 394 end; 395 396 // DTM_SELECT 397 PdtSelect = ^TdtSelect; 398 TdtSelect = record 399 MethodID: LongWord; 400 dts_GInfo: PGadgetInfo; 401 dts_Select: TRectangle; 402 end; 403 404 // DTM_FRAMEBOX 405 PdtFrameBox = ^TdtFrameBox; 406 TdtFrameBox = record 407 MethodID: LongWord; 408 dtf_GInfo: PGadgetInfo; 409 dtf_ContentsInfo: PFrameInfo; 410 dtf_FrameInfo: PFrameInfo; // Input 411 dtf_SizeFrameInfo: LongWord; // Output 412 dtf_FrameFlags: LongWord; 413 end; 414 415 // DTM_GOTO 416 PdtGoto = ^TdtGoto; 417 TdtGoto = record 418 MethodID: LongWord; 419 dtg_GInfo: PGadgetInfo; 420 dtg_NodeName: STRPTR; // Node to goto 421 dtg_AttrList: PTagItem; // Additional attributes 422 end; 423 424 //* DTM_TRIGGER */ 425 PdtTrigger = ^TdtTrigger; 426 TdtTrigger = record 427 MethodID: LongWord; 428 dtt_GInfo: PGadgetInfo; 429 dtt_Function: LongWord; 430 dtt_Data: APTR; 431 end; 432 433 const 434 STM_PAUSE = 1; 435 STM_PLAY = 2; 436 STM_CONTENTS = 3; 437 STM_INDEX = 4; 438 STM_RETRACE = 5; 439 STM_BROWSE_PREV = 6; 440 STM_BROWSE_NEXT = 7; 441 442 STM_NEXT_FIELD = 8; 443 STM_PREV_FIELD = 9; 444 STM_ACTIVATE_FIELD = 10; 445 446 STM_COMMAND = 11; 447 448 // New for V40 449 STM_REWIND = 12; 450 STM_FASTFORWARD = 13; 451 STM_STOP = 14; 452 STM_RESUME = 15; 453 STM_LOCATE = 16; 454 455 type 456 // Printer IO request 457 PPrinterIO = ^TPrinterIO; 458 TPrinterIO = record 459 Ios: TIOStdReq; 460 Iodrp: TIODRPReq; 461 Iopc: TIOPrtCmdReq; 462 end; 463 464 // DTM_PRINT 465 PdtPrint = ^TdtPrint; 466 TdtPrint = record 467 MethodID: LongWord; 468 dtp_GInfo: PGadgetInfo; 469 dtp_PIO: PPrinterIO; 470 dtp_AttrList: PTagItem; 471 end; 472 473 // DTM_DRAW 474 PdtDraw = ^TdtDraw; 475 TdtDraw = record 476 MethodID: LongWord; 477 dtd_RPort: PRastPort; 478 dtd_Left: LongInt; 479 dtd_Top: LongInt; 480 dtd_Width: LongInt; 481 dtd_Height: LongInt; 482 dtd_TopHoriz: LongInt; 483 dtd_TopVert: LongInt; 484 dtd_AttrList: PTagItem; // Additional attributes 485 end; 486 487 // DTM_WRITE 488 PdtWrite = ^TdtWrite; 489 TdtWrite = record 490 MethodID: LongWord; 491 dtw_GInfo: PGadgetInfo; // Gadget information 492 dtw_FileHandle: BPTR; // File handle to write to 493 dtw_Mode: LongWord; 494 dtw_AttrList: PTagItem; // Additional attributes 495 end; 496 497 const 498 DTWM_IFF = 0; // Save data as IFF data 499 DTWM_RAW = 1; // Save data as local data format 500 501 // pictureclass 502 const 503 PICTUREDTCLASS = 'picture.datatype'; 504 505 // Picture attributes 506 PDTA_ModeID = DTA_Dummy + 200; // Mode ID of the picture 507 PDTA_BitMapHeader = DTA_Dummy + 201; 508 PDTA_BitMap = DTA_Dummy + 202; // (PBitmap) Pointer to a class-allocated bitmap, that will end up being freed by picture.class when DisposeDTObject() is called 509 PDTA_ColorRegisters = DTA_Dummy + 203; // (PColorRegister) Picture colour table 510 PDTA_CRegs = DTA_Dummy + 204; // (PLongWord) Color table to use with SetRGB32CM() 511 PDTA_GRegs = DTA_Dummy + 205; // (PLongWord) Color table; this table is initialized during the layout process and will contain the colours the picture will use 512 // after remapping. If no remapping takes place, these colours will match those in the PDTA_CRegs table. 513 PDTA_ColorTable = DTA_Dummy + 206; // (PByte) Shared pen table; this table is initialized during the layout process while the picture is being remapped 514 PDTA_ColorTable2 = DTA_Dummy + 207; // (PByte) Shared pen table; in most places this table will be identical to the PDTA_ColorTable table. Some of the colours in this table might 515 // match the original colour palette a little better than the colours picked for the other table. The picture.datatype uses the two tables 516 // during remapping, alternating for each pixel 517 PDTA_Allocated = DTA_Dummy + 208; // OBSOLETE; DO NOT USE 518 PDTA_NumColors = DTA_Dummy + 209; // (Word) Number of colors used by the picture. 519 PDTA_NumAlloc = DTA_Dummy + 210; // (Word) Number of colors allocated by the picture 520 PDTA_Remap = DTA_Dummy + 211; // (Boolean) Remap picture (defaults to True) 521 PDTA_Screen = DTA_Dummy + 212; // (PScreen) Screen to remap to 522 PDTA_FreeSourceBitMap = DTA_Dummy + 213; // (Boolean) Free the source bitmap after remapping 523 PDTA_Grab = DTA_Dummy + 214; // Pointer to a Point structure 524 PDTA_DestBitMap = DTA_Dummy + 215; // Pointer to the destination (remapped) bitmap 525 PDTA_ClassBitMap = DTA_Dummy + 216; // Pointer to class-allocated bitmap, that will end up being freed by the class after DisposeDTObject() is called 526 PDTA_NumSparse = DTA_Dummy + 217; // (Word) Number of colors used for sparse remapping 527 PDTA_SparseTable = DTA_Dummy + 218; // (PByte) Pointer to a table of pen numbers indicating which colors should be used when remapping the image. 528 // This array must contain as many entries as there are colors specified with PDTA_NumSparse 529 // V44 530 PDTA_WhichPicture = DTA_Dummy + 219; // (LongWord) Index number of the picture to load 531 PDTA_GetNumPictures = DTA_Dummy + 220; // (PLongWord) Get the number of pictures stored in the file 532 PDTA_MaxDitherPens = DTA_Dummy + 221; // (LongWord) Maximum number of colours to use for dithering 533 PDTA_DitherQuality = DTA_Dummy + 222; // (LongWord) Quality of the dithering algorithm to be used during colour quantization 534 PDTA_AllocatedPens = DTA_Dummy + 223; // (PByte) Pointer to the allocated pen table 535 // V45 536 PDTA_ScaleQuality = DTA_Dummy + 224; // Quality for scaling. 537 538 539 PDTANUMPICTURES_Unknown = 0; // When querying the number of pictures stored in a file, the following value denotes "the number of pictures is unknown". 540 541 // V43 extensions (attributes) 542 PDTA_SourceMode = DTA_Dummy + 250; // Set the interface mode for the sub datatype. See below. 543 PDTA_DestMode = DTA_Dummy + 251; // Set the interface mode for the app datatype. See below. 544 PDTA_UseFriendBitMap = DTA_Dummy + 255; // Make the allocated bitmap be a "friend" bitmap (LongBool) 545 PDTA_MaskPlane = DTA_Dummy + 258; // (PlantPtr) nil or mask plane for use with BltMaskBitMapRastPort() 546 547 // Interface modes 548 PMODE_V42 = 0; // Compatibility mode 549 PMODE_V43 = 1; // Extended mode 550 551 // V43 extensions (methods) 552 PDTM_Dummy = DTM_Dummy + $60; 553 554 PDTM_WRITEPIXELARRAY = PDTM_Dummy + 0; // Transfer pixel data to the picture object in the specified format 555 PDTM_READPIXELARRAY = PDTM_Dummy + 1; // Transfer pixel data from the picture object in the specified format 556 557 // Masking techniques 558 mskNone = 0; 559 mskHasMask = 1; 560 mskHasTransparentColor = 2; 561 mskLasso = 3; 562 mskHasAlpha = 4; 563 564 // Compression techniques 565 cmpNone = 0; 566 cmpByteRun1 = 1; 567 cmpByteRun2 = 2; 568 569 type 570 // Bitmap header (BMHD) structure 571 PBitMapHeader = ^TBitMapHeader; 572 TBitMapHeader = record 573 bmh_Width: Word; // Width in pixels 574 bmh_Height: Word; // Height in pixels 575 bmh_Left: SmallInt; // Left position 576 bmh_Top: SmallInt; // Top position 577 bmh_Depth: Byte; // Number of planes 578 bmh_Masking: Byte; // Masking type 579 bmh_Compression: Byte; // Compression type 580 bmh_Pad: Byte; 581 bmh_Transparent: Word; // Transparent color 582 bmh_XAspect: Byte; 583 bmh_YAspect: Byte; 584 bmh_PageWidth: SmallInt; 585 bmh_PageHeight: SmallInt; 586 end; 587 588 PColorRegister = ^TColorRegister; 589 TColorRegister = record 590 red: Byte; 591 green: Byte; 592 blue: Byte; 593 end; 594 595 const 596 // IFF types that may be in pictures 597 ID_ILBM = Ord('I') shl 24 + Ord('L') shl 16 + Ord('B') shl 8 + Ord('M'); // ILBM 598 ID_BMHD = Ord('B') shl 24 + Ord('M') shl 16 + Ord('H') shl 8 + Ord('D'); // BMHD 599 ID_CMAP = Ord('C') shl 24 + Ord('M') shl 16 + Ord('A') shl 8 + Ord('P'); // CMAP 600 ID_CRNG = Ord('C') shl 24 + Ord('R') shl 16 + Ord('N') shl 8 + Ord('G'); // CRNG 601 ID_GRAB = Ord('G') shl 24 + Ord('R') shl 16 + Ord('A') shl 8 + Ord('B'); // GRAB 602 ID_SPRT = Ord('S') shl 24 + Ord('P') shl 16 + Ord('R') shl 8 + Ord('T'); // SPRT 603 ID_DEST = Ord('D') shl 24 + Ord('E') shl 16 + Ord('S') shl 8 + Ord('T'); // DEST 604 ID_CAMG = Ord('C') shl 24 + Ord('A') shl 16 + Ord('M') shl 8 + Ord('G'); // CAMG 605 606 ID_BODY = Ord('B') shl 24 + Ord('O') shl 16 + Ord('D') shl 8 + Ord('Y'); // BODY 607 608 // soundclass 609 const 610 SOUNDDTCLASS = 'sound.datatype'; 611 // Sound attributes 612 SDTA_Dummy = DTA_Dummy + 500; 613 SDTA_VoiceHeader = SDTA_Dummy + 1; 614 SDTA_Sample = SDTA_Dummy + 2; // (PByte) Sample data 615 SDTA_SampleLength = SDTA_Dummy + 3; // (LongWord) Length of the sample data in Bytes 616 SDTA_Period = SDTA_Dummy + 4; // (Word) Period 617 SDTA_Volume = SDTA_Dummy + 5; // (Word) Volume. Range from 0 to 64 618 SDTA_Cycles = SDTA_Dummy + 6; 619 // The following tags are new for V40 620 SDTA_SignalTask = SDTA_Dummy + 7; // (PTask) Task to signal when sound is complete or next buffer needed. 621 SDTA_SignalBit = SDTA_Dummy + 8; // (LongWord) Signal mask to use on completion or 0 to disable 622 SDTA_SignalBitMask = SDTA_SignalBit; // (Byte) Signal bit to use on completion or -1 to disable 623 SDTA_Continuous = SDTA_Dummy + 9; // (Byte) Playing a continuous stream of data. Defaults to False. 624 625 // The following tags are new for V44 626 SDTA_SignalBitNumber = SDTA_Dummy + 10; // (Byte) Signal bit to use on completion or -1 to disable 627 SDTA_SamplesPerSec = SDTA_Dummy + 11; // (Word) Samples per second 628 SDTA_ReplayPeriod = SDTA_Dummy + 12; // (PTimeVal) Sample replay period 629 SDTA_LeftSample = SDTA_Dummy + 13; // (PByte) Sample data 630 SDTA_RightSample = SDTA_Dummy + 14; // (PByte) Sample data 631 SDTA_Pan = SDTA_Dummy + 15; // (PByte) Stereo panning 632 SDTA_FreeSampleData = SDTA_Dummy + 16; // (Bool) FreeVec() all sample data upon OM_DISPOSE. 633 SDTA_SyncSampleChange = SDTA_Dummy + 17; // (Boot) Wait for the current sample to be played back before switching to the new sample data. 634 635 // Data compression methods 636 CMP_NONE = 0; 637 CMP_FIBDELTA = 1; 638 639 // Unity = Fixed 1.0 = maximum volume 640 Unity = $10000; 641 642 type 643 PVoiceHeader = ^TVoiceHeader; 644 TVoiceHeader = record 645 vh_OneShotHiSamples: LongWord; // # samples in the high octave 1-shot part 646 vh_RepeatHiSamples: LongWord; // # samples in the high octave repeat part 647 vh_SamplesPerHiCycle: LongWord; // # samples/cycle in high octave, else 0 648 vh_SamplesPerSec: Word; // data sampling rate 649 vh_Octaves: Byte; // # of octaves of waveforms 650 vh_Compression: Byte; // data compression technique used 651 vh_Volume: LongWord; // playback nominal volume from 0 to Unity (full volume). Map this value into the output hardware's dynamic range. 652 end; 653 654 const 655 // Channel allocation */ 656 SAMPLETYPE_Left = 2; 657 SAMPLETYPE_Right = 4; 658 SAMPLETYPE_Stereo = 6; 659 660 type 661 TSampleType = LongInt; 662 663 const 664 // IFF types 665 ID_8SVX = Ord('8') shl 24 + Ord('S') shl 16 + Ord('V') shl 8 + Ord('X'); // 8SVX 666 ID_VHDR = Ord('V') shl 24 + Ord('H') shl 16 + Ord('D') shl 8 + Ord('R'); // VHDR 667 ID_CHAN = Ord('C') shl 24 + Ord('H') shl 16 + Ord('A') shl 8 + Ord('N'); // CHAN 668 669 // textclass 670 const 671 TEXTDTCLASS = 'text.datatype'; 672 673 // attributes 674 TDTA_Buffer = DTA_Dummy + 300; 675 TDTA_BufferLen = DTA_Dummy + 301; 676 TDTA_LineList = DTA_Dummy + 302; 677 TDTA_WordSelect = DTA_Dummy + 303; 678 TDTA_WordDelim = DTA_Dummy + 304; 679 TDTA_WordWrap = DTA_Dummy + 305; // Boolean. Should the text be word wrapped. Defaults to false. 680 681 Type 682 // There is one line structure for every line of text in the document. 683 PLine = ^TLine; 684 TLine = record 685 ln_Link: TMinNode; // to link the lines together 686 ln_Text: STRPTR; // pointer to the text for this line 687 ln_TextLen: LongWord; // the character length of the text for this line 688 ln_XOffset: Word; // where in the line the text starts 689 ln_YOffset: Word; // line the text is on 690 ln_Width: Word; // Width of line in pixels 691 ln_Height: Word; // Height of line in pixels 692 ln_Flags: Word; // info on the line LNF_* 693 ln_FgPen: ShortInt; // foreground pen 694 ln_BgPen: ShortInt; // background pen 695 ln_Style: LongWord; // Font style 696 ln_Data: APTR; // Link data... 697 end; 698 const 699 // ln_Flags 700 LNF_LF = 1 shl 0; // Line Feed 701 LNF_LINK = 1 shl 1; // Segment is a link 702 LNF_OBJECT = 1 shl 2; // ln_Data is a pointer to an DataTypes object 703 LNF_SELECTED = 1 shl 3; // Object is selected 704 705 ID_FTXT = Ord('F') shl 24 + Ord('T') shl 16 + Ord('X') shl 8 + Ord('T'); // FTXT 706 ID_CHRS = Ord('C') shl 24 + Ord('H') shl 16 + Ord('R') shl 8 + Ord('S'); // CHRS 707 708 // animationclass 709 const 710 ANIMATIONDTCLASS = 'animation.datatype'; 711 712 // Animation attributes 713 ADTA_Dummy = DTA_Dummy + 600; 714 ADTA_ModeID = PDTA_ModeID; 715 ADTA_KeyFrame = PDTA_BitMap; // (PBitmap) Key frame (first frame) bitmap 716 ADTA_ColorRegisters = PDTA_ColorRegisters; 717 ADTA_CRegs = PDTA_CRegs; 718 ADTA_GRegs = PDTA_GRegs; 719 ADTA_ColorTable = PDTA_ColorTable; 720 ADTA_ColorTable2 = PDTA_ColorTable2; 721 ADTA_Allocated = PDTA_Allocated; 722 ADTA_NumColors = PDTA_NumColors; 723 ADTA_NumAlloc = PDTA_NumAlloc; 724 ADTA_Remap = PDTA_Remap; // (Bool) Remap animation (defaults to True) 725 ADTA_Screen = PDTA_Screen; // (PScreen) Screen to remap to 726 ADTA_NumSparse = PDTA_NumSparse; // (Word) Number of colors used for sparse remapping 727 ADTA_SparseTable = PDTA_SparseTable; // (PByte) Pointer to a table of pen numbers indicating which colors should be used when remapping the image. 728 // This array must contain as many entries as there are colors specified with ADTA_NumSparse 729 ADTA_Width = ADTA_Dummy + 1; 730 ADTA_Height = ADTA_Dummy + 2; 731 ADTA_Depth = ADTA_Dummy + 3; 732 ADTA_Frames = ADTA_Dummy + 4; // (LongWord) Number of frames in the animation 733 ADTA_Frame = ADTA_Dummy + 5; // (LongWord) Current frame 734 ADTA_FramesPerSecond = ADTA_Dummy + 6; // (LongWord) Frames per second 735 ADTA_FrameIncrement = ADTA_Dummy + 7; // (LongInt) Amount to change frame by when fast forwarding or rewinding. Defaults to 10. 736 737 ADTA_PreloadFrameCount = ADTA_Dummy + 8; // (V44) 738 739 // Sound attributes 740 ADTA_Sample = SDTA_Sample; 741 ADTA_SampleLength = SDTA_SampleLength; 742 ADTA_Period = SDTA_Period; 743 ADTA_Volume = SDTA_Volume; 744 ADTA_Cycles = SDTA_Cycles; 745 // V44 746 ADTA_LeftSample = SDTA_LeftSample; 747 ADTA_RightSample = SDTA_RightSample; 748 ADTA_SamplesPerSec = SDTA_SamplesPerSec; 749 750 // IFF ANIM chunks 751 ID_ANIM = Ord('A') shl 24 + Ord('N') shl 16 + Ord('I') shl 8 + Ord('M'); // ANIM 752 ID_ANHD = Ord('A') shl 24 + Ord('N') shl 16 + Ord('H') shl 8 + Ord('D'); // ANHD 753 ID_DLTA = Ord('D') shl 24 + Ord('L') shl 16 + Ord('T') shl 8 + Ord('A'); // DLTA 754 755 type 756 // Required ANHD structure describes an ANIM frame 757 PAnimHeader = ^TAnimHeader; 758 TAnimHeader = record 759 ah_Operation: Byte; { The compression method: 760 0 set directly (normal ILBM BODY), 761 1 XOR ILBM mode, 762 2 Long Delta mode, 763 3 Short Delta mode, 764 4 Generalized short/long Delta mode, 765 5 Byte Vertical Delta mode 766 6 Stereo op 5 (third party) 767 74 (ascii 'J') reserved for Eric Graham's 768 compression technique (details to be 769 released later). } 770 ah_Mask: Byte; // (XOR mode only - plane mask where each bit is set =1 if there is data and =0 if not.) 771 ah_Width: Word; // (XOR mode only - width and height of the area represented 772 ah_Height: Word; // by the BODY to eliminate unnecessary un-changed data) 773 ah_Left: SmallInt; // (XOR mode only - position of rectangular 774 ah_Top: SmallInt; // area representd by the BODY) 775 ah_AbsTime: LongWord; // Timing for a frame relative to the time the first frame was displayed, in jiffies (1/60 sec) 776 ah_RelTime: LongWord; // Timing for frame relative to time previous frame was displayed - in jiffies (1/60 sec) 777 ah_Interleave: Byte; { Indicates how may frames back this data is to modify. 0 defaults to indicate two frames back 778 (for double buffering). n indicates n frames back. The main intent here is to allow values 779 of 1 for special applications where frame data would modify the immediately previous frame. } 780 ah_Pad0: Byte; // Pad byte, not used at present. 781 ah_Flags: LongWord; { 32 option bits used by options=4 and 5. At present only 6 are identified, but the 782 rest are set =0 so they can be used to implement future ideas. These are defined 783 for option 4 only at this point. It is recommended that all bits be set =0 for 784 option 5 and that any bit settings used in the future (such as for XOR mode) 785 be compatible with the option 4 bit settings. Player code should check undefined bits 786 in options 4 and 5 to assure they are zero. 787 The six bits for current use are: 788 bit # set =0 set =1 789 =============================================== 790 0 short data long data 791 1 set XOR 792 2 separate info one info list 793 for each plane for all planes 794 3 not RLC RLC (run length coded) 795 4 horizontal vertical 796 5 short info offsets long info offsets} 797 ah_Pad: array[0..15] of Byte; // This is a pad for future use for future compression modes 798 end; 799 const 800 // Methods 801 ADTM_Dummy = $700; 802 ADTM_LOADFRAME = $701; // Used to load a frame of the animation 803 ADTM_UNLOADFRAME = $702; // Used to unload a frame of the animation 804 ADTM_START = $703; // Used to start the animation 805 ADTM_PAUSE = $704; // Used to pause the animation (don't reset the timer) 806 ADTM_STOP = $705; // Used to stop the animation 807 ADTM_LOCATE = $706; // Used to locate a frame in the animation (as set by a slider...) 808 // New on V44 809 ADTM_LOADNEWFORMATFRAME = $707; // Used to load a new format frame of the animation 810 ADTM_UNLOADNEWFORMATFRAME = $708; // Used to unload a new format frame of the animation 811 812 type 813 // ADTM_LOADFRAME, ADTM_UNLOADFRAME 814 PadtFrame = ^TadtFrame; 815 TadtFrame = record 816 MethodID: LongWord; 817 alf_TimeStamp: LongWord; // Timestamp of frame to load 818 // The following fields are filled in by the ADTM_LOADFRAME method, and are read-only for any other methods. 819 alf_Frame: LongWord; // Frame number 820 alf_Duration: LongWord; // Duration of frame 821 alf_BitMap: PBitMap; // Loaded BitMap 822 alf_CMap: PColorMap; // Colormap, if changed 823 alf_Sample: PShortInt; // Sound data 824 alf_SampleLength: LongWord; 825 alf_Period: LongWord; 826 alf_UserData: APTR; // Used by load frame for extra data 827 end; 828 829 // ADTM_LOADFRAME, ADTM_UNLOADFRAME 830 PadtNewFormatFrame = ^TadtNewFormatFrame; 831 TadtNewFormatFrame = record 832 MethodID: LongWord; 833 alf_TimeStamp: LongWord; // Timestamp of frame to load 834 // // The following fields are filled in by the ADTM_NEWLOADFRAME method, and are read-only for any other methods. 835 alf_Frame: LongWord; // Frame number 836 alf_Duration: LongWord; // Duration of frame 837 alf_BitMap: PBitMap; // Loaded BitMap 838 alf_CMap: PColorMap; // Colormap, if changed 839 alf_Sample: PShortInt; 840 alf_SampleLength: LongWord; // Sound data 841 alf_Period: LongWord; 842 alf_UserData: APTR; // Used by load frame for extra data 843 alf_Size: LongWord; // Size of this data structure (in bytes) 844 alf_LeftSample: PShortInt; // Sound for left channel, or nil if none 845 alf_RightSample: PShortInt; // Sound for right channel, or nil if none 846 alf_SamplesPerSec: LongWord; // Replay speed; if > 0, this overrides alf_Period 847 end; 848 849 // ADTM_START, ADTM_PAUSE, ADTM_STOP, ADTM_LOCATE 850 PadtStart = ^tadtStart; 851 TadtStart = record 852 MethodID: LongWord; 853 asa_Frame: LongWord; // Frame # to start at 854 end; 855 856 857 858 var 859 DataTypesBase: PLibrary = nil; 860 861 const 862 DATATYPESNAME: PChar = 'datatypes.library'; 863 864 function AddDTObject(Win: PWindow location 'a0'; Req: PRequester location 'a1'; o: PObject_ location 'a2'; Pos: LongInt location 'd0'): LongInt; syscall DataTypesBase 072; 865 procedure DisposeDTObject(o: PObject_ location 'a0'); syscall DataTypesBase 054; 866 function DoAsyncLayout(o: PObject_ location 'a0'; gpl: pgpLayout location 'a1'): LongWord; syscall DataTypesBase 084; 867 function DoDTMethodA(o: PObject_ location 'a0'; Win: PWindow location 'a1'; Req: PRequester location 'a2'; Msg: PLongInt location 'a3'): LongWord; syscall DataTypesBase 090; 868 function GetDTAttrsA(o: PObject_ location 'a0'; Attrs: PTagItem location 'a2'): LongWord; syscall DataTypesBase 066; 869 function GetDTMethods(Obj: PObject_ location 'a0'): Pointer; syscall DataTypesBase 102; 870 function GetDTString(Id: LongWord location 'a0'): STRPTR; syscall DataTypesBase 138; 871 function GetDTTriggerMethods(Obj: PObject_ location 'a0'): PDTMethod; syscall DataTypesBase 108; 872 function NewDTObjectA(Name: STRPTR location 'd0'; Attrs: pTagItem location 'a0'): Pointer; syscall DataTypesBase 048; 873 function ObtainDataTypeA(Typ: LongWord location 'd0'; Handle: Pointer location 'a0'; Attrs: PTagItem location 'a1'): pDataType; syscall DataTypesBase 036; 874 function PrintDTObjectA(o: PObject_ location 'a0'; w: PWindow location 'a1'; r: PRequester location 'a2'; Msg: PdtPrint location 'a3'): LongWord; syscall DataTypesBase 114; 875 procedure RefreshDTObjectA(o: PObject_ location 'a0'; Win: PWindow location 'a1'; Req: PRequester location 'a2'; Attrs: PTagItem location 'a3'); syscall DataTypesBase 078; 876 procedure ReleaseDataType(Dt: PDataType location 'a0'); syscall DataTypesBase 042; 877 function RemoveDTObject(Win: PWindow location 'a0'; o: PObject_ location 'a1'): LongInt; syscall DataTypesBase 096; 878 function SetDTAttrsA(o: PObject_ location 'a0'; Win: PWindow location 'a1'; Req: PRequester location 'a2'; Attrs: PTagItem location 'a3'): LongWord; syscall DataTypesBase 060; 879 880 function ObtainDTDrawInfoA(o: PObject_ location 'a0'; Attrs: PTagItem location 'a1'): Pointer; syscall DataTypesBase 120; 881 function DrawDTObjectA(Rp: PRastPort location 'a0'; o: PObject_ location 'a1'; x: LongInt location 'd0'; y: LongInt location 'd1'; w: LongInt location 'd2'; h: LongInt location 'd3'; th: LongInt location 'd4'; tv: LongInt location 'd5'; Attrs: PTagItem location 'a2'): LongInt; syscall DataTypesBase 126; 882 procedure ReleaseDTDrawInfo(o: PObject_ location 'a0'; Handle: Pointer location 'a1'); syscall DataTypesBase 132; 883 884 function ObtainDataType(Typ: LongWord; Handle: APTR; const TagList: array of PtrUInt): PDataType; inline; 885 function NewDTObject(Name: APTR; const TagList: array of PtrUInt): PObject_; inline; 886 function SetDTAttrs(O: PObject_; Win: PWindow; Req: PRequester; const TagList: array of PtrUInt): LongWord; inline; 887 function GetDTAttrs(O: PObject_; const TagList: array of PtrUInt): LongWord; inline; 888 procedure RefreshDTObject(Obj: PObject_; Window: PWindow; Req: PRequester; const TagList: array of PtrUInt); inline; 889 function DoDTMethod(O: PObject_; Win: PWindow; Req: PRequester; const ArgList: array of PtrUInt): PtrUInt; inline; 890 function PrintDTObject(Obj: PObject_; Window: PWindow; Requester: PRequester; const ArgList: array of PtrUInt): LongWord; inline; 891 function ObtainDTDrawInfo(O: PObject_; const TagList: array of PtrUInt): APTR; inline; 892 function DrawDTObject(Rp: PRastPort; O: PObject_; x, y, w, h, th, tv: LongInt; const TagList: array of PtrUInt): LongInt; inline; 893 894 implementation 895 896 function ObtainDataType(Typ: LongWord; Handle: APTR; const TagList: array of PtrUInt): PDataType; 897 begin 898 ObtainDataType := ObtainDataTypeA(Typ, Handle, @TagList); 899 end; 900 901 function NewDTObject(Name: APTR; const TagList: array of PtrUInt): PObject_; 902 begin 903 NewDTObject := NewDTObjectA(Name, @TagList); 904 end; 905 906 function SetDTAttrs(O: PObject_; Win: PWindow; Req: PRequester; const TagList: array of PtrUInt): LongWord; 907 begin 908 SetDTAttrs := SetDTAttrsA(O, Win, Req, @TagList); 909 end; 910 911 function GetDTAttrs(O: PObject_; const TagList: array of PtrUInt): LongWord; 912 begin 913 GetDTAttrs := GetDTAttrsA(O, @TagList); 914 end; 915 916 procedure RefreshDTObject(Obj: PObject_; Window: PWindow; Req: PRequester; const TagList: array of PtrUInt); 917 begin 918 RefreshDTObjectA(Obj, Window, Req, @TagList); 919 end; 920 921 function DoDTMethod(O: PObject_; Win: PWindow; Req: PRequester; const ArgList: array of PtrUInt): PtrUInt; 922 begin 923 DoDTMethod := DoDTMethodA(O, Win, Req, @ArgList); 924 end; 925 926 function PrintDTObject(Obj: PObject_; Window: PWindow; Requester: PRequester; const ArgList: array of PtrUInt): LongWord; 927 begin 928 PrintDTObject := PrintDTObjectA(Obj, Window, Requester, @ArgList); 929 end; 930 931 function ObtainDTDrawInfo(O: PObject_; const TagList: array of PtrUInt): APTR; 932 begin 933 ObtainDTDrawInfo := ObtainDTDrawInfoA(O, @TagList); 934 end; 935 936 function DrawDTObject(Rp: PRastPort; O: PObject_; x, y, w, h, th, tv: LongInt; const TagList: array of PtrUInt): LongInt; 937 begin 938 DrawDTObject := DrawDTObjectA(RP, O, x, y, w, h, th, tv, @TagList); 939 end; 940 941 942 const 943 LIBVERSION : longword = 0; 944 945 initialization 946 DataTypesBase := OpenLibrary(DATATYPESNAME,LIBVERSION); 947 finalization 948 if Assigned(DataTypesBase) then 949 CloseLibrary(DataTypesBase); 950 END. (* UNIT DATATYPES *) 951 952 953 954 955 956