[GEM Development] Re: GEM programming tutorial
John Elliott
jce at seasip.demon.co.uk
Thu Dec 22 02:01:16 PST 2005
: Another thing I'd like to see is an EASY and SIMPLE way to program in
: GEM. The example source code in the SDK is huge and I think that it
: could be much simpler. For example, a hello world program for the
: console is a few lines, but about 200 lines in GEM. It'd be nice to
: see a programming library for GEM that simplifies this; IIRC it is
: even much easier to program in GTK+. I'm not sure if it is complex if
: one is using PASCAL, but at least it seems complex in C.
The complexity of saying hello is something of a red herring. If you want
Hello World, you can do one of them with something like:
GEMAIN()
{
appl_init();
form_alert(1, ADDR("[0][Hello World][ OK ]"));
appl_exit();
}
but the HELLO sample is a lot more complicated for good reason; it's
demonstrating programming techniques that you might actually need to use
in GEM applications, such as opening a window, handling messages from it,
repainting bits that get trodden on, drawing in the window using VDI calls,
and the difference between a desk accessory and a standalone program.
--
------------- http://www.seasip.demon.co.uk/index.html --------------------
John Elliott |BLOODNOK: "But why have you got such a long face?"
|SEAGOON: "Heavy dentures, Sir!" - The Goon Show
:-------------------------------------------------------------------------)
More information about the gem-dev
mailing list