@ GNU AS assembler header file for Wimp
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:46:01 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 31 July 1995

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef Wimp_Hdr
#  define Wimp_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_OSSpriteOp
#    define Get_OSSpriteOp
#    include "oslib/OSSpriteOp.Hdr"
#  endif

#  ifndef Get_Font
#    define Get_Font
#    include "oslib/Font.Hdr"
#  endif

@Symbols for constants
#  define Wimp_VersionRO2 0xc8
#  define Wimp_VersionRO30 0x12c
#  define Wimp_VersionRO3 0x136
#  define Wimp_VersionRO35 0x15e
#  define Wimp_VersionRO36 0x168
#  define Wimp_VersionRO37 0x172
#  define Wimp_VersionRO38 0x17c
#  define Wimp_VersionRO40 0x190
#  define Wimp_IconNameLimit 0xc
#  define Wimp_TemplateNameLimit 0xc
#  define Wimp_MenuNameLimit 0xc
#  define Wimp_MenuDepthLimit 0x8
#  define Wimp_CharXSize 0x10
#  define Wimp_CharYSize 0x20
#  define Wimp_NullReasonCode 0x0
#  define Wimp_RedrawWindowRequest 0x1
#  define Wimp_OpenWindowRequest 0x2
#  define Wimp_CloseWindowRequest 0x3
#  define Wimp_PointerLeavingWindow 0x4
#  define Wimp_PointerEnteringWindow 0x5
#  define Wimp_MouseClick 0x6
#  define Wimp_UserDragBox 0x7
#  define Wimp_KeyPressed 0x8
#  define Wimp_MenuSelection 0x9
#  define Wimp_ScrollRequest 0xa
#  define Wimp_LoseCaret 0xb
#  define Wimp_GainCaret 0xc
#  define Wimp_PollwordNonZero 0xd
#  define Wimp_UserMessage 0x11
#  define Wimp_UserMessageRecorded 0x12
#  define Wimp_UserMessageAcknowledge 0x13
#  define Wimp_MaskNull 0x1
#  define Wimp_QueueRedraw 0x2
#  define Wimp_MaskLeaving 0x10
#  define Wimp_MaskEntering 0x20
#  define Wimp_QueueMouse 0x40
#  define Wimp_QueueKey 0x100
#  define Wimp_MaskLose 0x800
#  define Wimp_MaskGain 0x1000
#  define Wimp_MaskPollword 0x2000
#  define Wimp_MaskIconLeaving 0x4000
#  define Wimp_MaskIconEntering 0x8000
#  define Wimp_MaskMessage 0x20000
#  define Wimp_MaskRecorded 0x40000
#  define Wimp_MaskAcknowledge 0x80000
#  define Wimp_GivenPollword 0x400000
#  define Wimp_PollHighPriority 0x800000
#  define Wimp_SaveFP 0x1000000
#  define Wimp_IssuePoll14And15 0x2000000
#  define Wimp_Broadcast 0x0
#  define Wimp_Background 0xffffffff
#  define Wimp_IconBar 0xfffffffe
#  define Wimp_IconBarRight 0xffffffff
#  define Wimp_IconBarLeft 0xfffffffe
#  define Wimp_IconBarLeftRelative 0xfffffffd
#  define Wimp_IconBarRightRelative 0xfffffffc
#  define Wimp_IconBarLeftHighPriority 0xfffffffb
#  define Wimp_IconBarLeftLowPriority 0xfffffffa
#  define Wimp_IconBarRightLowPriority 0xfffffff9
#  define Wimp_IconBarRightHighPriority 0xfffffff8
#  define Wimp_Top 0xffffffff
#  define Wimp_Bottom 0xfffffffe
#  define Wimp_Hidden 0xfffffffd
#  define Wimp_NoIcon 0xffffffff
#  define Wimp_IconWindow 0xffffffff
#  define Wimp_IconBack 0xfffffffe
#  define Wimp_IconClose 0xfffffffd
#  define Wimp_IconTitle 0xfffffffc
#  define Wimp_IconToggle 0xfffffffb
#  define Wimp_IconScrollUp 0xfffffffa
#  define Wimp_IconVScroll 0xfffffff9
#  define Wimp_IconScrollDown 0xfffffff8
#  define Wimp_IconSize 0xfffffff7
#  define Wimp_IconScrollLeft 0xfffffff6
#  define Wimp_IconHScroll 0xfffffff5
#  define Wimp_IconScrollRight 0xfffffff4
#  define Wimp_IconFrame 0xfffffff3
#  define Wimp_IconIconise 0xfffffff2
#  define Wimp_FurnitureWhole 0x0
#  define Wimp_FurnitureBack 0x1
#  define Wimp_FurnitureClose 0x2
#  define Wimp_FurnitureTitle 0x3
#  define Wimp_FurnitureToggle 0x4
#  define Wimp_FurnitureVScroll 0x5
#  define Wimp_FurnitureSize 0x6
#  define Wimp_FurnitureHScroll 0x7
#  define Wimp_FurnitureIconise 0x8
#  define Wimp_ChildLinksParentWorkArea 0x0
#  define Wimp_ChildLinksParentVisibleBottomOrLeft 0x1
#  define Wimp_ChildLinksParentVisibleTopOrRight 0x2
#  define Wimp_ChildLinksParent 0x3
#  define Wimp_ChildLSEdgeShift 0x10
#  define Wimp_ChildBSEdgeShift 0x12
#  define Wimp_ChildRSEdgeShift 0x14
#  define Wimp_ChildTSEdgeShift 0x16
#  define Wimp_ChildXOriginShift 0x18
#  define Wimp_ChildYOriginShift 0x1a
#  define Wimp_WindowMoveable 0x2
#  define Wimp_WindowAutoRedraw 0x10
#  define Wimp_WindowPane 0x20
#  define Wimp_WindowNoBounds 0x40
#  define Wimp_WindowScrollRepeat 0x100
#  define Wimp_WindowScroll 0x200
#  define Wimp_WindowRealColours 0x400
#  define Wimp_WindowBack 0x800
#  define Wimp_WindowHotKeys 0x1000
#  define Wimp_WindowBounded 0x2000
#  define Wimp_WindowIgnoreXExtent 0x4000
#  define Wimp_WindowIgnoreYExtent 0x8000
#  define Wimp_WindowOpen 0x10000
#  define Wimp_WindowNotCovered 0x20000
#  define Wimp_WindowFullSize 0x40000
#  define Wimp_WindowToggled 0x80000
#  define Wimp_WindowHasFocus 0x100000
#  define Wimp_WindowBoundedOnce 0x200000
#  define Wimp_WindowPartialSize 0x400000
#  define Wimp_WindowFurnitureWindow 0x800000
#  define Wimp_WindowForegroundWindow 0x800000
#  define Wimp_WindowBackIcon 0x1000000
#  define Wimp_WindowCloseIcon 0x2000000
#  define Wimp_WindowTitleIcon 0x4000000
#  define Wimp_WindowToggleIcon 0x8000000
#  define Wimp_WindowVScroll 0x10000000
#  define Wimp_WindowSizeIcon 0x20000000
#  define Wimp_WindowHScroll 0x40000000
#  define Wimp_WindowNewFormat 0x80000000
#  define Wimp_WindowUseTitleValidationColours 0x1
#  define Wimp_WindowUseTitleValidationString 0x1
#  define Wimp_WindowUseExtendedScrollRequest 0x2
#  define Wimp_WindowNever3D 0x4
#  define Wimp_WindowAlways3D 0x8
#  define Wimp_WindowGiveShadedIconInfo 0x10
#  define Wimp_IconText 0x1
#  define Wimp_IconSprite 0x2
#  define Wimp_IconBorder 0x4
#  define Wimp_IconHCentred 0x8
#  define Wimp_IconVCentred 0x10
#  define Wimp_IconFilled 0x20
#  define Wimp_IconAntiAliased 0x40
#  define Wimp_IconNeedsHelp 0x80
#  define Wimp_IconIndirected 0x100
#  define Wimp_IconRJustified 0x200
#  define Wimp_IconAllowAdjust 0x400
#  define Wimp_IconHalfSize 0x800
#  define Wimp_IconButtonTypeShift 0xc
#  define Wimp_IconButtonType 0xf000
#  define Wimp_IconESGShift 0x10
#  define Wimp_IconESG 0x1f0000
#  define Wimp_IconSelected 0x200000
#  define Wimp_IconShaded 0x400000
#  define Wimp_IconDeleted 0x800000
#  define Wimp_IconFGColourShift 0x18
#  define Wimp_IconFGColour 0xf000000
#  define Wimp_IconBGColourShift 0x1c
#  define Wimp_IconBGColour 0xf0000000
#  define Wimp_IconFontHandleShift 0x18
#  define Wimp_IconFontHandle 0xff000000
#  define Wimp_ButtonNever 0x0
#  define Wimp_ButtonAlways 0x1
#  define Wimp_ButtonRepeat 0x2
#  define Wimp_ButtonClick 0x3
#  define Wimp_ButtonRelease 0x4
#  define Wimp_ButtonDoubleClick 0x5
#  define Wimp_ButtonClickDrag 0x6
#  define Wimp_ButtonReleaseDrag 0x7
#  define Wimp_ButtonDoubleDrag 0x8
#  define Wimp_ButtonMenuIcon 0x9
#  define Wimp_ButtonDoubleClickDrag 0xa
#  define Wimp_ButtonRadio 0xb
#  define Wimp_ButtonWriteClickDrag 0xe
#  define Wimp_ButtonWritable 0xf
#  define Wimp_MenuTicked 0x1
#  define Wimp_MenuSeparate 0x2
#  define Wimp_MenuWritable 0x4
#  define Wimp_MenuGiveWarning 0x8
#  define Wimp_MenuSubMenuWhenShaded 0x10
#  define Wimp_MenuLast 0x80
#  define Wimp_MenuTitleIndirected 0x100
#  define Wimp_CloseMenu 0xffffffff
#  define Wimp_NoSubMenu 0xffffffff
#  define Wimp_DeferSubMenu 0x1
#  define Wimp_NoFonts 0xffffffff
#  define Wimp_GetSize 0x0
#  define Wimp_ClickAdjust 0x1
#  define Wimp_DoubleAdjust 0x1
#  define Wimp_ClickMenu 0x2
#  define Wimp_ClickSelect 0x4
#  define Wimp_DoubleSelect 0x4
#  define Wimp_DragAdjust 0x10
#  define Wimp_DragSelect 0x40
#  define Wimp_SingleAdjust 0x100
#  define Wimp_SingleSelect 0x400
#  define Wimp_MenuItemHeight 0x2c
#  define Wimp_MenuItemGap 0x0
#  define Wimp_MenuItemSeparation 0x18
#  define Wimp_DragSystemPosition 0x1
#  define Wimp_DragSystemSize 0x2
#  define Wimp_DragSystemHScroll 0x3
#  define Wimp_DragSystemVScroll 0x4
#  define Wimp_DragUserFixed 0x5
#  define Wimp_DragUserRubber 0x6
#  define Wimp_DragUserPoint 0x7
#  define Wimp_DragAsmFixed 0x8
#  define Wimp_DragAsmRubber 0x9
#  define Wimp_DragAsmFixedIndefinite 0xa
#  define Wimp_DragAsmRubberIndefinite 0xb
#  define Wimp_DragSystemScrollBoth 0xc
#  define Wimp_DragStartTextSelection 0xd
#  define Wimp_KeyBackspace 0x8
#  define Wimp_KeyReturn 0xd
#  define Wimp_KeyEscape 0x1b
#  define Wimp_KeyHome 0x1e
#  define Wimp_KeyDelete 0x7f
#  define Wimp_KeyShift 0x10
#  define Wimp_KeyControl 0x20
#  define Wimp_KeyPrint 0x180
#  define Wimp_KeyF1 0x181
#  define Wimp_KeyF2 0x182
#  define Wimp_KeyF3 0x183
#  define Wimp_KeyF4 0x184
#  define Wimp_KeyF5 0x185
#  define Wimp_KeyF6 0x186
#  define Wimp_KeyF7 0x187
#  define Wimp_KeyF8 0x188
#  define Wimp_KeyF9 0x189
#  define Wimp_KeyTab 0x18a
#  define Wimp_KeyCopy 0x18b
#  define Wimp_KeyLeft 0x18c
#  define Wimp_KeyRight 0x18d
#  define Wimp_KeyLogo 0x1c0
#  define Wimp_KeyMenu 0x1c1
#  define Wimp_KeyF10 0x1ca
#  define Wimp_KeyF11 0x1cb
#  define Wimp_KeyF12 0x1cc
#  define Wimp_KeyInsert 0x1cd
#  define Wimp_KeyDown 0x18e
#  define Wimp_KeyUp 0x18f
#  define Wimp_KeyPageDown 0x19e
#  define Wimp_KeyPageUp 0x19f
#  define Message_Quit 0x0
#  define Message_DataSave 0x1
#  define Message_DataSaveAck 0x2
#  define Message_DataLoad 0x3
#  define Message_DataLoadAck 0x4
#  define Message_DataOpen 0x5
#  define Message_RAMFetch 0x6
#  define Message_RAMTransmit 0x7
#  define Message_Prequit 0x8
#  define Message_PreQuit 0x8
#  define Message_PaletteChange 0x9
#  define Message_SaveDesktop 0xa
#  define Message_DeviceClaim 0xb
#  define Message_DeviceInUse 0xc
#  define Message_DataSaved 0xd
#  define Message_Shutdown 0xe
#  define Message_ClaimEntity 0xf
#  define Message_DataRequest 0x10
#  define Message_Dragging 0x11
#  define Message_DragClaim 0x12
#  define Message_ReleaseEntity 0x13
#  define Message_AppControl 0x15
#  define Message_MenuWarning 0x400c0
#  define Message_ModeChange 0x400c1
#  define Message_TaskInitialise 0x400c2
#  define Message_TaskCloseDown 0x400c3
#  define Message_SlotSize 0x400c4
#  define Message_SetSlot 0x400c5
#  define Message_TaskNameRq 0x400c6
#  define Message_TaskNameIs 0x400c7
#  define Message_TaskStarted 0x400c8
#  define Message_MenusDeleted 0x400c9
#  define Message_Iconise 0x400ca
#  define Message_WindowClosed 0x400cb
#  define Message_WindowInfo 0x400cc
#  define Message_Swap 0x400cd
#  define Message_ToolsChanged 0x400ce
#  define Message_FontChanged 0x400cf
#  define Message_IconiseAt 0x400d0
#  define Message_ToggleBackdrop 0x400d1
#  define Message_ScreenEdgeNotification 0x400d2
#  define Wimp_DragBoxKeepInLine 0x1
#  define Wimp_DragBoxClip 0x2
#  define Wimp_AutoScrollEnableHorizontal 0x1
#  define Wimp_AutoScrollEnableVertical 0x2
#  define Wimp_AutoScrollDelegateToTask 0x4
#  define Wimp_AutoScrollReadState 0x80
#  define Wimp_ErrorBoxOKIcon 0x1
#  define Wimp_ErrorBoxCancelIcon 0x2
#  define Wimp_ErrorBoxHighlightCancel 0x4
#  define Wimp_ErrorBoxNoPrompt 0x8
#  define Wimp_ErrorBoxShortTitle 0x10
#  define Wimp_ErrorBoxLeaveOpen 0x20
#  define Wimp_ErrorBoxClose 0x40
#  define Wimp_ErrorBoxNoBeep 0x80
#  define Wimp_ErrorBoxGivenCategory 0x100
#  define Wimp_ErrorBoxCategory 0xe00
#  define Wimp_ErrorBoxCategoryShift 0x9
#  define Wimp_ErrorBoxCategoryInfo 0x1
#  define Wimp_ErrorBoxCategoryError 0x2
#  define Wimp_ErrorBoxCategoryProgram 0x3
#  define Wimp_ErrorBoxCategoryQuestion 0x4
#  define Wimp_ErrorBoxContinueResponseShift 0x18
#  define Wimp_ErrorBoxQuitResponseShift 0x1c
#  define Wimp_ErrorBoxSelectedNothing 0x0
#  define Wimp_ErrorBoxSelectedOK 0x1
#  define Wimp_ErrorBoxSelectedCancel 0x2
#  define Wimp_ColourWhite 0x0
#  define Wimp_ColourVeryLightGrey 0x1
#  define Wimp_ColourLightGrey 0x2
#  define Wimp_ColourMidLightGrey 0x3
#  define Wimp_ColourMidDarkGrey 0x4
#  define Wimp_ColourDarkGrey 0x5
#  define Wimp_ColourVeryDarkGrey 0x6
#  define Wimp_ColourBlack 0x7
#  define Wimp_ColourDarkBlue 0x8
#  define Wimp_ColourYellow 0x9
#  define Wimp_ColourLightGreen 0xa
#  define Wimp_ColourRed 0xb
#  define Wimp_ColourCream 0xc
#  define Wimp_ColourDarkGreen 0xd
#  define Wimp_ColourOrange 0xe
#  define Wimp_ColourLightBlue 0xf
#  define Wimp_ColourTransparent 0xffffffff
#  define Wimp_ScrollDoubleExtendedLeft 0xfffffff8
#  define Wimp_ScrollDoubleExtendedDown 0xfffffff8
#  define Wimp_ScrollSingleExtendedLeft 0xfffffffc
#  define Wimp_ScrollSingleExtendedDown 0xfffffffc
#  define Wimp_ScrollAutoLeft 0xfffffffd
#  define Wimp_ScrollAutoDown 0xfffffffd
#  define Wimp_ScrollPageLeft 0xfffffffe
#  define Wimp_ScrollPageDown 0xfffffffe
#  define Wimp_ScrollColumnLeft 0xffffffff
#  define Wimp_ScrollLineDown 0xffffffff
#  define Wimp_ScrollNone 0x0
#  define Wimp_ScrollLineUp 0x1
#  define Wimp_ScrollColumnRight 0x1
#  define Wimp_ScrollPageUp 0x2
#  define Wimp_ScrollPageRight 0x2
#  define Wimp_ScrollAutoUp 0x3
#  define Wimp_ScrollAutoRight 0x3
#  define Wimp_ScrollSingleExtendedUp 0x4
#  define Wimp_ScrollSingleExtendedRight 0x4
#  define Wimp_ScrollDoubleExtendedUp 0x8
#  define Wimp_ScrollDoubleExtendedRight 0x8
#  define Wimp_AutoScrollNoHandler 0x0
#  define Wimp_AutoScrollDefaultHandler 0x1
#  define Wimp_PreQuitTaskOnly 0x1
#  define Wimp_ClaimCaretOrSelection 0x3
#  define Wimp_ClaimClipboard 0x4
#  define Wimp_DataRequestClipboard 0x4
#  define Wimp_DraggingFromSelection 0x2
#  define Wimp_DraggingFromClipboard 0x4
#  define Wimp_DraggingDeleteSource 0x8
#  define Wimp_DraggingTerminateDrag 0x10
#  define Wimp_DragClaimPointerChanged 0x1
#  define Wimp_DragClaimSupressDragbox 0x2
#  define Wimp_DragClaimDeleteSource 0x8
#  define Wimp_ReleaseClipboard 0x4
#  define Wimp_AppControlImmediate 0x1
#  define Wimp_AppControlStop 0x0
#  define Wimp_AppControlWakeUp 0x1
#  define Wimp_AppControlPause 0x2
#  define Wimp_AppControlMinimiseMemory 0x3
#  define Wimp_AppControlOpenConfiguration 0x4
#  define Wimp_IconiseWithShiftClose 0x1
#  define Wimp_ToggleBackdropType 0x3
#  define Wimp_ToggleBackdrop 0x0
#  define Wimp_ToggleBackdropToFront 0x1
#  define Wimp_ToggleBackdropToBack 0x2
#  define Wimp_ToggleBackdropGetPosition 0x3
#  define Wimp_ScreenEdgeNotificationLeft 0x1
#  define Wimp_ScreenEdgeNotificationBottom 0x2
#  define Wimp_ScreenEdgeNotificationRight 0x4
#  define Wimp_ScreenEdgeNotificationTop 0x8
#  define Error_WimpNoClaim 0x280
#  define Error_WimpBadOp 0x281
#  define Error_WimpRectFull 0x282
#  define Error_WimpTooMany 0x283
#  define Error_WimpTooBig 0x284
#  define Error_WimpDivBy0 0x285
#  define Error_WimpGetRect 0x286
#  define Error_WimpFocus 0x287
#  define Error_WimpBadHandle 0x288
#  define Error_WimpTooMenus 0x289
#  define Error_WimpBadExtent 0x28a
#  define Error_WimpBadPointer 0x28b
#  define Error_WimpNoTemplateFile 0x28c
#  define Error_WimpBadTemplate 0x28d
#  define Error_WimpBadFonts 0x28e
#  define Error_WimpBadSyntax 0x28f
#  define Error_WimpNoTasks 0x290
#  define Error_WimpNoTemplate 0x291
#  define Error_WimpNotPresent 0x292
#  define Error_WimpInUse 0x293
#  define Error_WimpBadPalFile 0x294
#  define Error_WimpBadVersion 0x295
#  define Error_WimpBadMessageSize 0x296
#  define Error_WimpBadReasonCode 0x297
#  define Error_WimpBadTaskHandle 0x298
#  define Error_WimpCantTask 0x299
#  define Error_WimpBadSubMenu 0x29a
#  define Error_WimpOwnerWindow 0x29b
#  define Error_WimpBadMode 0x29c
#  define Error_WimpBadTransfer 0x29d
#  define Error_WimpBadSysInfo 0x29e
#  define Error_WimpBadPtrInR1 0x29f
#  define Error_WimpBadEscapeState 0x2a0
#  define Error_WimpBadIconHandle 0x2a1
#  define Error_WimpBadR3 0x2a2
#  define Error_WimpNoDotInFilename 0x2a3
#  define Error_WimpTemplateEOF 0x2a4
#  define Error_WimpBadSlot 0x2a5
#  define Error_WimpBadConfFont 0x2a6
#  define Error_WimpNoSprites 0x2a7
#  define Error_WimpBadPalFile2 0x2a8
#  define Error_WimpBadSprites 0x2a9
#  define Error_WimpBadParent 0x2aa
#  define Wimp_PriorityTaskManager 0x60000000
#  define Wimp_PriorityPaletteUtility 0x20000000
#  define Wimp_PriorityADFSFilerHardDiscs 0x70000000
#  define Wimp_PriorityADFSFilerFloppyDiscs 0x60000000
#  define Wimp_PriorityResourceFiler 0x50000000
#  define Wimp_PriorityRAMFSFiler 0x40000000
#  define Wimp_PriorityNFSFiler 0x30000000
#  define Wimp_PriorityNetFiler 0x20000000
#  define Wimp_PriorityPrinters 0xf000000
#  define Wimp_PriorityTinyDirs 0xc0000000
#  define Wimp_PlotIconGivenSpriteArea 0x1
#  define Wimp_PlotIconUnderPointer 0x2
#  define Wimp_CommandWindowInactive 0x0
#  define Wimp_CommandWindowPending 0x1
#  define Wimp_CommandWindowOpen 0x2
#  define Wimp_GivenWindowAndIcon 0x1
#  define Wimp_FilterPrePoll 0x0
#  define Wimp_FilterPostPoll 0x1
#  define Wimp_FilterCopy 0x2
#  define Wimp_FilterRect 0x3
#  define Wimp_FilterPostRect 0x4
#  define Wimp_FilterPostIcon 0x5
#  define Wimp_DefaultPalette 0xffffffff
#  define Wimp_Palette 0x0
#  define WimpTextOp_SizeCovered 0x80000000
#  define WimpTextOp_VJustify 0x10000000
#  define WimpTextOp_OffsetsForRedraw 0x20000000
#  define WimpTextOp_GivenBaseline 0x40000000
#  define WimpTextOp_RJustify 0x80000000

