OPTION EXPLICIT

IMPORT OSExec
IMPORT OSUtility
IMPORT OSGraphics
IMPORT OSDevices

TYPE Menu
    AS Menu PTR        NextMenu
    AS INTEGER         LeftEdge, TopEdge
    AS INTEGER         Width, Height
    AS UINTEGER        Flags
    AS STRING          MenuName
    AS MenuItem PTR    FirstItem
    AS INTEGER         JazzX, JazzY, BeatX, BeatY
END TYPE

CONST AS UINTEGER MENUENABLED = &H0001
CONST AS UINTEGER MIDRAWN     = &H0100

TYPE MenuItem
    AS MenuItem PTR    NextItem
    AS INTEGER         LeftEdge, TopEdge
    AS INTEGER         Width, Height
    AS UINTEGER        Flags
    AS LONG            MutualExclude
    AS ANY PTR         ItemFill
    AS ANY PTR         SelectFill
    AS BYTE            Command
    AS MenuItem PTR    SubItem
    AS UINTEGER        NextSelect
END TYPE

CONST AS UINTEGER CHECKIT     = &H0001
CONST AS UINTEGER ITEMTEXT    = &H0002
CONST AS UINTEGER COMMSEQ     = &H0004
CONST AS UINTEGER MENUTOGGLE  = &H0008
CONST AS UINTEGER ITEMENABLED = &H0010
CONST AS UINTEGER HIGHFLAGS   = &H00C0
CONST AS UINTEGER HIGHIMAGE   = &H0000
CONST AS UINTEGER HIGHCOMP    = &H0040
CONST AS UINTEGER HIGHBOX     = &H0080
CONST AS UINTEGER HIGHNONE    = &H00C0
CONST AS UINTEGER CHECKED     = &H0100
CONST AS UINTEGER ISDRAWN     = &H1000
CONST AS UINTEGER HIGHITEM    = &H2000
CONST AS UINTEGER MENUTOGGLED = &H4000

TYPE Requester
    AS Requester PTR    OlderRequest
    AS INTEGER          LeftEdge, TopEdge
    AS INTEGER          Width, Height
    AS INTEGER          RelLeft, RelTop
    AS Gadget PTR       ReqGadget
    AS Border PTR       ReqBorder
    AS IntuiText PTR    ReqText
    AS UINTEGER         Flags
    AS UBYTE            BackFill
    AS Layer PTR        ReqLayer
    AS UBYTE            ReqPad1(31)
    AS BitMap PTR       ImageBMap
    AS Window PTR       RWindow
    AS Image PTR        ReqImage
    AS UBYTE            ReqPad2(31)
END TYPE

CONST AS UINTEGER POINTREL      = &H0001
CONST AS UINTEGER PREDRAWN      = &H0002
CONST AS UINTEGER NOISYREQ      = &H0004
CONST AS UINTEGER SIMPLEREQ     = &H0010
CONST AS UINTEGER USEREQIMAGE   = &H0020
CONST AS UINTEGER NOREQBACKFILL = &H0040
CONST AS UINTEGER REQOFFWINDOW  = &H1000
CONST AS UINTEGER REQACTIVE     = &H2000
CONST AS UINTEGER SYSREQUEST    = &H4000
CONST AS UINTEGER DEFERREFRESH  = &H8000

TYPE Gadget
    AS Gadget PTR    NextGadget
    AS INTEGER     LeftEdge, TopEdge
    AS INTEGER     Width, Height
    AS UINTEGER     Flags
    AS UINTEGER     Activation
    AS UINTEGER     GadgetType
    AS ANY PTR      GadgetRender
    AS ANY PTR      SelectRender
    AS IntuiText PTR    GadgetText
    AS LONG     MutualExclude
    AS ANY PTR      SpecialInfo
    AS UINTEGER     GadgetID
    AS ANY PTR      UserData
END TYPE

TYPE ExtGadget
    AS ExtGadget PTR    NextGadget
    AS INTEGER          LeftEdge, TopEdge
    AS INTEGER          Width, Height
    AS UINTEGER         Flags
    AS UINTEGER         Activation
    AS UINTEGER         GadgetType
    AS ANY PTR          GadgetRender
    AS ANY PTR          SelectRender
    AS IntuiText PTR    GadgetText
    AS LONG             MutualExclude
    AS ANY PTR          SpecialInfo
    AS UINTEGER         GadgetID
    AS ANY PTR          UserData
    AS ULONG            MoreFlags
    AS INTEGER          BoundsLeftEdge
    AS INTEGER          BoundsTopEdge
    AS INTEGER          BoundsWidth
    AS INTEGER          BoundsHeight
END TYPE

CONST AS UINTEGER GFLG_GADGHIGHBITS = &H0003
CONST AS UINTEGER GFLG_GADGHCOMP    = &H0000
CONST AS UINTEGER GFLG_GADGHBOX     = &H0001
CONST AS UINTEGER GFLG_GADGHIMAGE   = &H0002
CONST AS UINTEGER GFLG_GADGHNONE    = &H0003
CONST AS UINTEGER GFLG_GADGIMAGE    = &H0004
CONST AS UINTEGER GFLG_RELBOTTOM    = &H0008
CONST AS UINTEGER GFLG_RELRIGHT     = &H0010
CONST AS UINTEGER GFLG_RELWIDTH     = &H0020
CONST AS UINTEGER GFLG_RELHEIGHT    = &H0040
CONST AS UINTEGER GFLG_RELSPECIAL   = &H4000
CONST AS UINTEGER GFLG_SELECTED     = &H0080
CONST AS UINTEGER GFLG_DISABLED     = &H0100
CONST AS UINTEGER GFLG_LABELMASK    = &H3000
CONST AS UINTEGER GFLG_LABELITEXT   = &H0000
CONST AS UINTEGER GFLG_LABELSTRING  = &H1000
CONST AS UINTEGER GFLG_LABELIMAGE   = &H2000
CONST AS UINTEGER GFLG_TABCYCLE     = &H0200
CONST AS UINTEGER GFLG_STRINGEXTEND = &H0400
CONST AS UINTEGER GFLG_IMAGEDISABLE = &H0800
CONST AS UINTEGER GFLG_EXTENDED     = &H8000

