Commit d9032831 authored by Ben Avison's avatar Ben Avison
Browse files

Added soe documentation on API changes since Ursula.

Fixed an errant top-bit-set pointer problem with submenu pointers.
Removed startup sprites from Wimp sprite pool - now live in Desktop module.

Version 4.90. Tagged as 'Wimp-4_90'
parent 3e87101c
Wimp API changes since Ursula
=============================
In general, APIs that take pointers which have formerly been documented as
assigning the same special meaning to all values less than or equal to zero
now only follow that special meaning for value of 0 and -1. This is to allow
pointers to the top half of memory to be used.
Service_ErrorButtonPressed (Service call &400C1)
Minimal environment handlers are now installed around this service call, so
its handler can call OS_Exit without leaving the Wimp state undefined.
Wimp_CreateWindow (SWI &400C1)
The feature introduced in the nested wimp, whereby a Wimp_Initialise version
of 380 allowed window foreground colour &FF to turn off single-pixel borders,
was unhelpfully being applied according to the version of the current task,
rather than the version of the creator of the window. In this way, old tasks
accessing windows created by other tasks could cause all the window
furniture bits to be unset.
Window flag byte +39 is extended as follows:
bit 1: reserved for use by RISC OS Select
bits 3 and 2:
01 => never give window a 3D border
10 => always give window a 3D border (subject to WimpVisualFlags)
00, 11 => automatic 3D border mode (subject to WimpVisualFlags)
bit 4 set => allow Wimp_GetPointerInfo to detect shaded icons (for example,
this allows interactive help messages to work with shaded icons). Note
that mouse click behaviour remains unchanged.
Wimp_CreateIcon (SWI &400C2)
New validation string command, 'U' followed by a decimal number, will set a
limit on the number of characters accepted in a writable icon. This is
distinct from the byte limit specified in the icon data (which still
applies) when the system alphabet is set to UTF-8. Theoretically, you should
allow 6 bytes storage per character for writable icons, but in practice
4 bytes will cover all the planes of UTF-16 and all therefore all the
characters that are likely ever to be defined by ISO.
Note that the 'A' and 'D' validation string commands accepts multi-byte
characters when the alphabet is UTF-8.
The 'C' command is extended to allow separate foregroud and background
24-bit colours to be specified when the icon is selected.
Wimp_Poll (SWI &400C7)
Multibyte UTF-8 characters are reported using multiple Key_Pressed events.
Callbacks are now triggered when there are no null event recipients waiting.
The default UpCall handler is now installed when a task is being paged out,
so there is no danger of aborts due to UpCallV being called from an
interrupt routine (note that such use of UpCallV is to be avoided, not least
to prevent this very problem under older Wimps).
Wimp_SetCaretPosition (SWI &400D2) / Wimp_GetCaretPosition (SWI &400D3)
Indexes into strings are by byte, not character. (This distinction only
matters when the alphabet is UTF-8.)
Wimp_ProcessKey (SWI &400DC)
This SWI can now be called multiple times between calls to Wimp_Poll - this
is important for the input of multi-byte UTF-8 characters.
Wimp_StartTask (SWI &400DE) / *WimpTask
Now accept long command lines.
Wimp_CreateMenu (SWI &400D4)
Dialogue boxes can now contain nested windows.
Menu titles can end in a key name without being aligned as though it were a
keyboard shortcut.
Wimp_AddMessages (SWI &400F6)
This can now safely be called for tasks that wanted all messages -
previously, it would have caused all other messages to be hidden from such
tasks!
Wimp_TextOp (SWI &400F9)
Two new reason codes, 3 (gets split point) and 4 (truncates with ellipsis).
On entry:
r0 bits 0-7 = 3 (reason code)
bits 8-31 = reserved (must be zero)
r1 -> string
r2 = width, OS units
r3 = split character
On exit:
r0 -> split point
other registers preserved
On entry:
r0 bits 0-7 = 4 (reason code)
bits 8-31 = reserved (must be zero)
r1 -> string
r2 -> output buffer
r3 = buffer size (may be zero if you just want to query the required size)
r4 = max width, OS units
On exit:
r0 = size of buffer needed
other registers preserved
The buffer is filled with a string, truncated (if necessary) with either
an alphabet-dependent ellipsis character or three full stops, depending
upon the current alphabet and whether the ellipsis character is defined in
the current desktop font.
Wimp_Extend (SWI &400FB)
A new reason code, 13, can be used to find the appropriate "resolution"
suffix to a sprite file name:
On entry:
r0 = 13 (reason code)
r1 -> pathname of file without suffix
r2 -> buffer for result
r3 = size of buffer (0 to read size required)
On exit:
r0 corrupted
r3 = space left in buffer (ie negative of size required if r3=0 on entry)
other registers preserved
contents of buffer are only valid if r3>=0
error "File not found" may be returned
This employs the full multi-pass scheme required to fully support EX0 EY0
modes. Older Wimps don't return an error, but can be detected because all
registers are preserved - in which case Wimp_ReadSysInfo 2 should be used
to construct the appropriate filename.
*Configure WimpClickSubmenu
Allows submenus to be opened by clicking on the parent menu item. Mostly
useful for touchscreen devices.
*WimpSlot
Can now take memory sizes in megabytes or even gigabytes.
*WimpVisualFlags
See *Help message.
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "4.89"
Module_Version SETA 489
Module_MajorVersion SETS "4.90"
Module_Version SETA 490
Module_MinorVersion SETS ""
Module_Date SETS "28 Feb 2003"
Module_ApplicationDate SETS "28-Feb-03"
Module_Date SETS "31 Mar 2003"
Module_ApplicationDate SETS "31-Mar-03"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "4.89"
Module_HelpVersion SETS "4.89 (28 Feb 2003)"
Module_FullVersion SETS "4.90"
Module_HelpVersion SETS "4.90 (31 Mar 2003)"
END
/* (4.89)
/* (4.90)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 4.89
#define Module_MajorVersion_CMHG 4.90
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Feb 2003
#define Module_Date_CMHG 31 Mar 2003
#define Module_MajorVersion "4.89"
#define Module_Version 489
#define Module_MajorVersion "4.90"
#define Module_Version 490
#define Module_MinorVersion ""
#define Module_Date "28 Feb 2003"
#define Module_Date "31 Mar 2003"
#define Module_ApplicationDate "28-Feb-03"
#define Module_ApplicationDate "31-Mar-03"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "4.89"
#define Module_HelpVersion "4.89 (28 Feb 2003)"
#define Module_LibraryVersionInfo "4:89"
#define Module_FullVersion "4.90"
#define Module_HelpVersion "4.90 (31 Mar 2003)"
#define Module_LibraryVersionInfo "4:90"
......@@ -3899,10 +3899,10 @@ crmenuiconlp
]
LDR R14,[R13,#4] ; skip one stack item - get shaded bit
ORR R1,R1,R14 ; shade arrow too
CMP R5,#0 ; if ptr <= 0, don't put arrow in
CMP R5,R5,ASR#31 ; if ptr <= 0, don't put arrow in
MOV R2,#cr:SHL:8 ; null text
ORRGT R2,R2,#&89 ; right-arrow
BICLE R1,R1,#if_sprite ; Isn't a sprite if no arrow.
ORRNE R2,R2,#&89 ; right-arrow
BICEQ R1,R1,#if_sprite ; Isn't a sprite if no arrow.
LDR R14,reversedmenu ; Is it a reversed menu?
CMP R14,#"\\"
EOREQ R2,R2,#1 ; Make it a left arrow.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment