Wimp_Initialise (SWI &400C0)
John Sandgrounder (1650) 574 posts |
My printed copies of the PRMs for RISCOS 2, 3 and 4 all state that the value in R0 should be the “Last Wimp version number known to the task * 100” And then, for RISC OS 4, goes on to state that Wimp_Iinitialise currently recognises versions 200, 300, 310 and 380. The principle being that the Wimp will behave as it did in the past when it encounters code written for previous versions. However, the on-line PRMs for RISCOS 5 have wording which is far less clear. No mention of last version number known to task or of versions currently recognised by the Window Manager. So, my question is – Does RISCOS 5 recocognise any previous versions (and behave accordingly), and if so, what are the values which are recognised? And, if not, does the value in R0 have any effect at all? |
Steve Fryatt (216) 2046 posts |
It recognises the same versions as have always been recognised, but you almost certainly want to be using either 310 or 380 in any modern application on any version of RISC OS.
The online PRM is a Wiki, so you could always improve the wording (while not copying text verbatim from a copyright work, of course). :-) |
John Sandgrounder (1650) 574 posts |
OK, thanks. Soounds like I should stick with 380. (and also stick with my paper PRMs). |
Rick Murray (539) 13406 posts |
As far as I’m aware there is no specific “new” Wimp version number, so it’ll recognise the list you have provided. It is a rather messy idea, to hang all sorts of functionality off of a version number, but we’re stuck with it. Off the top of my head:
There’s probably more stuff I’ve missed… You’ll probably want 310 unless you are doing “nested” stuff in which case you’ll want 380. And there are always API changes that don’t depend upon the version number: http://www.iyonix.com/32bit/WimpAPIChg.shtml BTW, just to make this clear – there’s no direct correlation between Wimp version and RISC OS version. |
John Sandgrounder (1650) 574 posts |
OK, thanks for the additional detail. Sounds like I could be using 310, but as my main two applications have been using 380 for many years with no issues, I will probably leave it that way. |
Rick Murray (539) 13406 posts |
Iyonix.com is no more, so → https://web.archive.org/web/20080214124223/http://www.iyonix.com/32bit/WimpAPIChg.shtml |
Steve Pampling (1551) 7932 posts |
I thought the proverbial “someone” was supposed to have transferred all relevant data from iyonix.com to the ROOL pages. |
Rick Murray (539) 13406 posts |
The first named entity I stumbled upon was “Service_ErrorButtonPressed”, which is here as a to-be-done entry in the list of service calls… |
Jeffrey Lee (213) 6046 posts |
I’ve had a go at tidying things up a bit, but it’s still a bit iffy. https://www.riscosopen.org/wiki/documentation/show/Wimp_Initialise
|
Rick Murray (539) 13406 posts |
Whosoever felt that it was a good idea to have the Wimp work with special magic numbers needs to be smacked upside the head. But, then, I guess this is the same screwy logic that blessed us with &4B534154… Should have had a flags word, with the Wimp clearing any unsupported flags during the initialise – like “app wants X, app gets initialised, then told that Y is supported”. Not so different to the “Last version known” being replaced by “Current version”, but allows for more fine-grained control. App isn’t interested in nested windows but wants to speak UTF-8. App wants to inhibit the display of the minimise button. App provides a list of messages that it is interested in. App may want to be pre-empted. That sort of thing… |