I had an idea for a neat RISC OS UI feature... Implement a RISC OS module that inserts a screen mode file written by RPCEmu into ResourceFS. When the host UI receives notification that the RPCEmu window has been resized, write mode timings for the new screen size into the ResourceFS mode file. Then issue a *LoadModeFile Resources:MyModeFile and a mode change (*WimpMode Xnnn Ynnn etc). The RISC OS session will change mode to fit the new window size. So when you want to read a big document you just drag for RPCEmu window and the desktop gets bigger.
I looked into implementing it, and sadly it won't work until Allegro 5 comes along (in development), because Allegro 4.2 and 4.4 don't support external resizing of the window. Also Allegro 5 has a new API and probably won't be out for another year, at which point it'd need RPCEmu porting to the new API. But it'd be a nice feature to have :) For compatibility, you'd probably want to add all the usual 640x480, 800x600 etc modes into the generated mode file so that someone can change mode manually. It'd also probably want to cache resizes and only issue them (say) a second after the last resize message - otherwise RISC OS would get dozens of resizes a second if your window manager does solid resize drags (as most do). It might be possible to implement it wholly in RISC OS with RPCEmu as it stands by some kind of desktop widget (perhaps a filter that grabs drags on the Display Manager icon?) that defines a new mode file, but it wouldn't be as neat. I had a play but I really don't understand mode timings and I got 'unsynced' modes - either I or RPCEmu got the line lengths wrong, where each line wasn't aligned with the start of the screen. MakeModes implements some rules but I can't work them out. Anyone got any suggestions on how to generate RPCEmu friendly modes or details on how to work out minimal timings (I tried setting front porch, sync width etc to zero but it was 'unsynced')? The VIDC20 datasheet isn't a huge amount of help. On an unrelated matter, has anyone tried the Sleep,ffb program in riscos-progs? On Ubuntu/x86 it works well as far as cutting the CPU load, but seems to stop mouse clicks from getting through to the desktop. I think the interrupt handler is OK - mouse movement is getting through fine, as is (usually) the double-click double-arrow pointer, but it's almost impossible to get the desktop to respond to anything (RO Adjust). I tried reducing the nanosecond sleep time in it to 10000 (from originally 1000000) but it didn't seem to make much difference except taking more CPU. Any ideas? Is it causing system timers to be upset (ISTR similar problems on Arcem with keyboard autorepeat because the 2MHz IOC timer was being emulated too fast/slow)? Theo _______________________________________________ Rpcemu mailing list [email protected] http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu
