datatypes.pas 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2018 by Free Pascal development team
  4. datatypes.library functions
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit datatypes;
  12. interface
  13. uses
  14. Exec, AmigaDOS, Utility, AGraphics, Intuition, IFFParse;
  15. const
  16. DATATYPESNAME = 'datatypes.library';
  17. // datatypes
  18. const
  19. ID_DTYP = Ord('D') shl 24 + Ord('T') shl 16 + Ord('Y') shl 8 + Ord('P'); // DTYP
  20. ID_DTHD = Ord('D') shl 24 + Ord('T') shl 16 + Ord('H') shl 8 + Ord('D'); // DTHD
  21. type
  22. PDataTypeHeader = ^TDataTypeHeader;
  23. TDataTypeHeader = record
  24. dth_Name: STRPTR; // Name of the data type
  25. dth_BaseName: STRPTR; // Base name of the data type
  26. dth_Pattern: STRPTR; // File name match pattern
  27. dth_Mask: PSmallInt; // Comparison mask (binary)
  28. dth_GroupID: LongWord; // DataType Group GID_*
  29. dth_ID: LongWord; // DataType ID (same as IFF FORM type) ID_*
  30. dth_MaskLen: SmallInt; // Length of the comparison mask
  31. dth_Pad: SmallInt; // Unused at present (must be 0)
  32. dth_Flags: Word; // Flags DTF_*
  33. dth_Priority: Word;
  34. end;
  35. const
  36. DTHSIZE = SizeOf(TDataTypeHeader);
  37. // TDataTypeHeader.dth_Flags
  38. DTF_TYPE_MASK = $000F;
  39. DTF_BINARY = $0000;
  40. DTF_ASCII = $0001;
  41. DTF_IFF = $0002;
  42. DTF_MISC = $0003;
  43. DTF_CASE = $0010; // Case is important
  44. DTF_SYSTEM1 = $1000; // For system use only
  45. // TDataTypeHeader.dth_GroupID and TDataTypeHeader.dth_ID
  46. // System file -- executable, directory, library, font and so on.
  47. GID_SYSTEM = Ord('s') shl 24 + Ord('y') shl 16 + Ord('s') shl 8 + Ord('t'); // syst
  48. ID_BINARY = Ord('b') shl 24 + Ord('i') shl 16 + Ord('n') shl 8 + Ord('a'); // bina
  49. ID_EXECUTABLE = Ord('e') shl 24 + Ord('x') shl 16 + Ord('e') shl 8 + Ord('c'); // exec
  50. ID_DIRECTORY = Ord('d') shl 24 + Ord('i') shl 16 + Ord('r') shl 8 + Ord('e'); // dire
  51. ID_IFF = Ord('i') shl 24 + Ord('f') shl 16 + Ord('f') shl 8 + Ord(#0); // iff
  52. // Text, formatted or not
  53. GID_TEXT = Ord('t') shl 24 + Ord('e') shl 16 + Ord('x') shl 8 + Ord('t'); // text
  54. ID_ASCII = Ord('a') shl 24 + Ord('s') shl 16 + Ord('c') shl 8 + Ord('i'); // asci
  55. // Formatted text combined with graphics or other DataTypes
  56. GID_DOCUMENT = Ord('d') shl 24 + Ord('o') shl 16 + Ord('c') shl 8 + Ord('u'); // docu
  57. // Sound
  58. GID_SOUND = Ord('s') shl 24 + Ord('o') shl 16 + Ord('u') shl 8 + Ord('n'); // soun
  59. // Musical instrument
  60. GID_INSTRUMENT = Ord('i') shl 24 + Ord('n') shl 16 + Ord('s') shl 8 + Ord('t'); // inst
  61. // Musical score
  62. GID_MUSIC = Ord('m') shl 24 + Ord('u') shl 16 + Ord('s') shl 8 + Ord('i'); // musi
  63. // Picture
  64. GID_PICTURE = Ord('p') shl 24 + Ord('i') shl 16 + Ord('c') shl 8 + Ord('t'); // pict
  65. //* Animated pictures */
  66. GID_ANIMATION = Ord('a') shl 24 + Ord('n') shl 16 + Ord('i') shl 8 + Ord('m'); // anim
  67. //* Animation with audio */
  68. GID_MOVIE = Ord('m') shl 24 + Ord('o') shl 16 + Ord('v') shl 8 + Ord('i'); // movi
  69. ID_CODE = Ord('D') shl 24 + Ord('T') shl 16 + Ord('C') shl 8 + Ord('D'); // DTCD
  70. type
  71. PTHookContext = ^TDTHookContext;
  72. TDTHookContext = record
  73. dthc_SysBase: PLibrary;
  74. dthc_DOSBase: PLibrary;
  75. dthc_IFFParseBase: PLibrary;
  76. dthc_UtilityBase: PLibrary;
  77. // File context
  78. dthc_Lock: BPTR;
  79. dthc_FIB: PFileInfoBlock;
  80. dthc_FileHandle: BPTR; // Pointer to file handle (may be nil)
  81. dthc_IFF: PIFFHandle; // Pointer to IFFHandle (may be nil)
  82. dthc_Buffer: STRPTR; // Buffer...
  83. dthc_BufferLength: LongWord; // ... and corresponding length
  84. end;
  85. const
  86. ID_TOOL = Ord('D') shl 24 + Ord('T') shl 16 + Ord('T') shl 8 + Ord('L'); // DTTL
  87. type
  88. PTool = ^TTool;
  89. TTool = record
  90. tn_Which: Word; // TW_*
  91. tn_Flags: Word; // Flags TF_*
  92. tn_Program: STRPTR; // Application to use
  93. end;
  94. const
  95. // TTool.tn_Which field
  96. TW_MISC = 0;
  97. TW_INFO = 1;
  98. TW_BROWSE = 2;
  99. TW_EDIT = 3;
  100. TW_PRINT = 4;
  101. TW_MAIL = 5;
  102. // TTool.tnFlags field
  103. TF_LAUNCH_MASK = $000F;
  104. TF_SHELL = $0001;
  105. TF_WORKBENCH = $0002;
  106. TF_RX = $0003;
  107. // Tags for use with FindToolNodeA(), GetToolAttrsA() and so on
  108. TOOLA_Dummy = TAG_USER;
  109. TOOLA_Program = TOOLA_Dummy + 1;
  110. TOOLA_Which = TOOLA_Dummy + 2;
  111. TOOLA_LaunchType = TOOLA_Dummy + 3;
  112. const
  113. ID_TAGS = Ord('D') shl 24 + Ord('T') shl 16 + Ord('T') shl 8 + Ord('G'); // DTTG
  114. type
  115. PDataType = ^TDataType;
  116. TDataType = record
  117. dtn_Node1: TNode; // These two nodes are for...
  118. dtn_Node2: TNode; // ...system use only!
  119. dtn_Header: PDataTypeHeader;
  120. dtn_ToolList: TList; // Tool nodes
  121. dtn_FunctionName: STRPTR; // Name of comparison routine
  122. dtn_AttrList: PTagItem; // Object creation tags
  123. dtn_Length: LongWord; // Length of the memory block
  124. end;
  125. const
  126. DTNSIZE = SizeOf(TDataType);
  127. type
  128. PToolNode = ^TToolNode;
  129. TToolNode = record
  130. tn_Node: TNode;
  131. tn_Tool: TTool;
  132. tn_Length: LongWord; // Length of the memory block
  133. end;
  134. const
  135. TNSIZE = SizeOf(TToolNode);
  136. ID_NAME = Ord('N') shl 24 + Ord('A') shl 16 + Ord('M') shl 8 + Ord('E');
  137. // Text ID's
  138. DTERROR_UNKNOWN_DATATYPE = 2000;
  139. DTERROR_COULDNT_SAVE = 2001;
  140. DTERROR_COULDNT_OPEN = 2002;
  141. DTERROR_COULDNT_SEND_MESSAGE = 2003;
  142. // new for V40
  143. DTERROR_COULDNT_OPEN_CLIPBOARD = 2004;
  144. DTERROR_Reserved = 2005;
  145. DTERROR_UNKNOWN_COMPRESSION = 2006;
  146. DTERROR_NOT_ENOUGH_DATA = 2007;
  147. DTERROR_INVALID_DATA = 2008;
  148. DTMSG_TYPE_OFFSET = 2100;
  149. // datatypesclass
  150. const
  151. DATATYPESCLASS = 'datatypesclass';
  152. DTA_Dummy = TAG_USER + $1000;
  153. DTA_TextAttr = DTA_Dummy + 10; // (PTextAttr) Default TextAttr to use for text within the object
  154. DTA_TopVert = DTA_Dummy + 11; // (LongInt) Top vertical unit
  155. DTA_VisibleVert = DTA_Dummy + 12; // (LongInt) Number of visible vertical units
  156. DTA_TotalVert = DTA_Dummy + 13; // (LongInt) Total number of vertical units
  157. DTA_VertUnit = DTA_Dummy + 14; // (LongInt) Number of pixels per vertical unit
  158. DTA_TopHoriz = DTA_Dummy + 15; // (LongInt) Top horizontal unit
  159. DTA_VisibleHoriz = DTA_Dummy + 16; // (LongInt) Number of visible horizontal units
  160. DTA_TotalHoriz = DTA_Dummy + 17; // (LongInt) Total number of horiziontal units
  161. DTA_HorizUnit = DTA_Dummy + 18; // (LongInt) Number of pixels per horizontal unit
  162. DTA_NodeName = DTA_Dummy + 19; // (PByte) Name of the current element within the object
  163. DTA_Title = DTA_Dummy + 20; // (STRPTR) Object's title
  164. DTA_TriggerMethods = DTA_Dummy + 21; // (PDTMethod) Pointer to a nil terminated array of trigger methods
  165. DTA_Data = DTA_Dummy + 22; // (APTR) Object data
  166. DTA_TextFont = DTA_Dummy + 23; // (PTextFont) Default font to use
  167. DTA_Methods = DTA_Dummy + 24; // (PLongWord) Pointer to an array (terminated with #0) of methods that the object supports
  168. DTA_PrinterStatus = DTA_Dummy + 25; // (LongInt) Printer error message
  169. DTA_PrinterProc = DTA_Dummy + 26; // (PProcess) PRIVATE! Pointer to the print process
  170. DTA_LayoutProc = DTA_Dummy + 27; // (PProcess) PRIVATE! Pointer to the print process
  171. DTA_Busy = DTA_Dummy + 28; // Turns the application's busy pointer on and off
  172. DTA_Sync = DTA_Dummy + 29; // Indicate that new information has been loaded into an object.
  173. // (This is used for models that cache the DTA_TopVert-like tags.)
  174. DTA_BaseName = DTA_Dummy + 30; // Base name of the class
  175. DTA_GroupID = DTA_Dummy + 31; // Group that the object must belong to
  176. DTA_ErrorLevel = DTA_Dummy + 32; // Error level
  177. DTA_ErrorNumber = DTA_Dummy + 33; // datatypes.library error number
  178. DTA_ErrorString = DTA_Dummy + 34; // Argument for datatypes.library error
  179. DTA_Conductor = DTA_Dummy + 35; // (PByte) Name of a realtime.library conductor -- defaults to "Main"
  180. DTA_ControlPanel = DTA_Dummy + 36; // (LongBool) Specify whether a control panel should be embedded into the object or not
  181. // (for example in the animation datatype) -- defaults to True
  182. DTA_Immediate = DTA_Dummy + 37; // (LongBool) Should the object begin playing immediately? -- defaults to False
  183. DTA_Repeat = DTA_Dummy + 38; // (LongBool) Indicate that the object should repeat playing -- defaults to False
  184. // V44
  185. DTA_SourceAddress = DTA_Dummy + 39; // (APTR) V44: Address of object if of type DTST_MEMORY
  186. DTA_SourceSize = DTA_Dummy + 40; // (LongWord) V44: Size of object if of type DTST_MEMORY
  187. // DTObject attributes
  188. DTA_Name = DTA_Dummy + 100;
  189. DTA_SourceType = DTA_Dummy + 101;
  190. DTA_Handle = DTA_Dummy + 102;
  191. DTA_DataType = DTA_Dummy + 103;
  192. DTA_Domain = DTA_Dummy + 104;
  193. // Left, Top, Width, Height -> use the Gadgetclass Tags
  194. DTA_ObjName = DTA_Dummy + 109;
  195. DTA_ObjAuthor = DTA_Dummy + 110;
  196. DTA_ObjAnnotation = DTA_Dummy + 111;
  197. DTA_ObjCopyright = DTA_Dummy + 112;
  198. DTA_ObjVersion = DTA_Dummy + 113;
  199. DTA_ObjectID = DTA_Dummy + 114;
  200. DTA_UserData = DTA_Dummy + 115;
  201. // RelLeft, RelTop, RelWidth, RelHeight -> use the Gadgetclass Tags
  202. DTA_FrameInfo = DTA_Dummy + 116;
  203. DTA_SelectDomain = DTA_Dummy + 121;
  204. DTA_TotalPVert = DTA_Dummy + 122;
  205. DTA_TotalPHoriz = DTA_Dummy + 123;
  206. DTA_NominalVert = DTA_Dummy + 124;
  207. DTA_NominalHoriz = DTA_Dummy + 125;
  208. // Printing attributes
  209. DTA_DestCols = DTA_Dummy + 400; // (LongInt) Destination x width
  210. DTA_DestRows = DTA_Dummy + 401; // (LongInt) Destination y height
  211. DTA_Special = DTA_Dummy + 402; // (Word) Option flags
  212. DTA_RastPort = DTA_Dummy + 403; // (PRastPort) RastPort used when printing
  213. DTA_ARexxPortName = DTA_Dummy + 404; // (STRPTR) Pointer to base name for ARexx port
  214. DTST_RAM = 1;
  215. DTST_FILE = 2;
  216. DTST_CLIPBOARD = 3;
  217. DTST_HOTLINK = 4;
  218. DTST_MEMORY = 5; // V44
  219. // This structure is attached to the Gadget.SpecialInfo field of the gadget. Use Get/Set calls to access it.
  220. type
  221. PDTSpecialInfo = ^TDTSpecialInfo;
  222. TDTSpecialInfo = record
  223. si_Lock: TSignalSemaphore;
  224. si_Flags: LongWord;
  225. si_TopVert: LongInt; // Top row (in units)
  226. si_VisVert: LongInt; // Number of visible rows (in units)
  227. si_TotVert: LongInt; // Total number of rows (in units)
  228. si_OTopVert: LongInt; // Previous top (in units)
  229. si_VertUnit: LongInt; // Number of pixels in vertical unit
  230. si_TopHoriz: LongInt; // Top column (in units)
  231. si_VisHoriz: LongInt; // Number of visible columns (in units)
  232. si_TotHoriz: LongInt; // Total number of columns (in units)
  233. si_OTopHoriz: LongInt; // Previous top (in units)
  234. si_HorizUnit: LongInt; // Number of pixels in horizontal unit
  235. end;
  236. const
  237. DTSIF_LAYOUT = 1 shl 0; // Object is in layout processing
  238. DTSIF_NEWSIZE = 1 shl 1; // Object needs to be layed out
  239. DTSIF_DRAGGING = 1 shl 2;
  240. DTSIF_DRAGSELECT = 1 shl 3;
  241. DTSIF_HIGHLIGHT = 1 shl 4;
  242. DTSIF_PRINTING = 1 shl 5; // Object is being printed
  243. DTSIF_LAYOUTPROC = 1 shl 6; // Object is in layout process
  244. type
  245. PDTMethod = ^TDTMethod;
  246. TDTMethod = record
  247. dtm_Label: STRPTR;
  248. dtm_Command: STRPTR;
  249. dtm_Method: LongWord;
  250. end;
  251. const
  252. DTM_Dummy = $600;
  253. DTM_FRAMEBOX = $601; // Get the environment an object requires
  254. DTM_PROCLAYOUT = $602;
  255. DTM_ASYNCLAYOUT = $603;
  256. DTM_REMOVEDTOBJECT = $604; // When RemoveDTObject() is called
  257. DTM_SELECT = $605;
  258. DTM_CLEARSELECTED = $606;
  259. DTM_COPY = $607;
  260. DTM_PRINT = $608;
  261. DTM_ABORTPRINT = $609;
  262. DTM_NEWMEMBER = $610;
  263. DTM_DISPOSEMEMBER = $611;
  264. DTM_GOTO = $630;
  265. DTM_TRIGGER = $631;
  266. DTM_OBTAINDRAWINFO = $640;
  267. DTM_DRAW = $641;
  268. DTM_RELEASEDRAWINFO = $642;
  269. DTM_WRITE = $650;
  270. type
  271. PFrameInfo = ^TFrameInfo;
  272. TFrameInfo = record
  273. fri_PropertyFlags: LongWord; // DisplayInfo
  274. fri_Resolution: TPoint; // DisplayInfo
  275. fri_RedBits: Byte;
  276. fri_GreenBits: Byte;
  277. fri_BlueBits: Byte;
  278. fri_Dimensions: record
  279. Width: LongWord;
  280. Height: LongWord;
  281. Depth: LongWord;
  282. end;
  283. fri_Screen: PScreen;
  284. fri_ColorMap: PColorMap;
  285. fri_Flags: LongWord; // FIF_*
  286. end;
  287. const
  288. FIF_SCALABLE = $1;
  289. FIF_SCROLLABLE = $2;
  290. FIF_REMAPPABLE = $4;
  291. type
  292. // DTM_REMOVEDTOBJECT, DTM_CLEARSELECTED, DTM_COPY, DTM_ABORTPRINT
  293. PdtGeneral = ^TdtGeneral;
  294. TdtGeneral = record
  295. MethodID: PtrUInt;
  296. dtg_GInfo: PGadgetInfo;
  297. end;
  298. // DTM_SELECT
  299. PdtSelect = ^TdtSelect;
  300. TdtSelect = record
  301. MethodID: PtrUInt;
  302. dts_GInfo: PGadgetInfo;
  303. dts_Select: TRectangle;
  304. end;
  305. // DTM_FRAMEBOX
  306. PdtFrameBox = ^TdtFrameBox;
  307. TdtFrameBox = record
  308. MethodID: PtrUInt;
  309. dtf_GInfo: PGadgetInfo;
  310. dtf_ContentsInfo: PFrameInfo;
  311. dtf_FrameInfo: PFrameInfo; // Input
  312. dtf_SizeFrameInfo: LongWord; // Output
  313. dtf_FrameFlags: LongWord;
  314. end;
  315. // DTM_GOTO
  316. PdtGoto = ^TdtGoto;
  317. TdtGoto = record
  318. MethodID: PtrUInt;
  319. dtg_GInfo: PGadgetInfo;
  320. dtg_NodeName: STRPTR; // Node to goto
  321. dtg_AttrList: PTagItem; // Additional attributes
  322. end;
  323. // DTM_TRIGGER
  324. PdtTrigger = ^TdtTrigger;
  325. TdtTrigger = record
  326. MethodID: PtrUInt;
  327. dtt_GInfo: PGadgetInfo;
  328. dtt_Function: LongWord;
  329. dtt_Data: APTR;
  330. end;
  331. const
  332. STMF_METHOD_MASK = $0000FFFF;
  333. STMF_DATA_MASK = $00FF0000;
  334. STMF_RESERVED_MASK = $FF000000;
  335. STMD_VOID = $00010000;
  336. STMD_ULONG = $00020000;
  337. STMD_STRPTR = $00030000;
  338. STMD_TAGLIST = $00040000;
  339. STM_DONE = 0;
  340. STM_PAUSE = 1;
  341. STM_PLAY = 2;
  342. STM_CONTENTS = 3;
  343. STM_INDEX = 4;
  344. STM_RETRACE = 5;
  345. STM_BROWSE_PREV = 6;
  346. STM_BROWSE_NEXT = 7;
  347. STM_NEXT_FIELD = 8;
  348. STM_PREV_FIELD = 9;
  349. STM_ACTIVATE_FIELD = 10;
  350. STM_COMMAND = 11;
  351. STM_REWIND = 12;
  352. STM_FASTFORWARD = 13;
  353. STM_STOP = 14;
  354. STM_RESUME = 15;
  355. STM_LOCATE = 16;
  356. //* 17 is reserved for help */
  357. STM_SEARCH = 18;
  358. STM_SEARCH_NEXT = 19;
  359. STM_SEARCH_PREV = 20;
  360. STM_USER = 100;
  361. // skipped PrinterIO, dtPrint -> needs printer unit
  362. type
  363. // DTM_DRAW
  364. PdtDraw = ^TdtDraw;
  365. TdtDraw = record
  366. MethodID: PtrUInt;
  367. dtd_RPort: PRastPort;
  368. dtd_Left: LongInt;
  369. dtd_Top: LongInt;
  370. dtd_Width: LongInt;
  371. dtd_Height: LongInt;
  372. dtd_TopHoriz: LongInt;
  373. dtd_TopVert: LongInt;
  374. dtd_AttrList: PTagItem; // Additional attributes
  375. end;
  376. // DTM_RELEASERAWINFO
  377. PdtReleaseDrawInfo = ^TdtReleaseDrawInfo;
  378. TdtReleaseDrawInfo = record
  379. MethodID: PtrUInt;
  380. dtr_Handle: APTR; // Handle as returned by DTM_OBTAINDRAWINFO
  381. end;
  382. // DTM_WRITE
  383. PdtWrite = ^TdtWrite;
  384. TdtWrite = record
  385. MethodID: PtrUInt;
  386. dtw_GInfo: PGadgetInfo; // Gadget information
  387. dtw_FileHandle: BPTR; // File handle to write to
  388. dtw_Mode: LongWord;
  389. dtw_AttrList: PTagItem; // Additional attributes
  390. end;
  391. const
  392. DTWM_IFF = 0; // Save data as IFF data
  393. DTWM_RAW = 1; // Save data as local data format
  394. // amigaguideclass
  395. const
  396. AMIGAGUIDEDTCLASS = 'amigaguide.datatype';
  397. AGDTA_Dummy = DTA_Dummy + 700;
  398. AGDTA_Secure = AGDTA_Dummy + 1;
  399. AGDTA_HelpGroup = AGDTA_Dummy + 2;
  400. // pictureclass
  401. const
  402. PICTUREDTCLASS = 'picture.datatype';
  403. type
  404. PBitMapHeader = ^TBitMapHeader;
  405. TBitMapHeader = record
  406. bmh_Width: Word;
  407. bmh_Height: Word;
  408. bmh_Left: SmallInt;
  409. bmh_Top: SmallInt;
  410. bmh_Depth: Byte;
  411. bmh_Masking: Byte;
  412. bmh_Compression: Byte;
  413. bmh_Pad: Byte;
  414. bmh_Transparent: Word;
  415. bmh_XAspect: Byte;
  416. bmh_YAspect: Byte;
  417. bmh_PageWidth: SmallInt;
  418. bmh_PageHeight: SmallInt;
  419. end;
  420. PColorRegister = ^TColorRegister;
  421. TColorRegister = record
  422. red: Byte;
  423. green: Byte;
  424. blue: Byte;
  425. end;
  426. const
  427. PDTA_ModeID = DTA_Dummy + 200;
  428. PDTA_BitMapHeader = DTA_Dummy + 201;
  429. PDTA_BitMap = DTA_Dummy + 202;
  430. PDTA_ColorRegisters = DTA_Dummy + 203;
  431. PDTA_CRegs = DTA_Dummy + 204;
  432. PDTA_GRegs = DTA_Dummy + 205;
  433. PDTA_ColorTable = DTA_Dummy + 206;
  434. PDTA_ColorTable2 = DTA_Dummy + 207;
  435. PDTA_Allocated = DTA_Dummy + 208;
  436. PDTA_NumColors = DTA_Dummy + 209;
  437. PDTA_NumAlloc = DTA_Dummy + 210;
  438. PDTA_Remap = DTA_Dummy + 211;
  439. PDTA_Screen = DTA_Dummy + 212;
  440. PDTA_FreeSourceBitMap = DTA_Dummy + 213;
  441. PDTA_Grab = DTA_Dummy + 214;
  442. PDTA_DestBitMap = DTA_Dummy + 215;
  443. PDTA_ClassBitMap = DTA_Dummy + 216;
  444. PDTA_NumSparse = DTA_Dummy + 217;
  445. PDTA_SparseTable = DTA_Dummy + 218;
  446. PDTA_SourceMode = DTA_Dummy + 250; // Set the interface mode for the sub datatype. See below.
  447. PDTA_DestMode = DTA_Dummy + 251; // Set the interface mode for the app datatype. See below.
  448. PDTA_UseFriendBitMap = DTA_Dummy + 255; // Make the allocated bitmap be a "friend" bitmap (LongBool)
  449. // Interface modes
  450. PMODE_V42 = 0; // Mode used for backward compatibility
  451. PMODE_V43 = 1; // Use the new features
  452. mskNone = 0;
  453. mskHasMask = 1;
  454. mskHasTransparentColor = 2;
  455. mskLasso = 3;
  456. mskHasAlpha = 4;
  457. cmpNone = 0;
  458. cmpByteRun1 = 1;
  459. cmpByteRun2 = 2;
  460. ID_ILBM = Ord('I') shl 24 + Ord('L') shl 16 + Ord('B') shl 8 + Ord('M'); // ILBM
  461. ID_BMHD = Ord('B') shl 24 + Ord('M') shl 16 + Ord('H') shl 8 + Ord('D'); // BMHD
  462. ID_BODY = Ord('B') shl 24 + Ord('O') shl 16 + Ord('D') shl 8 + Ord('Y'); // BODY
  463. ID_CMAP = Ord('C') shl 24 + Ord('M') shl 16 + Ord('A') shl 8 + Ord('P'); // CMAP
  464. ID_CRNG = Ord('C') shl 24 + Ord('R') shl 16 + Ord('N') shl 8 + Ord('G'); // CRNG
  465. ID_GRAB = Ord('G') shl 24 + Ord('R') shl 16 + Ord('A') shl 8 + Ord('B'); // GRAB
  466. ID_SPRT = Ord('S') shl 24 + Ord('P') shl 16 + Ord('R') shl 8 + Ord('T'); // SPRT
  467. ID_DEST = Ord('D') shl 24 + Ord('E') shl 16 + Ord('S') shl 8 + Ord('T'); // DEST
  468. ID_CAMG = Ord('C') shl 24 + Ord('A') shl 16 + Ord('M') shl 8 + Ord('G'); // CAMG
  469. {Support for the V44 picture.datatype
  470. It is not clear, if AROS should support AmigaOS3.5 .
  471. But if you want V44-support define DT_V44_SUPPORT
  472. Joerg Dietrich}
  473. {$IFDEF DT_V44_SUPPORT}
  474. const
  475. PDTANUMPICTURES_Unknown = 0;
  476. PDTA_WhichPicture = DTA_Dummy + 219;
  477. PDTA_GetNumPictures = DTA_Dummy + 220;
  478. PDTA_MaxDitherPens = DTA_Dummy + 221;
  479. PDTA_DitherQuality = DTA_Dummy + 222;
  480. PDTA_AllocatedPens = DTA_Dummy + 223;
  481. PDTA_ScaleQuality = DTA_Dummy + 224;
  482. PDTA_DelayRead = DTA_Dummy + 225;
  483. PDTA_DelayedRead = DTA_Dummy + 226;
  484. PDTA_SourceMode = DTA_Dummy + 250;
  485. PDTA_DestMode = DTA_Dummy + 251;
  486. PDTA_UseFriendBitMap = DTA_Dummy + 255;
  487. PDTA_MaskPlane = DTA_Dummy + 258;
  488. PDTM_Dummy = DTM_Dummy + $60;
  489. PDTM_WRITEPIXELARRAY = PDTM_Dummy + 0;
  490. PDTM_READPIXELARRAY = PDTM_Dummy + 1;
  491. PDTM_SCALE = PDTM_Dummy + 2;
  492. type
  493. PpdtBlitPixelArray = ^TpdtBlitPixelArray;
  494. TpdtBlitPixelArray = record
  495. MethodID: PtrUInt;
  496. pbpa_PixelData: APTR;
  497. pbpa_PixelFormat: LongWord;
  498. pbpa_PixelArrayMod: LongWord;
  499. pbpa_Left: LongWord;
  500. pbpa_Top: LongWord;
  501. pbpa_Width: LongWord;
  502. pbpa_Height: LongWord;
  503. end;
  504. PpdtScale = ^TpdtScale;
  505. TpdtScale = record
  506. MethodID: PtrUInt;
  507. ps_NewWidth: LongWord;
  508. ps_NewHeight: LongWord;
  509. ps_Flags: LongWord;
  510. end;
  511. const
  512. // Flags for ps_Flags, for AROS only
  513. PScale_KeepAspect = $10; // Keep aspect ratio when scaling, fit inside given x, y coordinates
  514. PBPAFMT_RGB = 0;
  515. PBPAFMT_RGBA = 1;
  516. PBPAFMT_ARGB = 2;
  517. PBPAFMT_LUT8 = 3;
  518. PBPAFMT_GREY8 = 4;
  519. {$ENDIF DT_V44_SUPPORT}
  520. // soundclass
  521. const
  522. SOUNDDTCLASS = 'sound.datatype';
  523. const
  524. // Tags
  525. SDTA_Dummy = DTA_Dummy + 500;
  526. SDTA_VoiceHeader = SDTA_Dummy + 1;
  527. SDTA_Sample = SDTA_Dummy + 2;
  528. SDTA_SampleLength = SDTA_Dummy + 3;
  529. SDTA_Period = SDTA_Dummy + 4;
  530. SDTA_Volume = SDTA_Dummy + 5;
  531. SDTA_Cycles = SDTA_Dummy + 6;
  532. SDTA_SignalTask = SDTA_Dummy + 7;
  533. SDTA_SignalBit = SDTA_Dummy + 8;
  534. SDTA_SignalBitMask = SDTA_SignalBit;
  535. SDTA_Continuous = SDTA_Dummy + 9;
  536. // New in V44
  537. SDTA_SignalBitNumber = SDTA_Dummy + 10;
  538. SDTA_SamplesPerSec = SDTA_Dummy + 11;
  539. SDTA_ReplayPeriod = SDTA_Dummy + 12;
  540. SDTA_LeftSample = SDTA_Dummy + 13;
  541. SDTA_RightSample = SDTA_Dummy + 14;
  542. SDTA_Pan = SDTA_Dummy + 15;
  543. SDTA_FreeSampleData = SDTA_Dummy + 16;
  544. SDTA_SyncSampleChange = SDTA_Dummy + 17;
  545. // Data compression methods
  546. CMP_NONE = 0;
  547. CMP_FIBDELTA = 1;
  548. // Unity = Fixed 1.0 = maximum volume
  549. Unity = $10000;
  550. type
  551. PVoiceHeader = ^TVoiceHeader;
  552. TVoiceHeader = record
  553. vh_OneShotHiSamples: LongWord;
  554. vh_RepeatHiSamples: LongWord;
  555. vh_SamplesPerHiCycle: LongWord;
  556. vh_SamplesPerSec: Word;
  557. vh_Octaves: Byte;
  558. vh_Compression: Byte;
  559. vh_Volume: LongWord;
  560. end;
  561. const
  562. // Channel allocation */
  563. SAMPLETYPE_Left = 2;
  564. SAMPLETYPE_Right = 4;
  565. SAMPLETYPE_Stereo = 6;
  566. type
  567. TSampleType = LongInt;
  568. const
  569. // IFF types
  570. ID_8SVX = Ord('8') shl 24 + Ord('S') shl 16 + Ord('V') shl 8 + Ord('X'); // 8SVX
  571. ID_VHDR = Ord('V') shl 24 + Ord('H') shl 16 + Ord('D') shl 8 + Ord('R'); // VHDR
  572. ID_CHAN = Ord('C') shl 24 + Ord('H') shl 16 + Ord('A') shl 8 + Ord('N'); // CHAN
  573. // soundclassext
  574. const
  575. SDTA_SampleType = SDTA_Dummy + 30;
  576. SDTA_Panning = SDTA_Dummy + 31;
  577. SDTA_Frequency = SDTA_Dummy + 32;
  578. SDTST_M8S = 0;
  579. SDTST_S8S = 1;
  580. SDTST_M16S = 2;
  581. SDTST_S16S = 3;
  582. // textclass
  583. const
  584. TEXTDTCLASS = 'text.datatype';
  585. // attributes
  586. TDTA_Buffer = DTA_Dummy + 300;
  587. TDTA_BufferLen = DTA_Dummy + 301;
  588. TDTA_LineList = DTA_Dummy + 302;
  589. TDTA_WordSelect = DTA_Dummy + 303;
  590. TDTA_WordDelim = DTA_Dummy + 304;
  591. TDTA_WordWrap = DTA_Dummy + 305;
  592. Type
  593. // There is one line structure for every line of text in the document.
  594. PLine = ^TLine;
  595. TLine = record
  596. ln_Link: TMinNode;
  597. ln_Text: STRPTR;
  598. ln_TextLen: LongWord;
  599. ln_XOffset: Word;
  600. ln_YOffset: Word;
  601. ln_Width: Word;
  602. ln_Height: Word;
  603. ln_Flags: Word; // LNF_*
  604. ln_FgPen: ShortInt;
  605. ln_BgPen: ShortInt;
  606. ln_Style: LongWord;
  607. ln_Data: APTR;
  608. end;
  609. const
  610. // ln_Flags
  611. LNF_LF = 1 shl 0;
  612. LNF_LINK = 1 shl 1;
  613. LNF_OBJECT = 1 shl 2;
  614. LNF_SELECTED = 1 shl 3;
  615. ID_FTXT = Ord('F') shl 24 + Ord('T') shl 16 + Ord('X') shl 8 + Ord('T'); // FTXT
  616. ID_CHRS = Ord('C') shl 24 + Ord('H') shl 16 + Ord('R') shl 8 + Ord('S'); // CHRS
  617. // animationclass
  618. const
  619. ANIMATIONDTCLASS = 'animation.datatype';
  620. // Tags
  621. ADTA_Dummy = DTA_Dummy + 600;
  622. ADTA_ModeID = PDTA_ModeID;
  623. ADTA_KeyFrame = PDTA_BitMap;
  624. ADTA_ColorRegisters = PDTA_ColorRegisters;
  625. ADTA_CRegs = PDTA_CRegs;
  626. ADTA_GRegs = PDTA_GRegs;
  627. ADTA_ColorTable = PDTA_ColorTable;
  628. ADTA_ColorTable2 = PDTA_ColorTable2;
  629. ADTA_Allocated = PDTA_Allocated;
  630. ADTA_NumColors = PDTA_NumColors;
  631. ADTA_NumAlloc = PDTA_NumAlloc;
  632. ADTA_Remap = PDTA_Remap;
  633. ADTA_Screen = PDTA_Screen;
  634. ADTA_Width = ADTA_Dummy + 1;
  635. ADTA_Height = ADTA_Dummy + 2;
  636. ADTA_Depth = ADTA_Dummy + 3;
  637. ADTA_Frames = ADTA_Dummy + 4;
  638. ADTA_Frame = ADTA_Dummy + 5;
  639. ADTA_FramesPerSecond = ADTA_Dummy + 6;
  640. ADTA_FrameIncrement = ADTA_Dummy + 7;
  641. ADTA_Sample = SDTA_Sample;
  642. ADTA_SampleLength = SDTA_SampleLength;
  643. ADTA_Period = SDTA_Period;
  644. ADTA_Volume = SDTA_Volume;
  645. ADTA_Cycles = SDTA_Cycles;
  646. // New in V44
  647. ADTA_PreloadFrameCount = ADTA_Dummy + 8;
  648. ADTA_LeftSample = SDTA_LeftSample;
  649. ADTA_RightSample = SDTA_RightSample;
  650. ADTA_SamplesPerSec = SDTA_SamplesPerSec;
  651. // IFF ANIM chunks
  652. ID_ANIM = Ord('A') shl 24 + Ord('N') shl 16 + Ord('I') shl 8 + Ord('M'); // ANIM
  653. ID_ANHD = Ord('A') shl 24 + Ord('N') shl 16 + Ord('H') shl 8 + Ord('D'); // ANHD
  654. ID_DLTA = Ord('D') shl 24 + Ord('L') shl 16 + Ord('T') shl 8 + Ord('A'); // DLTA
  655. type
  656. PAnimHeader = ^TAnimHeader;
  657. TAnimHeader = record
  658. ah_Operation: Byte;
  659. ah_Mask: Byte;
  660. ah_Width: Word;
  661. ah_Height: Word;
  662. ah_Left: SmallInt;
  663. ah_Top: SmallInt;
  664. ah_AbsTime: LongWord;
  665. ah_RelTime: LongWord;
  666. ah_Interleave: Byte;
  667. ah_Pad0: Byte;
  668. ah_Flags: LongWord;
  669. ah_Pad: array[0..15] of Byte;
  670. end;
  671. const
  672. // Methods
  673. ADTM_Dummy = $700;
  674. ADTM_LOADFRAME = $701;
  675. ADTM_UNLOADFRAME = $702;
  676. ADTM_START = $703;
  677. ADTM_PAUSE = $704;
  678. ADTM_STOP = $705;
  679. ADTM_LOCATE = $706;
  680. // New on V44
  681. ADTM_LOADNEWFORMATFRAME = $707;
  682. ADTM_UNLOADNEWFORMATFRAME = $708;
  683. type
  684. PadtFrame = ^TadtFrame;
  685. TadtFrame = record
  686. MethodID: PtrUInt;
  687. alf_TimeStamp: LongWord;
  688. alf_Frame: LongWord;
  689. alf_Duration: LongWord;
  690. alf_BitMap: PBitMap;
  691. alf_CMap: PColorMap;
  692. alf_Sample: PShortInt;
  693. alf_SampleLength: LongWord;
  694. alf_Period: LongWord;
  695. alf_UserData: APTR;
  696. end;
  697. PadtNewFormatFrame = ^TadtNewFormatFrame;
  698. TadtNewFormatFrame = record
  699. MethodID: PtrUInt;
  700. alf_TimeStamp: LongWord;
  701. alf_Frame: LongWord;
  702. alf_Duration: LongWord;
  703. alf_BitMap: PBitMap;
  704. alf_CMap: PColorMap;
  705. alf_Sample: PShortInt;
  706. alf_SampleLength: LongWord;
  707. alf_Period: LongWord;
  708. alf_UserData: APTR;
  709. alf_Size: LongWord;
  710. alf_LeftSample: PShortInt;
  711. alf_RightSample: PShortInt;
  712. alf_SamplesPerSec: LongWord;
  713. end;
  714. PadtStart = ^tadtStart;
  715. TadtStart = record
  716. MethodID: PtrUInt;
  717. asa_Frame: LongWord;
  718. end;
  719. function SDTM_ISSTEREO(SampleType: LongWord): Boolean; inline;
  720. function SDTM_CHANNELS(SampleType: LongWord): LongWord; inline;
  721. function SDTM_BYTESPERSAMPLE(x: LongWord): LongWord; inline;
  722. function SDTM_BYTESPERPOINT(x: LongWord): LongWord; inline;
  723. var
  724. DataTypesBase: PLibrary;
  725. function ObtainDataTypeA(Typ: LongWord; Handle: APTR; Attrs: PTagItem): PDataType; syscall DataTypesBase 6;
  726. procedure ReleaseDataType(Dt: PDataType); syscall DataTypesBase 7;
  727. function NewDTObjectA(Name: APTR; Attrs: PTagItem): PObject_; syscall DataTypesBase 8;
  728. procedure DisposeDTObject(O: PObject_); syscall DataTypesBase 9;
  729. function SetDTAttrsA(O: PObject_; Win: PWindow; Req: PRequester; Attrs: PTagItem): LongWord; syscall DataTypesBase 10;
  730. function GetDTAttrsA(O: PObject_; Attrs: PTagItem): LongWord; syscall DataTypesBase 11;
  731. function AddDTObject(Win: PWindow; Req: PRequester; Obj: PObject_; Pos: LongInt): LongInt; syscall DataTypesBase 12;
  732. procedure RefreshDTObjectA(Obj: PObject_; Window: PWindow; Req: PRequester; Attrs: PTagItem); syscall DataTypesBase 13;
  733. function DoAsyncLayout(Obj: PObject_; Gpl: PgpLayout): LongWord; syscall DataTypesBase 14;
  734. function DoDTMethodA(O: PObject_; Win: PWindow; Req: PRequester; Msg: PMsg): PtrUInt; syscall DataTypesBase 15;
  735. function RemoveDTObject(Window: PWindow; Obj: PObject_): LongInt; syscall DataTypesBase 16;
  736. function GetDTMethods(Obj: PObject_): PLongWord; syscall DataTypesBase 17;
  737. function GetDTTriggerMethods(Obj: PObject_): PDTMethod; syscall DataTypesBase 18;
  738. function PrintDTObjectA(Obj: PObject_; Window: PWindow; Requester: PRequester; Msg: Pointer {PdtPrint}): LongWord; syscall DataTypesBase 19;
  739. function ObtainDTDrawInfoA(O: PObject_; Attrs: PTagItem): APTR; syscall DataTypesBase 20;
  740. function DrawDTObjectA(Rp: PRastPort; O: PObject_; x, y, w, h, th, tv: LongInt; Attrs: PTagItem): LongInt; syscall DataTypesBase 21;
  741. procedure ReleaseDTDrawInfo(O: PObject_; Handle: APTR); syscall DataTypesBase 22;
  742. function GetDTString(Id: LongWord): CONST_STRPTR; syscall DataTypesBase 23;
  743. procedure LockDataType(Dt: PDataType); syscall DataTypesBase 40;
  744. function FindToolNodeA(ToolList: PList; Attrs: PTagItem): PToolNode; syscall DataTypesBase 41;
  745. function LaunchToolA(Tool: PTool; Project: STRPTR; Attrs: PTagItem): LongWord; syscall DataTypesBase 42;
  746. function FindMethod(Methods: PLongWord; SearchModeID: LongWord): PLongWord; syscall DataTypesBase 43;
  747. function FindTriggerMethod(Methods: PDTMethod; Command: STRPTR; Method: LongWord): PDTMethod; syscall DataTypesBase 44;
  748. function CopyDTMethods(Methods: PLongWord; Include: PLongWord; Exclude: PLongWord): PLongWord; syscall DataTypesBase 45;
  749. function CopyDTTriggerMethods(Methods: PDTMethod; Include: PDTMethod; Exclude: PDTMethod): PDTMethod; syscall DataTypesBase 46;
  750. procedure FreeDTMethods(Methods: APTR); syscall DataTypesBase 47;
  751. function GetDTTriggerMethodDataFlags(Method: LongWord): LongWord; syscall DataTypesBase 48;
  752. function SaveDTObjectA(O: PObject_; Win: PWindow; Req: PRequester; File_: STRPTR; Mode: LongWord; SaveIcon: Bool; Attrs: PTagItem): LongWord; syscall DataTypesBase 49;
  753. function StartDragSelect(O: PObject_): LongWord; syscall DataTypesBase 50;
  754. function DoDTDomainA(O: PObject_; Win: PWindow; Req: PRequester; RPort: PRastPort; Which: LongWord; Domain: PIBox; Attrs: PTagItem): LongWord; syscall DataTypesBase 51;
  755. function ObtainDataType(Typ: LongWord; Handle: APTR; const TagList: array of PtrUInt): PDataType; inline;
  756. function NewDTObject(Name: APTR; const TagList: array of PtrUInt): PObject_; inline;
  757. function SetDTAttrs(O: PObject_; Win: PWindow; Req: PRequester; const TagList: array of PtrUInt): LongWord; inline;
  758. function GetDTAttrs(O: PObject_; const TagList: array of PtrUInt): LongWord; inline;
  759. procedure RefreshDTObject(Obj: PObject_; Window: PWindow; Req: PRequester; const TagList: array of PtrUInt); inline;
  760. function DoDTMethod(O: PObject_; Win: PWindow; Req: PRequester; const ArgList: array of PtrUInt): PtrUInt; inline;
  761. function PrintDTObject(Obj: PObject_; Window: PWindow; Requester: PRequester; const ArgList: array of PtrUInt): LongWord; inline;
  762. function ObtainDTDrawInfo(O: PObject_; const TagList: array of PtrUInt): APTR; inline;
  763. function DrawDTObject(Rp: PRastPort; O: PObject_; x, y, w, h, th, tv: LongInt; const TagList: array of PtrUInt): LongInt; inline;
  764. function FindToolNode(ToolList: PList; const TagList: array of PtrUInt): PToolNode; inline;
  765. function LaunchTool(Tool: PTool; Project: STRPTR; const TagList: array of PtrUInt): LongWord; inline;
  766. function SaveDTObject(O: PObject_; Win: PWindow; Req: PRequester; File_: STRPTR; Mode: LongWord; SaveIcon: Bool; const TagList: array of PtrUInt): LongWord; inline;
  767. function DoDTDomain(O: PObject_; Win: PWindow; Req: PRequester; RPort: PRastPort; Which: LongWord; Domain: PIBox; const TagList: array of PtrUInt): LongWord; inline;
  768. implementation
  769. function SDTM_ISSTEREO(SampleType: LongWord): Boolean; inline;
  770. begin
  771. SDTM_ISSTEREO := Boolean(SampleType and 1);
  772. end;
  773. function SDTM_CHANNELS(SampleType: LongWord): LongWord; inline;
  774. begin
  775. SDTM_CHANNELS := 1 + (SampleType and 1);
  776. end;
  777. function SDTM_BYTESPERSAMPLE(x: LongWord): LongWord; inline;
  778. begin
  779. if x >= SDTST_M16S then
  780. SDTM_BYTESPERSAMPLE := 2
  781. else
  782. SDTM_BYTESPERSAMPLE := 1;
  783. end;
  784. function SDTM_BYTESPERPOINT(x: LongWord): LongWord;
  785. begin
  786. SDTM_BYTESPERPOINT := SDTM_CHANNELS(x) * SDTM_BYTESPERSAMPLE(x);
  787. end;
  788. function ObtainDataType(Typ: LongWord; Handle: APTR; const TagList: array of PtrUInt): PDataType;
  789. begin
  790. ObtainDataType := ObtainDataTypeA(Typ, Handle, @TagList);
  791. end;
  792. function NewDTObject(Name: APTR; const TagList: array of PtrUInt): PObject_;
  793. begin
  794. NewDTObject := NewDTObjectA(Name, @TagList);
  795. end;
  796. function SetDTAttrs(O: PObject_; Win: PWindow; Req: PRequester; const TagList: array of PtrUInt): LongWord;
  797. begin
  798. SetDTAttrs := SetDTAttrsA(O, Win, Req, @TagList);
  799. end;
  800. function GetDTAttrs(O: PObject_; const TagList: array of PtrUInt): LongWord;
  801. begin
  802. GetDTAttrs := GetDTAttrsA(O, @TagList);
  803. end;
  804. procedure RefreshDTObject(Obj: PObject_; Window: PWindow; Req: PRequester; const TagList: array of PtrUInt);
  805. begin
  806. RefreshDTObjectA(Obj, Window, Req, @TagList);
  807. end;
  808. function DoDTMethod(O: PObject_; Win: PWindow; Req: PRequester; const ArgList: array of PtrUInt): PtrUInt;
  809. begin
  810. DoDTMethod := DoDTMethodA(O, Win, Req, @ArgList);
  811. end;
  812. function PrintDTObject(Obj: PObject_; Window: PWindow; Requester: PRequester; const ArgList: array of PtrUInt): LongWord;
  813. begin
  814. PrintDTObject := PrintDTObjectA(Obj, Window, Requester, @ArgList);
  815. end;
  816. function ObtainDTDrawInfo(O: PObject_; const TagList: array of PtrUInt): APTR;
  817. begin
  818. ObtainDTDrawInfo := ObtainDTDrawInfoA(O, @TagList);
  819. end;
  820. function DrawDTObject(Rp: PRastPort; O: PObject_; x, y, w, h, th, tv: LongInt; const TagList: array of PtrUInt): LongInt;
  821. begin
  822. DrawDTObject := DrawDTObjectA(RP, O, x, y, w, h, th, tv, @TagList);
  823. end;
  824. function FindToolNode(ToolList: PList; const TagList: array of PtrUInt): PToolNode;
  825. begin
  826. FindToolNode := FindToolNodeA(ToolList, @TagList);
  827. end;
  828. function LaunchTool(Tool: PTool; Project: STRPTR; const TagList: array of PtrUInt): LongWord;
  829. begin
  830. LaunchTool := LaunchToolA(Tool, Project, @TagList);
  831. end;
  832. function SaveDTObject(O: PObject_; Win: PWindow; Req: PRequester; File_: STRPTR; Mode: LongWord; SaveIcon: Bool; const TagList: array of PtrUInt): LongWord;
  833. begin
  834. SaveDTObject := SaveDTObjectA(O, Win, Req, File_, Mode, SaveIcon, @TagList);
  835. end;
  836. function DoDTDomain(O: PObject_; Win: PWindow; Req: PRequester; RPort: PRastPort; Which: LongWord; Domain: PIBox; const TagList: array of PtrUInt): LongWord;
  837. begin
  838. DoDTDomain := DoDTDomainA(O, Win, Req, RPort, Which, Domain, @TagList);
  839. end;
  840. initialization
  841. DataTypesBase := OpenLibrary(DATATYPESNAME, 0);
  842. finalization
  843. CloseLibrary(DataTypesBase);
  844. end.