@Symbols for structure offsets and sizes
@ abstract type
#  define Wimp_W 4

        .struct 0
        .skip   Int
Wimp_I                         : 

@ abstract type
#  define Wimp_T 4

        .struct 0
        .skip   Byte
Wimp_Colour                    : 

        .struct 0
        .skip   Int
Wimp_VersionNo                 : 

        .struct 0
        .skip   Int
Wimp_EventNo                   : 

        .struct 0
        .skip   Bits
Wimp_PollFlags                 : 

        .struct 0
        .skip   Int
Wimp_Furniture                 : 

        .struct 0
        .skip   Bits
Wimp_WindowNestingFlags        : 

        .struct 0
        .skip   Bits
Wimp_WindowFlags               : 

        .struct 0
        .skip   Byte
Wimp_ExtraWindowFlags          : 

        .struct 0
        .skip   Bits
Wimp_IconFlags                 : 

        .struct 0
        .skip   Bits
Wimp_MenuFlags                 : 

        .struct 0
        .skip   Bits
Wimp_MouseState                : 

        .struct 0
        .skip   Int
Wimp_DragType                  : 

        .struct 0
        .skip   Int
Wimp_KeyNo                     : 

        .struct 0
        .skip   Bits
Wimp_DragBoxFlags              : 

        .struct 0
        .skip   Bits