CONST AS UINTEGER GACT_RELVERIFY    = &H0001
CONST AS UINTEGER GACT_IMMEDIATE    = &H0002
CONST AS UINTEGER GACT_ENDGADGET    = &H0004
CONST AS UINTEGER GACT_FOLLOWMOUSE  = &H0008
CONST AS UINTEGER GACT_RIGHTBORDER  = &H0010
CONST AS UINTEGER GACT_LEFTBORDER   = &H0020
CONST AS UINTEGER GACT_TOPBORDER    = &H0040
CONST AS UINTEGER GACT_BOTTOMBORDER = &H0080
CONST AS UINTEGER GACT_BORDERSNIFF  = &H8000
CONST AS UINTEGER GACT_TOGGLESELECT = &H0100
CONST AS UINTEGER GACT_BOOLEXTEND   = &H2000
CONST AS UINTEGER GACT_STRINGLEFT   = &H0000
CONST AS UINTEGER GACT_STRINGCENTER = &H0200
CONST AS UINTEGER GACT_STRINGRIGHT  = &H0400
CONST AS UINTEGER GACT_LONGINT      = &H0800
CONST AS UINTEGER GACT_ALTKEYMAP    = &H1000
CONST AS UINTEGER GACT_STRINGEXTEND = &H2000
CONST AS UINTEGER GACT_ACTIVEGADGET = &H4000

CONST AS UINTEGER GTYP_GADGETTYPE   = &HFC00
CONST AS UINTEGER GTYP_SCRGADGET    = &H4000
CONST AS UINTEGER GTYP_GZZGADGET    = &H2000
CONST AS UINTEGER GTYP_REQGADGET    = &H1000
CONST AS UINTEGER GTYP_SYSGADGET    = &H8000
CONST AS UINTEGER GTYP_SYSTYPEMASK  = &H00F0
CONST AS UINTEGER GTYP_SIZING       = &H0010
CONST AS UINTEGER GTYP_WDRAGGING    = &H0020
CONST AS UINTEGER GTYP_SDRAGGING    = &H0030
CONST AS UINTEGER GTYP_WDEPTH       = &H0040
CONST AS UINTEGER GTYP_SDEPTH       = &H0050
CONST AS UINTEGER GTYP_WZOOM        = &H0060
CONST AS UINTEGER GTYP_SUNUSED      = &H0070
CONST AS UINTEGER GTYP_CLOSE        = &H0080

CONST AS UINTEGER GTYP_GTYPEMASK    = &H0007
CONST AS UINTEGER GTYP_BOOLGADGET   = &H0001
CONST AS UINTEGER GTYP_GADGET0002   = &H0002
CONST AS UINTEGER GTYP_PROPGADGET   = &H0003
CONST AS UINTEGER GTYP_STRGADGET    = &H0004
CONST AS UINTEGER GTYP_CUSTOMGADGET = &H0005

CONST AS ULONG GMORE_BOUNDS         = &H00000001
CONST AS ULONG GMORE_GADGETHELP     = &H00000002
CONST AS ULONG GMORE_SCROLLRASTER   = &H00000004

TYPE BoolInfo
    AS UINTEGER     Flags
    AS UINTEGER PTR    Mask
    AS ULONG     Reserved
END TYPE

CONST AS UINTEGER BOOLMASK          = &H0001

TYPE PropInfo
    AS UINTEGER     Flags
    AS UINTEGER     HorizPot
    AS UINTEGER     VertPot
    AS UINTEGER     HorizBody
    AS UINTEGER     VertBody
    AS UINTEGER     CWidth
    AS UINTEGER     CHeight
    AS UINTEGER     HPotRes, VPotRes
    AS UINTEGER     LeftBorder
    AS UINTEGER     TopBorder
END TYPE

CONST AS UINTEGER AUTOKNOB       = &H0001
CONST AS UINTEGER FREEHORIZ      = &H0002
CONST AS UINTEGER FREEVERT       = &H0004
CONST AS UINTEGER PROPBORDERLESS = &H0008
CONST AS UINTEGER KNOBHIT        = &H0100
CONST AS UINTEGER PROPNEWLOOK    = &H0010
CONST AS UINTEGER KNOBHMIN       = 6
CONST AS UINTEGER KNOBVMIN       = 4
CONST AS UINTEGER MAXBODY        = &HFFFF
CONST AS UINTEGER MAXPOT         = &HFFFF

TYPE IBox
    AS INTEGER     Left
    AS INTEGER     Top
    AS INTEGER     Width
    AS INTEGER     Height
END TYPE

const AS INTEGER DRI_VERSION     = 2

TYPE DrawInfo
    AS UINTEGER     dri_Version
    AS UINTEGER     dri_NumPens
    AS UINTEGER PTR    dri_Pens
    AS TextFont PTR    dri_Font
    AS UINTEGER     dri_Depth
    AS UINTEGER     X
    AS UINTEGER     Y
    AS ULONG     dri_Flags
    AS Image PTR    dri_CheckMark
    AS Image PTR    dri_AmigaKey
    AS ULONG     dri_Reserved(4)
END TYPE

CONST AS ULONG DRIF_NEWLOOK         = &H00000001
CONST AS UINTEGER DETAILPEN         = &H0000
CONST AS UINTEGER BLOCKPEN          = &H0001
CONST AS UINTEGER TEXTPEN           = &H0002
CONST AS UINTEGER SHINEPEN          = &H0003
CONST AS UINTEGER SHADOWPEN         = &H0004
CONST AS UINTEGER FILLPEN           = &H0005
CONST AS UINTEGER FILLTEXTPEN       = &H0006
CONST AS UINTEGER BACKGROUNDPEN     = &H0007
CONST AS UINTEGER HIGHLIGHTTEXTPEN  = &H0008
CONST AS UINTEGER BARDETAILPEN      = &H0009
CONST AS UINTEGER BARBLOCKPEN       = &H000A
CONST AS UINTEGER BARTRIMPEN        = &H000B
CONST AS UINTEGER NUMDRIPENS        = &H000C
CONST AS UINTEGER PEN_C3            = &HFEFC
CONST AS UINTEGER PEN_C2            = &HFEFD
CONST AS UINTEGER PEN_C1            = &HFEFE
CONST AS UINTEGER PEN_C0            = &HFEFF

TYPE GadgetInfo
    AS Screen PTR    gi_Screen
    AS Window PTR    gi_Window
    AS Requester PTR    gi_Requester
    AS RastPort PTR    gi_RastPort
    AS Layer PTR    gi_Layer
    AS IBox     gi_Domain
    AS UBYTE     DetailPen
    AS UBYTE     BlockPen
    AS DrawInfo PTR    gi_DrInfo
    AS ULONG     gi_Reserved(5)
END TYPE

TYPE PGX
    AS IBox     pgx_Container
    AS IBox     pgx_NewKnob
END TYPE

TYPE StringExtend
    AS TextFont PTR    Font
    AS UBYTE     Pens(1)
    AS UBYTE     ActivePens(1)
    AS ULONG     InitialModes
    AS Hook PTR    EditHook
    AS UBYTE PTR    WorkBuffer
    AS ULONG     Reserved(3)
END TYPE

TYPE SGWork
    AS Gadget PTR    Gadget
    AS StringInfo PTR    StringInfo
    AS UBYTE PTR    WorkBuffer
    AS UBYTE PTR    PrevBuffer
    AS ULONG     Modes
    AS InputEvent PTR    IEvent
    AS UINTEGER     Code
    AS INTEGER     BufferPos
    AS INTEGER     NumChars
    AS ULONG     Actions
    AS LONG     LongInt
    AS GadgetInfo PTR    GadgetInfo
    AS UINTEGER     EditOp
