home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilst
/
wimpext
/
SWIs
< prev
next >
Wrap
Text File
|
1993-05-11
|
61KB
|
1,669 lines
WimpExtension SWIs - 2.17
==================
Note: All strings are control-terminated (ie. <32)
All SWIs preserve all registers that are not used to return information
except for R0, which is always corrupted (or used to return
information). The processor status flags are always preserved unless
there is an error.
I have tried to make the icon-handling SWIs 'intelligent' - ie. if you
tell WimpExtension to set an icon (for example) it won't do anything if
it's already set, so it won't flicker.
WimpExtension has two SWI chunks - &45780 and &46380.
SWI &457BF is unused; this is due to a really really stupid bug in
RISC OS.
Brief list:
-------------------------------
WimpExt_Initialise &45780
WimpExt_CloseDown &45781
WimpExt_SlabIcon &45782
WimpExt_Redraw &45783
WimpExt_Action &45784
WimpExt_IconBarSprite &45785
WimpExt_IconBarText &45786
WimpExt_LinkWindows &45787
WimpExt_OpenLinked &45788
WimpExt_CloseLinked &45789
WimpExt_UnLinkWindows &4578A
WimpExt_CurrentTask &4578B
WimpExt_LoadTemplates &4578C
WimpExt_SetIconString &4578D
WimpExt_OpenWindowTop &4578E
WimpExt_SetIcon &4578F
WimpExt_GetIcon &45790
WimpExt_SetNumberIcon &45791
WimpExt_GetNumberIcon &45792
WimpExt_IncNumberIcon &45793
WimpExt_DecNumberIcon &45794
WimpExt_SetPointer &45795
WimpExt_Divide &45796
WimpExt_ColoursMenu &45797
WimpExt_AutoRedraw &45798
WimpExt_CentreWindow &45799
WimpExt_DragIcon &4579A
WimpExt_PutCaretIcon &4579B
WimpExt_OpenDialogue &4579C
WimpExt_CheckWindowOpen &4579D
WimpExt_CopyString &4579E
WimpExt_SetWindowTitle &4579F
WimpExt_SetIconStringN &457A0
WimpExt_FindLeaf &457A1
WimpExt_LimitPointer &457A2
WimpExt_ReleasePointer &457A3
WimpExt_OpenFullSize &457A4
WimpExt_LoadRAMTemplate &457A5
WimpExt_OpenRequester &457A6
WimpExt_CloseRequester &457A7
WimpExt_HideLink &457A8
WimpExt_UnHideLink &457A9
WimpExt_SendHelp &457AA
WimpExt_SendWimpHelp &457AB
WimpExt_CreateMenu &457AC
WimpExt_ReCreateMenu &457AD
WimpExt_ShadeEntry &457AE
WimpExt_TickEntry &457AF
WimpExt_SetIconColour &457B0
WimpExt_ShadeIcon &457B1
WimpExt_PlotSprite &457B2
WimpExt_RedrawDraw &457B3
WimpExt_PrePoll &457B4
WimpExt_SetExtent &457B5
WimpExt_MoveCaret &457B6
WimpExt_GetFontMenu &457B7
WimpExt_DecodeFontMenu &457B8
WimpExt_ControlImmediate &457B9
WimpExt_Heap &457BA
WimpExt_MemCopy &457BB
WimpExt_DataSave &457BC
WimpExt_PlotBorder &457BD
WimpExt_CentreWindowV &457BE
WimpExt_Sort &46380
WimpExt_MemMove &46381
WimpExt_MenuWidth &46382
WimpExt_DataLoad &46383
WimpExt_MoveCaretIcon &46384
WimpExt_DrawOp &46385
WimpExt_SpriteOp &46386
WimpExt_Intersect &46387
WimpExt_BorderOp &46388
WimpExt_ManualLink &46389
WimpExt_MiscOp &4638A
WimpExt_ViewIcon &4638B
WimpExt_SubsituteArgs &4638C
WimpExt_RedirectSprites &4638D
-------------------------------
WimpExt_Initialise &45780
-------------------------------
R0 = 16
R1 = task handle
R2 = features flags
bit meaning
0 Semi-automatic slabbing if set, automatic otherwise
1 Automatically recreate menus if set
2 Task wants to use font menus if set
3 Automatically compact heap once a second if set
4 'Correct' radio icons if set
5 Semi-automatic help if set, automatic otherwise
6 Use alternative parameters for flag-setting SWIs if set
7 Use R0 of WimpExt_SetIconString[N]
8 Automatically call WimpExt_MoveCaret
9 Unset other icons in ESG when setting icons
10 Automatically call WimpExt_ViewIcon after moving caret
11 Don't allow TAB for moving between writeable icons
12-31 reserved; MUST BE 0
Exit:
R0 = WimpExt version number * 100
R2 = pointer to WimpExt's sprite pool
Must be called prior to using any other WimpExt calls. R0 must be 11 on
entry. This is so that WimpExtension can work out what version the program
thinks it is calling (so I can change the functionality of calls later whilst
still retaining backwards-compatibility). R2 holds features flags, for
specifying certain things at start-up. If bit 1 of R2 is set then if the user
selects a menu option with the ADJUST button then the menu will automatically
be recreated when you next call WimpExt_PrePoll (assuming you used
'WimpExt_CreateMenu' to create the menu, that is). If bit 2 of R2 is set then
you are allowed to call WimpExt_GetFontMenu and WimpExt_DecodeFontMenu - you
are NOT allowed to call them if you do not set bit 2. If bit 4 of R2 is set
then the user won't be able to deselect all of a group of radio icons by
clicking adjust on the selected icon.
WimpExt_CloseDown &45781
-------------------------------
R0 = task handle
MUST be called prior to the task exiting.
WimpExt_SlabIcon &45782
-------------------------------
R2 = window handle or 0 for slabbed icon
R3 = icon handle
If semi-automatic slabbing is enabled, then:
R4 = 0 to pop out, any other to pop in
To be called to force an icon to be slabbed (for example to slab the default
action icon if RETURN is pressed). If semi-automatic slabbing is enabled then
the icon will be popped in or out depending on R4, otherwise it will be
popped in and then out again. If R2 is zero then the last icon to be slabbed
in (either implicity or explicity) is used. Note that in this case the SWI
might return an error (eg. if the window has been deleted), so use the X form
of the SWI.
WimpExt_Redraw &45783
-------------------------------
R1 = Wimp_RedrawWindow block
To be called in the window redraw loop, to draw the 3D borders round icons.
WimpExt_Action &45784
-------------------------------
R0 = task handle
R1 = Wimp_Poll block
R2 = Wimp_Poll reason code
Exit:
R0 = Wimp_Poll reason code (possibly altered)
To be called immediately after Wimp_Poll, to perform actions such as slabbing
icons and changing pointers. WimpExtension may alter the code returned - eg.
if the user clicks in a requester window then the code will be translated
before your program gets to see it.
WimpExt_IconBarSprite &45785
-------------------------------
R2 = -2 for left of iconbar, -1 for right
R3 = pointer to sprite name
R5 = icon button type (eg. 3)
Exit:
R0 = icon handle
Will place a sprite on the iconbar, returning the icon handle. Note that the
sprite name is copied out of the memory block, which can be reused. Also note
that the number in R5 is just the button type, not the flags.
WimpExt_IconBarText &45786
-------------------------------
R2 = -2 for left of iconbar, -1 for right
R3 = pointer to sprite name
R4 = pointer to text (max. 128 chars inc. terminator)
R5 = icon button type (eg. 3)
Exit:
R0 = icon handle
Will place a sprite on the iconbar, with a text message underneath, returning
the icon handle. Note that the sprite name is copied out of the memory block,
which can be reused, but the text remains where it is; this is so you can
change the text after creating the icon. Also note that the number in R5 is
just the button type, not the flags.
WimpExt_LinkWindows &45787
-------------------------------
R2 = main window handle
R3 = sub-window handle
R4 = flags
bit meaning
0 clip linked window to the left of the main window
1 clip linked window to the right of the main window
2 clip linked window above the main window
3 clip linked window below the main window
4-30 reserved; MUST BE 0
31 link is hidden
Will link two windows so the sub-window moves with the main window. Currently
there is a limit of 16 linked windows - this may be removed in a later
version.
WimpExt_OpenLinked &45788
-------------------------------
R1 = Wimp_OpenWindow block
To be used instead of Wimp_OpenWindow.