Wimp_AutoScrollFlags           : 

        .struct 0
        .skip   Bits
Wimp_ErrorBoxFlags             : 

        .struct 0
        .skip   Int
Wimp_ErrorBoxSelection         : 

        .struct 0
        .skip   Int
Wimp_ScrollDirection           : 

        .struct 0
Wimp_IconData_text             : .skip   12*Char
        .struct 0
Wimp_IconData_sprite           : .skip   12*Char
        .struct 0
Wimp_IconData_text_and_sprite  : .skip   12*Char
        .struct 0
Wimp_IconData_indirected_text_text: .skip   Ptr
Wimp_IconData_indirected_text_validation: .skip   Ptr
Wimp_IconData_indirected_text_size: .skip   Int
        .struct 0
Wimp_IconData_indirected_sprite_id: .skip   OSSpriteOp_Id
Wimp_IconData_indirected_sprite_area: .skip   Ptr
Wimp_IconData_indirected_sprite_size: .skip   Int
        .struct 0
Wimp_IconData_indirected_text_and_sprite_text: .skip   Ptr
Wimp_IconData_indirected_text_and_sprite_validation: .skip   Ptr
Wimp_IconData_indirected_text_and_sprite_size: .skip   Int
Wimp_IconData                  : 

        .struct 0
Wimp_Icon_extent               : .skip   OS_Box
Wimp_Icon_flags                : .skip   Wimp_IconFlags
Wimp_Icon_data                 : .skip   Wimp_IconData
Wimp_Icon                      : 

        .struct 0
Wimp_IconCreate_w              : .skip   Wimp_W
Wimp_IconCreate_icon           : .skip   Wimp_Icon
Wimp_IconCreate                : 

        .struct 0
Wimp_Window_visible            : .skip   OS_Box
Wimp_Window_xscroll            : .skip   Int
Wimp_Window_yscroll            : .skip   Int
Wimp_Window_next               : .skip   Wimp_W
Wimp_Window_flags              : .skip   Wimp_WindowFlags
Wimp_Window_title_fg           : .skip   Wimp_Colour
Wimp_Window_title_bg           : .skip   Wimp_Colour
Wimp_Window_work_fg            : .skip   Wimp_Colour
Wimp_Window_work_bg            : .skip   Wimp_Colour
Wimp_Window_scroll_outer       : .skip   Wimp_Colour
Wimp_Window_scroll_inner       : .skip   Wimp_Colour
Wimp_Window_highlight_bg       : .skip   Wimp_Colour
Wimp_Window_extra_flags        : .skip   Wimp_ExtraWindowFlags
Wimp_Window_extent             : .skip   OS_Box
Wimp_Window_title_flags        : .skip   Wimp_IconFlags
Wimp_Window_work_flags         : .skip   Wimp_IconFlags
Wimp_Window_sprite_area        : .skip   Ptr
Wimp_Window_xmin               : .skip   Short
Wimp_Window_ymin               : .skip   Short
Wimp_Window_title_data         : .skip   Wimp_IconData
Wimp_Window_icon_count         : .skip   Int
Wimp_Window_icons              : .skip   Wimp_Icon
Wimp_Window                    : 
        
        .altmacro
        .macro  Wimp_Window_MEMBERS label
\label&_visible                : .skip   OS_Box
\label&_xscroll                : .skip   Int
\label&_yscroll                : .skip   Int
\label&_next                   : .skip   Wimp_W
\label&_flags                  : .skip   Wimp_WindowFlags
\label&_title_fg               : .skip   Wimp_Colour
\label&_title_bg               : .skip   Wimp_Colour
\label&_work_fg                : .skip   Wimp_Colour
\label&_work_bg                : .skip   Wimp_Colour
\label&_scroll_outer           : .skip   Wimp_Colour
\label&_scroll_inner           : .skip   Wimp_Colour
\label&_highlight_bg           : .skip   Wimp_Colour
\label&_extra_flags            : .skip   Wimp_ExtraWindowFlags
\label&_extent                 : .skip   OS_Box
\label&_title_flags            : .skip   Wimp_IconFlags
\label&_work_flags             : .skip   Wimp_IconFlags
\label&_sprite_area            : .skip   Ptr
\label&_xmin                   : .skip   Short
\label&_ymin                   : .skip   Short
\label&_title_data             : .skip   Wimp_IconData
\label&_icon_count             : .skip   Int
        .endm
        
        .struct 0
        Wimp_Window_MEMBERS Wimp_WindowBase
Wimp_WindowBase                : 

        .struct 0
Wimp_WindowState_w             : .skip   Wimp_W
Wimp_WindowState_visible       : .skip   OS_Box
Wimp_WindowState_xscroll       : .skip   Int
Wimp_WindowState_yscroll       : .skip   Int
Wimp_WindowState_next          : .skip   Wimp_W
Wimp_WindowState_flags         : .skip   Wimp_WindowFlags
Wimp_WindowState               : 

        .struct 0
Wimp_IconState_w               : .skip   Wimp_W
Wimp_IconState_i               : .skip   Wimp_I
Wimp_IconState_icon            : .skip   Wimp_Icon
Wimp_IconState                 : 

        .struct 0
Wimp_SetIconStateBlock_w       : .skip   Wimp_W
Wimp_SetIconStateBlock_i       : .skip   Wimp_I
Wimp_SetIconStateBlock_eor_bits: .skip   Wimp_IconFlags
Wimp_SetIconStateBlock_clear_bits: .skip   Wimp_IconFlags
Wimp_SetIconStateBlock         : 

        .struct 0
Wimp_WindowInfo_w              : .skip   Wimp_W
Wimp_WindowInfo_visible        : .skip   OS_Box
Wimp_WindowInfo_xscroll        : .skip   Int
Wimp_WindowInfo_yscroll        : .skip   Int
Wimp_WindowInfo_next           : .skip   Wimp_W
Wimp_WindowInfo_flags          : .skip   Wimp_WindowFlags
Wimp_WindowInfo_title_fg       : .skip   Wimp_Colour
Wimp_WindowInfo_title_bg       : .skip   Wimp_Colour
Wimp_WindowInfo_work_fg        : .skip   Wimp_Colour
Wimp_WindowInfo_work_bg        : .skip   Wimp_Colour
Wimp_WindowInfo_scroll_outer   : .skip   Wimp_Colour
Wimp_WindowInfo_scroll_inner   : .skip   Wimp_Colour
Wimp_WindowInfo_highlight_bg   : .skip   Wimp_Colour
Wimp_WindowInfo_extra_flags    : .skip   Wimp_ExtraWindowFlags
Wimp_WindowInfo_extent         : .skip   OS_Box
Wimp_WindowInfo_title_flags    : .skip   Wimp_IconFlags
Wimp_WindowInfo_work_flags     : .skip   Wimp_IconFlags
Wimp_WindowInfo_sprite_area    : .skip   Ptr
Wimp_WindowInfo_xmin           : .skip   Short
Wimp_WindowInfo_ymin           : .skip   Short
Wimp_WindowInfo_title_data     : .skip   Wimp_IconData
Wimp_WindowInfo_icon_count     : .skip   Int
Wimp_WindowInfo_icons          : .skip   Wimp_Icon
Wimp_WindowInfo                : 
        
        .altmacro
        .macro  Wimp_WindowInfo_MEMBERS label