END TYPE

CONST AS ULONG EO_NOOP          = &H0001
CONST AS ULONG EO_DELBACKWARD   = &H0002
CONST AS ULONG EO_DELFORWARD    = &H0003
CONST AS ULONG EO_MOVECURSOR    = &H0004
CONST AS ULONG EO_ENTER         = &H0005
CONST AS ULONG EO_RESET         = &H0006
CONST AS ULONG EO_REPLACECHAR   = &H0007
CONST AS ULONG EO_INSERTCHAR    = &H0008
CONST AS ULONG EO_BADFORMAT     = &H0009
CONST AS ULONG EO_BIGCHANGE     = &H000A
CONST AS ULONG EO_UNDO          = &H000B
CONST AS ULONG EO_CLEAR         = &H000C
CONST AS ULONG EO_SPECIAL       = &H000D
CONST AS ULONG SGM_REPLACE      = 1 SHL  0
CONST AS ULONG SGM_FIXEDFIELD   = 1 SHL  1
CONST AS ULONG SGM_NOFILTER     = 1 SHL  2
CONST AS ULONG SGM_EXITHELP     = 1 SHL  7
CONST AS ULONG SGM_NOCHANGE     = 1 SHL  3
CONST AS ULONG SGM_NOWORKB      = 1 SHL  4
CONST AS ULONG SGM_CONTROL      = 1 SHL  5
CONST AS ULONG SGM_LONGINT      = 1 SHL  6
CONST AS ULONG SGA_USE          = &H1
CONST AS ULONG SGA_END          = &H2
CONST AS ULONG SGA_BEEP         = &H4
CONST AS ULONG SGA_REUSE        = &H8
CONST AS ULONG SGA_REDISPLAY    = &H10
CONST AS ULONG SGA_NEXTACTIVE   = &H20
CONST AS ULONG SGA_PREVACTIVE   = &H40
CONST AS ULONG SGH_KEY          = 1
CONST AS ULONG SGH_CLICK        = 2

TYPE StringInfo
    AS UBYTE PTR    Buffer
    AS UBYTE PTR    UndoBuffer
    AS INTEGER     BufferPos
    AS INTEGER     MaxChars
    AS INTEGER     DispPos
    AS INTEGER     UndoPos
    AS INTEGER     NumChars
    AS INTEGER     DispCount
    AS INTEGER     CLeft, CTop
    AS StringExtend PTR    Extension
    AS LONG     LongInt
    AS KeyMap PTR    AltKeyMap
END TYPE

TYPE IntuiText
    AS UBYTE     FrontPen, BackPen
    AS UBYTE     DrawMode
    AS INTEGER     LeftEdge
    AS INTEGER     TopEdge
    AS TextAttr PTR    ITextFont
    AS UBYTE PTR    IText
    AS IntuiText PTR    NextText
END TYPE

TYPE Border
    AS INTEGER     LeftEdge, TopEdge
    AS UBYTE     FrontPen, BackPen
    AS UBYTE     DrawMode
    AS BYTE     Count
    AS INTEGER PTR    XY
    AS Border PTR    NextBorder
END TYPE

TYPE Image
    AS INTEGER     LeftEdge
    AS INTEGER     TopEdge
    AS INTEGER     Width
    AS INTEGER     Height
    AS INTEGER     Depth
    AS UINTEGER PTR    ImageData
    AS UBYTE     PlanePick, PlaneOnOff
    AS Image PTR    NextImage
END TYPE

TYPE IntuiMessage
    AS Message     ExecMessage
    AS ULONG     Class
    AS UINTEGER     Code
    AS UINTEGER     Qualifier
    AS ANY PTR      IAddress
    AS INTEGER     MouseX, MouseY
    AS ULONG     Seconds, Micros
    AS Window PTR    IDCMPWindow
    AS IntuiMessage PTR    SpecialLink
END TYPE

TYPE ExtIntuiMessage
    AS IntuiMessage     eim_IntuiMessage
    AS TabletData PTR    eim_TabletData
END TYPE

CONST AS ULONG IDCMP_SIZEVERIFY          = &H00000001
CONST AS ULONG IDCMP_NEWSIZE             = &H00000002
CONST AS ULONG IDCMP_REFRESHWINDOW       = &H00000004
CONST AS ULONG IDCMP_MOUSEBUTTONS        = &H00000008
CONST AS ULONG IDCMP_MOUSEMOVE           = &H00000010
CONST AS ULONG IDCMP_GADGETDOWN          = &H00000020
CONST AS ULONG IDCMP_GADGETUP            = &H00000040
CONST AS ULONG IDCMP_REQSET              = &H00000080
CONST AS ULONG IDCMP_MENUPICK            = &H00000100
CONST AS ULONG IDCMP_CLOSEWINDOW         = &H00000200
CONST AS ULONG IDCMP_RAWKEY              = &H00000400
CONST AS ULONG IDCMP_REQVERIFY           = &H00000800
CONST AS ULONG IDCMP_REQCLEAR            = &H00001000
CONST AS ULONG IDCMP_MENUVERIFY          = &H00002000
CONST AS ULONG IDCMP_NEWPREFS            = &H00004000
CONST AS ULONG IDCMP_DISKINSERTED        = &H00008000
CONST AS ULONG IDCMP_DISKREMOVED         = &H00010000
CONST AS ULONG IDCMP_WBENCHMESSAGE       = &H00020000
CONST AS ULONG IDCMP_ACTIVEWINDOW        = &H00040000
CONST AS ULONG IDCMP_INACTIVEWINDOW      = &H00080000
CONST AS ULONG IDCMP_DELTAMOVE           = &H00100000
CONST AS ULONG IDCMP_VANILLAKEY          = &H00200000
CONST AS ULONG IDCMP_INTUITICKS          = &H00400000
CONST AS ULONG IDCMP_IDCMPUPDATE         = &H00800000
CONST AS ULONG IDCMP_MENUHELP            = &H01000000
CONST AS ULONG IDCMP_CHANGEWINDOW        = &H02000000
CONST AS ULONG IDCMP_GADGETHELP          = &H04000000
CONST AS ULONG IDCMP_LONELYMESSAGE       = &H80000000

CONST AS UINTEGER CWCODE_MOVESIZE        = &H0000
CONST AS UINTEGER CWCODE_DEPTH           = &H0001
CONST AS UINTEGER MENUHOT                = &H0001
CONST AS UINTEGER MENUCANCEL             = &H0002
CONST AS UINTEGER MENUWAITING            = &H0003
CONST AS UINTEGER OKOK                   = MENUHOT
CONST AS UINTEGER OKABORT                = &H0004
CONST AS UINTEGER OKCANCEL               = MENUCANCEL
CONST AS UINTEGER WBENCHOPEN             = &H0001
CONST AS UINTEGER WBENCHCLOSE            = &H0002

