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-2003 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     Updated to triton 2.0. Added function with array of PtrUInt.
21     09 Jan 2003.
22 
23     Added the defines use_amiga_smartlink and
24     use_auto_openlib.
25     12 Jan 2003.
26 
27     Changed integer > smallint.
28     Changed cardinal > longword.
29     Changed startcode for unit.
30     11 Feb 2003.
31 
32     nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
33 
34 }
35 
36 
37 UNIT TRITON;
38 
39 INTERFACE
40 
41 uses exec, intuition, agraphics, utility;
42 
43 
44 {* ------------------------------------------------------------------------------ *}
45 {* library name and version                                                       *}
46 {* ------------------------------------------------------------------------------ *}
47 
48 CONST   TRITONNAME        : PChar = 'triton.library';
49         TRITON10VERSION   = 1;
50         TRITON11VERSION   = 2;
51         TRITON12VERSION   = 3;
52         TRITON13VERSION   = 4;
53         TRITON14VERSION   = 5;
54         TRITON20VERSION   = 6;
55         TRITONVERSION     = TRITON20VERSION;
56 
57 {* ------------------------------------------------------------------------------ *}
58 {* Triton Message                                                                 *}
59 {* ------------------------------------------------------------------------------ *}
60 
61 TYPE
62      pTR_Project = ^tTR_Project;
63      pTR_App     = ^tTR_App;
64 
65      pTR_Message = ^tTR_Message;
66      tTR_Message = RECORD
67          trm_Project   : pTR_Project;   {* the message                  *}
68          trm_Id        : ULONG;         {* The object's ID              *}
69          trm_Class     : ULONG;         {* The Triton message class     *}
70          trm_Data      : ULONG;         {* The class-specific data      *}
71          trm_Code      : ULONG;         {* Currently only used BY       *}
72                                         {* TRMS_KEYPRESSED              *}
73          trm_Pad0      : ULONG;         {* qualifier is only 16 Bit     *}
74          trm_Qualifier : ULONG;         {* Qualifiers                   *}
75          trm_Seconds   : ULONG;         {* \ Copy of system clock time  *}
76          trm_Micros    : ULONG;         {* / (Only where available! IF  *}
77                                         {*    not set, seconds is NULL) *}
78          trm_App       : pTR_App;
79      END;                               {* End of TR_Message            *}
80 
81 {* Data for TROM_NEW *}
82      pTROM_NewDataPtr = ^tTROM_NewData;
83      tTROM_NewData = record
84          {* The following elements are set up for the object (read only) *}
85          project    : pTR_Project;     {*  TR_ProjectPtr;  *}
86          firstitem  : pTagItem;
87          objecttype : ULONG;
88          grouptype  : ULONG;
89          itemdata   : ULONG;
90          backfilltype : ULONG;
91          {* The following elements have to be set by the object and read by
92 class_DisplayObject *}
93          parseargs  : BOOL;
94      end;
95 
96 
97 {* Data for TROM_INSTALL *}
98      pTROM_InstallData = ^tTROM_InstallData;
99      tTROM_InstallData = record
100          left : ULONG;
101          top  : ULONG;
102          width : ULONG;
103          height : ULONG;
104      end;
105 
106 
107 {* Data for TROM_SETATTRIBUTE *}
108      pTROM_SetAttributeData = ^tTROM_SetAttributeData;
109      tTROM_SetAttributeData = record
110          attribute : ULONG;
111          value     : ULONG;
112      end;
113 
114 
115 {* Data for TROM_EVENT *}
116      pTROM_EventData = ^tTROM_EventData;
117      tTROM_EventData = record
118          imsg : pIntuiMessage;
119      end;
120 
121 {* ------------------------------------------------------------------------------ *}
122 {* The Application Structure                                                      *}
123 {* ------------------------------------------------------------------------------ *}
124 
125      tTR_App = RECORD {* This structure is PRIVATE! *}
126          tra_MemPool    : Pointer;       {* The memory pool             *}
127          tra_BitMask    : ULONG;         {* Bits to Wait() for          *}
128          tra_Name       : STRPTR;        {* Unique name                 *}
129      END; {* TR_App *}
130 
131      pTR_Class = ^tTR_Class;
132      tTR_Class = RECORD
133          trc_Node     : tMinNode;         {* PRIVATE! *}
134          trc_SuperClass : pTR_Class;
135      end;
136 
137 
138 
139 
140 {* ------------------------------------------------------------------------------ *}
141 {* The Dimension Structure                                                        *}
142 {* ------------------------------------------------------------------------------ *}
143 
144      pTR_Dimensions = ^tTR_Dimensions;
145      tTR_Dimensions = RECORD
146          trd_Left          : Word;
147          trd_Top           : Word;
148          trd_Width         : Word;
149          trd_Height        : Word;
150          trd_Left2         : Word;
151          trd_Top2          : Word;
152          trd_Width2        : Word;
153          trd_Height2       : Word;
154          trd_Zoomed        : BOOL;
155          reserved          : ARRAY [0..2] OF Word;
156      END; {* TR_Dimensions *}
157 
158 
159 {* ////////////////////////////////////////////////////////////////////// *}
160 {* ///////////////////////////// Default classes, attributes and flags // *}
161 {* ////////////////////////////////////////////////////////////////////// *}
162 
163 
164      pTROD_Object = ^tTROD_Object;
165      tTROD_Object = record
166          Node : tMinNode;             {* The node for linking all objects *}
167          tr_Class : pTR_Class;        {* The object's class *}
168          Project : pTR_Project;    {* The object's project *}
169          Reserved : array [0..5] of ULONG;
170      end;
171 
172 
173 
174      pTROD_DisplayObject = ^tTROD_DisplayObject;
175      tTROD_DisplayObject = record
176          O           : tTROD_Object;       {* Superclass object data *}
177          ID          : ULONG;             {* The object's ID *}
178          MinWidth    : ULONG;             {* The precalculated minimum width *}
179          MinHeight   : ULONG;             {* The precalculated minimum height *}
180          Left        : ULONG;             {* The X coordinate of the object *}
181          Top         : ULONG;             {* The Y coordinate of the object *}
182          Width       : ULONG;             {* The width of the object *}
183          Height      : ULONG;             {* The height of the object *}
184          Flags       : ULONG;             {* See below for flags *}
185          XResize     : BOOL;              {* Horizontally resizable? *}
186          YResize     : BOOL;              {* Vertically resizable? *}
187          QuickHelpString : STRPTR;        {* QuickHelp string *}
188          Shortcut    : smallint;           {* The object's shortcut *}
189          Backfilltype : ULONG;            {* The object's backfill type *}
190          Installed   : BOOL;              {* Does the object have an on-screen
191 representation? *}
192          Reserved    : array [0..3] of ULONG;   {* Private! *}
193      end;
194 
195 
196 {* Data for TROM_HIT *}
197      pTROM_HitData = ^tTROM_HitData;
198      tTROM_HitData = record
199          x : ULONG;
200          y : ULONG;
201          tr_object : pTROD_DisplayObject;
202      end;
203 
204 
205 {* ------------------------------------------------------------------------------ *}
206 {* The Projects Structure                                                         *}
207 {* ------------------------------------------------------------------------------ *}
208 
209      tTR_Project = RECORD
210          tro_SC_Object                : tTROD_Object;          {* PRIVATE *}
211          trp_App                      : pTR_App;            {* Our application
212 *}
213          trp_MemPool                  : Pointer;              {* The memory pool *}
214          trp_ID                       : ULONG;                {* The project's ID *}
215          trp_IDCMPFlags               : ULONG;                {* The IDCMP flags *}
216          trp_Window                   : pWindow;            {* The default window *}
217          trp_AspectFixing             : Word;                 {* Pixel aspect
218 correction factor *}
219      END;                                               {* End of TR_Projects
220 *}
221 
222 {* Message classes *}
223 CONST   TRMS_CLOSEWINDOW        = 1;  {* The window should be closed *}
224         TRMS_ERROR              = 2;  {* An error occurred. Error code in trm_Data *}
225         TRMS_NEWVALUE           = 3;  {* Object's VALUE has changed. New VALUE in
226 trm_Data *}
227         TRMS_ACTION             = 4;  {* Object has triggered an action *}
228         TRMS_ICONDROPPED        = 5;  {* Icon dropped over window (ID=0) or DropBox.
229 AppMessage* in trm_Data *}
230         TRMS_KEYPRESSED         = 6;  {* Key pressed. trm_Data contains ASCII code,
231 trm_Code raw code and *}
232                                       {* trm_Qualifier contains qualifiers *}
233         TRMS_HELP               = 7;  {* The user requested help for the specified ID
234 *}
235         TRMS_DISKINSERTED       = 8;  {* A disk has been inserted into a drive *}
236         TRMS_DISKREMOVED        = 9;  {* A disk has been removed from a drive *}
237 
238 
239 {* ////////////////////////////////////////////////////////////////////// *}
240 {* //////////////////////////////////////////////// Triton error codes // *}
241 {* ////////////////////////////////////////////////////////////////////// *}
242 
243         TRER_OK                 = 0;        {* No error *}
244 
245         TRER_ALLOCMEM           = 1;        {* Not enough memory *}
246         TRER_OPENWINDOW         = 2;        {* Can't open window *}
247         TRER_WINDOWTOOBIG       = 3;        {* Window would be too big for screen *}
248         TRER_DRAWINFO           = 4;        {* Can't get screen's DrawInfo *}
249         TRER_OPENFONT           = 5;        {* Can't open font *}
250         TRER_CREATEMSGPORT      = 6;        {* Can't create message port *}
251         TRER_INSTALLOBJECT      = 7;        {* Can't create an object *}
252         TRER_CREATECLASS        = 8;        {* Can't create a class *}
253         TRER_NOLOCKPUBSCREEN    = 9;        {* Can't lock public screen *}
254         TRER_CREATEMENUS        = 12;       {* Error while creating the menus *}
255         TRER_GT_CREATECONTEXT   = 14;       {* Can't create gadget context *}
256 
257         TRER_MAXERRORNUM        = 15;       {* PRIVATE! *}
258 
259 
260 {* ////////////////////////////////////////////////////////////////////// *}
261 {* /////////////////////////////////////////////////// Object messages // *}
262 {* ////////////////////////////////////////////////////////////////////// *}
263 
264         TROM_NEW                = 1;         {* Create object *}
265         TROM_INSTALL            = 2;         {* Tell object to install itself in the
266 window *}
267         TROM_REFRESH            = 4;         {* Refresh object *}
268         TROM_REMOVE             = 6;         {* Remove object from window *}
269         TROM_DISPOSE            = 7;         {* Dispose an object's private data *}
270         TROM_GETATTRIBUTE       = 8;         {* Get an object's attribute *}
271         TROM_SETATTRIBUTE       = 9;         {* Set an object's attribute *}
272         TROM_EVENT              = 10;        {* IDCMP event *}
273         TROM_DISABLED           = 11;        {* Disabled object *}
274         TROM_ENABLED            = 12;        {* Enabled object *}
275         TROM_KEYDOWN            = 13;        {* Key pressed *}
276         TROM_REPEATEDKEYDOWN    = 14;        {* Key pressed repeatedly *}
277         TROM_KEYUP              = 15;        {* Key released *}
278         TROM_KEYCANCELLED       = 16;        {* Key cancelled *}
279         TROM_CREATECLASS        = 17;        {* Create class-specific data *}
280         TROM_DISPOSECLASS       = 18;        {* Dispose class-specific data *}
281         TROM_HIT                = 22;        {* Find an object for a coordinate pair
282 *}
283         TROM_ACTIVATE           = 23;        {* Activate an object *}
284 
285 
286         TROM_EVENT_SWALLOWED    = 1;
287         TROM_EVENT_CONTINUE     = 0;
288 
289 
290 {* ////////////////////////////////////////////////////////////////////// *}
291 {* ///////////////////////////////////////// Tags for TR_OpenProject() // *}
292 {* ////////////////////////////////////////////////////////////////////// *}
293 
294 {* Tag bases *}
295         TRTG_OAT              = (TAG_USER+$400);  {* Object attribute *}
296         TRTG_CLS              = (TAG_USER+$100);  {* Class ID $1 to $2FF *}
297         TRTG_OAT2             = (TAG_USER+$80);   {* PRIVATE! *}
298         TRTG_PAT              = (TAG_USER);        {* Project attribute *}
299 
300 
301 {* Window/Project *}
302         TRWI_Title              = (TRTG_PAT+$01); {* STRPTR: The window title *}
303         TRWI_Flags              = (TRTG_PAT+$02); {* See below for window flags *}
304         TRWI_Underscore         = (TRTG_PAT+$03); {* BYTE *: The underscore for menu
305 and gadget shortcuts *}
306         TRWI_Position           = (TRTG_PAT+$04); {* Window position,  see below *}
307         TRWI_CustomScreen       = (TRTG_PAT+$05); {* STRUCT Screen * *}
308         TRWI_PubScreen          = (TRTG_PAT+$06); {* STRUCT Screen *,  must have been
309 locked! *}
310         TRWI_PubScreenName      = (TRTG_PAT+$07); {* ADDRESS,  Triton is doing the
311 locking *}
312         TRWI_PropFontAttr       = (TRTG_PAT+$08); {* STRUCT TextAttr *: The
313 proportional font *}
314         TRWI_FixedWidthFontAttr = (TRTG_PAT+$09); {* STRUCT TextAttr *: The fixed-
315 width font *}
316         TRWI_Backfill           = (TRTG_PAT+$0A); {* The backfill type,  see below *}
317         TRWI_ID                 = (TRTG_PAT+$0B); {* ULONG: The window ID *}
318         TRWI_Dimensions         = (TRTG_PAT+$0C); {* STRUCT TR_Dimensions * *}
319         TRWI_ScreenTitle        = (TRTG_PAT+$0D); {* STRPTR: The screen title *}
320         TRWI_QuickHelp          = (TRTG_PAT+$0E); {* BOOL: Quick help active? *}
321 
322 {* Menus *}
323         TRMN_Title              = (TRTG_PAT+$65); {* STRPTR: Menu *}
324         TRMN_Item               = (TRTG_PAT+$66); {* STRPTR: Menu item *}
325         TRMN_Sub                = (TRTG_PAT+$67); {* STRPTR: Menu subitem *}
326         TRMN_Flags              = (TRTG_PAT+$68); {* See below for flags *}
327 
328 {* General object attributes *}
329         TRAT_ID               = (TRTG_OAT2+$16);  {* The object's/menu's ID *}
330         TRAT_Flags            = (TRTG_OAT2+$17);  {* The object's flags *}
331         TRAT_Value            = (TRTG_OAT2+$18);  {* The object's value *}
332         TRAT_Text             = (TRTG_OAT2+$19);  {* The object's text *}
333         TRAT_Disabled         = (TRTG_OAT2+$1A);  {* Disabled object? *}
334         TRAT_Backfill         = (TRTG_OAT2+$1B);  {* Backfill pattern *}
335         TRAT_MinWidth         = (TRTG_OAT2+$1C);  {* Minimum width *}
336         TRAT_MinHeight        = (TRTG_OAT2+$1D);  {* Minimum height *}
337 
338 
339 {* ////////////////////////////////////////////////////////////////////// *}
340 {* ////////////////////////////////////////////////////// Window flags // *}
341 {* ////////////////////////////////////////////////////////////////////// *}
342 
343         TRWF_BACKDROP           = $00000001;     {* Create a backdrop borderless
344 window *}
345         TRWF_NODRAGBAR          = $00000002;     {* Don't use a dragbar *}
346         TRWF_NODEPTHGADGET      = $00000004;     {* Don't use a depth-gadget *}
347         TRWF_NOCLOSEGADGET      = $00000008;     {* Don't use a close-gadget *}
348         TRWF_NOACTIVATE         = $00000010;     {* Don't activate window *}
349         TRWF_NOESCCLOSE         = $00000020;     {* Don't send TRMS_CLOSEWINDOW when
350 Esc is pressed *}
351         TRWF_NOPSCRFALLBACK     = $00000040;     {* Don't fall back onto default
352 PubScreen *}
353         TRWF_NOZIPGADGET        = $00000080;     {* Don't use a zip-gadget *}
354         TRWF_ZIPCENTERTOP       = $00000100;     {* Center the zipped window on the
355 title bar *}
356         TRWF_NOMINTEXTWIDTH     = $00000200;     {* Minimum window width not according
357 to title text *}
358         TRWF_NOSIZEGADGET       = $00000400;     {* Don't use a sizing-gadget *}
359         TRWF_NOFONTFALLBACK     = $00000800;     {* Don't fall back to topaz.8 *}
360         TRWF_NODELZIP           = $00001000;     {* Don't zip the window when Del is
361 pressed *}
362         TRWF_SIMPLEREFRESH      = $00002000;     {* *** OBSOLETE *** (V3+) *}
363         TRWF_ZIPTOCURRENTPOS    = $00004000;     {* Will zip the window at the current
364 position (OS3.0+) *}
365         TRWF_APPWINDOW          = $00008000;     {* Create an AppWindow without using
366 class_dropbox *}
367         TRWF_ACTIVATESTRGAD     = $00010000;     {* Activate the first string gadget
368 after opening the window *}
369         TRWF_HELP               = $00020000;     {* Pressing <Help> will create a
370 TRMS_HELP message (V4) *}
371         TRWF_SYSTEMACTION       = $00040000;     {* System status messages will be
372 sent (V4) *}
373 
374 
375 {* ////////////////////////////////////////////////////////////////////// *}
376 {* //////////////////////////////////////////////////////// Menu flags // *}
377 {* ////////////////////////////////////////////////////////////////////// *}
378 
379         TRMF_CHECKIT            = $00000001;     {* Leave space for a checkmark *}
380         TRMF_CHECKED            = $00000002;     {* Check the item (includes
381 TRMF_CHECKIT) *}
382         TRMF_DISABLED           = $00000004;     {* Ghost the menu/item *}
383 
384 
385 {* ////////////////////////////////////////////////////////////////////// *}
386 {* ////////////////////////////////////////////////// Window positions // *}
387 {* ////////////////////////////////////////////////////////////////////// *}
388 
389         TRWP_DEFAULT            = 0;              {* Let Triton choose a good position
390 *}
391         TRWP_BELOWTITLEBAR      = 1;              {* Left side of screen,  below title
392 bar *}
393         TRWP_CENTERTOP          = 1025;           {* Top of screen,  centered on the
394 title bar *}
395         TRWP_TOPLEFTSCREEN      = 1026;           {* Top left corner of screen *}
396         TRWP_CENTERSCREEN       = 1027;           {* Centered on the screen *}
397         TRWP_CENTERDISPLAY      = 1028;           {* Centered on the currently
398 displayed clip *}
399         TRWP_MOUSEPOINTER       = 1029;           {* Under the mouse pointer *}
400         TRWP_ABOVECOORDS        = 2049;           {* Above coordinates from the
401 dimensions STRUCT *}
402         TRWP_BELOWCOORDS        = 2050;           {* Below coordinates from the
403 dimensions STRUCT *}
404 
405 
406 {* ////////////////////////////////////////////////////////////////////// *}
407 {* //////////////////////////////////// Backfill types / System images // *}
408 {* ////////////////////////////////////////////////////////////////////// *}
409 
410         TRBF_WINDOWBACK         = $00000000;     {* Window backfill *}
411         TRBF_REQUESTERBACK      = $00000001;     {* Requester backfill *}
412 
413         TRBF_NONE               = $00000002;     {* No backfill (= Fill with
414 BACKGROUNDPEN) *}
415         TRBF_SHINE              = $00000003;     {* Fill with SHINEPEN *}
416         TRBF_SHINE_SHADOW       = $00000004;     {* Fill with SHINEPEN + SHADOWPEN *}
417         TRBF_SHINE_FILL         = $00000005;     {* Fill with SHINEPEN + FILLPEN *}
418         TRBF_SHINE_BACKGROUND   = $00000006;     {* Fill with SHINEPEN + BACKGROUNDPEN
419 *}
420         TRBF_SHADOW             = $00000007;     {* Fill with SHADOWPEN *}
421         TRBF_SHADOW_FILL        = $00000008;     {* Fill with SHADOWPEN + FILLPEN *}
422         TRBF_SHADOW_BACKGROUND  = $00000009;     {* Fill with SHADOWPEN +
423 BACKGROUNDPEN *}
424         TRBF_FILL               = $0000000A;     {* Fill with FILLPEN *}
425         TRBF_FILL_BACKGROUND    = $0000000B;     {* Fill with FILLPEN + BACKGROUNDPEN
426 *}
427 
428         TRSI_USBUTTONBACK       = $00010002;     {* Unselected button backfill *}
429         TRSI_SBUTTONBACK        = $00010003;     {* Selected button backfill *}
430 
431 
432 
433 {* ////////////////////////////////////////////////////////////////////// *}
434 {* /////////////////////////////////////////////////////// Frame types // *}
435 {* ////////////////////////////////////////////////////////////////////// *}
436 
437         { * Copies of the GadTools BBFT_#? types *}
438         TRFT_BUTTON       = 1;
439         TRFT_RIDGE        = 2;
440         TRFT_ICONDROPBOX  = 3;
441         { * Triton's low-level frame types *}
442         TRFT_XENBUTTON1   = 33;
443         TRFT_XENBUTTON2   = 34;
444         TRFT_NEXTBUTTON   = 35;
445         { * Triton's abstract frame types *}
446         TRFT_ABSTRACT_BUTTON      = 65;
447         TRFT_ABSTRACT_ICONDROPBOX = 66;
448         TRFT_ABSTRACT_FRAMEBOX    = 67;
449         TRFT_ABSTRACT_PROGRESS    = 68;
450         TRFT_ABSTRACT_GROUPBOX    = 69;
451 
452 
453 {* ////////////////////////////////////////////////////////////////////// *}
454 {* ///////////////////////////////////////////////////////// Pen types // *}
455 {* ////////////////////////////////////////////////////////////////////// *}
456 
457         TRPT_SYSTEMPEN   = 0;
458         TRPT_GRAPHICSPEN = 1;
459         TRPT_TRITONPEN   = 128;
460 
461         TRTP_NORMUSCORE         = 0;
462         TRTP_HIGHUSCORE         = 1;
463         TRTP_HALFSHINE          = 2;
464         TRTP_HALFSHADOW         = 3;
465         TRTP_USSTRINGGADBACK    = 4;
466         TRTP_SSTRINGGADBACK     = 5;
467         TRTP_USSTRINGGADFRONT   = 6;
468         TRTP_SSTRINGGADFRONT    = 7;
469 
470 {* ////////////////////////////////////////////////////////////////////// *}
471 {* ////////////////////////////////////////////// Display Object flags // *}
472 {* ////////////////////////////////////////////////////////////////////// *}
473 
474 {* General flags *}
475         TROF_RAISED             = $00000001;     {* Raised object *}
476         TROF_HORIZ              = $00000002;     {* Horizontal object \ Works
477 automatically *}
478         TROF_VERT               = $00000004;     {* Vertical object   / in groups *}
479         TROF_RIGHTALIGN         = $00000008;     {* Align object to the right border
480 if available *}
481         TROF_GENERAL_MASK       = $000000FF;     {* PRIVATE *}
482 
483 {* Text flags for different kinds of text-related objects *}
484         TRTX_NOUNDERSCORE       = $00000100;     {* Don't interpret underscores *}
485         TRTX_HIGHLIGHT          = $00000200;     {* Highlight text *}
486         TRTX_3D                 = $00000400;     {* 3D design *}
487         TRTX_BOLD               = $00000800;     {* Softstyle 'bold' *}
488         TRTX_TITLE              = $00001000;     {* A title (e.g. of a group) *}
489         TRTX_MULTILINE          = $00002000;     {* A multi-line text. See
490 TR_PrintText() autodoc clip *}
491         TRTX_RIGHTALIGN         = TROF_RIGHTALIGN;
492         TRTX_CENTER             = $00004000;     {* Center text *}
493         TRTX_SELECTED           = $00002000;     {* PRIVATE! *}
494 
495 {* ////////////////////////////////////////////////////////////////////// *}
496 {* ////////////////////////////////////////////////////// Menu entries // *}
497 {* ////////////////////////////////////////////////////////////////////// *}
498 
499         TRMN_BARLABEL           = (-1);           {* A barlabel instead of text *}
500 
501 
502 {* ////////////////////////////////////////////////////////////////////// *}
503 {* /////////////////////////////////////////// Tags for TR_CreateApp() // *}
504 {* ////////////////////////////////////////////////////////////////////// *}
505 
506         TRCA_Name               = (TAG_USER+1);
507         TRCA_LongName           = (TAG_USER+2);
508         TRCA_Info               = (TAG_USER+3);
509         TRCA_Version            = (TAG_USER+4);
510         TRCA_Release            = (TAG_USER+5);
511         TRCA_Date               = (TAG_USER+6);
512 
513 
514 {* ////////////////////////////////////////////////////////////////////// *}
515 {* ///////////////////////////////////////// Tags for TR_EasyRequest() // *}
516 {* ////////////////////////////////////////////////////////////////////// *}
517 
518         TREZ_ReqPos             = (TAG_USER+1);
519         TREZ_LockProject        = (TAG_USER+2);
520         TREZ_Return             = (TAG_USER+3);
521         TREZ_Title              = (TAG_USER+4);
522         TREZ_Activate           = (TAG_USER+5);
523 
524 {* class_DisplayObject *}
525 
526         TROB_DisplayObject      = (TRTG_CLS+$3C); {* A basic display object *}
527 
528         TRDO_QuickHelpString    = (TRTG_OAT+$1E3);
529 
530 {* Flags *}
531         TROB_DISPLAYOBJECT_DISABLED    = $00100000; {* Disabled? *}
532         TROB_DISPLAYOBJECT_RETURNOK    = $00200000; {* Activate with <Return> *}
533         TROB_DISPLAYOBJECT_ESCOK       = $00400000; {* Activate with <Esc> *}
534         TROB_DISPLAYOBJECT_TABOK       = $00800000; {* Activate with <Tab> *}
535         TROB_DISPLAYOBJECT_SPACE       = $01000000; {* A spacing object? *}
536 
537 {* class_DragItem *}
538 
539          TROB_DragItem          = (TRTG_CLS+$3E); {* A draggable item *}
540 
541 {* class_Image *}
542 
543         TROB_Image              = (TRTG_CLS+$3B); {* An image *}
544 
545         TRIM_BOOPSI             = $00010000;     {* Use a BOOPSI IClass image *}
546 
547 {* class_String *}
548 
549         TROB_String             = (TRTG_CLS+$37); {* A string gadget *}
550         TRST_Filter             = (TRTG_OAT+$1E4);
551 
552         TRST_INVISIBLE          = $00010000;     {* A password gadget -> invisible
553 typing *}
554         TRST_NORETURNBROADCAST  = $00020000;     {* <Return> keys will not be
555 broadcast to the window *}
556         TRST_FLOAT              = $00040000;     {* Separators "." and "," will be
557 accepted only once *}
558 
559 {* class_Cycle *}
560 
561         TROB_Cycle              = (TRTG_CLS+$36); {* A cycle gadget *}
562 
563         TRCY_MX                 = $00010000;     {* Unfold the cycle gadget to a MX
564 gadget *}
565         TRCY_RIGHTLABELS        = $00020000;     {* Put the labels to the right of a
566 MX gadget *}
567 
568 {* class_Palette *}
569 
570         TROB_Palette            = (TRTG_CLS+$33); {* A palette gadget *}
571 
572 {* class_DropBox *}
573 
574         TROB_DropBox            = (TRTG_CLS+$38); {* An icon drop box *}
575 
576 {* class_Group *}
577 
578         TRGR_Horiz              = (TAG_USER+201);  {* Horizontal group *}
579         TRGR_Vert               = (TAG_USER+202);  {* Vertical group *}
580         TRGR_End                = (TRTG_OAT2+$4B); {* End of a group *}
581 
582         TRGR_PROPSHARE          = $00000000;     {* Default: Divide objects
583 proportionally *}
584         TRGR_EQUALSHARE         = $00000001;     {* Divide objects equally *}
585         TRGR_PROPSPACES         = $00000002;     {* Divide spaces proportionally *}
586         TRGR_ARRAY              = $00000004;     {* Top-level array group *}
587 
588         TRGR_ALIGN              = $00000008;     {* Align resizeable objects in
589 secondary dimension *}
590         TRGR_CENTER             = $00000010;     {* Center unresizeable objects in
591 secondary dimension *}
592 
593         TRGR_FIXHORIZ           = $00000020;     {* Don't allow horizontal resizing *}
594         TRGR_FIXVERT            = $00000040;     {* Don't allow vertical resizing *}
595         TRGR_INDEP              = $00000080;     {* Group is independant of
596 surrounding array *}
597 
598 {* class_Line *}
599 
600         TROB_Line               = (TRTG_CLS+$2D); {* A simple line *}
601 
602 {* class_Slider *}
603 
604         TROB_Slider             = (TRTG_CLS+$34); {* A slider gadget *}
605 
606         TRSL_Min                = (TRTG_OAT+$1DE);
607         TRSL_Max                = (TRTG_OAT+$1DF);
608 
609 {* class_Listview *}
610 
611         TROB_Listview           = (TRTG_CLS+$39); {* A listview gadget *}
612 
613         TRLV_Top                = (TRTG_OAT+$1E2);
614         TRLV_VisibleLines       = (TRTG_OAT+$1E4);
615 
616         TRLV_READONLY           = $00010000;     {* A read-only list *}
617         TRLV_SELECT             = $00020000;     {* You may select an entry *}
618         TRLV_SHOWSELECTED       = $00040000;     {* Selected entry will be shown *}
619         TRLV_NOCURSORKEYS       = $00080000;     {* Don't use arrow keys *}
620         TRLV_NONUMPADKEYS       = $00100000;     {* Don't use numeric keypad keys *}
621         TRLV_FWFONT             = $00200000;     {* Use the fixed-width font *}
622         TRLV_NOGAP              = $00400000;     {* Don't leave a gap below the list
623 *}
624 
625 {* class_Progress *}
626 
627         TROB_Progress           = (TRTG_CLS+$3A); {* A progress indicator *}
628 
629 {* class_Space *}
630 
631         TROB_Space              = (TRTG_CLS+$285); {* The spaces class *}
632 
633         TRST_NONE               = 1;              {* No space *}
634         TRST_SMALL              = 2;              {* Small space *}
635         TRST_NORMAL             = 3;              {* Normal space (default) *}
636         TRST_BIG                = 4;              {* Big space *}
637 
638 {* class_Text *}
639 
640         TROB_Text               = (TRTG_CLS+$30); {* A line of text *}
641 
642         TRTX_CLIPPED            = $00010000;     {* Text is clipped *}
643 
644 {* class_Button *}
645 
646         TROB_Button             = (TRTG_CLS+$31); {* A BOOPSI button gadget *}
647 
648         TRBU_RETURNOK           = $00010000;     {* <Return> answers the button *}
649         TRBU_ESCOK              = $00020000;     {* <Esc> answers the button *}
650         TRBU_SHIFTED            = $00040000;     {* Shifted shortcut only *}
651         TRBU_UNSHIFTED          = $00080000;     {* Unshifted shortcut only *}
652         TRBU_YRESIZE            = $00100000;     {* Button resizeable in Y direction
653 *}
654         TRBT_TEXT               = 0;              {* Text button *}
655         TRBT_GETFILE            = 1;              {* GetFile button *}
656         TRBT_GETDRAWER          = 2;              {* GetDrawer button *}
657         TRBT_GETENTRY           = 3;              {* GetEntry button *}
658 
659 {* class_CheckBox *}
660 
661         TROB_CheckBox           = (TRTG_CLS+$2F); {* A checkbox gadget *}
662 
663 {* class_Object *}
664 
665         TROB_Object             = (TRTG_CLS+$3D); {* A rootclass object *}
666 
667 {* class_Scroller *}
668 
669         TROB_Scroller           = (TRTG_CLS+$35); {* A scroller gadget *}
670 
671         TRSC_Total              = (TRTG_OAT+$1E0);
672         TRSC_Visible            = (TRTG_OAT+$1E1);
673 
674 {* class_FrameBox *}
675 
676         TROB_FrameBox           = (TRTG_CLS+$32); {* A framing box *}
677 
678         TRFB_GROUPING           = $00000001;     {* A grouping box *}
679         TRFB_FRAMING            = $00000002;     {* A framing box *}
680         TRFB_TEXT               = $00000004;     {* A text container *}
681 
682 
683 VAR TritonBase : pLibrary = nil;
684 
TR_AddClassnull685 FUNCTION TR_AddClass(app : pTR_App location 'a1'; d0arg : longword location 'd0'; supertag : longword location 'd1'; defaultmethod : LONGINT location 'a2'; datasize : longword location 'd2'; tags : pTagItem location 'a0') : BOOLEAN; syscall TritonBase 168;
686 PROCEDURE TR_AreaFill(project : pTR_Project location 'a0'; rp : pRastPort location 'a1'; left : ULONG location 'd0'; top :ULONG location 'd1'; right : ULONG location 'd2'; bottom : ULONG location 'd3'; typ : ULONG location 'd4'; dummy : POINTER location 'a2'); syscall TritonBase 228;
TR_AutoRequestnull687 FUNCTION TR_AutoRequest(app : pTR_App location 'a1'; lockproject : pTR_Project location 'a0'; wintags : pTagItem location 'a2'): ULONG; syscall TritonBase 84;
688 PROCEDURE TR_CloseProject(project : pTR_Project location 'a0'); syscall TritonBase 36;
689 PROCEDURE TR_CloseWindowSafely(window : pWindow location 'a0'); syscall TritonBase 126;
TR_CreateAppnull690 FUNCTION TR_CreateApp(apptags : pTagItem location 'a1') : pTR_App; syscall TritonBase 96;
TR_CreateMsgnull691 FUNCTION TR_CreateMsg(app : pTR_App location 'a1') : pTR_Message; syscall TritonBase 234;
692 PROCEDURE TR_DeleteApp(app : pTR_App location 'a1'); syscall TritonBase 102;
TR_DoMethodnull693 FUNCTION TR_DoMethod(obj : pTROD_Object location 'a0'; messageid : ULONG location 'd0'; data : POINTER location 'a1') : ULONG; syscall TritonBase 216;
TR_DoMethodClassnull694 FUNCTION TR_DoMethodClass(obj : pTROD_Object location 'a0'; messageid : ULONG location 'd0'; data : POINTER location 'a1'; trclass : pTR_Class location 'a2') : ULONG; syscall TritonBase 222;
695 PROCEDURE TR_DrawFrame(project : pTR_Project location 'a0'; rp : pRastPort location 'a1'; left : WORD location 'd1'; top : WORD location 'd2'; width : WORD location 'd3'; height : WORD location 'd4'; typ : WORD location 'd0'; inverted : BOOLEAN location 'd5'); syscall TritonBase 174;
TR_EasyRequestnull696 FUNCTION TR_EasyRequest(app : pTR_App location 'a1'; bodyfmt : pCHAR location 'a2'; gadfmt : pCHAR location 'a3'; taglist : pTagItem location 'a0') : ULONG; syscall TritonBase 90;
TR_EasyRequestnull697 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : pCHAR; gadfmt : String; taglist : pTagItem) : ULONG;
TR_EasyRequestnull698 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : String; gadfmt : pCHAR; taglist : pTagItem) : ULONG;
TR_EasyRequestnull699 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : String; gadfmt : String; taglist : pTagItem) : ULONG;
TR_FirstOccurancenull700 FUNCTION TR_FirstOccurance(ch : BYTE location 'd0'; str : pCHAR location 'a0') : LONGINT; syscall TritonBase 42;
TR_FirstOccurancenull701 FUNCTION TR_FirstOccurance(ch : BYTE; str : String) : LONGINT;
TR_FrameBorderHeightnull702 FUNCTION TR_FrameBorderHeight(project : pTR_Project location 'a0'; typ : WORD location 'd0') : ULONG; syscall TritonBase 186;
TR_FrameBorderWidthnull703 FUNCTION TR_FrameBorderWidth(project : pTR_Project location 'a0'; typ : WORD location 'd0') : ULONG; syscall TritonBase 180;
TR_GetAttributenull704 FUNCTION TR_GetAttribute(project : pTR_Project location 'a0'; ID : ULONG location 'd0'; attribute : ULONG location 'd1') : ULONG; syscall TritonBase 66;
TR_GetErrorStringnull705 FUNCTION TR_GetErrorString(num : WORD location 'd0') : pCHAR; syscall TritonBase 54;
TR_GetLastErrornull706 FUNCTION TR_GetLastError(app : pTR_App location 'a1') : WORD; syscall TritonBase 132;
TR_GetMsgnull707 FUNCTION TR_GetMsg(app : pTR_App location 'a1') : pTR_Message; syscall TritonBase 108;
TR_GetPennull708 FUNCTION TR_GetPen(project : pTR_Project location 'a0'; pentype : ULONG location 'd0'; pendata : ULONG location 'd1') : ULONG; syscall TritonBase 210;
709 PROCEDURE TR_LockProject(project : pTR_Project location 'a0'); syscall TritonBase 72;
TR_LockScreennull710 FUNCTION TR_LockScreen(project : pTR_Project location 'a0') : pScreen; syscall TritonBase 138;
TR_NumOccurancesnull711 FUNCTION TR_NumOccurances(ch : BYTE location 'd0'; str : pCHAR location 'a0') : LONGINT; syscall TritonBase 48;
TR_NumOccurancesnull712 FUNCTION TR_NumOccurances(ch : BYTE; str : String) : LONGINT;
TR_ObtainWindownull713 FUNCTION TR_ObtainWindow(project : pTR_Project location 'a0') : pWindow; syscall TritonBase 150;
TR_OpenProjectnull714 FUNCTION TR_OpenProject(app : pTR_App location 'a1'; taglist : pTagItem location 'a0') : pTR_Project; syscall TritonBase 30;
715 PROCEDURE TR_PrintText(project : pTR_Project location 'a0'; rp : pRastPort location 'a1'; txt : pCHAR location 'a2'; x : ULONG location 'd1'; y : ULONG location 'd2'; width : ULONG location 'd3'; flags : ULONG location 'd0'); syscall TritonBase 204;
716 PROCEDURE TR_PrintText(project : pTR_Project; rp : pRastPort; txt : String; x : ULONG; y : ULONG; width : ULONG; flags : ULONG);
717 PROCEDURE TR_ReleaseWindow(window : pWindow location 'a0'); syscall TritonBase 156;
718 PROCEDURE TR_ReplyMsg(message : pTR_Message location 'a1'); syscall TritonBase 114;
TR_SendMessagenull719 FUNCTION TR_SendMessage(project : pTR_Project location 'a0'; objectid : ULONG location 'd0'; messageid : ULONG location 'd1'; messagedata : POINTER location 'a1') : ULONG; syscall TritonBase 162;
720 PROCEDURE TR_SetAttribute(project : pTR_Project location 'a0'; ID : ULONG location 'd0'; attribute : ULONG location 'd1'; value: ULONG location 'd2'); syscall TritonBase 60;
TR_TextHeightnull721 FUNCTION TR_TextHeight(project : pTR_Project location 'a0'; txt : pCHAR location 'a2'; flags : ULONG location 'd0') : ULONG; syscall TritonBase 198;
TR_TextHeightnull722 FUNCTION TR_TextHeight(project : pTR_Project; txt : String; flags : ULONG) : ULONG;
TR_TextWidthnull723 FUNCTION TR_TextWidth(project : pTR_Project location 'a0'; txt : pCHAR location 'a2'; flags : ULONG location 'd0') : ULONG; syscall TritonBase 192;
TR_TextWidthnull724 FUNCTION TR_TextWidth(project : pTR_Project; txt : String; flags : ULONG) : ULONG;
725 PROCEDURE TR_UnlockProject(project : pTR_Project location 'a0'); syscall TritonBase 78;
726 PROCEDURE TR_UnlockScreen(screen : pScreen location 'a0'); syscall TritonBase 144;
TR_Waitnull727 FUNCTION TR_Wait(app : pTR_App location 'a1'; otherbits : ULONG location 'd0') : ULONG; syscall TritonBase 120;
728 
729 {
730    Functions with array of PtrUInt
731 }
TR_AddClassTagsnull732 FUNCTION TR_AddClassTags(app : pTR_App; d0arg : longword; supertag : longword;
733 defaultmethod : LONGINT; datasize : longword; const tags : array of PtrUInt) : BOOLEAN;
TR_OpenProjectTagsnull734 FUNCTION TR_OpenProjectTags(app : pTR_App; const taglist : array of PtrUInt) : pTR_Project;
TR_AutoRequestTagsnull735 FUNCTION TR_AutoRequestTags(app : pTR_App; lockproject : pTR_Project; const wintags : array of PtrUInt): ULONG;
TR_CreateAppTagsnull736 FUNCTION TR_CreateAppTags(const apptags : array of PtrUInt) : pTR_App;
TR_EasyRequestTagsnull737 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : pCHAR; gadfmt : pCHAR; const taglist : array of PtrUInt) : ULONG;
TR_EasyRequestTagsnull738 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : pCHAR; gadfmt : String; Const taglist : array of PtrUInt) : ULONG;
TR_EasyRequestTagsnull739 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : String; gadfmt : pCHAR; Const taglist : array of PtrUInt) : ULONG;
TR_EasyRequestTagsnull740 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : String; gadfmt : String; Const taglist : array of PtrUInt) : ULONG;
741 
742 {  This are a few support functions for triton.
743    Could be handy.
744 }
745 
746 procedure TR_Disable(p : pTR_Project; id : Longint);
747 procedure TR_Enable(p : pTR_Project; id : Longint);
TR_GetCheckBoxnull748 function TR_GetCheckBox(p : pTR_Project; id : Longint): boolean;
TR_GetSTRPTRnull749 function TR_GetSTRPTR(p : pTR_Project; id : Longint): PChar;
TR_GetStringnull750 function TR_GetString(p : pTR_Project; id : Longint): String;
TR_GetValuenull751 function TR_GetValue(p : pTR_Project; gadid : Longint): Longint;
752 procedure TR_SetCheckBox(p : pTR_Project; id : Longint; onoff : boolean);
753 procedure TR_SetString(p : pTR_Project; id : Longint; txt : String);
754 procedure TR_SetString(p : pTR_Project; id : Longint; txt : PChar);
755 procedure TR_SetText(p : pTR_Project; id : Longint; txt : string);
756 procedure TR_SetText(p : pTR_Project; id : Longint; txt : PChar);
757 procedure TR_SetValue(p : pTR_Project; id : Longint; value : Longint);
758 procedure TR_SetWindowTitle(p : pTR_Project; thetitle : string);
759 procedure TR_SetWindowTitle(p : pTR_Project; thetitle : PChar);
760 procedure TR_UpdateListView(p : pTR_Project; gadid : Longint; thelist: pList);
761 
762 IMPLEMENTATION
763 
764 uses
765   pastoc;
766 
767 procedure TR_Disable(p : pTR_Project; id : Longint);
768 begin
769     TR_SetAttribute(p,id, TRAT_Disabled,0);
770 end;
771 
772 procedure TR_Enable(p : pTR_Project; id : Longint);
773 begin
774     TR_SetAttribute(p,id,TRAT_Disabled,1);
775 end;
776 
TR_GetCheckBoxnull777 function TR_GetCheckBox(p : pTR_Project; id : Longint): boolean;
778 var
779     temp : Longint;
780 begin
781     temp := TR_GetAttribute(p,id,TRAT_Value);
782     if temp = 0 then TR_GetCheckBox := false
783     else TR_GetCheckBox := true;
784 end;
785 
TR_GetSTRPTRnull786 function TR_GetSTRPTR(p : pTR_Project; id : Longint): PChar;
787 var
788     temp : Longint;
789 begin
790     temp := TR_GetAttribute(p,id,0);
791     TR_GetSTRPTR := PChar(Pointer(temp));
792 end;
793 
TR_GetStringnull794 function TR_GetString(p : pTR_Project; id : Longint): String;
795 var
796     temp : Longint;
797 begin
798     temp := TR_GetAttribute(p,id,0);
799     TR_GetString := strpas(PChar(Pointer(temp)));
800 end;
801 
TR_GetValuenull802 function TR_GetValue(p : pTR_Project; gadid : Longint): Longint;
803 begin
804    TR_GetValue := TR_GetAttribute(p,gadid,TRAT_Value);
805 end;
806 
807 procedure TR_SetCheckBox(p : pTR_Project; id : Longint; onoff : boolean);
808 begin
809     TR_SetAttribute(p,id,TRAT_Value,Longint(byte(onoff)));
810 end;
811 
812 procedure TR_SetString(p : pTR_Project; id : Longint; txt : String);
813 begin
814     TR_SetAttribute(p,id,0,Longint(pas2c(txt)));
815 end;
816 
817 procedure TR_SetString(p : pTR_Project; id : Longint; txt : PChar);
818 begin
819     TR_SetAttribute(p,id,0,Longint(txt));
820 end;
821 
822 procedure TR_SetText(p : pTR_Project; id : Longint; txt : string);
823 begin
824     TR_SetAttribute(p,id,TRAT_Text,Longint(pas2c(txt)));
825 end;
826 
827 procedure TR_SetText(p : pTR_Project; id : Longint; txt : PChar);
828 begin
829     TR_SetAttribute(p,id,TRAT_Text,Longint(txt));
830 end;
831 
832 procedure TR_SetValue(p : pTR_Project; id : Longint; value : Longint);
833 begin
834     TR_SetAttribute(p,id,TRAT_Value,value);
835 end;
836 
837 procedure TR_SetWindowTitle(p : pTR_Project; thetitle : string);
838 begin
839     TR_SetAttribute(p,0,TRWI_Title,Longint(pas2c(thetitle)));
840 end;
841 
842 procedure TR_SetWindowTitle(p : pTR_Project; thetitle : PChar);
843 begin
844     TR_SetAttribute(p,0,TRWI_Title,Longint(thetitle));
845 end;
846 
847 procedure TR_UpdateListView(p : pTR_Project; gadid : Longint; thelist: pList);
848 begin
849     TR_SetAttribute(p,gadid,0,Longint(thelist));
850 end;
851 
852 
TR_EasyRequestnull853 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : PChar; gadfmt : String; taglist :
854 pTagItem) : ULONG;
855 begin
856     TR_EasyRequest := TR_EasyRequest(app,bodyfmt,pas2c(gadfmt),taglist);
857 end;
858 
TR_EasyRequestnull859 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : String; gadfmt : PChar; taglist :
860 pTagItem) : ULONG;
861 begin
862     TR_EasyRequest := TR_EasyRequest(app,pas2c(bodyfmt),gadfmt,taglist);
863 end;
864 
TR_EasyRequestnull865 FUNCTION TR_EasyRequest(app : pTR_App; bodyfmt : String; gadfmt : String; taglist :
866 pTagItem) : ULONG;
867 begin
868     TR_EasyRequest := TR_EasyRequest(app,pas2c(bodyfmt),pas2c(gadfmt),taglist);
869 end;
870 
TR_FirstOccurancenull871 FUNCTION TR_FirstOccurance(ch : BYTE; str : String) : LONGINT;
872 BEGIN
873     TR_FirstOccurance := TR_FirstOccurance(ch, pas2c(str));
874 END;
875 
TR_NumOccurancesnull876 FUNCTION TR_NumOccurances(ch : BYTE; str : String) : LONGINT;
877 BEGIN
878     TR_NumOccurances := TR_NumOccurances(ch, pas2c(str));
879 END;
880 
881 PROCEDURE TR_PrintText(project : pTR_Project; rp : pRastPort; txt : String; x : ULONG;
882 y : ULONG; width : ULONG; flags : ULONG);
883 BEGIN
884     TR_PrintText(project,rp,pas2c(txt),x,y,width,flags);
885 END;
886 
TR_TextHeightnull887 FUNCTION TR_TextHeight(project : pTR_Project; txt : String; flags : ULONG) : ULONG;
888 BEGIN
889     TR_TextHeight :=  TR_TextHeight(project,pas2c(txt),flags);
890 END;
891 
TR_TextWidthnull892 FUNCTION TR_TextWidth(project : pTR_Project; txt : String; flags : ULONG) : ULONG;
893 BEGIN
894     TR_TextWidth := TR_TextWidth(project,pas2c(txt),flags);
895 END;
896 
897 {
898    Functions with array of PtrUInt
899 }
900 {
901  Functions and procedures with array of PtrUInt go here
902 }
TR_AddClassTagsnull903 FUNCTION TR_AddClassTags(app : pTR_App; d0arg : longword; supertag : longword; defaultmethod : LONGINT; datasize : longword; const tags : array of PtrUInt) : BOOLEAN;
904 begin
905     TR_AddClassTags := TR_AddClass(app , d0arg , supertag , defaultmethod , datasize , @tags);
906 end;
907 
TR_EasyRequestTagsnull908 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : pCHAR; gadfmt : pCHAR; const taglist : array of PtrUInt) : Ulong;
909 begin
910     TR_EasyRequestTags := TR_EasyRequest(app , bodyfmt , gadfmt , @taglist);
911 end;
912 
TR_OpenProjectTagsnull913 FUNCTION TR_OpenProjectTags(app : pTR_App; const taglist : array of PtrUInt) : pTR_Project;
914 begin
915     TR_OpenProjectTags := TR_OpenProject(app , @taglist);
916 end;
917 
TR_AutoRequestTagsnull918 FUNCTION TR_AutoRequestTags(app : pTR_App; lockproject : pTR_Project; const wintags : array of PtrUInt): ULONG;
919 begin
920     TR_AutoRequestTags := TR_AutoRequest(app,lockproject, @wintags);
921 end;
922 
TR_CreateAppTagsnull923 FUNCTION TR_CreateAppTags(const apptags : array of PtrUInt) : pTR_App;
924 begin
925     TR_CreateAppTags := TR_CreateApp(@apptags);
926 end;
927 
TR_EasyRequestTagsnull928 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : pCHAR; gadfmt : String; Const taglist : array of PtrUInt) : ULONG;
929 begin
930     TR_EasyRequestTags := TR_EasyRequest(app,bodyfmt,pas2c(gadfmt), @taglist);
931 end;
932 
TR_EasyRequestTagsnull933 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : String; gadfmt : pCHAR; Const taglist : array of PtrUInt) : ULONG;
934 begin
935     TR_EasyRequestTags := TR_EasyRequest(app,pas2c(bodyfmt),gadfmt, @taglist);
936 end;
937 
TR_EasyRequestTagsnull938 FUNCTION TR_EasyRequestTags(app : pTR_App; bodyfmt : String; gadfmt : String; Const taglist : array of PtrUInt) : ULONG;
939 begin
940     TR_EasyRequestTags := TR_EasyRequest(app,pas2c(bodyfmt),pas2c(gadfmt), @taglist);
941 end;
942 
943 const
944     { Change VERSION and LIBVERSION to proper values }
945     VERSION : string[2] = '0';
946     LIBVERSION : longword = 0;
947 
948 initialization
949   TritonBase := OpenLibrary(TRITONNAME,LIBVERSION);
950 finalization
951   if Assigned(TritonBase) then
952     CloseLibrary(TritonBase);
953 END. (* UNIT TRITON *)
954 
955 
956 
957 
958 
959 
960