\label&_w                      : .skip   Wimp_W
\label&_visible                : .skip   OS_Box
\label&_xscroll                : .skip   Int
\label&_yscroll                : .skip   Int
\label&_next                   : .skip   Wimp_W
\label&_flags                  : .skip   Wimp_WindowFlags
\label&_title_fg               : .skip   Wimp_Colour
\label&_title_bg               : .skip   Wimp_Colour
\label&_work_fg                : .skip   Wimp_Colour
\label&_work_bg                : .skip   Wimp_Colour
\label&_scroll_outer           : .skip   Wimp_Colour
\label&_scroll_inner           : .skip   Wimp_Colour
\label&_highlight_bg           : .skip   Wimp_Colour
\label&_extra_flags            : .skip   Wimp_ExtraWindowFlags
\label&_extent                 : .skip   OS_Box
\label&_title_flags            : .skip   Wimp_IconFlags
\label&_work_flags             : .skip   Wimp_IconFlags
\label&_sprite_area            : .skip   Ptr
\label&_xmin                   : .skip   Short
\label&_ymin                   : .skip   Short
\label&_title_data             : .skip   Wimp_IconData
\label&_icon_count             : .skip   Int
        .endm
        
        .struct 0
        Wimp_WindowInfo_MEMBERS Wimp_WindowInfoBase
Wimp_WindowInfoBase            : 

        .struct 0
Wimp_Outline_w                 : .skip   Wimp_W
Wimp_Outline_outline           : .skip   OS_Box
Wimp_Outline                   : 

        .struct 0
Wimp_Draw_w                    : .skip   Wimp_W
Wimp_Draw_box                  : .skip   OS_Box
Wimp_Draw_xscroll              : .skip   Int
Wimp_Draw_yscroll              : .skip   Int
Wimp_Draw_clip                 : .skip   OS_Box
Wimp_Draw                      : 

        .struct 0
Wimp_Open_w                    : .skip   Wimp_W
Wimp_Open_visible              : .skip   OS_Box
Wimp_Open_xscroll              : .skip   Int
Wimp_Open_yscroll              : .skip   Int
Wimp_Open_next                 : .skip   Wimp_W
Wimp_Open                      : 

        .struct 0
Wimp_Close_w                   : .skip   Wimp_W
Wimp_Close                     : 

        .struct 0
Wimp_Leaving_w                 : .skip   Wimp_W
Wimp_Leaving                   : 

        .struct 0
Wimp_Entering_w                : .skip   Wimp_W
Wimp_Entering                  : 

        .struct 0
Wimp_Pointer_pos               : .skip   OS_Coord
Wimp_Pointer_buttons           : .skip   Wimp_MouseState
Wimp_Pointer_w                 : .skip   Wimp_W
Wimp_Pointer_i                 : .skip   Wimp_I
Wimp_Pointer                   : 

        .struct 0
Wimp_Dragged_final             : .skip   OS_Box
Wimp_Dragged                   : 

        .struct 0
Wimp_Key_w                     : .skip   Wimp_W
Wimp_Key_i                     : .skip   Wimp_I
Wimp_Key_pos                   : .skip   OS_Coord
Wimp_Key_height                : .skip   Int
Wimp_Key_index                 : .skip   Int
Wimp_Key_c                     : .skip   Wimp_KeyNo
Wimp_Key                       : 

        .struct 0
Wimp_Selection_items           : .skip   9*Int
Wimp_Selection                 : 

        .struct 0
Wimp_Scroll_w                  : .skip   Wimp_W
Wimp_Scroll_visible            : .skip   OS_Box
Wimp_Scroll_xscroll            : .skip   Int
Wimp_Scroll_yscroll            : .skip   Int
Wimp_Scroll_next               : .skip   Wimp_W
Wimp_Scroll_xmin               : .skip   Wimp_ScrollDirection
Wimp_Scroll_ymin               : .skip   Wimp_ScrollDirection
Wimp_Scroll_i                  : .skip   Wimp_I
Wimp_Scroll                    : 

        .struct 0
Wimp_Pollword_addr             : .skip   Ptr
Wimp_Pollword_word             : .skip   Int
Wimp_Pollword                  : 

        .struct 0
Wimp_Drag_w                    : .skip   Wimp_W
Wimp_Drag_type                 : .skip   Wimp_DragType
Wimp_Drag_initial              : .skip   OS_Box
Wimp_Drag_bbox                 : .skip   OS_Box
Wimp_Drag_handle               : .skip   Ptr
Wimp_Drag_draw                 : .skip   Ptr
Wimp_Drag_undraw               : .skip   Ptr
Wimp_Drag_redraw               : .skip   Ptr
Wimp_Drag                      : 

        .struct 0
Wimp_AutoScrollInfo_w          : .skip   Wimp_W
Wimp_AutoScrollInfo_pause_zone_sizes: .skip   OS_Box
Wimp_AutoScrollInfo_pause_duration: .skip   Int
Wimp_AutoScrollInfo_state_change: .skip   Ptr
Wimp_AutoScrollInfo_handle     : .skip   Ptr
Wimp_AutoScrollInfo            : 

        .struct 0
Wimp_Caret_w                   : .skip   Wimp_W
Wimp_Caret_i                   : .skip   Wimp_I
Wimp_Caret_pos                 : .skip   OS_Coord
Wimp_Caret_height              : .skip   Int
Wimp_Caret_index               : .skip   Int
Wimp_Caret                     : 

        .struct 0
Wimp_TextSelection_w           : .skip   Wimp_W
Wimp_TextSelection_i           : .skip   Wimp_I
Wimp_TextSelection_start_index : .skip   Int
Wimp_TextSelection_end_index   : .skip   Int
Wimp_TextSelection             : 

        .struct 0
Wimp_MenuEntry_menu_flags      : .skip   Wimp_MenuFlags
Wimp_MenuEntry_sub_menu        : .skip   Ptr
Wimp_MenuEntry_icon_flags      : .skip   Wimp_IconFlags
Wimp_MenuEntry_data            : .skip   Wimp_IconData
Wimp_MenuEntry                 : 

        .struct 0
Wimp_Menu_title_data           : 
Wimp_Menu_title_data_text      : .skip   12*Char
        .struct Wimp_Menu_title_data
Wimp_Menu_title_data_indirected_text_text: .skip   Ptr
Wimp_Menu_title_data_indirected_text_reserved: .skip   8*Byte
Wimp_Menu_title_fg             : .skip   Wimp_Colour
Wimp_Menu_title_bg             : .skip   Wimp_Colour
Wimp_Menu_work_fg              : .skip   Wimp_Colour
Wimp_Menu_work_bg              : .skip   Wimp_Colour
Wimp_Menu_width                : .skip   Int
Wimp_Menu_height               : .skip   Int
Wimp_Menu_gap                  : .skip   Int
Wimp_Menu_entries              : .skip   Wimp_MenuEntry
Wimp_Menu                      : 
        
        .altmacro
        .macro  Wimp_Menu_MEMBERS label
\label&_title_data             : 
\label&_title_data_text        : .skip   12*Char
        .struct \label&_title_data
\label&_title_data_indirected_text_text: .skip   Ptr
\label&_title_data_indirected_text_reserved: .skip   8*Byte
\label&_title_fg               : .skip   Wimp_Colour
\label&_title_bg               : .skip   Wimp_Colour
\label&_work_fg                : .skip   Wimp_Colour
\label&_work_bg                : .skip   Wimp_Colour
\label&_width                  : .skip   Int
\label&_height                 : .skip   Int
\label&_gap                    : .skip   Int
        .endm
        
        .struct 0
        Wimp_Menu_MEMBERS Wimp_MenuBase
Wimp_MenuBase                  : 

        .struct 0
        .skip   Bits
Wimp_PreQuitFlags              : 

        .struct 0
        .skip   Bits
Wimp_SaveDesktopFlags          : 

        .struct 0
        .skip   Bits
Wimp_ShutdownFlags             : 

        .struct 0
        .skip   Bits
Wimp_ClaimFlags                : 

        .struct 0
        .skip   Bits
Wimp_DataRequestFlags          : 

        .struct 0
        .skip   Bits
Wimp_DraggingFlags             : 

        .struct 0
        .skip   Bits
Wimp_DragClaimFlags            : 

        .struct 0
        .skip   Bits
Wimp_ReleaseFlags              : 

        .struct 0
        .skip   Bits
Wimp_AppControlFlags           : 

        .struct 0
        .skip   Int
Wimp_AppControlOperation       : 

        .struct 0
Wimp_MessageHeader_size        : .skip   Int
Wimp_MessageHeader_sender      : .skip   Wimp_T
Wimp_MessageHeader_my_ref      : .skip   Int
Wimp_MessageHeader_your_ref    : .skip   Int
Wimp_MessageHeader_action      : .skip   Bits
Wimp_MessageHeader_data        : .skip   Byte
Wimp_MessageHeader             : 
        
        .altmacro
        .macro  Wimp_MessageHeader_MEMBERS label
\label&_size                   : .skip   Int
\label&_sender                 : .skip   Wimp_T
\label&_my_ref                 : .skip   Int
\label&_your_ref               : .skip   Int
\label&_action                 : .skip   Bits
        .endm
        
        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_MessageHeaderBase
Wimp_MessageHeaderBase         : 

        .struct 0
Wimp_MessageDataXfer_w         : .skip   Wimp_W
Wimp_MessageDataXfer_i         : .skip   Wimp_I
Wimp_MessageDataXfer_pos       : .skip   OS_Coord
Wimp_MessageDataXfer_est_size  : .skip   Int
Wimp_MessageDataXfer_file_type : .skip   Bits
Wimp_MessageDataXfer_file_name : .skip   212*Char
Wimp_MessageDataXfer           : 

        .struct 0
Wimp_MessageRAMXfer_addr       : .skip   Ptr
Wimp_MessageRAMXfer_size       : .skip   Int
Wimp_MessageRAMXfer            : 

        .struct 0
Wimp_MessagePrequit_flags      : .skip   Wimp_PreQuitFlags
Wimp_MessagePrequit            : 

        .struct 0
Wimp_MessageSaveDesktop_file   : .skip   OS_F
Wimp_MessageSaveDesktop_reserved: .skip   3*Byte
Wimp_MessageSaveDesktop_flags  : .skip   Wimp_SaveDesktopFlags
Wimp_MessageSaveDesktop        : 

        .struct 0
Wimp_MessageSaveDesktopW_file  : .skip   OS_FW
Wimp_MessageSaveDesktopW_flags : .skip   Wimp_SaveDesktopFlags
Wimp_MessageSaveDesktopW       : 

        .struct 0
Wimp_MessageDevice_major       : .skip   Int
Wimp_MessageDevice_minor       : .skip   Int
Wimp_MessageDevice_info        : .skip   228*Char
Wimp_MessageDevice             : 

        .struct 0
Wimp_MessageDataSaved_ref      : .skip   Int
Wimp_MessageDataSaved          : 

        .struct 0
Wimp_MessageShutdown_flags     : .skip   Wimp_ShutdownFlags
Wimp_MessageShutdown           : 

        .struct 0
Wimp_MessageClaimEntity_flags  : .skip   Wimp_ClaimFlags
Wimp_MessageClaimEntity        : 

        .struct 0
Wimp_MessageDataRequest_w      : .skip   Wimp_W
Wimp_MessageDataRequest_i      : .skip   Wimp_I
Wimp_MessageDataRequest_pos    : .skip   OS_Coord
Wimp_MessageDataRequest_flags  : .skip   Wimp_DataRequestFlags
Wimp_MessageDataRequest_file_types: .skip   54*Bits
Wimp_MessageDataRequest        : 

        .struct 0