TYPE Screen
    AS Screen PTR    NextScreen
    AS Window PTR    FirstWindow
    AS INTEGER     LeftEdge, TopEdge
    AS INTEGER     Width, Height
    AS INTEGER     MouseY, MouseX
    AS UINTEGER     Flags
    AS UBYTE PTR    Title
    AS UBYTE PTR    DefaultTitle
    AS BYTE     BarHeight, BarVBorder, BarHBorder, MenuVBorder, MenuHBorder
    AS BYTE     WBorTop, WBorLeft, WBorRight, WBorBottom
    AS TextAttr PTR    Font
    AS ViewPort     ViewPort
    AS RastPort     RastPort
    AS BitMap     BitMap
    AS Layer_Info     LayerInfo
    AS Gadget PTR    FirstGadget
    AS UBYTE     DetailPen, BlockPen
    AS UINTEGER     SaveColor0
    AS Layer PTR    BarLayer
    AS UBYTE PTR    ExtData
    AS UBYTE PTR    UserData
END TYPE

CONST AS UINTEGER SCREENTYPE       = &H000F
CONST AS UINTEGER WBENCHSCREEN     = &H0001
CONST AS UINTEGER PUBLICSCREEN     = &H0002
CONST AS UINTEGER CUSTOMSCREEN     = &H000F
CONST AS UINTEGER SHOWTITLE        = &H0010
CONST AS UINTEGER BEEPING          = &H0020
CONST AS UINTEGER CUSTOMBITMAP     = &H0040
CONST AS UINTEGER SCREENBEHIND     = &H0080
CONST AS UINTEGER SCREENQUIET      = &H0100
CONST AS UINTEGER SCREENHIRES      = &H0200
CONST AS UINTEGER NS_EXTENDED      = &H1000
CONST AS UINTEGER AUTOSCROLL       = &H4000
CONST AS UINTEGER PENSHARED        = &H0400

CONST AS INTEGER STDSCREENHEIGHT   = -1
CONST AS INTEGER STDSCREENWIDTH    = -1

CONST AS ULONG SA_Dummy            = TAG_USER + 32
CONST AS ULONG SA_Left             = SA_Dummy + &H0001
CONST AS ULONG SA_Top              = SA_Dummy + &H0002
CONST AS ULONG SA_Width            = SA_Dummy + &H0003
CONST AS ULONG SA_Height           = SA_Dummy + &H0004
CONST AS ULONG SA_Depth            = SA_Dummy + &H0005
CONST AS ULONG SA_DetailPen        = SA_Dummy + &H0006
CONST AS ULONG SA_BlockPen         = SA_Dummy + &H0007
CONST AS ULONG SA_Title            = SA_Dummy + &H0008
CONST AS ULONG SA_Colors           = SA_Dummy + &H0009
CONST AS ULONG SA_ErrorCode        = SA_Dummy + &H000A
CONST AS ULONG SA_Font             = SA_Dummy + &H000B
CONST AS ULONG SA_SysFont          = SA_Dummy + &H000C
CONST AS ULONG SA_Type             = SA_Dummy + &H000D
CONST AS ULONG SA_BitMap           = SA_Dummy + &H000E
CONST AS ULONG SA_PubName          = SA_Dummy + &H000F
CONST AS ULONG SA_PubSig           = SA_Dummy + &H0010
CONST AS ULONG SA_PubTask          = SA_Dummy + &H0011
CONST AS ULONG SA_DisplayID        = SA_Dummy + &H0012
CONST AS ULONG SA_DClip            = SA_Dummy + &H0013
CONST AS ULONG SA_Overscan         = SA_Dummy + &H0014
CONST AS ULONG SA_Obsolete1        = SA_Dummy + &H0015
CONST AS ULONG SA_ShowTitle        = SA_Dummy + &H0016
CONST AS ULONG SA_Behind           = SA_Dummy + &H0017
CONST AS ULONG SA_Quiet            = SA_Dummy + &H0018
CONST AS ULONG SA_AutoScroll       = SA_Dummy + &H0019
CONST AS ULONG SA_Pens             = SA_Dummy + &H001A
CONST AS ULONG SA_FullPalette      = SA_Dummy + &H001B
CONST AS ULONG SA_ColorMapEntries  = SA_Dummy + &H001C
CONST AS ULONG SA_Parent           = SA_Dummy + &H001D
CONST AS ULONG SA_Draggable        = SA_Dummy + &H001E
CONST AS ULONG SA_Exclusive        = SA_Dummy + &H001F
CONST AS ULONG SA_SharePens        = SA_Dummy + &H0020
CONST AS ULONG SA_BackFill         = SA_Dummy + &H0021
CONST AS ULONG SA_Interleaved      = SA_Dummy + &H0022
CONST AS ULONG SA_Colors32         = SA_Dummy + &H0023
CONST AS ULONG SA_VideoControl     = SA_Dummy + &H0024
CONST AS ULONG SA_FrontChild       = SA_Dummy + &H0025
CONST AS ULONG SA_BackChild        = SA_Dummy + &H0026
CONST AS ULONG SA_LikeWorkbench    = SA_Dummy + &H0027
CONST AS ULONG SA_Reserved         = SA_Dummy + &H0028
CONST AS ULONG SA_MinimizeISG      = SA_Dummy + &H0029
CONST AS ULONG NSTAG_EXT_VPMODE    = TAG_USER OR 1

CONST AS BYTE OSERR_NOMONITOR      = 1
CONST AS BYTE OSERR_NOCHIPS        = 2
CONST AS BYTE OSERR_NOMEM          = 3
CONST AS BYTE OSERR_NOCHIPMEM      = 4
CONST AS BYTE OSERR_PUBNOTUNIQUE   = 5
CONST AS BYTE OSERR_UNKNOWNMODE    = 6
CONST AS BYTE OSERR_TOODEEP        = 7
CONST AS BYTE OSERR_ATTACHFAIL     = 8
CONST AS BYTE OSERR_NOTAVAILABLE   = 9

TYPE NewScreen
    AS INTEGER     LeftEdge, TopEdge, Width, Height, Depth
    AS UBYTE     DetailPen, BlockPen
    AS UINTEGER     ViewModes
    AS UINTEGER     Type
    AS TextAttr PTR    Font
    AS UBYTE PTR    DefaultTitle
    AS Gadget PTR    Gadgets
    AS BitMap PTR    CustomBitMap
END TYPE

TYPE ExtNewScreen
    AS INTEGER     LeftEdge, TopEdge, Width, Height, Depth
    AS UBYTE     DetailPen, BlockPen
    AS UINTEGER     ViewModes
    AS UINTEGER     Type
    AS TextAttr PTR    Font
    AS UBYTE PTR    DefaultTitle
    AS Gadget PTR    Gadgets
    AS BitMap PTR    CustomBitMap
    AS TagItem PTR    Extension
