Wimp 13.5 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
        SUBT    Exported Window Manager constants

OldOpt  SETA    {OPT}
        OPT     OptNoList+OptNoP1List

; ***********************************
; ***    C h a n g e   L i s t    ***
; ***********************************

; Date       Name  Description
; ----       ----  -----------
; 20-Jul-87  NDR   Added change list
; 28-Jul-87  NDR   Put in missing variables & change Wimp to check for them!
; 29-Oct-87  NDR   Add Wimp_ReportError
;  2-Nov-87  NDR   Add Wimp_TaskHandle
;  3-Nov-87  NDR   Remove Wimp_TaskHandle
; 26-Nov-87  NDR   Add Wimp_GetWindowOutline
; 21-Jan-88  NDR   Add Wimp_PollIdle
; 26-Jan-88  NDR   Add Wimp_SetMode
; 28-Jan-88  NDR   Add Wimp_SetPalette and Wimp_ReadPalette
; 29-Jan-88  NDR   Add Wimp_SetColour
;  8-Feb-88  NDR   Add Wimp_SendMessage
; 15-Feb-88  NDR   Add Wimp_MergeSpriteFile and Wimp_BaseOfSprites
; 16-Feb-88  NDR   Add Wimp_BlockCopy
; 25-Feb-88  NDR   Add Wimp_SlotSize
; 29-Feb-88  NDR   Add Wimp message action numbers as well
;  2-Mar-88  NDR   Add Wimp_ReadPixTrans
; 21-Mar-88  NDR   Add Wimp_ClaimFreeMemory
; 12-Apr-88  NDR   Add Wimp_CommandWindow
; 14-Apr-88  NDR   Add Wimp_TextColour
; 18-May-88  NDR   Add Wimp_TransferBlock
; 23-May-88  NDR   Add Wimp_ReadSysInfo
; 21-Jun-88  NDR   Changed Wimp_MergeSpriteFile to Wimp_SpriteOp
;  5-Jul-88  NDR   Add Wimp_SetFontColours
; 27-Jul-89  NDR   Added Wimp_GetMenuState (Wimp 2.18 onwards)
; 26-Feb-90  NDR   Added WimpPriority settings
; 30-Nov-90  RM    Added Wimp_RegisterFilter
; 18-Jul-91  RM    Added Wimp_AddMessages
; 03-Dec-91  DDV   Added Wimp_SetColourMapping
; 10-Jan-92  DDV   Added list of ReadSysInfo requests
; 17-Jan-92  DDV   Split off Task Manager SWIs section
; 30-Jan-92  DDV   Added list of filter reasons
; 13-Feb-92  DDV   Inserted Wimp_RemoveMessages (before SetColourMapping)
; 18-Feb-92  DDV   Added WimpSysInfo_CurrentTask
; 03-Apr-92  LRust Added WimpSysInfo_WimpVersion and WimpValidation definitions
; 15-Apr-92  DDV   Added token for the Interface Manager in WimpValidation defs.
; 23-Mar-93  NK    Added Wimp_GetIconInfo SWI call.
; 12-Jul-93  SMC   Added WimpPriority_ModeChooser.
; 15-Jul-93  NK    Added SWIs SetWatchdogState,Extend and ResizeIcon
;                  Added Macro BL_Wimp for direct calling of wimp code
;                  Added new codes for ReadSysInfo
; 20-Aug-93  NK    Changed GetIconInfo to TextOp
; 31-Jan-94  NK    Added reason codes
; 02-Aug-94  AMcC  Changed to using the preferred SWI base and name symbols
; 18-Aug-94  SMC   Fixed MED-03541 and MED-03390: Wimp failed to lookup error/button texts
;

Ben Avison's avatar
Ben Avison committed
72 73 74
        GBLL    Included_Hdr_Wimp
Included_Hdr_Wimp SETL {TRUE}