Wimp_MessageDragging_w         : .skip   Wimp_W
Wimp_MessageDragging_i         : .skip   Wimp_I
Wimp_MessageDragging_pos       : .skip   OS_Coord
Wimp_MessageDragging_flags     : .skip   Wimp_DraggingFlags
Wimp_MessageDragging_box       : .skip   OS_Box
Wimp_MessageDragging_file_types: .skip   50*Bits
Wimp_MessageDragging           : 

        .struct 0
Wimp_MessageDragClaim_flags    : .skip   Wimp_DragClaimFlags
Wimp_MessageDragClaim_file_types: .skip   58*Bits
Wimp_MessageDragClaim          : 

        .struct 0
Wimp_MessageReleaseEntity_flags: .skip   Wimp_ReleaseFlags
Wimp_MessageReleaseEntity      : 

        .struct 0
Wimp_MessageAppControl_protocol_version: .skip   Int
Wimp_MessageAppControl_flags   : .skip   Wimp_AppControlFlags
Wimp_MessageAppControl_operation: .skip   Wimp_AppControlOperation
Wimp_MessageAppControl         : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDataXfer
Wimp_FullMessageDataXfer_w     : .skip   Wimp_W
Wimp_FullMessageDataXfer_i     : .skip   Wimp_I
Wimp_FullMessageDataXfer_pos   : .skip   OS_Coord
Wimp_FullMessageDataXfer_est_size: .skip   Int
Wimp_FullMessageDataXfer_file_type: .skip   Bits
Wimp_FullMessageDataXfer_file_name: .skip   212*Char
Wimp_FullMessageDataXfer       : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageRAMXfer
Wimp_FullMessageRAMXfer_addr   : .skip   Ptr
Wimp_FullMessageRAMXfer_xfer_size: .skip   Int
Wimp_FullMessageRAMXfer        : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessagePrequit
Wimp_FullMessagePrequit_flags  : .skip   Wimp_PreQuitFlags
Wimp_FullMessagePrequit        : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageSaveDesktopW
Wimp_FullMessageSaveDesktopW_file: .skip   OS_FW
Wimp_FullMessageSaveDesktopW_flags: .skip   Wimp_SaveDesktopFlags
Wimp_FullMessageSaveDesktopW   : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDevice
Wimp_FullMessageDevice_major   : .skip   Int
Wimp_FullMessageDevice_minor   : .skip   Int
Wimp_FullMessageDevice_info    : .skip   228*Char
Wimp_FullMessageDevice         : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDataSaved
Wimp_FullMessageDataSaved_ref  : .skip   Int
Wimp_FullMessageDataSaved      : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageShutdown
Wimp_FullMessageShutdown_flags : .skip   Wimp_ShutdownFlags
Wimp_FullMessageShutdown       : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageClaimEntity
Wimp_FullMessageClaimEntity_flags: .skip   Wimp_ClaimFlags
Wimp_FullMessageClaimEntity    : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDataRequest
Wimp_FullMessageDataRequest_w  : .skip   Wimp_W
Wimp_FullMessageDataRequest_i  : .skip   Wimp_I
Wimp_FullMessageDataRequest_pos: .skip   OS_Coord
Wimp_FullMessageDataRequest_flags: .skip   Wimp_DataRequestFlags
Wimp_FullMessageDataRequest_file_types: .skip   54*Bits
Wimp_FullMessageDataRequest    : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDragging
Wimp_FullMessageDragging_w     : .skip   Wimp_W
Wimp_FullMessageDragging_i     : .skip   Wimp_I
Wimp_FullMessageDragging_pos   : .skip   OS_Coord
Wimp_FullMessageDragging_flags : .skip   Wimp_DraggingFlags
Wimp_FullMessageDragging_box   : .skip   OS_Box
Wimp_FullMessageDragging_file_types: .skip   50*Bits
Wimp_FullMessageDragging       : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageDragClaim
Wimp_FullMessageDragClaim_flags: .skip   Wimp_DragClaimFlags
Wimp_FullMessageDragClaim_file_types: .skip   58*Bits
Wimp_FullMessageDragClaim      : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageReleaseEntity
Wimp_FullMessageReleaseEntity_flags: .skip   Wimp_ReleaseFlags
Wimp_FullMessageReleaseEntity  : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageAppControl
Wimp_FullMessageAppControl_protocol_version: .skip   Int
Wimp_FullMessageAppControl_flags: .skip   Wimp_AppControlFlags
Wimp_FullMessageAppControl_operation: .skip   Wimp_AppControlOperation
Wimp_FullMessageAppControl     : 

        .struct 0
        .skip   Bits
Wimp_IconiseFlags              : 

        .struct 0
        .skip   Bits
Wimp_ToggleBackdropFlags       : 

        .struct 0
        .skip   Bits
Wimp_ScreenEdgeNotificationFlags: 

        .struct 0
Wimp_MessageMenuWarning_sub_menu: .skip   Ptr
Wimp_MessageMenuWarning_pos    : .skip   OS_Coord
Wimp_MessageMenuWarning_selection: .skip   Wimp_Selection
Wimp_MessageMenuWarning        : 

        .struct 0
Wimp_MessageTaskInitialise_cao : .skip   Ptr
Wimp_MessageTaskInitialise_size: .skip   Int
Wimp_MessageTaskInitialise_task_name: .skip   228*Char
Wimp_MessageTaskInitialise     : 

        .struct 0
Wimp_MessageSlotSize_new_curr  : .skip   Int
Wimp_MessageSlotSize_new_next  : .skip   Int
Wimp_MessageSlotSize           : 

        .struct 0
Wimp_MessageSetSlot_new_curr   : .skip   Int
Wimp_MessageSetSlot_task       : .skip   Wimp_T
Wimp_MessageSetSlot            : 

        .struct 0
Wimp_MessageTaskNameRq_task    : .skip   Wimp_T
Wimp_MessageTaskNameRq         : 

        .struct 0
Wimp_MessageTaskNameIs_task    : .skip   Wimp_T
Wimp_MessageTaskNameIs_size    : .skip   Int
Wimp_MessageTaskNameIs_task_name: .skip   228*Char
Wimp_MessageTaskNameIs         : 

        .struct 0
Wimp_MessageMenusDeleted_menu  : .skip   Ptr
Wimp_MessageMenusDeleted       : 

        .struct 0
Wimp_MessageIconise_w          : .skip   Wimp_W
Wimp_MessageIconise_task       : .skip   Wimp_T
Wimp_MessageIconise_title      : .skip   20*Char
Wimp_MessageIconise            : 

        .struct 0
Wimp_MessageWindowClosed_w     : .skip   Wimp_W
Wimp_MessageWindowClosed       : 

        .struct 0
Wimp_MessageWindowInfo_w       : .skip   Wimp_W
Wimp_MessageWindowInfo_reserved: .skip   Int
Wimp_MessageWindowInfo_sprite_name: .skip   8*Char
Wimp_MessageWindowInfo_title   : .skip   20*Char
Wimp_MessageWindowInfo         : 

        .struct 0
Wimp_MessageFontChanged_font   : .skip   Font_F
Wimp_MessageFontChanged        : 

        .struct 0
Wimp_MessageIconiseAt_w        : .skip   Wimp_W
Wimp_MessageIconiseAt_task     : .skip   Wimp_T
Wimp_MessageIconiseAt_at       : .skip   OS_Coord
Wimp_MessageIconiseAt_flags    : .skip   Wimp_IconiseFlags
Wimp_MessageIconiseAt          : 

        .struct 0
Wimp_MessageToggleBackdrop_flags: .skip   Wimp_ToggleBackdropFlags
Wimp_MessageToggleBackdrop     : 

        .struct 0
Wimp_MessageScreenEdgeNotification_flags: .skip   Wimp_ScreenEdgeNotificationFlags
Wimp_MessageScreenEdgeNotification: 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageMenuWarning
Wimp_FullMessageMenuWarning_sub_menu: .skip   Ptr
Wimp_FullMessageMenuWarning_pos: .skip   OS_Coord
Wimp_FullMessageMenuWarning_selection: .skip   Wimp_Selection
Wimp_FullMessageMenuWarning    : 

        .struct 0
        .skip   Wimp_MessageHeaderBase
Wimp_FullMessageModeChange     : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageTaskInitialise
Wimp_FullMessageTaskInitialise_cao: .skip   Ptr
Wimp_FullMessageTaskInitialise_memory_size: .skip   Int
Wimp_FullMessageTaskInitialise_task_name: .skip   228*Char
Wimp_FullMessageTaskInitialise : 

        .struct 0
        .skip   Wimp_MessageHeaderBase
Wimp_FullMessageTaskCloseDown  : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageSlotSize
Wimp_FullMessageSlotSize_new_curr: .skip   Int
Wimp_FullMessageSlotSize_new_next: .skip   Int
Wimp_FullMessageSlotSize       : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageSetSlot
Wimp_FullMessageSetSlot_new_curr: .skip   Int
Wimp_FullMessageSetSlot_task   : .skip   Wimp_T
Wimp_FullMessageSetSlot        : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageTaskNameRq
Wimp_FullMessageTaskNameRq_task: .skip   Wimp_T
Wimp_FullMessageTaskNameRq     : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageTaskNameIs
Wimp_FullMessageTaskNameIs_task: .skip   Wimp_T
Wimp_FullMessageTaskNameIs_slot_size: .skip   Int
Wimp_FullMessageTaskNameIs_task_name: .skip   228*Char
Wimp_FullMessageTaskNameIs     : 

        .struct 0
        .skip   Wimp_MessageHeaderBase
Wimp_FullMessageTaskStarted    : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageMenusDeleted
Wimp_FullMessageMenusDeleted_menu: .skip   Ptr
Wimp_FullMessageMenusDeleted   : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageIconise
Wimp_FullMessageIconise_w      : .skip   Wimp_W
Wimp_FullMessageIconise_task   : .skip   Wimp_T
Wimp_FullMessageIconise_title  : .skip   20*Char
Wimp_FullMessageIconise        : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageWindowClosed
Wimp_FullMessageWindowClosed_w : .skip   Wimp_W
Wimp_FullMessageWindowClosed   : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageWindowInfo
Wimp_FullMessageWindowInfo_w   : .skip   Wimp_W
Wimp_FullMessageWindowInfo_reserved: .skip   Int
Wimp_FullMessageWindowInfo_sprite_name: .skip   8*Char
Wimp_FullMessageWindowInfo_title: .skip   20*Char
Wimp_FullMessageWindowInfo     : 

        .struct 0
        .skip   Wimp_MessageHeaderBase
Wimp_FullMessageSwap           : 

        .struct 0
        .skip   Wimp_MessageHeaderBase
Wimp_FullMessageToolsChanged   : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageFontChanged
Wimp_FullMessageFontChanged_font: .skip   Font_F
Wimp_FullMessageFontChanged    : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageIconiseAt
Wimp_FullMessageIconiseAt_w    : .skip   Wimp_W
Wimp_FullMessageIconiseAt_task : .skip   Wimp_T
Wimp_FullMessageIconiseAt_at   : .skip   OS_Coord
Wimp_FullMessageIconiseAt_flags: .skip   Wimp_IconiseFlags
Wimp_FullMessageIconiseAt      : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageToggleBackdrop
Wimp_FullMessageToggleBackdrop_flags: .skip   Wimp_ToggleBackdropFlags
Wimp_FullMessageToggleBackdrop : 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_FullMessageScreenEdgeNotification
Wimp_FullMessageScreenEdgeNotification_flags: .skip   Wimp_ScreenEdgeNotificationFlags
Wimp_FullMessageScreenEdgeNotification: 

        .struct 0
        Wimp_MessageHeader_MEMBERS Wimp_Message
Wimp_Message_data              : 
Wimp_Message_data_data_xfer    : .skip   Wimp_MessageDataXfer
        .struct Wimp_Message_data
Wimp_Message_data_ram_xfer     : .skip   Wimp_MessageRAMXfer
        .struct Wimp_Message_data
Wimp_Message_data_prequit      : .skip   Wimp_MessagePrequit
        .struct Wimp_Message_data
Wimp_Message_data_save_desktop : .skip   Wimp_MessageSaveDesktop
        .struct Wimp_Message_data
Wimp_Message_data_save_desktopw: .skip   Wimp_MessageSaveDesktopW
        .struct Wimp_Message_data
Wimp_Message_data_device       : .skip   Wimp_MessageDevice
        .struct Wimp_Message_data
Wimp_Message_data_data_saved   : .skip   Wimp_MessageDataSaved
        .struct Wimp_Message_data
Wimp_Message_data_shutdown     : .skip   Wimp_MessageShutdown
        .struct Wimp_Message_data
Wimp_Message_data_claim_entity : .skip   Wimp_MessageClaimEntity
        .struct Wimp_Message_data
Wimp_Message_data_data_request : .skip   Wimp_MessageDataRequest
        .struct Wimp_Message_data
Wimp_Message_data_dragging     : .skip   Wimp_MessageDragging
        .struct Wimp_Message_data
Wimp_Message_data_drag_claim   : .skip   Wimp_MessageDragClaim
        .struct Wimp_Message_data
Wimp_Message_data_release_entity: .skip   Wimp_MessageReleaseEntity
        .struct Wimp_Message_data
Wimp_Message_data_app_control  : .skip   Wimp_MessageAppControl
        .struct Wimp_Message_data
Wimp_Message_data_reserved     : .skip   236*Byte
Wimp_Message                   : 

        .struct 0
Wimp_Block_redraw              : .skip   Wimp_Draw
        .struct 0
Wimp_Block_open                : .skip   Wimp_Open
        .struct 0
Wimp_Block_close               : .skip   Wimp_Close
        .struct 0
Wimp_Block_leaving             : .skip   Wimp_Leaving
        .struct 0
Wimp_Block_entering            : .skip   Wimp_Entering
        .struct 0
Wimp_Block_pointer             : .skip   Wimp_Pointer
        .struct 0
Wimp_Block_dragged             : .skip   Wimp_Dragged
        .struct 0
Wimp_Block_key                 : .skip   Wimp_Key
        .struct 0
Wimp_Block_selection           : .skip   Wimp_Selection
        .struct 0
Wimp_Block_scroll              : .skip   Wimp_Scroll
        .struct 0
Wimp_Block_caret               : .skip   Wimp_Caret
        .struct 0
Wimp_Block_pollword            : .skip   Wimp_Pollword
        .struct 0
Wimp_Block_message             : .skip   Wimp_Message
        .struct 0
Wimp_Block_reserved            : .skip   256*Byte
Wimp_Block                     : 

        .struct 0
Wimp_MessageList_messages      : .skip   Int
Wimp_MessageList               : 

        .struct 0
        .skip   Bits
Wimp_Priority                  : 

        .struct 0
        .skip   Bits
Wimp_PlotIconFlags             : 

        .struct 0
        .skip   Int
Wimp_CommandWindowState        : 

        .struct 0
        .skip   Bits
Wimp_MenuStateFlags            : 

        .struct 0
        .skip   Int
Wimp_FilterAction              : 

        .struct 0
        .skip   Bits
WimpTextOp_StringWidthFlags    : 

        .struct 0
        .skip   Bits
WimpTextOp_PaintFlags          : 


@Symbols for SWI's and SWI reason codes
.set XWimp_Initialise,0x600c0
.set Wimp_Initialise,0x400c0
   @Entry
   @  R0 = version (Wimp_VersionNo)
   @  R1 = &4B534154
   @  R2 -> name (String)
   @  R3 -> messages (Wimp_MessageList)
   @Exit
   @  R0 = version_out (Wimp_VersionNo)
   @  R1 = task_out (Wimp_T)

.set XWimp_Init,0x600c0
.set Wimp_Init,0x400c0
   @Entry
   @  R0 = version (Wimp_VersionNo)
   @  R1 = r1 (Bits)
   @  R2 -> name (String)
   @  R3 -> messages (Wimp_MessageList)
   @Exit
   @  R0 = version_out (Wimp_VersionNo)
   @  R1 = task_out (Wimp_T)

.set XWimp_CreateWindow,0x600c1
.set Wimp_CreateWindow,0x400c1
   @Entry
   @  R1 -> window (Wimp_Window)
   @Exit
   @  R0 = w (Wimp_W)

.set XWimp_CreateIcon,0x600c2
.set Wimp_CreateIcon,0x400c2
   @Entry
   @  R1 -> icon (Wimp_IconCreate)
   @Exit
   @  R0 = i (Wimp_I)

.set XWimp_CreateIconRelative,0x600c2
.set Wimp_CreateIconRelative,0x400c2
   @Entry
   @  R0 = neighbour (Wimp_I)
   @  R1 -> icon (Wimp_IconCreate)
   @Exit
   @  R0 = i (Wimp_I)

.set XWimp_CreateIconPrioritised,0x600c2
.set Wimp_CreateIconPrioritised,0x400c2
   @Entry
   @  R0 = priority (Wimp_Priority)
   @  R1 -> icon (Wimp_IconCreate)
   @Exit
   @  R0 = i (Wimp_I)

.set XWimp_DeleteWindow,0x600c3
.set Wimp_DeleteWindow,0x400c3
   @Entry
   @  R1 -> delete_window (sequence of (Wimp_W))
   @Exit
   @  R0 corrupted

.set XWimp_DeleteIcon,0x600c4
.set Wimp_DeleteIcon,0x400c4
   @Entry
   @  R1 -> delete_icon (sequence of (Wimp_W, Wimp_I))
   @Exit
   @  R0 corrupted

.set XWimp_OpenWindow,0x600c5
.set Wimp_OpenWindow,0x400c5
   @Entry
   @  R1 = open (pointer to Wimp_Open)
   @  R2 = &0
   @Exit
   @  R0 corrupted

.set XWimp_OpenWindowNested,0x600c5
.set Wimp_OpenWindowNested,0x400c5
   @Entry
   @  R1 = open (pointer to Wimp_Open)
   @  R2 = &4B534154
   @  R3 = parent (Wimp_W)
   @  R4 = linkage (Wimp_WindowNestingFlags)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_OpenWindowNestedWithFlags,0x600c5
.set Wimp_OpenWindowNestedWithFlags,0x400c5
   @Entry
   @  R1 = open (pointer to Wimp_WindowState)
   @  R2 = &4B534154
   @  R3 = parent (Wimp_W)
   @  R4 = &1 :OR: linkage (Wimp_WindowNestingFlags)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_CloseWindow,0x600c6
.set Wimp_CloseWindow,0x400c6
   @Entry
   @  R1 -> close_window (sequence of (Wimp_W))
   @Exit
   @  R0 corrupted

.set XWimp_Poll,0x600c7
.set Wimp_Poll,0x400c7
   @Entry
   @  R0 = mask (Wimp_PollFlags)
   @  R1 = block (pointer to Wimp_Block)
   @  R3 = pollword (pointer to Int)
   @Exit
   @  R0 = event (Wimp_EventNo)
   @  R2 corrupted

.set XWimp_RedrawWindow,0x600c8
.set Wimp_RedrawWindow,0x400c8
   @Entry
   @  R1 = redraw (pointer to Wimp_Draw)
   @Exit
   @  R0 = more (Bool)

.set XWimp_UpdateWindow,0x600c9
.set Wimp_UpdateWindow,0x400c9
   @Entry
   @  R1 = update (pointer to Wimp_Draw)
   @Exit
   @  R0 = more (Bool)

.set XWimp_GetRectangle,0x600ca
.set Wimp_GetRectangle,0x400ca
   @Entry
   @  R1 = draw (pointer to Wimp_Draw)
   @Exit
   @  R0 = more (Bool)

.set XWimp_GetWindowState,0x600cb
.set Wimp_GetWindowState,0x400cb
   @Entry
   @  R1 = state (pointer to Wimp_WindowState)
   @  R2 = &0
   @Exit
   @  R0 corrupted

.set XWimp_GetWindowStateAndNesting,0x600cb
.set Wimp_GetWindowStateAndNesting,0x400cb
   @Entry
   @  R1 = state (pointer to Wimp_WindowState)
   @  R2 = &4B534154
   @Exit
   @  R0 corrupted
   @  R2 corrupted
   @  R3 = parent (Wimp_W)
   @  R4 = linkage (Bits)

.set XWimp_GetWindowInfo,0x600cc
.set Wimp_GetWindowInfo,0x400cc
   @Entry
   @  R1 = info (pointer to Wimp_WindowInfo)
   @Exit
   @  R0 corrupted

.set XWimp_GetWindowInfoHeaderOnly,0x600cc
.set Wimp_GetWindowInfoHeaderOnly,0x400cc
   @Entry
   @  R1 = &1 :OR: info (pointer to Wimp_WindowInfo)
   @Exit
   @  R0 corrupted

.set XWimp_SetIconState,0x600cd
.set Wimp_SetIconState,0x400cd
   @Entry
   @  R1 -> state_change (sequence of (Wimp_W, Wimp_I, Wimp_IconFlags, Wimp_IconFlags))
   @Exit
   @  R0 corrupted

.set XWimp_SetIconStateFromBlock,0x600cd
.set Wimp_SetIconStateFromBlock,0x400cd
   @Entry
   @  R1 -> block (Wimp_SetIconStateBlock)
   @Exit
   @  R0 corrupted

.set XWimp_GetIconState,0x600ce
.set Wimp_GetIconState,0x400ce
   @Entry
   @  R1 = icon_state (pointer to Wimp_IconState)
   @Exit
   @  R0 corrupted

.set XWimp_GetPointerInfo,0x600cf
.set Wimp_GetPointerInfo,0x400cf
   @Entry
   @  R1 = pointer (pointer to Wimp_Pointer)
   @Exit
   @  R0 corrupted

.set XWimp_DragBox,0x600d0
.set Wimp_DragBox,0x400d0
   @Entry
   @  R1 -> drag (Wimp_Drag)
   @Exit
   @  R0 corrupted

.set XWimp_DragBoxWithFlags,0x600d0
.set Wimp_DragBoxWithFlags,0x400d0
   @Entry
   @  R1 -> drag (Wimp_Drag)
   @  R2 = &4B534154
   @  R3 = flags (Wimp_DragBoxFlags)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_ForceRedraw,0x600d1
.set Wimp_ForceRedraw,0x400d1
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = x0 (Int)
   @  R2 = y0 (Int)
   @  R3 = x1 (Int)
   @  R4 = y1 (Int)
   @Exit
   @  R0 corrupted

.set XWimp_ForceRedrawFurniture,0x600d1
.set Wimp_ForceRedrawFurniture,0x400d1
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = &4B534154
   @  R2 = item (Wimp_Furniture)
   @Exit
   @  R0 corrupted
   @  R1 corrupted

.set XWimp_ForceRedrawTitle,0x600d1
.set Wimp_ForceRedrawTitle,0x400d1
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = &4B534154
   @  R2 = &3
   @Exit
   @  R0 corrupted
   @  R1 corrupted

.set XWimp_SetCaretPosition,0x600d2
.set Wimp_SetCaretPosition,0x400d2
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = i (Wimp_I)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @  R4 = height (Int)
   @  R5 = index (Int)

#  define WimpSetCaretPositionExtended_Caret 0x0
   @Entry
   @  R0 = &4B534154
   @  R1 -> caret (Wimp_Caret)
   @  R2 = &0
   @Exit
   @  R0 corrupted

#  define WimpSetCaretPositionExtended_Selection 0x2
   @Entry
   @  R0 = &4B534154
   @  R1 -> selection (Wimp_TextSelection)
   @  R2 = &2
   @Exit
   @  R0 corrupted

.set XWimp_GetCaretPosition,0x600d3
.set Wimp_GetCaretPosition,0x400d3
   @Entry
   @  R1 = caret (pointer to Wimp_Caret)
   @Exit
   @  R0 corrupted

#  define WimpGetCaretPositionExtended_Caret 0x0
   @Entry
   @  R0 = &4B534154
   @  R1 = caret (pointer to Wimp_Caret)
   @  R2 = &0
   @Exit
   @  R0 corrupted

#  define WimpGetCaretPositionExtended_Selection 0x2
   @Entry
   @  R0 = &4B534154
   @  R1 = selection (pointer to Wimp_TextSelection)
   @  R2 = &2
   @Exit
   @  R0 corrupted

.set XWimp_CreateMenu,0x600d4
.set Wimp_CreateMenu,0x400d4
   @Entry
   @  R1 = menu (pointer to Wimp_Menu)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @Exit
   @  R0 corrupted

.set XWimp_DecodeMenu,0x600d5
.set Wimp_DecodeMenu,0x400d5
   @Entry
   @  R1 -> menu (Wimp_Menu)
   @  R2 -> selection (Wimp_Selection)
   @  R3 = decode (pointer to String)
   @Exit
   @  R0 corrupted

.set XWimp_WhichIcon,0x600d6
.set Wimp_WhichIcon,0x400d6
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = which (pointer to Wimp_I)
   @  R2 = mask (Wimp_IconFlags)
   @  R3 = match (Wimp_IconFlags)
   @Exit
   @  R0 corrupted

.set XWimp_SetExtent,0x600d7
.set Wimp_SetExtent,0x400d7
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 -> box (OS_Box)
   @Exit
   @  R0 corrupted

.set XWimp_SetPointerShape,0x600d8
.set Wimp_SetPointerShape,0x400d8
   @Entry
   @  R0 = shape_no (Int)
   @  R1 -> shape_data (data)
   @  R2 = width (Int)
   @  R3 = height (Int)
   @  R4 = xactive (Int)
   @  R5 = yactive (Int)
   @Exit
   @  R0 corrupted

.set XWimp_OpenTemplate,0x600d9
.set Wimp_OpenTemplate,0x400d9
   @Entry
   @  R1 -> file_name (String)
   @Exit
   @  R0 corrupted

.set XWimp_CloseTemplate,0x600da
.set Wimp_CloseTemplate,0x400da
   @Exit
   @  R0 corrupted

.set XWimp_LoadTemplate,0x600db
.set Wimp_LoadTemplate,0x400db
   @Entry
   @  R1 = window (pointer to Wimp_Window)
   @  R2 = data (pointer to String)
   @  R3 -> end (Char)
   @  R4 = font_ref (pointer to Byte)
   @  R5 = name (pointer to String)
   @  R6 = context (Int)
   @Exit
   @  R0 corrupted
   @  R1 = used (Int)
   @  R2 = data_used (Int)
   @  R6 = context_out (Int)

.set XWimp_ProcessKey,0x600dc
.set Wimp_ProcessKey,0x400dc
   @Entry
   @  R0 = c (Wimp_KeyNo)
   @Exit
   @  R0 corrupted

.set XWimp_CloseDown,0x600dd
.set Wimp_CloseDown,0x400dd
   @Entry
   @  R0 = t (Wimp_T)
   @  R1 = &4B534154
   @Exit
   @  R0 corrupted
   @  R1 corrupted

.set XWimp_StartTask,0x600de
.set Wimp_StartTask,0x400de
   @Entry
   @  R0 -> command (String)
   @Exit
   @  R0 = t (Wimp_T)

.set XWimp_ReportError,0x600df
.set Wimp_ReportError,0x400df
   @Entry
   @  R0 -> error (OS_Error)
   @  R1 = flags (Wimp_ErrorBoxFlags)
   @  R2 -> name (String)
   @Exit
   @  R0 corrupted
   @  R1 = click (Wimp_ErrorBoxSelection)

.set XWimp_ReportErrorByCategory,0x600df
.set Wimp_ReportErrorByCategory,0x400df
   @Entry
   @  R0 -> error (OS_Error)
   @  R1 = &100 :OR: flags (Wimp_ErrorBoxFlags)
   @  R2 -> name (String)
   @  R3 -> sprite_name (String)
   @  R4 -> area (OSSpriteOp_Area)
   @  R5 -> buttons (String)
   @Exit
   @  R0 corrupted
   @  R1 = click (Wimp_ErrorBoxSelection)

.set XWimp_GetWindowOutline,0x600e0
.set Wimp_GetWindowOutline,0x400e0
   @Entry
   @  R1 = outline (pointer to Wimp_Outline)
   @Exit
   @  R0 corrupted

.set XWimp_PollIdle,0x600e1
.set Wimp_PollIdle,0x400e1
   @Entry
   @  R0 = mask (Wimp_PollFlags)
   @  R1 = block (pointer to Wimp_Block)
   @  R2 = t (OS_T)
   @  R3 = pollword (pointer to Int)
   @Exit
   @  R0 = event (Wimp_EventNo)
   @  R2 corrupted

.set XWimp_PlotIcon,0x600e2
.set Wimp_PlotIcon,0x400e2
   @Entry
   @  R1 -> icon (Wimp_Icon)
   @Exit
   @  R0 corrupted

.set XWimp_PlotIconWithWindow,0x600e2
.set Wimp_PlotIconWithWindow,0x400e2
   @Entry
   @  R1 -> icon (Wimp_Icon)
   @  R2 = &4B534154
   @  R3 = x_origin (Int)
   @  R4 = y_origin (Int)
   @  R5 = flags (Wimp_PlotIconFlags)
   @  R6 = window (Wimp_W)
   @Exit
   @  R0 corrupted

.set XWimp_PlotIconWithSpriteArea,0x600e2
.set Wimp_PlotIconWithSpriteArea,0x400e2
   @Entry
   @  R1 -> icon (Wimp_Icon)
   @  R2 = &4B534154
   @  R3 = x_origin (Int)
   @  R4 = y_origin (Int)
   @  R5 = &1 :OR: flags (Wimp_PlotIconFlags)
   @  R6 = background_colour (Wimp_Colour)
   @  R7 -> sprite_area (OSSpriteOp_Area)
   @Exit
   @  R0 corrupted

.set XWimp_PlotIconWithWindowSpriteArea,0x600e2
.set Wimp_PlotIconWithWindowSpriteArea,0x400e2
   @Entry
   @  R1 -> icon (Wimp_Icon)
   @  R2 = &5441534B
   @  R3 = &0 :OR: flags (Wimp_PlotIconFlags)
   @  R4 = x_origin (Int)
   @  R5 = y_origin (Int)
   @  R6 = window (Wimp_W)
   @  R7 -> sprite_area (OSSpriteOp_Area)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_PlotIconWithBackgroundSpriteArea,0x600e2
.set Wimp_PlotIconWithBackgroundSpriteArea,0x400e2
   @Entry
   @  R1 -> icon (Wimp_Icon)
   @  R2 = &5441534B
   @  R3 = &1 :OR: flags (Wimp_PlotIconFlags)
   @  R4 = x_origin (Int)
   @  R5 = y_origin (Int)
   @  R6 = background_colour (Wimp_Colour)
   @  R7 -> sprite_area (OSSpriteOp_Area)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_SetMode,0x600e3
.set Wimp_SetMode,0x400e3
   @Entry
   @  R0 = mode (OS_Mode)
   @Exit
   @  R0 corrupted

.set XWimp_SetPalette,0x600e4
.set Wimp_SetPalette,0x400e4
   @Entry
   @  R1 -> palette (OS_Palette)
   @Exit
   @  R0 corrupted

.set XWimp_ReadPalette,0x600e5
.set Wimp_ReadPalette,0x400e5
   @Entry
   @  R1 = palette (pointer to OS_Palette)
   @  R2 = &0
   @Exit
   @  R0 corrupted

.set XWimp_ReadTruePalette,0x600e5
.set Wimp_ReadTruePalette,0x400e5
   @Entry
   @  R1 = palette (pointer to OS_Palette)
   @  R2 = &45555254
   @Exit
   @  R0 corrupted

.set XWimp_SetColour,0x600e6
.set Wimp_SetColour,0x400e6
   @Entry
   @  R0 = colour (Wimp_Colour)
   @Exit
   @  R0 corrupted

.set XWimp_SendMessage,0x600e7
.set Wimp_SendMessage,0x400e7
   @Entry
   @  R0 = event (Wimp_EventNo)
   @  R1 = message (pointer to Wimp_Message)
   @  R2 = to (Wimp_T)
   @Exit
   @  R0 corrupted
   @  R2 corrupted

.set XWimp_SendMessageToWindow,0x600e7
.set Wimp_SendMessageToWindow,0x400e7
   @Entry
   @  R0 = event (Wimp_EventNo)
   @  R1 = message (pointer to Wimp_Message)
   @  R2 = to_w (Wimp_W)
   @  R3 = to_i (Wimp_I)
   @Exit
   @  R0 corrupted
   @  R2 = to_t (Wimp_T)

.set XWimp_CreateSubMenu,0x600e8
.set Wimp_CreateSubMenu,0x400e8
   @Entry
   @  R1 = sub_menu (pointer to Wimp_Menu)
   @  R2 = x (Int)
   @  R3 = y (Int)
   @Exit
   @  R0 corrupted

.set XWimp_BaseOfSprites,0x600ea
.set Wimp_BaseOfSprites,0x400ea
   @Exit
   @  R0 -> rom (OSSpriteOp_Area)
   @  R1 -> ram (OSSpriteOp_Area)

.set XWimp_BlockCopy,0x600eb
.set Wimp_BlockCopy,0x400eb
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = x0 (Int)
   @  R2 = y0 (Int)
   @  R3 = x1 (Int)
   @  R4 = y1 (Int)
   @  R5 = X0 (Int)
   @  R6 = Y0 (Int)

.set XWimp_SlotSize,0x600ec
.set Wimp_SlotSize,0x400ec
   @Entry
   @  R0 = new_curr_slot (Int)
   @  R1 = new_next_slot (Int)
   @Exit
   @  R0 = curr_slot (Int)
   @  R1 = next_slot (Int)
   @  R2 = free_slot (Int)
   @  R4 corrupted

.set XWimp_ReadPixTrans,0x600ed
.set Wimp_ReadPixTrans,0x400ed
   @Entry
   @  R0 = flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R6 = factors (pointer to OS_Factors)
   @  R7 = trans_tab (pointer to OSSpriteOp_TransTab)
   @Exit
   @  R0 corrupted

.set XWimp_ClaimFreeMemory,0x600ee
.set Wimp_ClaimFreeMemory,0x400ee

#  define WimpClaimFreeMemory_Alloc 0x1
   @Entry
   @  R0 = &1
   @  R1 = size (Int)
   @Exit
   @  R0 corrupted
   @  R1 = size_out (Int)
   @  R2 = blk (pointer to Void)

#  define WimpClaimFreeMemory_Free 0x0
   @Entry
   @  R0 = &0
   @Exit
   @  R0 corrupted
   @  R1 corrupted
   @  R2 corrupted

.set XWimp_CommandWindow,0x600ef
.set Wimp_CommandWindow,0x400ef
   @Entry
   @  R0 -> op (String)
   @Exit
   @  R0 corrupted

.set XWimp_CommandWindowActivate,0x600ef
.set Wimp_CommandWindowActivate,0x400ef
   @Entry
   @  R0 = &1
   @Exit
   @  R0 corrupted

.set XWimp_CommandWindowCloseWithPrompt,0x600ef
.set Wimp_CommandWindowCloseWithPrompt,0x400ef
   @Entry
   @  R0 = &0
   @Exit
   @  R0 corrupted

.set XWimp_CommandWindowClose,0x600ef
.set Wimp_CommandWindowClose,0x400ef
   @Entry
   @  R0 = &FFFFFFFF
   @Exit
   @  R0 corrupted

.set XWimp_CommandWindowReadState,0x600ef
.set Wimp_CommandWindowReadState,0x400ef
   @Entry
   @  R0 = &2
   @Exit
   @  R0 = state (Wimp_CommandWindowState)

.set XWimp_TextColour,0x600f0
.set Wimp_TextColour,0x400f0
   @Entry
   @  R0 = colour (Wimp_Colour)
   @Exit
   @  R0 corrupted

.set XWimp_TransferBlock,0x600f1
.set Wimp_TransferBlock,0x400f1
   @Entry
   @  R0 = from_t (Wimp_T)
   @  R1 = from (pointer to data)
   @  R2 = to_t (Wimp_T)
   @  R3 = to (pointer to data)
   @  R4 = len (Int)
   @Exit
   @  R0 corrupted

.set XWimp_SetFontColours,0x600f3
.set Wimp_SetFontColours,0x400f3
   @Entry
   @  R1 = fg (Wimp_Colour)
   @  R2 = bg (Wimp_Colour)
   @Exit
   @  R0 corrupted

.set XWimp_GetMenuState,0x600f4
.set Wimp_GetMenuState,0x400f4
   @Entry
   @  R0 = flags (Wimp_MenuStateFlags)
   @  R1 = selection (pointer to Wimp_Selection)
   @  R2 = w (Wimp_W)
   @  R3 = i (Wimp_I)
   @Exit
   @  R0 corrupted

.set XWimp_RegisterFilter,0x600f5
.set Wimp_RegisterFilter,0x400f5
   @Entry
   @  R0 = type (Wimp_FilterAction)
   @  R1 = filter_code (pointer to code)
   @  R2 = handle (pointer to data)
   @Exit
   @  R0 corrupted

.set XWimp_AddMessages,0x600f6
.set Wimp_AddMessages,0x400f6
   @Entry
   @  R0 -> messages (Wimp_MessageList)
   @Exit
   @  R0 corrupted

.set XWimp_RemoveMessages,0x600f7
.set Wimp_RemoveMessages,0x400f7
   @Entry
   @  R0 -> messages (Wimp_MessageList)
   @Exit
   @  R0 corrupted

.set XWimp_SetColourMapping,0x600f8
.set Wimp_SetColourMapping,0x400f8
   @Entry
   @  R1 -> palette (OS_Palette)
   @  R2 -> map2 (Byte)
   @  R3 -> map4 (Byte)
   @  R4 -> map16 (Byte)
   @  R5 = &0
   @  R6 = &0
   @  R7 = &0
   @Exit
   @  R0 corrupted

.set XWimp_TextOp,0x600f9
.set Wimp_TextOp,0x400f9

#  define WimpTextOp_SetColour 0x0
   @Entry
   @  R0 = &0
   @  R1 = fg (OS_Colour)
   @  R2 = bg (OS_Colour)
   @Exit
   @  R0 corrupted

#  define WimpTextOp_StringWidth 0x1
   @Entry
   @  R0 = &1
   @  R1 -> s (String)
   @  R2 = len (Int)
   @Exit
   @  R0 = width (Int)

#  define WimpTextOp_StringWidthWithFlags 0x1
   @Entry
   @  R0 = &1 :OR: flags (WimpTextOp_StringWidthFlags)
   @  R1 -> s (String)
   @  R2 = len (Int)
   @Exit
   @  R0 = width (Int)

#  define WimpTextOp_Paint 0x2
   @Entry
   @  R0 = &2 :OR: flags (WimpTextOp_PaintFlags)
   @  R1 -> s (String)
   @  R2 = &FFFFFFFF
   @  R3 = &FFFFFFFF
   @  R4 = x0 (Int)
   @  R5 = y0 (Int)

#  define WimpTextOp_GetSplitPoint 0x3
   @Entry
   @  R0 = &3
   @  R1 -> s (String)
   @  R2 = width (Int)
   @  R3 = split_char (Int)
   @Exit
   @  R0 -> split_point (String)

#  define WimpTextOp_TruncateWithEllipsis 0x4
   @Entry
   @  R0 = &4
   @  R1 -> s (String)
   @  R2 = out_buf (pointer to String)
   @  R3 = buf_size (Int)
   @  R4 = width (Int)
   @Exit
   @  R0 = buf_size_required (Int)

.set XWimp_SetWatchdogState,0x600fa
.set Wimp_SetWatchdogState,0x400fa
   @Entry
   @  R0 = enable (Bool)
   @  R1 = code_word (Int)
   @Exit
   @  R0 corrupted

.set XWimp_ResizeIcon,0x600fc
.set Wimp_ResizeIcon,0x400fc
   @Entry
   @  R0 = w (Wimp_W)
   @  R1 = i (Wimp_I)
   @  R2 = x0 (Int)
   @  R3 = y0 (Int)
   @  R4 = x1 (Int)
   @  R5 = y1 (Int)
   @Exit
   @  R0 corrupted

.set XWimp_AutoScroll,0x600fd
.set Wimp_AutoScroll,0x400fd
   @Entry
   @  R0 = flags (Wimp_AutoScrollFlags)
   @  R1 = info (pointer to Wimp_AutoScrollInfo)
   @Exit
   @  R0 = flags_out (Wimp_AutoScrollFlags)

#  define Service_Memory 0x11
   @Entry
   @  R0 = change (Int)
   @  R1 = &11
   @  R2 = cao (pointer to data)

#  define Service_StartWimp 0x49
   @Entry
   @  R1 = &49

#  define Service_StartedWimp 0x4a
   @Entry
   @  R1 = &4A

#  define Service_MouseTrap 0x52
   @Entry
   @  R1 = &52

#  define Service_WimpCloseDown 0x53
   @Entry
   @  R1 = &53

#  define Service_WimpReportError 0x57
   @Entry
   @  R0 = opening (Bool)
   @  R1 = &57

#  define Service_WimpSaveDesktop 0x5c
   @Entry
   @  R0 = flags (Wimp_SaveDesktopFlags)
   @  R1 = &5C
   @  R2 = file (OS_F)
   @Exit
   @  R0 -> error (OS_Error)
   @  R1 = unclaimed (Bool)

#  define Service_WimpSaveDesktopW 0x5c
   @Entry
   @  R0 = flags (Wimp_SaveDesktopFlags)
   @  R1 = &5C
   @  R2 = file (OS_FW)
   @Exit
   @  R0 -> error (OS_Error)
   @  R1 = unclaimed (Bool)

#  define Service_WimpPalette 0x5d
   @Entry
   @  R1 = &5D

#  define Service_DesktopWelcome 0x7c
   @Entry
   @  R1 = &7C

#  define Service_ShutDown 0x7e
   @Entry
   @  R1 = &7E

#  define Service_ShutDownComplete 0x80
   @Entry
   @  R1 = &80

#  define Service_WimpSpritesMoved 0x85
   @Entry
   @  R1 = &85

#  define Service_WimpRegisterFilters 0x86
   @Entry
   @  R1 = &86

#  define Service_ErrorStarting 0x400c0
   @Entry
   @  R1 = &400C0
   @  R2 -> error (OS_Error)
   @  R3 = flags (Wimp_ErrorBoxFlags)
   @  R4 -> name (String)
   @  R5 -> sprite_name (String)
   @  R6 -> area (OSSpriteOp_Area)
   @  R7 -> buttons (String)
   @Exit
   @  R2 -> error_out (OS_Error)
   @  R3 = flags_out (Wimp_ErrorBoxFlags)
   @  R4 -> name_out (String)
   @  R5 -> sprite_name_out (String)
   @  R6 -> area_out (OSSpriteOp_Area)
   @  R7 -> buttons_out (String)

#  define Service_ErrorButtonPressed 0x400c1
   @Entry
   @  R0 = &0
   @  R1 = &400C1
   @  R2 = button (Wimp_ErrorBoxSelection)
   @  R3 -> button_list (String)
   @Exit
   @  R0 = redisplay (Bool)
   @  R1 = unclaimed (Bool)
   @  R2 = button_out (Wimp_ErrorBoxSelection)

#  define Service_ErrorEnding 0x400c2
   @Entry
   @  R1 = &400C2
   @  R2 = button (Wimp_ErrorBoxSelection)
   @Exit
   @  R1 = unclaimed (Bool)
   @  R2 = button_out (Wimp_ErrorBoxSelection)

#  define Service_WimpToolSpritesChanged 0x400c3
   @Entry
   @  R1 = &400C3
   @  R2 -> tool_area (OSSpriteOp_Area)

#endif