END TYPE

CONST AS BYTE OSCAN_TEXT       = 1
CONST AS BYTE OSCAN_STANDARD   = 2
CONST AS BYTE OSCAN_MAX        = 3
CONST AS BYTE OSCAN_VIDEO      = 4

TYPE PubScreenNode
    AS Node     psn_Node
    AS Screen PTR    psn_Screen
    AS UINTEGER     psn_Flags
    AS INTEGER     psn_Size
    AS INTEGER     psn_VisitorCount
    AS Task PTR    psn_SigTask
    AS UBYTE     psn_SigBit
END TYPE

CONST AS UINTEGER PSNF_PRIVATE     = &H0001
CONST AS UINTEGER MAXPUBSCREENNAME = 139
CONST AS UINTEGER SHANGHAI         = &H0001
CONST AS UINTEGER POPPUBSCREEN     = &H0002

CONST AS BYTE SDEPTH_TOFRONT       = 0
CONST AS BYTE SDEPTH_TOBACK        = 1
CONST AS BYTE SDEPTH_INFAMILY      = 2
CONST AS BYTE SDEPTH_CHILDONLY     = SDEPTH_INFAMILY
CONST AS BYTE SPOS_RELATIVE        = 0
CONST AS BYTE SPOS_ABSOLUTE        = 1
CONST AS BYTE SPOS_MAKEVISIBLE     = 2
CONST AS BYTE SPOS_FORCEDRAG       = 4

TYPE ScreenBuffer
    AS BitMap PTR      sb_BitMap
    AS DBufInfo PTR    sb_DBufInfo
END TYPE

CONST AS BYTE SB_SCREEN_BITMAP = 1
CONST AS BYTE SB_COPY_BITMAP   = 2

TYPE Window
    AS Window PTR        NextWindow
    AS INTEGER           LeftEdge, TopEdge
    AS INTEGER           Width, Height
    AS INTEGER           MouseY, MouseX
    AS INTEGER           MinWidth, MinHeight
    AS UINTEGER          MaxWidth, MaxHeight
    AS ULONG             Flags
    AS Menu PTR          MenuStrip
    AS UBYTE PTR         Title
    AS Requester PTR     FirstRequest
    AS Requester PTR     DMRequest
    AS INTEGER           ReqCount
    AS Screen PTR        WScreen
    AS RastPort PTR      RPort
    AS BYTE              BorderLeft, BorderTop, BorderRight, BorderBottom
    AS RastPort PTR      BorderRPort
    AS Gadget PTR        FirstGadget
    AS Window PTR        Parent, Descendant
    AS UINTEGER PTR      Pointer
    AS BYTE              PtrHeight
    AS BYTE              PtrWidth
    AS BYTE              XOffset, YOffset
    AS ULONG             IDCMPFlags
    AS MsgPort PTR       UserPort, WindowPort
    AS IntuiMessage PTR  MessageKey
    AS UBYTE             DetailPen, BlockPen
    AS Image PTR         CheckMark
    AS UBYTE PTR         ScreenTitle
    AS INTEGER           GZZMouseX
    AS INTEGER           GZZMouseY
    AS INTEGER           GZZWidth
    AS INTEGER           GZZHeight
    AS UBYTE PTR         ExtData
    AS BYTE PTR          UserData
    AS Layer PTR         WLayer
    AS TextFont PTR      IFont
    AS ULONG             MoreFlags
END TYPE

CONST AS ULONG WFLG_SIZEGADGET       = &H00000001
CONST AS ULONG WFLG_DRAGBAR          = &H00000002
CONST AS ULONG WFLG_DEPTHGADGET      = &H00000004
CONST AS ULONG WFLG_CLOSEGADGET      = &H00000008
CONST AS ULONG WFLG_SIZEBRIGHT       = &H00000010
CONST AS ULONG WFLG_SIZEBBOTTOM      = &H00000020
CONST AS ULONG WFLG_REFRESHBITS      = &H000000C0
CONST AS ULONG WFLG_SMART_REFRESH    = &H00000000
CONST AS ULONG WFLG_SIMPLE_REFRESH   = &H00000040
CONST AS ULONG WFLG_SUPER_BITMAP     = &H00000080
CONST AS ULONG WFLG_OTHER_REFRESH    = &H000000C0
CONST AS ULONG WFLG_BACKDROP         = &H00000100
CONST AS ULONG WFLG_REPORTMOUSE      = &H00000200
CONST AS ULONG WFLG_GIMMEZEROZERO    = &H00000400
CONST AS ULONG WFLG_BORDERLESS       = &H00000800
CONST AS ULONG WFLG_ACTIVATE         = &H00001000
CONST AS ULONG WFLG_RMBTRAP          = &H00010000
CONST AS ULONG WFLG_NOCAREREFRESH    = &H00020000
CONST AS ULONG WFLG_NW_EXTENDED      = &H00040000
CONST AS ULONG WFLG_NEWLOOKMENUS     = &H00200000
CONST AS ULONG WFLG_WINDOWACTIVE     = &H00002000
CONST AS ULONG WFLG_INREQUEST        = &H00004000
CONST AS ULONG WFLG_MENUSTATE        = &H00008000
CONST AS ULONG WFLG_WINDOWREFRESH    = &H01000000
CONST AS ULONG WFLG_WBENCHWINDOW     = &H02000000
CONST AS ULONG WFLG_WINDOWTICKED     = &H04000000
CONST AS ULONG WFLG_VISITOR          = &H08000000
CONST AS ULONG WFLG_ZOOMED           = &H10000000
CONST AS ULONG WFLG_HASZOOM          = &H20000000

TYPE NewWindow
    AS INTEGER     LeftEdge, TopEdge
    AS INTEGER     Width, Height
    AS UBYTE       DetailPen, BlockPen
    AS ULONG       IDCMPFlags
    AS ULONG       Flags
    AS Gadget PTR  FirstGadget
    AS Image PTR   CheckMark
    AS UBYTE PTR   Title
    AS Screen PTR  Screen
    AS BitMap PTR  BitMap
    AS INTEGER     MinWidth, MinHeight
    AS UINTEGER    MaxWidth, MaxHeight
    AS UINTEGER    Type
END TYPE

TYPE ExtNewWindow
    AS INTEGER      LeftEdge, TopEdge
    AS INTEGER      Width, Height
    AS UBYTE        DetailPen, BlockPen
    AS ULONG        IDCMPFlags
    AS ULONG        Flags
    AS Gadget PTR   FirstGadget
    AS Image PTR    CheckMark
    AS UBYTE PTR    Title
    AS Screen PTR   Screen
    AS BitMap PTR   BitMap
    AS INTEGER      MinWidth, MinHeight
    AS UINTEGER     MaxWidth, MaxHeight
    AS UINTEGER     Type
    AS TagItem PTR  Extension
END TYPE

CONST AS ULONG WA_Dummy               = TAG_USER + 99
CONST AS ULONG WA_Left                = WA_Dummy + &H01
CONST AS ULONG WA_Top                 = WA_Dummy + &H02
CONST AS ULONG WA_Width               = WA_Dummy + &H03
CONST AS ULONG WA_Height              = WA_Dummy + &H04
CONST AS ULONG WA_DetailPen           = WA_Dummy + &H05
CONST AS ULONG WA_BlockPen            = WA_Dummy + &H06
CONST AS ULONG WA_IDCMP               = WA_Dummy + &H07
CONST AS ULONG WA_Flags               = WA_Dummy + &H08
CONST AS ULONG WA_Gadgets             = WA_Dummy + &H09
CONST AS ULONG WA_Checkmark           = WA_Dummy + &H0A
CONST AS ULONG WA_Title               = WA_Dummy + &H0B
CONST AS ULONG WA_ScreenTitle         = WA_Dummy + &H0C
CONST AS ULONG WA_CustomScreen        = WA_Dummy + &H0D
CONST AS ULONG WA_SuperBitMap         = WA_Dummy + &H0E
CONST AS ULONG WA_MinWidth            = WA_Dummy + &H0F
CONST AS ULONG WA_MinHeight           = WA_Dummy + &H10
CONST AS ULONG WA_MaxWidth            = WA_Dummy + &H11
CONST AS ULONG WA_MaxHeight           = WA_Dummy + &H12
CONST AS ULONG WA_InnerWidth          = WA_Dummy + &H13
CONST AS ULONG WA_InnerHeight         = WA_Dummy + &H14
CONST AS ULONG WA_PubScreenName       = WA_Dummy + &H15
CONST AS ULONG WA_PubScreen           = WA_Dummy + &H16
CONST AS ULONG WA_PubScreenFallBack   = WA_Dummy + &H17
CONST AS ULONG WA_WindowName          = WA_Dummy + &H18
CONST AS ULONG WA_Colors              = WA_Dummy + &H19
CONST AS ULONG WA_Zoom                = WA_Dummy + &H1A
CONST AS ULONG WA_MouseQueue          = WA_Dummy + &H1B
CONST AS ULONG WA_BackFill            = WA_Dummy + &H1C
CONST AS ULONG WA_RptQueue            = WA_Dummy + &H1D
CONST AS ULONG WA_SizeGadget          = WA_Dummy + &H1E
CONST AS ULONG WA_DragBar             = WA_Dummy + &H1F
CONST AS ULONG WA_DepthGadget         = WA_Dummy + &H20
CONST AS ULONG WA_CloseGadget         = WA_Dummy + &H21
CONST AS ULONG WA_Backdrop            = WA_Dummy + &H22
CONST AS ULONG WA_ReportMouse         = WA_Dummy + &H23
CONST AS ULONG WA_NoCareRefresh       = WA_Dummy + &H24
CONST AS ULONG WA_Borderless          = WA_Dummy + &H25
CONST AS ULONG WA_Activate            = WA_Dummy + &H26
CONST AS ULONG WA_RMBTrap             = WA_Dummy + &H27
CONST AS ULONG WA_WBenchWindow        = WA_Dummy + &H28
CONST AS ULONG WA_SimpleRefresh       = WA_Dummy + &H29
CONST AS ULONG WA_SmartRefresh        = WA_Dummy + &H2A
CONST AS ULONG WA_SizeBRight          = WA_Dummy + &H2B
CONST AS ULONG WA_SizeBBottom         = WA_Dummy + &H2C
CONST AS ULONG WA_AutoAdjust          = WA_Dummy + &H2D
CONST AS ULONG WA_GimmeZeroZero       = WA_Dummy + &H2E
CONST AS ULONG WA_MenuHelp            = WA_Dummy + &H2F
CONST AS ULONG WA_NewLookMenus        = WA_Dummy + &H30
CONST AS ULONG WA_AmigaKey            = WA_Dummy + &H31
CONST AS ULONG WA_NotifyDepth         = WA_Dummy + &H32
CONST AS ULONG WA_Pointer             = WA_Dummy + &H34
CONST AS ULONG WA_BusyPointer         = WA_Dummy + &H35
CONST AS ULONG WA_PointerDelay        = WA_Dummy + &H36
CONST AS ULONG WA_TabletMessages      = WA_Dummy + &H37
CONST AS ULONG WA_HelpGroup           = WA_Dummy + &H38
CONST AS ULONG WA_HelpGroupWindow     = WA_Dummy + &H39

CONST AS ULONG HC_GADGETHELP          = 1

TYPE Remember
    AS Remember PTR    NextRemember
    AS ULONG     RememberSize
    AS UBYTE PTR    Memory
END TYPE

TYPE ColorSpec
    AS INTEGER     ColorIndex
    AS UINTEGER     Red
    AS UINTEGER     Green
    AS UINTEGER     Blue
END TYPE

TYPE EasyStruct
    AS ULONG     es_StructSize
    AS ULONG     es_Flags
    AS UBYTE PTR    es_Title
    AS UBYTE PTR    es_TextFormat
    AS UBYTE PTR    es_GadgetFormat
END TYPE

CONST AS UINTEGER NOMENU        = &H001F
CONST AS UINTEGER NOITEM        = &H003F
CONST AS UINTEGER NOSUB         = &H001F
CONST AS UINTEGER MENUNULL      = &HFFFF

CONST AS UINTEGER CHECKWIDTH    = 19
CONST AS UINTEGER COMMWIDTH     = 27
CONST AS UINTEGER LOWCHECKWIDTH = 13
CONST AS UINTEGER LOWCOMMWIDTH  = 16

CONST AS ULONG ALERT_TYPE       = &H80000000
CONST AS ULONG RECOVERY_ALERT   = &H00000000
CONST AS ULONG DEADEND_ALERT    = &H80000000

CONST AS UINTEGER AUTOFRONTPEN  = 0
CONST AS UINTEGER AUTOBACKPEN   = 1
CONST AS UINTEGER AUTODRAWMODE  = JAM2
CONST AS UINTEGER AUTOLEFTEDGE  = 6
CONST AS UINTEGER AUTOTOPEDGE   = 3

CONST AS ANY PTR  AUTOITEXTFONT = NULL
CONST AS ANY PTR  AUTONEXTTEXT  = NULL

CONST AS UINTEGER SELECTUP       = IECODE_LBUTTON  OR  IECODE_UP_PREFIX
CONST AS UINTEGER SELECTDOWN     = IECODE_LBUTTON
CONST AS UINTEGER MENUUP         = IECODE_RBUTTON  OR  IECODE_UP_PREFIX
CONST AS UINTEGER MENUDOWN       = IECODE_RBUTTON
CONST AS UINTEGER MIDDLEUP       = IECODE_MBUTTON  OR  IECODE_UP_PREFIX
CONST AS UINTEGER MIDDLEDOWN     = IECODE_MBUTTON
CONST AS UINTEGER ALTLEFT        = IEQUALIFIER_LALT
CONST AS UINTEGER ALTRIGHT       = IEQUALIFIER_RALT
CONST AS UINTEGER AMIGALEFT      = IEQUALIFIER_LCOMMAND
CONST AS UINTEGER AMIGARIGHT     = IEQUALIFIER_RCOMMAND
CONST AS UINTEGER AMIGAKEYS      = AMIGALEFT  OR  AMIGARIGHT

CONST AS UBYTE CURSORUP          = &H4C
CONST AS UBYTE CURSORLEFT        = &H4F
CONST AS UBYTE CURSORRIGHT       = &H4E
CONST AS UBYTE CURSORDOWN        = &H4D
CONST AS UBYTE KEYCODE_Q         = &H10
CONST AS UBYTE KEYCODE_Z         = &H31
CONST AS UBYTE KEYCODE_X         = &H32
CONST AS UBYTE KEYCODE_V         = &H34
CONST AS UBYTE KEYCODE_B         = &H35
CONST AS UBYTE KEYCODE_N         = &H36
CONST AS UBYTE KEYCODE_M         = &H37
CONST AS UBYTE KEYCODE_LESS      = &H38
CONST AS UBYTE KEYCODE_GREATER   = &H39

CONST AS ULONG TABLETA_Dummy         = TAG_USER + &H3A000
CONST AS ULONG TABLETA_TabletZ       = TABLETA_Dummy + &H01
CONST AS ULONG TABLETA_RangeZ        = TABLETA_Dummy + &H02
CONST AS ULONG TABLETA_AngleX        = TABLETA_Dummy + &H03
CONST AS ULONG TABLETA_AngleY        = TABLETA_Dummy + &H04
CONST AS ULONG TABLETA_AngleZ        = TABLETA_Dummy + &H05
CONST AS ULONG TABLETA_Pressure      = TABLETA_Dummy + &H06
CONST AS ULONG TABLETA_ButtonBits    = TABLETA_Dummy + &H07
CONST AS ULONG TABLETA_InProximity   = TABLETA_Dummy + &H08
CONST AS ULONG TABLETA_ResolutionX   = TABLETA_Dummy + &H09
CONST AS ULONG TABLETA_ResolutionY   = TABLETA_Dummy + &H0A

TYPE TabletData
    AS UINTEGER     td_XFraction, td_YFraction
    AS ULONG     td_TabletX, td_TabletY
    AS ULONG     td_RangeX, td_RangeY
    AS TagItem PTR    td_TagList
END TYPE

TYPE TabletHookData
    AS Screen PTR    thd_Screen
    AS ULONG     thd_Width
    AS ULONG     thd_Height
    AS LONG     thd_ScreenChanged
END TYPE

PUBLIC CONST AS ULONG GA_Dummy              = TAG_USER+&H30000
PUBLIC CONST AS ULONG GA_Left               = GA_Dummy+1
PUBLIC CONST AS ULONG GA_RelRight           = GA_Dummy+2
PUBLIC CONST AS ULONG GA_Top                = GA_Dummy+3
PUBLIC CONST AS ULONG GA_RelBottom          = GA_Dummy+4
PUBLIC CONST AS ULONG GA_Width              = GA_Dummy+5
PUBLIC CONST AS ULONG GA_RelWidth           = GA_Dummy+6
PUBLIC CONST AS ULONG GA_Height             = GA_Dummy+7
PUBLIC CONST AS ULONG GA_RelHeight          = GA_Dummy+8
PUBLIC CONST AS ULONG GA_Text               = GA_Dummy+9
PUBLIC CONST AS ULONG GA_Image              = GA_Dummy+10
PUBLIC CONST AS ULONG GA_Border             = GA_Dummy+11
PUBLIC CONST AS ULONG GA_SelectRender       = GA_Dummy+12
PUBLIC CONST AS ULONG GA_Highlight          = GA_Dummy+13
PUBLIC CONST AS ULONG GA_Disabled           = GA_Dummy+14
PUBLIC CONST AS ULONG GA_GZZGadget          = GA_Dummy+15
PUBLIC CONST AS ULONG GA_ID                 = GA_Dummy+16
PUBLIC CONST AS ULONG GA_UserData           = GA_Dummy+17
PUBLIC CONST AS ULONG GA_SpecialInfo        = GA_Dummy+18
PUBLIC CONST AS ULONG GA_Selected           = GA_Dummy+19
PUBLIC CONST AS ULONG GA_EndGadget          = GA_Dummy+20
PUBLIC CONST AS ULONG GA_Immediate          = GA_Dummy+21
PUBLIC CONST AS ULONG GA_RelVerify          = GA_Dummy+22
PUBLIC CONST AS ULONG GA_FollowMouse        = GA_Dummy+23
PUBLIC CONST AS ULONG GA_RightBorder        = GA_Dummy+24
PUBLIC CONST AS ULONG GA_LeftBorder         = GA_Dummy+25
PUBLIC CONST AS ULONG GA_TopBorder          = GA_Dummy+26
PUBLIC CONST AS ULONG GA_BottomBorder       = GA_Dummy+27
PUBLIC CONST AS ULONG GA_ToggleSelect       = GA_Dummy+28
PUBLIC CONST AS ULONG GA_SysGadget          = GA_Dummy+29
PUBLIC CONST AS ULONG GA_SysGType           = GA_Dummy+30
PUBLIC CONST AS ULONG GA_Previous           = GA_Dummy+31
PUBLIC CONST AS ULONG GA_Next               = GA_Dummy+32
PUBLIC CONST AS ULONG GA_DrawInfo           = GA_Dummy+33
PUBLIC CONST AS ULONG GA_IntuiText          = GA_Dummy+34
PUBLIC CONST AS ULONG GA_LabelImage         = GA_Dummy+35
PUBLIC CONST AS ULONG GA_TabCycle           = GA_Dummy+36
PUBLIC CONST AS ULONG GA_GadgetHelp         = GA_Dummy+37
PUBLIC CONST AS ULONG GA_Bounds             = GA_Dummy+38
PUBLIC CONST AS ULONG GA_RelSpecial         = GA_Dummy+39
PUBLIC CONST AS ULONG GA_TextAttr           = GA_Dummy+40
PUBLIC CONST AS ULONG GA_ReadOnly           = GA_Dummy+41
PUBLIC CONST AS ULONG GA_Underscore         = GA_Dummy+42
PUBLIC CONST AS ULONG GA_ActivateKey        = GA_Dummy+43
PUBLIC CONST AS ULONG GA_BackFill           = GA_Dummy+44
PUBLIC CONST AS ULONG GA_GadgetHelpText     = GA_Dummy+45
PUBLIC CONST AS ULONG GA_UserInput          = GA_Dummy+46