Neil Turton's avatar
Neil Turton committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
SWIClass        SETS    WimpSWI_Name

        ^       WimpSWI_Base

        AddSWI  Initialise              ; &400C0
        AddSWI  CreateWindow            ; &400C1
        AddSWI  CreateIcon              ; &400C2
        AddSWI  DeleteWindow            ; &400C3
        AddSWI  DeleteIcon              ; &400C4
        AddSWI  OpenWindow              ; &400C5
        AddSWI  CloseWindow             ; &400C6
        AddSWI  Poll                    ; &400C7
        AddSWI  RedrawWindow            ; &400C8
        AddSWI  UpdateWindow            ; &400C9
        AddSWI  GetRectangle            ; &400CA
        AddSWI  GetWindowState          ; &400CB
        AddSWI  GetWindowInfo           ; &400CC
        AddSWI  SetIconState            ; &400CD
        AddSWI  GetIconState            ; &400CE
        AddSWI  GetPointerInfo          ; &400CF
        AddSWI  DragBox                 ; &400D0
        AddSWI  ForceRedraw             ; &400D1
        AddSWI  SetCaretPosition        ; &400D2
        AddSWI  GetCaretPosition        ; &400D3
        AddSWI  CreateMenu              ; &400D4
        AddSWI  DecodeMenu              ; &400D5
        AddSWI  WhichIcon               ; &400D6
        AddSWI  SetExtent               ; &400D7
        AddSWI  SetPointerShape         ; &400D8
        AddSWI  OpenTemplate            ; &400D9
        AddSWI  CloseTemplate           ; &400DA
        AddSWI  LoadTemplate            ; &400DB
        AddSWI  ProcessKey              ; &400DC
        AddSWI  CloseDown               ; &400DD
        AddSWI  StartTask               ; &400DE
        AddSWI  ReportError             ; &400DF
        AddSWI  GetWindowOutline        ; &400E0
        AddSWI  PollIdle                ; &400E1
        AddSWI  PlotIcon                ; &400E2
        AddSWI  SetMode                 ; &400E3
        AddSWI  SetPalette              ; &400E4
        AddSWI  ReadPalette             ; &400E5
        AddSWI  SetColour               ; &400E6
        AddSWI  SendMessage             ; &400E7
        AddSWI  CreateSubMenu           ; &400E8
        AddSWI  SpriteOp                ; &400E9
        AddSWI  BaseOfSprites           ; &400EA
        AddSWI  BlockCopy               ; &400EB
        AddSWI  SlotSize                ; &400EC
        AddSWI  ReadPixTrans            ; &400ED
        AddSWI  ClaimFreeMemory         ; &400EE
        AddSWI  CommandWindow           ; &400EF
        AddSWI  TextColour              ; &400F0
        AddSWI  TransferBlock           ; &400F1
        AddSWI  ReadSysInfo             ; &400F2
        AddSWI  SetFontColours          ; &400F3
        AddSWI  GetMenuState            ; &400F4        Wimp 2.18 onwards
        AddSWI  RegisterFilter          ; &400F5        Wimp 2.85 onwards
        AddSWI  AddMessages             ; &400F6        Wimp 2.95 onwards
        AddSWI  RemoveMessages          ; &400F7        Wimp 3.05 onwards
        AddSWI  SetColourMapping        ; &400F8
        AddSWI  TextOp                  ; &400F9        Wimp 3.23 onwards
        AddSWI  SetWatchdogState        ; &400FA        Wimp 3.22 onwards
        AddSWI  Extend                  ; &400FB
        AddSWI  ResizeIcon              ; &400FC
140 141
        AddSWI  AutoScroll              ; &400FD        Wimp 4.00 onwards
;       AddSWI  MiscOp                  ; &400FE
Neil Turton's avatar
Neil Turton committed
142

143 144 145 146 147 148 149 150 151 152 153
; Service calls

  [ :LNOT::DEF: WimpService ; While migrating to Hdr:Services
WimpService                     *       &400C0
  ]
                                ^       WimpService
  [ :LNOT::DEF: Service_ErrorStarting ; While migrating from Hdr:Services
Service_ErrorStarting           #       1
Service_ErrorButtonPressed      #       1
Service_ErrorEnding             #       1
  ]
