;
;**
;** $VER: triton.bb2 1.05 (12.5.95)
;** Triton Release 1.4
;**
;** triton.library definitions
;**
;** (C) Copyright 1993-1994 Stefan Zeiger
;** All Rights Reserved
;**
;** Translation to BlitzBasic2 (C) by Philipp Lonke
;** All Rights Reserved
;** No change may be made to this sourcecode.
;** contact: phips@scout.rhein-main.de or in the blitz-mailing-list.
;**
;

;extern struct TR_App *__Triton_Support_App;
;extern struct IClass *TRIM_trLogo;

; this here is an addition to the amigalibs.res, because in the
; original include it was wrongly converted from C

NEWTYPE .AppWindow
  *aw_PRIVATE.b
End NEWTYPE

; ////////////////////////////////////////////////////////////////////// */
; //////////////////////////////////////////////// The Triton message // */
; ////////////////////////////////////////////////////////////////////// */

NEWTYPE.TR_Message

  *trm_Project.TR_Project;    ; The project which triggered the message */
  trm_ID.l;         ; The object's ID (where appropriate) */
  trm_Class.l;      ; The Triton message class */
  trm_Data.l;       ; The class-specific data */
  trm_Code.l;       ; Currently only used by TRMS_KEYPRESSED */
  trm_Qualifier.l;  ; IEQUALIFIERs */
  trm_Seconds.l;    ; \ Copy of system clock time (Only where */
  trm_Micros.l;     ; / available! If not set, trm_Seconds is NULL) */
  *trm_App.TR_App;        ; The project's application */

End NEWTYPE

; Message classes */

#TRMS_CLOSEWINDOW        =1  ; The window should be closed */
#TRMS_ERROR              =2  ; An error occured. Error code in trm_Data */
#TRMS_NEWVALUE           =3  ; Object's value has changed. New value in trm_Data */
#TRMS_ACTION             =4  ; Object has triggered an action */
#TRMS_ICONDROPPED        =5  ; Icon dropped over window (ID=0) or DropBox. AppMessage* in trm_Data */
#TRMS_KEYPRESSED         =6  ; Key pressed. trm_Data contains ASCII code, trm_Code raw code and */
                             ; trm_Qualifier contains qualifiers */
#TRMS_HELP               =7  ; The user requested help for the specified ID */


; ////////////////////////////////////////////////////////////////////// */
; //////////////////////////////////////////////// Triton error codes // */
; ////////////////////////////////////////////////////////////////////// */

#TRER_OK                 =0        ; No error */

#TRER_ALLOCMEM           =1        ; Not enough memory */
#TRER_OPENWINDOW         =2        ; Can't open window */
#TRER_WINDOWTOOBIG       =3        ; Window would be too big for screen */
#TRER_DRAWINFO           =4        ; Can't get screen's DrawInfo */
#TRER_OPENFONT           =5        ; Can't open font */
#TRER_CREATEMSGPORT      =6        ; Can't create message port */
#TRER_INSTALLOBJECT      =7        ; Can't create an object */
#TRER_CREATECLASS        =8        ; Can't create a class */
#TRER_NOLOCKPUBSCREEN    =9        ; Can't lock public screen */
#TRER_CREATEMENUS        =12       ; Error while creating the menus */
#TRER_GT_CREATECONTEXT   =14       ; Can't create gadget context */

#TRER_MAXERRORNUM        =15       ; PRIVATE! */


; ////////////////////////////////////////////////////////////////////// */
; ///////////////////////////////////////// Tags for TR_OpenProject() // */
; ////////////////////////////////////////////////////////////////////// */

; Window/Project */

