Newsgroups: comp.sys.acorn
Subject: RISC_OSLib and wimpt_init()...
From: jwil1@cs.aukuni.ac.nz (TMOTA)
Date: Fri, 22 Jan 1993 01:40:16 GMT
Organization: Computer Science Dept. University of Auckland

>Is it ok to mix and match when using RISC_OSLib? For instance
>can I replace...
>  wimpt_init("LegoCAD");

>...with my own ( that lets me pass the messages I'm interested in ).

Possibly. This really hinges upon what the h*ll wimpt_init() DOES.
(Don'tchoo wish you had the RISC OS Lib sources? I do...)

The way I do things like this is to rip the RISC OS Lib code out and
replace it by my own, and then use it like that for 3 weeks until the
subtle problems due to the undeclared internal operations become
aparrent... ;-(

>What I really need to know is how much goes on behind the scenes with
>RISC_OSLib - to what degree can you use your own direct wimp SWI's fn.s?

Well, I've just been trimming back on RISC OS Lib... I started with about
50kB of code being included for me, and I have now got it down to 18kB.
I have done this by splitting RISC OS Lib up into separate .o files
with LibFile, and then writing my own C code to replace individual modules.
The savings are huge (e.g. my replacement for bbc (2228 bytes) is only 664
bytes long, because I only included the functions that I actually *call*, and
because I wrote far more efficient code than is used in RISC OS Lib. (I have
some *old* ROLib sources for a few little bits)

>How much is RISC_OSLib a front-end to the wimp SWI's or a more tightly
>integrated package?

In many cases (e.g. font_() to the best of my knowledge) the code is just
a straight (albeit inefficient) SWI interface. However, in most of the cases
where you want to change something, there is an inaccessible static variable
or undefined internal operations which cause impediment ;-(

>I know a lot of folks frown upon RISC_OSLib, but I'm 3/4 through
>a project and don't want to switch to another library now.

I have the same problem with DSEdit... 400kB of source code is not an easy
thing to convert to a different library! ;-(

>Although I've heard DeskLib is worth a look.
>Has anyone had any experiance with it?

Desklib is worth a look, mainly because of how bad RISC OS Lib is (i.e.
*nothing* is better than RISC OS Lib, and I don't mean that there isn't
anything that is better ;-)
As the moderator of desklib, I may be slightly biased, but it is much nicer
to use than RISC OS Lib, and wins in the crucial case in that you get ALL
the source code with it, so it's a good place to look for useful tidbits
of code...

However, DeskLib has stalled (at version 1.04), and will not get moving until
at least March 1993. At present it has a few holes in it (llke no menu code,
though there is some code waiting to be added), but I hope you'll take a
look at it - I personally would rather write the missing 50% of DeskLib
from scratch for each application than have to use RISC OS Lib again!

Also, DeskLib should be supporting the new developments in template file
formats and the editor !Glazier, and other really useful programmers tools,
so you will be able to integrate such new things nice & fast if you're using
desklib, while RISC OS Lib might be more problematical...
-- 
themasterofthearcanejwil1@cs.aukuni.ac.nzthismessagewassentonrecycledelectrons
Newsgroups: comp.sys.acorn