home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / gui / triton / programmer / amigaoberon / triton.mod < prev   
Text File  |  1994-07-14  |  20KB  |  425 lines

  1. (* ==================================================================== *)
  2. (*
  3.  
  4.   :Program.     Triton.MOD
  5.   :Contents.    interface to Stefan Zeiger's triton.library
  6.  
  7.   :Author.      Peter Fröhlich [phf]
  8.   :Copyright.   This module is © 1994 by Peter Fröhlich. It may be
  9.   :Copyright.   distributed freely as long as remains unchanged.
  10.  
  11.   :Language.    Oberon (revised)
  12.   :Translator.  Amiga Oberon V3.11d
  13.  
  14.   :History.     V0.1 [phf] 01-May-1994 first release to S. Zeiger
  15.  
  16.   :Address.     Peter Fröhlich, Ebenböckstraße 19, D-81241 München
  17.   :Address.     Z-NETZ: P.FROEHLICH@AMC.ZER
  18.  
  19.   :Remark.      The interface currently supports only direct use
  20.   :Remark.      of the library, ie. the infamous C macros have not
  21.   :Remark.      been ported yet.
  22.   :Remark.         Note that the interface does not AmigaOberon's
  23.   :Remark.      LONGSET since this would result in cumbersome casts
  24.   :Remark.      in the taglists.
  25.   :Remark.         Remember to ensure "Triton.base # NIL" before
  26.   :Remark.      calling procedures of the module.
  27.  
  28. *)
  29. (* ==================================================================== *)
  30.  
  31. MODULE Triton;
  32.  
  33. IMPORT
  34.   E* := Exec, S* := SYSTEM, U* := Utility, W* := Workbench,
  35.   I* := Intuition, GT* := GadTools, G* := Graphics;
  36.  
  37. CONST
  38.   tritonName* = "triton.library";
  39.   triton10Version* = 1;
  40.  
  41. TYPE
  42.   MessagePtr*    = UNTRACED POINTER TO Message;
  43.   AppPtr*        = UNTRACED POINTER TO App;
  44.   DimensionsPtr* = UNTRACED POINTER TO Dimensions;
  45.   ProjectPtr*    = UNTRACED POINTER TO Project;
  46.  
  47. (* --- The Triton message --- *)
  48.  
  49.   Message* = STRUCT
  50.     project-   : ProjectPtr; (* The project which triggered the message       *)
  51.     id-        : E.ULONG;    (* The object's ID (where appropriate)           *)
  52.     class-     : E.ULONG;    (* The Triton message class                      *)
  53.     data-      : E.ULONG;    (* The class-specific data                       *)
  54.     code-      : E.ULONG;    (* \ Currently only used                         *)
  55.     qualifier- : E.ULONG;    (* / by TRMS_KEYPRESSED                          *)
  56.     seconds-   : E.ULONG;    (* \ Copy of system clock time (Only where       *)
  57.     micros-    : E.ULONG;    (* / available! If not set, trm_Seconds is NULL) *)
  58.   END;
  59.  
  60. (* --- The Application Structure --- *)
  61.  
  62.   App* = STRUCT (* This structure is PRIVATE! *)
  63.     memPool  : E.ADDRESS;    (* The memory pool    *)
  64.     bitMask  : E.LONGBITS;   (* Bits to Wait() for *)
  65.     name     : E.STRPTR;     (* Unique name        *)
  66.     longName : E.STRPTR;     (* User-readable name *)
  67.     info     : E.STRPTR;     (* Info string        *)
  68.     version  : E.STRPTR;     (* Version            *)
  69.     release  : E.STRPTR;     (* Release            *)
  70.     date     : E.STRPTR;     (* Compilation date   *)
  71.     appPort  : E.MsgPortPtr; (* AppMessage port    *)
  72.   END;
  73.  
  74. (* --- The Dimensions Structure --- *)
  75.  
  76.   Dimensions* = STRUCT
  77.     left*     : E.UWORD;            (* Left                  *)
  78.     top*      : E.UWORD;            (* Top                   *)
  79.     width*    : E.UWORD;            (* Width                 *)
  80.     height*   : E.UWORD;            (* Height                *)
  81.     left2*    : E.UWORD;            (* Left                  *)
  82.     top2*     : E.UWORD;            (* Top                   *)
  83.     width2*   : E.UWORD;            (* Width                 *)
  84.     height2*  : E.UWORD;            (* Height                *)
  85.     zoomed*   : E.BOOL;             (* Window zoomed?        *)
  86.     reserved* : ARRAY 3 OF E.UWORD; (* For future expansions *)
  87.   END;
  88.  
  89. (* --- The Project Structure --- *)
  90.  
  91.   Project* = STRUCT (* This structure is PRIVATE! *)
  92.     app                  : AppPtr;            (* Our application *)
  93.     screen               : I.ScreenPtr;       (* Our screen, always valid *)
  94.     lockedPubScreen      : I.ScreenPtr;       (* Only valid if we're using a PubScreen *)
  95.     window               : I.WindowPtr;       (* The window *)
  96.     id                   : E.ULONG;           (* The window ID *)
  97.     appWindow            : W.AppWindowPtr;    (* AppWindow for icon dropping *)
  98.     idcmpFlags           : E.ULONG;           (* The IDCMP flags *)
  99.     flags                : E.ULONG;           (* Triton window flags *)
  100.     newMenu              : GT.NewMenuPtr;     (* The newmenu stucture built by Triton *)
  101.     newMenuSize          : E.ULONG;           (* The number of menu items in the list *)
  102.     menu                 : I.MenuPtr;         (* The menu structure *)
  103.     nextSelect           : E.UWORD;           (* The next selected menu item    *)
  104.     visualInfo           : E.ADDRESS;         (* The VisualInfo of our window *)
  105.     drawInfo             : I.DrawInfoPtr;     (* The DrawInfo of the screen *)
  106.     dimensions           : DimensionsPtr;     (* User-supplied dimensions *)
  107.     windowStdHeight      : E.ULONG;           (* The standard height of the window *)
  108.     leftBorder           : E.ULONG;           (* The width of the left window border *)
  109.     rightBorder          : E.ULONG;           (* The width of the right window border *)
  110.     topBorder            : E.ULONG;           (* The height of the top window border *)
  111.     bottomBorder         : E.ULONG;           (* The height of the bottom window border *)
  112.     innerWidth           : E.ULONG;           (* The inner width of the window *)
  113.     innerHeight          : E.ULONG;           (* The inner height of the window *)
  114.     zipDimensions        : ARRAY 4 OF E.WORD; (* The dimensions for the zipped window *)
  115.     aspectFixing         : E.UWORD;           (* Pixel aspect correction factor *)
  116.     objectList           : E.MinList;         (* The list of display objects *)
  117.     menuList             : E.MinList;         (* The list of menus *)
  118.     idList               : E.MinList;         (* The ID linking list (menus & objects) *)
  119.     memPool              : E.ADDRESS;         (* The memory pool for the lists *)
  120.     hasObjects           : E.BOOL;            (* Do we have display objects ? *)
  121.     propAttr             : G.TextAttrPtr;     (* The proportional font attributes *)
  122.     fixedWidthAttr       : G.TextAttrPtr;     (* The fixed-width font attributes *)
  123.     propFont             : G.TextFontPtr;     (* The proportional font *)
  124.     fixedWidthFont       : G.TextFontPtr;     (* The fixed-width font *)
  125.     openedPropFont       : E.BOOL;            (* \ Have we opened the fonts ? *)
  126.     openedFixedWidthFont : E.BOOL;            (* / *)
  127.     totalPropFontHeight  : E.UWORD;           (* Height of prop font incl. underscore *)
  128.     backfillType         : E.ULONG;           (* The backfill type *)
  129.     backfillHook         : U.HookPtr;         (* The backfill hook *)
  130.     gadToolsGadgetList   : I.GadgetPtr;       (* List of GadTools gadgets *)
  131.     prevGadget           : I.GadgetPtr;       (* Previous GadTools gadget *)
  132.     newGadget            : GT.NewGadgetPtr;   (* GadTools NewGadget *)
  133.     invisibleRequest     : I.RequesterPtr;    (* The invisible blocking requester *)
  134.     isUserLocked         : E.BOOL;            (* Project locked by the user? *)
  135.     currentID            : E.ULONG;           (* The currently keyboard-selected ID *)
  136.     isCancelDown         : E.BOOL;            (* Cancellation key pressed? *)
  137.     isShortcutDown       : E.BOOL;            (* Shortcut key pressed? *)
  138.     underscore           : E.UBYTE;           (* The underscore character *)
  139.     escClose             : E.BOOL;            (* Close window on Esc ? *)
  140.     delZip               : E.BOOL;            (* Zip window on Del ? *)
  141.     pubScreenFallBack    : E.BOOL;            (* Fall back onto default public screen ? *)
  142.     fontFallBack         : E.BOOL;            (* Fall back to topaz.8 ? *)
  143.     oldWidth             : E.UWORD;           (* Old window width *)
  144.     oldHeight            : E.UWORD;           (* Old window height *)
  145.   END;
  146.  
  147. CONST
  148.  
  149. (* --- Message classes --- *)
  150.  
  151.   msCloseWindow* = 1; (* The window should be closed *)
  152.   msError*       = 2; (* An error occured. Error code in trm_Data *)
  153.   msNewValue*    = 3; (* Object's value has changed. New value in trm_Data *)
  154.   msAction*      = 4; (* Object has triggered an action *)
  155.   msIconDropped* = 5; (* Icon dropped over window (ID=0) or DropBox. AppMessage* in trm_Data *)
  156.   msKeyPressed*  = 6; (* Key pressed. trm_Data contains ASCII code, trm_Code raw code and *)
  157.                                     (* trm_Qualifier contains qualifiers *)
  158. (* --- Triton error codes --- *)
  159.  
  160.   erOk*              = 0;  (* No error *)
  161.   erAllocMem*        = 1;  (* Not enough memory *)
  162.   erOpenWindow*      = 2;  (* Can't open window *)
  163.   erWindowTooBig*    = 3;  (* Window would be too big for screen *)
  164.   erDrawInfo*        = 4;  (* Can't get screen's DrawInfo *)
  165.   erOpenFont*        = 5;  (* Can't open font *)
  166.   erCreateMsgPort*   = 6;  (* Can't create message port *)
  167.   erInstallObject*   = 7;  (* Can't create an object *)
  168.   erCreateClass*     = 8;  (* Can't create a class *)
  169.   erNoLockPubScreen* = 9;  (* Can't lock public screen *)
  170.   erInvalid*         = 10; (* Invalid NewMenu structure -> probably a bug in Triton *)
  171.   erNoMem*           = 11; (* Not enough memory for menu creation *)
  172.   erOtherCreate*     = 12; (* Other error while creating the menus *)
  173.   erLayout*          = 13; (* GadTools can't layout the menus *)
  174.   erCreateContext*   = 14; (* Can't create gadget context *)
  175.   erMaxErrorNum      = 15; (* PRIVATE! *)
  176.  
  177. (* --- Tags for OpenWindow() --- *)
  178.  
  179. (* Window *)
  180.   wiTitle*              = (U.user+1);  (* STRPTR: The window title *)
  181.   wiFlags*              = (U.user+2);  (* See below for window flags *)
  182.   wiUnderscore*         = (U.user+3);  (* POINTER TO CHAR: The underscore for menu and gadget shortcuts *)
  183.   wiPosition*           = (U.user+4);  (* Window position, see below *)
  184.   wiCustomScreen*       = (U.user+5);  (* ScreenPtr *)
  185.   wiPubScreen*          = (U.user+6);  (* ScreenPtr, must have been locked! *)
  186.   wiPubScreenName*      = (U.user+7);  (* STRPTR, Triton is doing the locking *)
  187.   wiPropFontAttr*       = (U.user+8);  (* TextAttrPtr: The proportional font *)
  188.   wiFixedWidthFontAttr* = (U.user+9);  (* TextAttrPtr: The fixed-width font *)
  189.   wiBackfill*           = (U.user+10); (* The backfill type, see below *)
  190.   wiID*                 = (U.user+11); (* ULONG: The window ID *)
  191.   wiDimensions*         = (U.user+12); (* DimensionsPtr *)
  192.  
  193. (* Menus *)
  194.   mnTitle* = (U.user+101); (* STRPTR: Menu *)
  195.   mnItem*  = (U.user+102); (* STRPTR: Menu item *)
  196.   mnSub*   = (U.user+103); (* STRPTR: Menu subitem *)
  197.   mnFlags* = (U.user+104); (* See below for flags *)
  198.  
  199. (* General object attributes *)
  200.   atID*        = (U.user+150); (* The object's/menu's ID *)
  201.   atFlags*     = (U.user+151); (* The object's flags *)
  202.   atValue*     = (U.user+152); (* The object's value *)
  203.   atText*      = (U.user+153); (* The object's text *)
  204.   atDisabled*  = (U.user+154); (* Disabled object? *)
  205.   atBackfill*  = (U.user+155); (* Backfill pattern *)
  206.   atMinWidth*  = (U.user+156); (* Minimum width *)
  207.   atMinHeight* = (U.user+157); (* Minimum height *)
  208.  
  209.   user* = (U.user+800); (* Add something to get your own IDs *)
  210.  
  211. (* Magic code *)
  212.   magicObjBeg* = (U.user+200); (* PRIVATE! *)
  213.   magicObjEnd* = (U.user+999); (* PRIVATE! *)
  214.   magicSpcBeg* = (U.user+900); (* PRIVATE! *)
  215.   magicSpcEnd* = (U.user+999); (* PRIVATE! *)
  216.  
  217. (* --- Window flags --- *)
  218.  
  219.   wiBackDrop*        = 000000001H; (* Create a backdrop borderless window *)
  220.   wiNoDragBar*       = 000000002H; (* Don't use a dragbar *)
  221.   wiNoDepthGadget*   = 000000004H; (* Don't use a depth-gadget *)
  222.   wiNOCloseGadget*   = 000000008H; (* Don't use a close-gadget *)
  223.   wiNoActivate*      = 000000010H; (* Don't activate window *)
  224.   wiNoEscClose*      = 000000020H; (* Don't send closeWindow when Esc is pressed *)
  225.   wiNoPScrFallback*  = 000000040H; (* Don't fall back onto default PubScreen *)
  226.   wiNoZipGadget*     = 000000080H; (* Don't use a zip-gadget *)
  227.   wiZipCenterTop*    = 000000100H; (* Center the zipped window on the title bar *)
  228.   wiNoMinTextWidth*  = 000000200H; (* Minimum window width not according to title text *)
  229.   wiNoSizeGadget*    = 000000400H; (* Don't use a sizing-gadget *)
  230.   wiNoFontFallback*  = 000000800H; (* Don't fall back to topaz.8 *)
  231.   wiNoDelZip*        = 000001000H; (* Don't zip the window when Del is pressed *)
  232.   wiSimpleRefresh*   = 000002000H; (* Use simple refresh instead of smart refresh *)
  233.   wiZipToCurrentPos* = 000004000H; (* Will zip the window at the current position (OS3.0+) *)
  234.   wiAppWindow*       = 000008000H; (* Create an AppWindow without using class_dropbox *)
  235.   wiActivateStrGad*  = 000010000H; (* Activate the first string gadget after opening the window *)
  236.  
  237.  
  238. (* --- Menu flags --- *)
  239.  
  240.   mnCheckIt*  = 000000001H; (* Leave space for a checkmark *)
  241.   mnChecked*  = 000000002H; (* Check the item (includes TRMF_CHECKIT) *)
  242.   mnDisabled* = 000000004H; (* Ghost the menu/item *)
  243.  
  244. (* --- Window positions --- *)
  245.  
  246.   wpDefault*       = 0;    (* Let Triton choose a good position *)
  247.   wpBelowTitlebar* = 1;    (* Left side of screen, below title bar *)
  248.   wpCenterTop*     = 1025; (* Top of screen, centered on the title bar *)
  249.   wpTopLeftScreen* = 1026; (* Top left corner of screen *)
  250.   wpCenterScreen*  = 1027; (* Centered on the screen *)
  251.   wpCenterDisplay* = 1028; (* Centered on the currently displayed clip *)
  252.   wpMousePointer*  = 1029; (* Under the mouse pointer *)
  253.   wpMagic          = 1024; (* PRIVATE! *)
  254.  
  255. (* --- Backfill types --- *)
  256.  
  257.   bfWindowBack*       = 0;  (* Window backfill colors *)
  258.   bfRequesterBack*    = 1;  (* Requester backfill colors *)
  259.   bfNone*             = 2;  (* No backfill (= Fill with BACKGROUNDPEN) *)
  260.   bfShine*            = 3;  (* Fill with SHINEPEN *)
  261.   bfShineShadow*      = 4;  (* Fill with SHINEPEN + SHADOWPEN *)
  262.   bfShineFill*        = 5;  (* Fill with SHINEPEN + FILLPEN *)
  263.   bfShineBackground*  = 6;  (* Fill with SHINEPEN + BACKGROUNDPEN *)
  264.   bfShadow*           = 7;  (* Fill with SHADOWPEN *)
  265.   bfShadowFill*       = 8;  (* Fill with SHADOWPEN + FILLPEN *)
  266.   bfShadowBackground* = 9;  (* Fill with SHADOWPEN + BACKGROUNDPEN *)
  267.   bfFill*             = 10; (* Fill with FILLPEN *)
  268.   bfFillBackground*   = 11; (* Fill with FILLPEN + BACKGROUNDPEN *)
  269.  
  270. (* --- Display Object flags --- *)
  271.  
  272. (* General flags *)
  273.   ofRaised* = 000000001H; (* Raised object *)
  274.   ofHoriz*  = 000000002H; (* Horizontal object \ Works automatically *)
  275.   ofVert*   = 000000004H; (* Vertical object   / in groups *)
  276.  
  277. (* Text flags *)
  278.   txNoUnderscore* = 000000100H; (* Don't interpret underscores *)
  279.   txHighlight*    = 000000200H; (* Highlight text *)
  280.   tx3D*           = 000000400H; (* 3D design *)
  281.   txBold*         = 000000800H; (* Softstyle 'bold' *)
  282.   txTitle*        = 000001000H; (* A title (e.g. of a group) *)
  283.  
  284. (* --- Menu entries --- *)
  285.  
  286.   menuBarLabel* = -1; (* A barlabel instead of text *)
  287.  
  288. (* --- Tags for CreateApp() --- *)
  289.  
  290.   caName*     = (U.user+1);
  291.   caLongName* = (U.user+2);
  292.   caInfo*     = (U.user+3);
  293.   caVersion*  = (U.user+4);
  294.   caRelease*  = (U.user+5);
  295.   caDate*     = (U.user+6);
  296.  
  297. (* --- Tags for EasyRequest() --- *)
  298.  
  299.   ezReqPos*      = (U.user+1);
  300.   ezLockProject* = (U.user+2);
  301.   ezReturn*      = (U.user+3);
  302.   ezTitle*       = (U.user+4);
  303.   ezActivate*    = (U.user+5);
  304.  
  305. (* --- Default classes, attributes and flags --- *)
  306.  
  307. (* Classes *)
  308.   obButton*   = (U.user+305); (* A BOOPSI button gadget *)
  309.   obCheckBox* = (U.user+303); (* A checkbox gadget *)
  310.   obCycle*    = (U.user+310); (* A cycle gadget *)
  311.   obFrameBox* = (U.user+306); (* A framing box *)
  312.   obDropBox*  = (U.user+312); (* An icon drop box *)
  313.   grHoriz*    = (U.user+201); (* Horizontal group, see below for types *)
  314.   grVert*     = (U.user+202); (* Vertical group, see below for types *)
  315.   grEnd*      = (U.user+203); (* End of a group *)
  316.   obLine*     = (U.user+301); (* A simple line *)
  317.   obPalette*  = (U.user+307); (* A palette gadget *)
  318.   obScroller* = (U.user+309); (* A scroller gadget *)
  319.   obSlider*   = (U.user+308); (* A slider gadget *)
  320.   obSpace*    = (U.user+901); (* The spaces class *)
  321.   obString*   = (U.user+311); (* A string gadget *)
  322.   obText*     = (U.user+304); (* A line of text *)
  323.   obListview* = (U.user+313); (* A listview gadget *)
  324.   obProgress* = (U.user+314); (* A progress indicator *)
  325.  
  326. (* Button *)
  327.   buReturnOk*  = 000010000H; (* <Return> answers the button *)
  328.   buEscOk*     = 000020000H; (* <Esc> answers the button *)
  329.   buShifted*   = 000040000H; (* Shifted shortcut only *)
  330.   buUnshifted* = 000080000H; (* Unshifted shortcut only *)
  331.   btText*      = 0;          (* Text button *)
  332.   btGetFile*   = 1;          (* GetFile button *)
  333.   btGetDrawer* = 2;          (* GetDrawer button *)
  334.   btGetEntry*  = 3;          (* GetEntry button *)
  335.  
  336. (* Group *)
  337.   grPropShare*  = 000000000H; (* Divide objects proportionally *)
  338.   grEqualShare* = 000000001H; (* Divide objects equally *)
  339.   grPropSpaces* = 000000002H; (* Divide spaces proportionally *)
  340.   grArray*      = 000000004H; (* Top-level array group *)
  341.   grAlign*      = 000000008H; (* Align resizeable objects in secondary dimension *)
  342.   grCenter*     = 000000010H; (* Center unresizeable objects in secondary dimension *)
  343.   grFixHoriz*   = 000000020H; (* Don't allow horizontal resizing *)
  344.   grFixVert*    = 000000040H; (* Don't allow vertical resizing *)
  345.  
  346. (* Scroller *)
  347.   scTotal*   = (U.user+1504);
  348.   scVisible* = (U.user+1505);
  349.  
  350. (* Slider *)
  351.   slMin* = (U.user+1502);
  352.   slMax* = (U.user+1503);
  353.  
  354. (* Space *)
  355.   stNone*   = 1; (* No space *)
  356.   stSmall*  = 2; (* Small space *)
  357.   stNormal* = 3; (* Normal space (default) *)
  358.   stBig*    = 4; (* Big space *)
  359.  
  360. (* Listview *)
  361.   lvTop*          = (U.user+1506);
  362.   lvReadOnly*     = 000010000H;    (* A read-only list *)
  363.   lvSelect*       = 000020000H;    (* You may select an entry *)
  364.   lvShowSelected* = 000040000H;    (* Selected entry will be shown *)
  365.   lvNoCursorKeys* = 000080000H;    (* Don't use arrow keys *)
  366.   lvNoNumPadKeys* = 000100000H;    (* Don't use numeric keypad keys *)
  367.   lvFWFont*       = 000200000H;    (* Use the fixed-width font *)
  368.  
  369. VAR
  370.   base- : E.LibraryPtr;
  371.   supportApp : AppPtr;
  372.  
  373. (* --- Main system --- *)
  374.  
  375. PROCEDURE OpenProject*       {base,-30}  (app{9}: AppPtr; taglist{8}: ARRAY OF U.TagItem): ProjectPtr;
  376. PROCEDURE CloseProject*      {base,-36}  (project{8}: ProjectPtr);
  377. PROCEDURE FirstOccurance*    {base,-42}  (ch{0}: E.UBYTE; str{8}: E.STRPTR): E.LONG;
  378. PROCEDURE NumOccurances*     {base,-48}  (ch{0}: E.UBYTE; str{8}: E.STRPTR): E.LONG;
  379. PROCEDURE GetErrorString*    {base,-54}  (num{0}: E.UWORD): E.STRPTR;
  380. PROCEDURE CloseWindowSafely* {base,-126} (win{8}: I.WindowPtr);
  381. PROCEDURE GetMsg*            {base,-108} (app{9}: AppPtr): MessagePtr;
  382. PROCEDURE ReplyMsg*          {base,-114} (msg{9}: MessagePtr);
  383. PROCEDURE Wait*              {base,-120} (app{9}: AppPtr; otherbits{0}: E.ULONG): E.ULONG;
  384. PROCEDURE SetAttribute*      {base,-60}  (prj{8}: ProjectPtr; id{0}: E.ULONG; attribute{1}: E.ULONG; value{2}: E.ULONG);
  385. PROCEDURE GetAttribute*      {base,-66}  (prj{8}: ProjectPtr; id{0}: E.ULONG; attribute{1}: E.ULONG): E.ULONG;
  386. PROCEDURE LockProject*       {base,-72}  (prj{8}: ProjectPtr);
  387. PROCEDURE UnlockProject*     {base,-78}  (prj{8}: ProjectPtr);
  388. PROCEDURE AutoRequest*       {base,-84}  (app{9}: AppPtr; lockproject{8}: ProjectPtr; requestTRWindowTags{10}: ARRAY OF U.TagItem): E.ULONG;
  389. PROCEDURE EasyRequest*       {base,-90}  (app{9}: AppPtr; bodyfmt{10}: E.STRPTR; gadfmt{11}: E.STRPTR; taglist{8}: ARRAY OF U.TagItem): E.ULONG;
  390. PROCEDURE CreateApp*         {base,-96}  (apptags{9}: ARRAY OF U.TagItem): AppPtr;
  391. PROCEDURE DeleteApp*         {base,-102} (app{9}: AppPtr);
  392.  
  393. (* I'm not sure where this call belongs. [phf] *)
  394. (*
  395. extern BOOL                __saveds __asm  TR_AddClass(register __d0 ULONG tag, register __a0 ULONG ( *dispatcher)());
  396. *)
  397.  
  398. (* --- Support library --- *)
  399.  
  400. (* OpenTriton() and CloseTriton() are obsolete under Oberon *)
  401.  
  402. PROCEDURE OpenProjectTags* {base,-30} (app{9}: AppPtr; tag{8}..: U.Tag): ProjectPtr;
  403. PROCEDURE AutoRequestTags* {base,-84} (app{9}: AppPtr; lockproject{8}: ProjectPtr; tag{10}..: U.Tag): E.ULONG;
  404. PROCEDURE EasyRequestTags* {base,-90} (app{9}: AppPtr; bodyfmt{10}: E.STRPTR; gadfmt{11}: E.STRPTR; tag{8}..: U.Tag): E.ULONG;
  405.  
  406. (* --- extensions by [phf] --- *)
  407.  
  408. PROCEDURE CreateAppTags* {base,-96}  (apptags{9}..: U.Tag): AppPtr;
  409.  
  410. (* --- get everything rolling --- *)
  411.  
  412. BEGIN
  413.  
  414.   (* supportApp is not used currently *)
  415.   supportApp := NIL;
  416.  
  417.   (* I'm not sure about the version. [phf] *)
  418.   base := E.OpenLibrary (tritonName, 0);
  419.  
  420. CLOSE
  421.  
  422.   IF (base # NIL) THEN E.CloseLibrary (base) END;
  423.  
  424. END Triton.
  425.