#TRWI_Title              =(#TAG_USER+1)    ; STRPTR: The window title */
#TRWI_Flags              =(#TAG_USER+2)    ; See below for window flags */
#TRWI_Underscore         =(#TAG_USER+3)    ; char *: The underscore for menu and gadget shortcuts */
#TRWI_Position           =(#TAG_USER+4)    ; Window position, see below */
#TRWI_CustomScreen       =(#TAG_USER+5)    ; struct Screen * */
#TRWI_PubScreen          =(#TAG_USER+6)    ; struct Screen *, must have been locked! */
#TRWI_PubScreenName      =(#TAG_USER+7)    ; STRPTR, Triton is doing the locking */
#TRWI_PropFontAttr       =(#TAG_USER+8)    ; struct TextAttr *: The proportional font */
#TRWI_FixedWidthFontAttr =(#TAG_USER+9)    ; struct TextAttr *: The fixed-width font */
#TRWI_Backfill           =(#TAG_USER+10)   ; The backfill type, see below */
#TRWI_ID                 =(#TAG_USER+11)   ; ULONG: The window ID */
#TRWI_Dimensions         =(#TAG_USER+12)   ; struct TR_Dimensions * */
#TRWI_ScreenTitle        =(#TAG_USER+13)   ; STRPTR: The screen title */

; Menus */

#TRMN_Title              =(#TAG_USER+101)  ; STRPTR: Menu */
#TRMN_Item               =(#TAG_USER+102)  ; STRPTR: Menu item */
#TRMN_Sub                =(#TAG_USER+103)  ; STRPTR: Menu subitem */
#TRMN_Flags              =(#TAG_USER+104)  ; See below for flags */

; General object attributes */
#TRAT_ID                 =(#TAG_USER+150)  ; The object's/menu's ID */
#TRAT_Flags              =(#TAG_USER+151)  ; The object's flags */
#TRAT_Value              =(#TAG_USER+152)  ; The object's value */
#TRAT_Text               =(#TAG_USER+153)  ; The object's text */
#TRAT_Disabled           =(#TAG_USER+154)  ; Disabled object? */
#TRAT_Backfill           =(#TAG_USER+155)  ; Backfill pattern */
#TRAT_MinWidth           =(#TAG_USER+156)  ; Minimum width */
#TRAT_MinHeight          =(#TAG_USER+157)  ; Minimum height */

#TROB_USER               =(#TAG_USER+800)  ; PRIVATE! */


; ////////////////////////////////////////////////////////////////////// */
; ////////////////////////////////////////////////////// Window flags // */
; ////////////////////////////////////////////////////////////////////// */

#TRWF_BACKDROP           =$00000001     ; Create a backdrop borderless window */
#TRWF_NODRAGBAR          =$00000002     ; Don't use a dragbar */
#TRWF_NODEPTHGADGET      =$00000004     ; Don't use a depth-gadget */
#TRWF_NOCLOSEGADGET      =$00000008     ; Don't use a close-gadget */
#TRWF_NOACTIVATE         =$00000010     ; Don't activate window */
#TRWF_NOESCCLOSE         =$00000020     ; Don't send TRMS_CLOSEWINDOW when Esc is pressed */
#TRWF_NOPSCRFALLBACK     =$00000040     ; Don't fall back onto default PubScreen */
#TRWF_NOZIPGADGET        =$00000080     ; Don't use a zip-gadget */
#TRWF_ZIPCENTERTOP       =$00000100     ; Center the zipped window on the title bar */
#TRWF_NOMINTEXTWIDTH     =$00000200     ; Minimum window width not according to title text */
#TRWF_NOSIZEGADGET       =$00000400     ; Don't use a sizing-gadget */
#TRWF_NOFONTFALLBACK     =$00000800     ; Don't fall back to topaz.8 */
#TRWF_NODELZIP           =$00001000     ; Don't zip the window when Del is pressed */
#TRWF_SIMPLEREFRESH      =$00002000     ; Use simple refresh instead of smart refresh */
#TRWF_ZIPTOCURRENTPOS    =$00004000     ; Will zip the window at the current position (OS3.0+) */
#TRWF_APPWINDOW          =$00008000     ; Create an AppWindow without using class_dropbox */
#TRWF_ACTIVATESTRGAD     =$00010000     ; Activate the first string gadget after opening the window */
#TRWF_HELP               =$00020000     ; Pressing <Help> will create a TRMS_HELP message */


; ////////////////////////////////////////////////////////////////////// */
; //////////////////////////////////////////////////////// Menu flags // */
; ////////////////////////////////////////////////////////////////////// */

#TRMF_CHECKIT            =$00000001     ; Leave space for a checkmark */
#TRMF_CHECKED            =$00000002     ; Check the item (includes TRMF_CHECKIT) */
#TRMF_DISABLED           =$00000004     ; Ghost the menu/item */


; ////////////////////////////////////////////////////////////////////// */
; ////////////////////////////////////////////////// Window positions // */
; ////////////////////////////////////////////////////////////////////// */

#TRWP_DEFAULT            =0              ; Let Triton choose a good position */
#TRWP_BELOWTITLEBAR      =1              ; Left side of screen, below title bar */
#TRWP_CENTERTOP          =1025           ; Top of screen, centered on the title bar */
#TRWP_TOPLEFTSCREEN      =1026           ; Top left corner of screen */
#TRWP_CENTERSCREEN       =1027           ; Centered on the screen */
#TRWP_CENTERDISPLAY      =1028           ; Centered on the currently displayed clip */
#TRWP_MOUSEPOINTER       =1029           ; Under the mouse pointer */


; ////////////////////////////////////////////////////////////////////// */
; //////////////////////////////////////////////////// Backfill types // */
; ////////////////////////////////////////////////////////////////////// */

#TRBF_WINDOWBACK         =0              ; Window backfill colors */
#TRBF_REQUESTERBACK      =1              ; Requester backfill colors */
#TRBF_NONE               =2              ; No backfill (= Fill with BACKGROUNDPEN) */
#TRBF_SHINE              =3              ; Fill with SHINEPEN */
#TRBF_SHINE_SHADOW       =4              ; Fill with SHINEPEN + SHADOWPEN */
#TRBF_SHINE_FILL         =5              ; Fill with SHINEPEN + FILLPEN */
#TRBF_SHINE_BACKGROUND   =6              ; Fill with SHINEPEN + BACKGROUNDPEN */
#TRBF_SHADOW             =7              ; Fill with SHADOWPEN */
#TRBF_SHADOW_FILL        =8              ; Fill with SHADOWPEN + FILLPEN */
#TRBF_SHADOW_BACKGROUND  =9              ; Fill with SHADOWPEN + BACKGROUNDPEN */
#TRBF_FILL               =10             ; Fill with FILLPEN */
#TRBF_FILL_BACKGROUND    =11             ; Fill with FILLPEN + BACKGROUNDPEN */


; ////////////////////////////////////////////////////////////////////// */
; ////////////////////////////////////////////// Display Object flags // */
; ////////////////////////////////////////////////////////////////////// */

; General flags */
#TROF_RAISED             =$00000001     ; Raised object */
#TROF_HORIZ              =$00000002     ; Horizontal object \ Works automatically */
#TROF_VERT               =$00000004     ; Vertical object   / in groups */
#TROF_RIGHTALIGN         =$00000008     ; Align object to the right border if available */

; Text flags */
#TRTX_NOUNDERSCORE       =$00000100     ; Don't interpret underscores */
#TRTX_HIGHLIGHT          =$00000200     ; Highlight text */
#TRTX_3D                 =$00000400     ; 3D design */
#TRTX_BOLD               =$00000800     ; Softstyle 'bold' */
#TRTX_TITLE              =$00001000     ; A title (e.g. of a group) */
#TRTX_SELECTED           =$00002000     ; PRIVATE! */


; ////////////////////////////////////////////////////////////////////// */
; ////////////////////////////////////////////////////// Menu entries // */
; ////////////////////////////////////////////////////////////////////// */