PUBLIC CONST AS ULONG PGA_Dummy             = TAG_USER+&H31000
PUBLIC CONST AS ULONG PGA_Freedom           = PGA_Dummy+&H0001
PUBLIC CONST AS ULONG PGA_Borderless        = PGA_Dummy+&H0002
PUBLIC CONST AS ULONG PGA_HorizPot          = PGA_Dummy+&H0003
PUBLIC CONST AS ULONG PGA_HorizBody         = PGA_Dummy+&H0004
PUBLIC CONST AS ULONG PGA_VertPot           = PGA_Dummy+&H0005
PUBLIC CONST AS ULONG PGA_VertBody          = PGA_Dummy+&H0006
PUBLIC CONST AS ULONG PGA_Total             = PGA_Dummy+&H0007
PUBLIC CONST AS ULONG PGA_Visible           = PGA_Dummy+&H0008
PUBLIC CONST AS ULONG PGA_Top               = PGA_Dummy+&H0009
PUBLIC CONST AS ULONG PGA_NewLook           = PGA_Dummy+&H000A

PUBLIC CONST AS ULONG STRINGA_Dummy         = TAG_USER     +&H32000
PUBLIC CONST AS ULONG STRINGA_MaxChars      = STRINGA_Dummy+&H0001
PUBLIC CONST AS ULONG STRINGA_Buffer        = STRINGA_Dummy+&H0002
PUBLIC CONST AS ULONG STRINGA_UndoBuffer    = STRINGA_Dummy+&H0003
PUBLIC CONST AS ULONG STRINGA_WorkBuffer    = STRINGA_Dummy+&H0004
PUBLIC CONST AS ULONG STRINGA_BufferPos     = STRINGA_Dummy+&H0005
PUBLIC CONST AS ULONG STRINGA_DispPos       = STRINGA_Dummy+&H0006
PUBLIC CONST AS ULONG STRINGA_AltKeyMap     = STRINGA_Dummy+&H0007
PUBLIC CONST AS ULONG STRINGA_Font          = STRINGA_Dummy+&H0008
PUBLIC CONST AS ULONG STRINGA_Pens          = STRINGA_Dummy+&H0009
PUBLIC CONST AS ULONG STRINGA_ActivePens    = STRINGA_Dummy+&H000A
PUBLIC CONST AS ULONG STRINGA_EditHook      = STRINGA_Dummy+&H000B
PUBLIC CONST AS ULONG STRINGA_EditModes     = STRINGA_Dummy+&H000C
PUBLIC CONST AS ULONG STRINGA_ReplaceMode   = STRINGA_Dummy+&H000D
PUBLIC CONST AS ULONG STRINGA_FixedFieldMode= STRINGA_Dummy+&H000E
PUBLIC CONST AS ULONG STRINGA_NoFilterMode  = STRINGA_Dummy+&H000F
PUBLIC CONST AS ULONG STRINGA_LongVal       = STRINGA_Dummy+&H0011
PUBLIC CONST AS ULONG STRINGA_TextVal       = STRINGA_Dummy+&H0012
PUBLIC CONST AS ULONG STRINGA_ExitHelp      = STRINGA_Dummy+&H0013

PUBLIC CONST AS ULONG SG_DEFAULTMAXCHARS    = 128

PUBLIC CONST AS ULONG LAYOUTA_Dummy         = TAG_USER+&H38000
PUBLIC CONST AS ULONG LAYOUTA_LayoutObj     = LAYOUTA_Dummy+&H0001
PUBLIC CONST AS ULONG LAYOUTA_Spacing       = LAYOUTA_Dummy+&H0002
PUBLIC CONST AS ULONG LAYOUTA_Orientation   = LAYOUTA_Dummy+&H0003
PUBLIC CONST AS ULONG LAYOUTA_ChildMaxWidth = LAYOUTA_Dummy+&H0004
PUBLIC CONST AS ULONG LAYOUTA_ChildMaxHeight= LAYOUTA_Dummy+&H0005

CONST AS ULONG LORIENT_NONE  = 0
CONST AS ULONG LORIENT_HORIZ = 1
CONST AS ULONG LORIENT_VERT  = 2

PUBLIC CONST AS ULONG GM_Dummy            = -1
PUBLIC CONST AS ULONG GM_HITTEST          = 0
PUBLIC CONST AS ULONG GM_RENDER           = 1
PUBLIC CONST AS ULONG GM_GOACTIVE         = 2
PUBLIC CONST AS ULONG GM_HANDLEINPUT      = 3
PUBLIC CONST AS ULONG GM_GOINACTIVE       = 4
PUBLIC CONST AS ULONG GM_HELPTEST         = 5
PUBLIC CONST AS ULONG GM_LAYOUT           = 6
PUBLIC CONST AS ULONG GM_DOMAIN           = 7
PUBLIC CONST AS ULONG GM_KEYTEST          = 8
PUBLIC CONST AS ULONG GM_KEYGOACTIVE      = 9
PUBLIC CONST AS ULONG GM_KEYGOINACTIVE    = 10
PUBLIC CONST AS ULONG GMR_GADGETHIT       = &H00000004
PUBLIC CONST AS ULONG GMR_NOHELPHIT       = &H00000000
PUBLIC CONST AS ULONG GMR_HELPHIT         = &HFFFFFFFF
PUBLIC CONST AS ULONG GMR_HELPCODE        = &H00010000
PUBLIC CONST AS ULONG GREDRAW_UPDATE      = 2
PUBLIC CONST AS ULONG GREDRAW_REDRAW      = 1
PUBLIC CONST AS ULONG GREDRAW_TOGGLE      = 0
PUBLIC CONST AS ULONG GMR_MEACTIVE        = 0
PUBLIC CONST AS ULONG GMR_NOREUSE         = 1 SHL 1
PUBLIC CONST AS ULONG GMR_REUSE           = 1 SHL 2
PUBLIC CONST AS ULONG GMR_VERIFY          = 1 SHL 3
PUBLIC CONST AS ULONG GMR_NEXTACTIVE      = 1 SHL 4
PUBLIC CONST AS ULONG GMR_PREVACTIVE      = 1 SHL 5
PUBLIC CONST AS ULONG GDOMAIN_MINIMUM     = 0
PUBLIC CONST AS ULONG GDOMAIN_NOMINAL     = 1
PUBLIC CONST AS ULONG GDOMAIN_MAXIMUM     = 2
PUBLIC CONST AS ULONG GMR_KEYACTIVE       = 1 SHL 4
PUBLIC CONST AS ULONG GMR_KEYVERIFY       = 1 SHL 5

