Multi tasking with full screen
Colin Ferris (399) 1814 posts |
Is there a example of Multi tasking with a full screen? Ie printing to a sprite which is then automatically copied to the screen. A BASIC example would be handy. |
Chris Hall (132) 3554 posts |
A multi tasking application can easily write to the whole screen but when it cooperatively multitasks by calling Wimp_Poll all other running applications will respond to any stimulus by updating their window on screen and, possibly, bringing it to the top. So even if you fill the screen with a window, put it on top, and write to the full screen, another application can still bring its window to the top of the window stack and update it. So the question is – what do you mean ‘multi-tasking’ if you do not want any visible effect? Modules can still run, even if single tasking. Is the light in the refrigerator lit with the door closed? |
Rick Murray (539) 13840 posts |
The screen savers, though they’re written in C (I think?).
Oh, RISC OS isn’t so good at the automatic part. If you’re multitasking you’ll need to plot the sprite as part of a regular redraw loop, and as Chris points out, if you’re doing that you might as well draw directly to the screen as you would in any other task.
Ah, Schrödinger’s fridge. ;-) |
Steve Pampling (1551) 8170 posts |
I thought most of “ye olde” BBC BASIC programming examples covered multi-tasking and putting a sprite in a window. Most of the items in the APDL library that are done in BASIC probably fit the bill too.
Someone else who can’t use PayPal :) |
Stuart Swales (1481) 351 posts |
The solution to that one (Viz Top Tips) is to drill a hole in the fridge door so you can check. |
Rick Murray (539) 13840 posts |
They did, but this is for a full screen app. Which, ostensibly the exact same thing, would likely require a few additional twiddles in order to create an bereft window (no furniture or border) to fit the screen, and to understand it’s dimensions to know how big the part to draw into and/or scale.
You would have thought, in a country with people having names with umlaut accents, to muck around with the non-accented versions would be a real dick move.
How depressingly low tech. Turn on phone. Go to camera. Record video. Put phone in fridge. Close door. Open door. Retrieve phone. Stop recording. Watch video. At some point remember to close the fridge door again. ;-) |
Andrew Rawnsley (492) 1445 posts |
If you want to multitask with other RISC OS applications, that generally means you’ll need to be a wimp task and call wimp_poll. I don’t think you can do this if you change mode and go exclusively full-screen. As such, your main route is a full-screen, borderless window. Make sure not to limit this to your maximum screen size! Don’t know if it helps, but there’s a window flag (I forget which) which was introduced in the nested wimp, I believe, which defines windows as being at the “very top” layer, “normal” layer or “bottom” layer, I think. This is a vague memory from last year when I was developing LockScreen – my head is rather cloudy today still, I’m afraid. The main aim of this seemed to be to allow screensavers to use a top layer and be on top of any “normal” wimp window. IIRC most of the RO5 screen savers use this but not all – I think a user submitted me some minor updates that they’d done to fix those that didn’t. Anyway, we use this topology to allow screensavers to kick in “above” LockScreen for users that want to combine the two. Hope this is vaguely useful. http://www.marutan.net/wikiref/Acorn%20Registered%20Developer%20REFERNC/RO4/API/HTML/WIMP.HTM |
Rick Murray (539) 13840 posts |
Which probably shouldn’t be used, unless the app in question is a screensaver. There is no indication of what sort of app this actually is, or why it wants to take up the entire screen, however the thing with screensavers is that they automatically go away when the user does something. Any other app, that wants to put itself on top and not have the possibility of other windows on top of itself better have a really good reason for it. |