154 155
                                GBLA    Service_WimpToolSpritesChanged
Service_WimpToolSpritesChanged  SETA    WimpService+3
Neil Turton's avatar
Neil Turton committed
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170

; ReadSysInfo reason codes
                                ^       0
WimpSysInfo_TasksActive         #       1
WimpSysInfo_Mode                #       1
WimpSysInfo_ReadSpriteSuffix    #       1
WimpSysInfo_DesktopState        #       1
WimpSysInfo_WriteDirection      #       1
WimpSysInfo_CurrentTask         #       1
WimpSysInfo_Swapping            #       1               ; reserved for swapping Window Manager
WimpSysInfo_WimpVersion         #       1
WimpSysInfo_SystemFont          #       1
WimpSysInfo_ToolSprites         #       1
WimpSysInfo_IconBar             #       1
WimpSysInfo_AppSpaceSize        #       1
171 172 173 174 175 176
WimpSysInfo_MessagesDebug       #       1               ; debugging only
WimpSysInfo_MemoryDebug         #       1               ; debugging only
WimpSysInfo_TransTables         #       1               ; internal use
WimpSysInfo_IconiseButton       #       1               ; disabled in Wimp 3.99 onwards
WimpSysInfo_BaseOfSprites       #       1               ; Wimp 3.99 onwards
WimpSysInfo_ScrollPause         #       1               ; Wimp 3.99 onwards
177 178 179 180 181 182 183 184 185 186 187
WimpSysInfo_Reserved_ROL18      #       1               ; RISC OS Select
WimpSysInfo_Reserved_ROL19      #       1               ; RISC OS Select
WimpSysInfo_Reserved_ROL20      #       1               ; RISC OS Select
WimpSysInfo_Reserved_ROL21      #       1               ; RISC OS Select
WimpSysInfo_Reserved_ROL22      #       1               ; RISC OS Select
WimpSysInfo_DragPause           #       1               ; Wimp 5.14 onwards
WimpSysInfo_DoubleClickPause    #       1               ; Wimp 5.14 onwards
WimpSysInfo_AutoMenuPause       #       1               ; Wimp 5.14 onwards
WimpSysInfo_IconbarFactors      #       1               ; Wimp 5.14 onwards
WimpSysInfo_Reserved_ROL27      #       1               ; RISC OS Select
WimpSysInfo_ThreeDFlags         #       1               ; Wimp 5.14 onwards
188
WimpSysInfo_AlphaSprites        #       1               ; Wimp 5.35 onwards
Neil Turton's avatar
Neil Turton committed
189 190
WimpSysInfo_MAX                 #       0

191
; Extend reason codes
192 193 194 195 196 197 198 199 200 201 202 203 204 205
                                ^       1
WimpExtend_Workspace            #       1               ;  1 Private
WimpExtend_Jumptable            #       1               ;  2 Private
WimpExtend_SWICallback          #       1               ;  3 Private
WimpExtend_SpriteNamePointers   #       1               ;  4 Private
WimpExtend_TilingCallback       #       1               ;  5 Private
WimpExtend_Parent               #       1               ;  6
WimpExtend_FrontChild           #       1               ;  7
WimpExtend_BackChild            #       1               ;  8
WimpExtend_SiblingAbove         #       1               ;  9
WimpExtend_SiblingBehind        #       1               ; 10
WimpExtend_GetBorderInfo        #       1               ; 11 Wimp 3.99 onwards
WimpExtend_NCErrorPointerSuspend #      1               ; 12 Private/STB-only
WimpExtend_SpriteSuffix         #       1               ; 13 Wimp 4.85 onwards
ROOL's avatar
ROOL committed
206 207
WimpExtend_GetValidationString  #       1               ; 14 Wimp 5.64 onwards

208 209
WimpExtend_MAX                  #       0

210 211 212
WimpExtend_SpriteSuffix_ROL     *       257             ; ROOL Wimp 5.35 onwards
WimpExtend_SpriteColourmap_ROL  *       258             ; ROOL unimplemented