#TRMN_BARLABEL           =(-1)           ; A barlabel instead of text */


; ////////////////////////////////////////////////////////////////////// */
; /////////////////////////////////////////// Tags for TR_CreateApp() // */
; ////////////////////////////////////////////////////////////////////// */

#TRCA_Name               =(#TAG_USER+1)
#TRCA_LongName           =(#TAG_USER+2)
#TRCA_Info               =(#TAG_USER+3)
#TRCA_Version            =(#TAG_USER+4)
#TRCA_Release            =(#TAG_USER+5)
#TRCA_Date               =(#TAG_USER+6)


; ////////////////////////////////////////////////////////////////////// */
; ///////////////////////////////////////// Tags for TR_EasyRequest() // */
; ////////////////////////////////////////////////////////////////////// */

#TREZ_ReqPos             =(#TAG_USER+1)
#TREZ_LockProject        =(#TAG_USER+2)
#TREZ_Return             =(#TAG_USER+3)
#TREZ_Title              =(#TAG_USER+4)
#TREZ_Activate           =(#TAG_USER+5)


; ////////////////////////////////////////////////////////////////////// */
; ///////////////////////////////////////// The Application Structure // */
; ////////////////////////////////////////////////////////////////////// */

NEWTYPE.TR_App ; This structure is PRIVATE! */

  *tra_MemPool.w       ; The memory pool */
  tra_BitMask.l        ; Bits to Wait() for */
  tra_LastError.l      ; TRER code of last error */
  *tra_Name.w;           ; Unique name */
  *tra_LongName.w;       ; User-readable name */
  *tra_Info.w;           ; Info string */
  *tra_Version.w;        ; Version */
  *tra_Release.w;        ; Release */
  *tra_Date.w;           ; Compilation date */
  *tra_AppPort.MsgPort   ; Application message port */
  *tra_IDCMPPort.MsgPort ; IDCMP message port */
  *tra_Prefs.b;          ; Pointer to Triton app prefs */
  *tra_LastProject.TR_Project    ; Used for menu item linking */
  *tra_InputEvent.InputEvent     ; Used for RAWKEY conversion */

End NEWTYPE


; ////////////////////////////////////////////////////////////////////// */
; ////////////////////////////////////////// The Dimensions Structure // */
; ////////////////////////////////////////////////////////////////////// */

NEWTYPE.TR_Dimensions

  trd_Left.w           ; Left */
  trd_Top.w            ; Top */
  trd_Width.w          ; Width */
  trd_Height.w         ; Height */
  trd_Left2.w          ; Left */
  trd_Top2.w           ; Top */
  trd_Width2.w         ; Width */
  trd_Height2.w        ; Height */
  trd_Zoomed.w         ; Window zoomed? */
  reserved.w[3]        ; For future expansions */

End NEWTYPE


; ////////////////////////////////////////////////////////////////////// */
; ///////////////////////////////////////////// The Project Structure // */
; ////////////////////////////////////////////////////////////////////// */

NEWTYPE.TR_Project ; This structure is PRIVATE! */

  *trp_App.TR_App                   ; Our application */
  *trp_Screen.Screen                     ; Our screen, always valid */

  *trp_LockedPubScreen.Screen            ; Only valid if we're using a PubScreen */
  *trp_ScreenTitle.w                ; The screen title */

  *trp_Window.Window                     ; The window */
  trp_ID.l                         ; The window ID */
  *trp_AppWindow.AppWindow         ; AppWindow for icon dropping */

  trp_IDCMPFlags.l                 ; The IDCMP flags */
  trp_Flags.l                      ; Triton window flags */

  *trp_NewMenu.NewMenu                    ; The newmenu stucture built by Triton */
  trp_NewMenuSize.l                ; The number of menu items in the list */
  *trp_Menu.Menu                       ; The menu structure */
  trp_NextSelect.w                 ; The next selected menu item */

  *trp_VisualInfo.w                 ; The VisualInfo of our window */
  *trp_DrawInfo.DrawInfo                   ; The DrawInfo of the screen */
  *trp_UserDimensions.TR_Dimensions             ; User-supplied dimensions */
  *trp_Dimensions.TR_Dimensions                 ; Private dimensions */

  trp_WindowStdHeight.l            ; The standard height of the window */
  trp_LeftBorder.l                 ; The width of the left window border */
  trp_RightBorder.l                ; The width of the right window border */
  trp_TopBorder.l                  ; The height of the top window border */
  trp_BottomBorder.l               ; The height of the bottom window border */
  trp_InnerWidth.l                 ; The inner width of the window */
  trp_InnerHeight.l                ; The inner height of the window */
  trp_ZipDimensions.w[4]           ; The dimensions for the zipped window */
  trp_AspectFixing.w               ; Pixel aspect correction factor */

  trp_ObjectList.MinList                 ; The list of display objects */
  trp_MenuList.MinList                   ; The list of menus */
  trp_IDList.MinList                     ; The ID linking list (menus & objects) */
  *trp_MemPool.w                    ; The memory pool for the lists */
  trp_HasObjects.b;                 ; Do we have display objects ? */

  *trp_PropAttr.TextAttr                   ; The proportional font attributes */
  *trp_FixedWidthAttr.TextAttr             ; The fixed-width font attributes */
  *trp_PropFont.TextFont                   ; The proportional font */
  *trp_FixedWidthFont.TextFont             ; The fixed-width font */
  trp_OpenedPropFont.b             ; \ Have we opened the fonts ? */
  trp_OpenedFixedWidthFont.b       ; /
  trp_TotalPropFontHeight.w        ; Height of prop font incl. underscore */

  trp_BackfillType.l               ; The backfill type */
  *trp_BackfillHook.Hook               ; The backfill hook */

  *trp_GadToolsGadgetList.Gadget         ; List of GadTools gadgets */
  *trp_PrevGadget.Gadget                 ; Previous GadTools gadget */
  *trp_NewGadget.NewGadget               ; GadTools NewGadget */

  *trp_InvisibleRequest.Requester        ; The invisible blocking requester */
  trp_IsUserLocked.b               ; Project locked by the user? */

  trp_CurrentID.l                  ; The currently keyboard-selected ID */
  trp_IsCancelDown.b               ; Cancellation key pressed? */
  trp_IsShortcutDown.b             ; Shortcut key pressed? */
  trp_Underscore.b                 ; The underscore character */

  trp_EscClose.b                   ; Close window on Esc ? */
  trp_DelZip.b                     ; Zip window on Del ? */
  trp_PubScreenFallBack.b          ; Fall back onto default public screen ? */
  trp_FontFallBack.b               ; Fall back to topaz.8 ? */

  trp_OldWidth.w                   ; Old window width */
  trp_OldHeight.w                  ; Old window height */

End NEWTYPE

; ////////////////////////////////////////////////////////////////////// */
; ///////////////////////////// Default classes, attributes and flags // */
; ////////////////////////////////////////////////////////////////////// */

; Classes */

#TROB_Button             =(#TAG_USER+305)  ; A BOOPSI button gadget */
#TROB_CheckBox           =(#TAG_USER+303)  ; A checkbox gadget */
#TROB_Cycle              =(#TAG_USER+310)  ; A cycle gadget */
#TROB_FrameBox           =(#TAG_USER+306)  ; A framing box */
#TROB_DropBox            =(#TAG_USER+312)  ; An icon drop box */
#TRGR_Horiz              =(#TAG_USER+201)  ; Horizontal group, see below for types */
#TRGR_Vert               =(#TAG_USER+202)  ; Vertical group, see below for types */
#TRGR_End                =(#TAG_USER+203)  ; End of a group */
#TROB_Line               =(#TAG_USER+301)  ; A simple line */
#TROB_Palette            =(#TAG_USER+307)  ; A palette gadget */
#TROB_Scroller           =(#TAG_USER+309)  ; A scroller gadget */
#TROB_Slider             =(#TAG_USER+308)  ; A slider gadget */
#TROB_Space              =(#TAG_USER+901)  ; The spaces class */
#TROB_String             =(#TAG_USER+311)  ; A string gadget */
#TROB_Text               =(#TAG_USER+304)  ; A line of text */
#TROB_Listview           =(#TAG_USER+313)  ; A listview gadget */
#TROB_Progress           =(#TAG_USER+314)  ; A progress indicator */
#TROB_Image              =(#TAG_USER+315)  ; An image */


; Button */
#TRBU_RETURNOK           =$00010000     ; <Return> answers the button */
#TRBU_ESCOK              =$00020000     ; <Esc> answers the button */
#TRBU_SHIFTED            =$00040000     ; Shifted shortcut only */
#TRBU_UNSHIFTED          =$00080000     ; Unshifted shortcut only */
#TRBU_YRESIZE            =$00100000     ; Button resizeable in Y direction */
#TRBT_TEXT               =0              ; Text button */
#TRBT_GETFILE            =1              ; GetFile button */
#TRBT_GETDRAWER          =2              ; GetDrawer button */
#TRBT_GETENTRY           =3              ; GetEntry button */


; Group */
#TRGR_PROPSHARE          =$00000000     ; Default: Divide objects proportionally */
#TRGR_EQUALSHARE         =$00000001     ; Divide objects equally */
#TRGR_PROPSPACES         =$00000002     ; Divide spaces proportionally */
#TRGR_ARRAY              =$00000004     ; Top-level array group */

#TRGR_ALIGN              =$00000008     ; Align resizeable objects in secondary dimension */
#TRGR_CENTER             =$00000010     ; Center unresizeable objects in secondary dimension */

#TRGR_FIXHORIZ           =$00000020     ; Don't allow horizontal resizing */
#TRGR_FIXVERT            =$00000040     ; Don't allow vertical resizing */
#TRGR_INDEP              =$00000080     ; Group is independant of surrounding array */


; Framebox */
#TRFB_GROUPING           =$00000001     ; A grouping box */
#TRFB_FRAMING            =$00000002     ; A framing box */
#TRFB_TEXT               =$00000004     ; A text container */


; Scroller */
#TRSC_Total              =(#TAG_USER+1504)
#TRSC_Visible            =(#TAG_USER+1505)


; Slider */
#TRSL_Min                =(#TAG_USER+1502)
#TRSL_Max                =(#TAG_USER+1503)


; Space */
#TRST_NONE               =1              ; No space */
#TRST_SMALL              =2              ; Small space */
#TRST_NORMAL             =3              ; Normal space (default) */
#TRST_BIG                =4              ; Big space */


; Listview */
#TRLV_Top                =(#TAG_USER+1506)
#TRLV_READONLY           =$00010000     ; A read-only list */
#TRLV_SELECT             =$00020000     ; You may select an entry */
#TRLV_SHOWSELECTED       =$00040000     ; Selected entry will be shown */
#TRLV_NOCURSORKEYS       =$00080000     ; Don't use arrow keys */
#TRLV_NONUMPADKEYS       =$00100000     ; Don't use numeric keypad keys */
#TRLV_FWFONT             =$00200000     ; Use the fixed-width font */
#TRLV_NOGAP              =$00400000     ; Don't leave a gap below the list */


; Image */
#TRIM_BOOPSI             =$00010000     ; Use a BOOPSI IClass image */


; Cycle */
#TRCY_MX                 =$00010000     ; Unfold the cycle gadget to a MX gadget */
#TRCY_RIGHTLABELS        =$00020000     ; Put the labels to the right of a MX gadget */


; ////////////////////////////////////////////////////////////////////// */
; /////////////////////////////////////////////////////////// The End // */
; ////////////////////////////////////////////////////////////////////// */