Neil Turton's avatar
Neil Turton committed
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
; TextOp

Wimp_SetTextColour              *       0
Wimp_TextWidth                  *       1
Wimp_RenderText                 *       2

WimpTextOp_RightJustify         *       1 :SHL: 31
WimpTextOp_VerticalJustify      *       1 :SHL: 30
WimpTextOp_Style                *       1 :SHL: 29

; Priority for Wimp_CreateIcon (iconbar)

WimpPriority_Maximum            *       &78000000       ; used for handle = -3 or -4

WimpPriority_TaskManager        *       &60000000
WimpPriority_Help               *       &40000000
WimpPriority_Palette            *       &20000000
WimpPriority_ModeChooser        *       &20000000
WimpPriority_Apps               *       &00000000
WimpPriority_Utilities          *      -&40000000

WimpPriority_HardDiscs          *       &70000000
WimpPriority_FloppyDiscs        *       &60000000
WimpPriority_ResourceFS         *       &50000000
WimpPriority_RAMFS              *       &40000000
WimpPriority_Ethernet           *       &30000000
WimpPriority_Econet             *       &20000000
WimpPriority_OtherFS            *       &10000000
WimpPriority_Printers           *       &0F000000
WimpPriority_TinyDirs           *       &0E000000
WimpPriority_HFS                *       &0D000000

; Reason codes passed to Wimp_RegisterFilter

                                ^       0
WimpFilter_PrePoll              #       1
WimpFilter_PostPoll             #       1
WimpFilter_BlockCopy            #       1
WimpFilter_GetRectangle         #       1
Kevin Bracey's avatar
Kevin Bracey committed
252 253
WimpFilter_PostGetRectangle	#	1
WimpFilter_PostIconGetRectangle #	1
Neil Turton's avatar
Neil Turton committed
254 255 256 257 258 259 260
WimpFilter_MAX                  #       0


; Validation string commands

WimpValidation_Allow            * 'A'           ; Allow following chars
WimpValidation_InterfaceModule  * 'B'           ; Border type used by interface module
261
WimpValidation_Colour           * 'C'           ; Select icon colours (in 24-bit)
Neil Turton's avatar
Neil Turton committed
262 263 264 265
WimpValidation_Display          * 'D'           ; Display char following for password
WimpValidation_Font             * 'F'           ; Select font foreground/background hex colours
WimpValidation_Key              * 'K'           ; Allow wimp key processing
WimpValidation_Line             * 'L'           ; Set line spacing in OS units
266
WimpValidation_Name             * 'N'           ; Used by some template editors
Neil Turton's avatar
Neil Turton committed
267 268 269
WimpValidation_Pointer          * 'P'           ; Set pointer from sprite name and active posn
WimpValidation_Border           * 'R'           ; Border type
WimpValidation_Sprite           * 'S'           ; Sprite name
270
WimpValidation_CharLimit        * 'U'           ; Max number of Unicode characters allowed
Neil Turton's avatar
Neil Turton committed
271 272 273 274 275 276 277
WimpValidation_NoAuto           * 'X'           ; wimp doesn't auto size iconbar icons

WimpValidationKey_Return        * 'R'           ; Handle return key
WimpValidationKey_Arrow         * 'A'           ; Handle arrow keys
WimpValidationKey_Tab           * 'T'           ; Handle tab key
WimpValidationKey_Edit          * 'D'           ; Notify task of editing keys
WimpValidationKey_Any           * 'N'           ; Notify task of any key
ROOL's avatar
ROOL committed
278
WimpValidationKey_NoClipboard   * 'C'           ; Disable clipboard keyboard shortcuts for this icon
Neil Turton's avatar
Neil Turton committed
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299

        MACRO
$label  BL_Wimp $n
$label
        Push    "R12"
        LDR     R14,wimpextend
        LDR     R12,wimpr12
        ADD     R14,R14,$n
        Push    "R14"
        MOV     R14,PC                ; points to pull R12
        Pull    "PC"

        NOP
        Pull    "R12"
;        NOP
        MEND

        OPT     OldOpt

        END