home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
432b.lha
/
EzLib
/
README
< prev
next >
Wrap
Text File
|
1990-11-10
|
5KB
|
132 lines
Ez Lib
A link time library to make life easy
-------------------------------------
Howdy. You have just gotten your greedy little hands on a library
called Ez.lib. Ez.lib is a link time library which provides numerous calls
to access many Intuition features without the normal hassle. There are
single line calls to open any type of screen, window, or boolean gadget.
This library is my effort at making the Amiga a little bit less of a
bear to program. You can now do something like this:
struct Screen *screen;
screen = makescreen(HIRES|LACE, 4); /* 640x400x16 color */
if (screen == NULL)
error_no_screen();
As you can see from the above code, you will save yourself HOURS of
time with a single function call. No more hassling around worrying about
BitMap structures etc.... The makescreen() call will even check to make
sure that Graphics.library and Intuition.library are opened. Working with
screens, windows, and boolean gadgets now becomes trivial.
In addition there are two "widgets" in the library. The first widget
is getyn(). It will simply return true or false depending on how the user
clicked the AutoRequest(). NOTE: this function was taken from M. Dillon's
DME, however I did enhance it somewhat.
The other "widget", getstring() will pop open a small window to get a
string of input from the user. It is about as difficult to use as fgets()
or similar - making it easy to create Intuitionized programs.
For the more hacker types there are a few lower level functions
which you can call if you wish. These provide access to properly allocated
and filled in BitMaps, Gadgets, and other things.
Installing and Using Ez.lib
---------------------------
What do you have to do to use all these nifty and wonderful things?
Not much. The included library is for Manx 3.6. If you have Manx 5.0
you will just have to recompile the modules and use LB to make the library.
You can find out more about this by looking at the makefile in the SRC
directory.
If you have Lattice, you will have to recompile the modules and then
use whatever tool is provided with Lattice to make a link time library. I
don't have Lattice so I can't help you too much. Basically all there is in
the SRC directory is a bunch of individual source modules which need to be
compiled. Granted the code isn't ANSI C, but it should compile without too
many warnings (I hope ;^)
After you have the correct version of the library, you simply need to
put it where your compiler will find it. Same thing for the header file.
You can just put these wherever your setup looks for them.
Then, when you write a program that uses Ez.lib, you just
#include <ezlib.h>
at the beginning of your program. When you get to the linking stage,
simply link with ez.lib (e.g. "ln -o demo demo.o -lez -lc") and you are
done. That's it, no more no less.
Other things of interest
------------------------
The full docs for each of the functions in Ez.lib are in the DOC
directory. Poke around there for more info.
The SRC directory just contains the individual files that provide the
functionality. You can sniff through here if you don't trust my coding or
to see if I did something wrong (hey, if I did I'd like to hear about it,
as I certainly don't want trashy code floating around with my name on it :)
The demo that is in the root level is just a simple demo which
exercises each of the features in Ez.lib. As you can see it is less than
9K and does a fair amount. BTW, it looks for a font. If you don't have it
it's no big deal, but just so you know.
The DEMOS directory contains a few programs that show how to use the
library. They are all very simple, purposely, so that you can see how the
library is used.
Final Notes
-----------
At the moment the gadget creation facilities are somewhat plain. They
just create simple box affairs. I'm looking into changing this to a more
3-D'ish look. Don't worry though as the changes would be transparent to
you - they would just require a re-compile.
I'm going to continue to add functionality to this library as needed.
I'd like access to string gadgets and ideally prop gadgets too (but I
understand this is much easier in 2.0, so I may not bother). I'm probably
going to add some Rexx code that I have written (to send/receive rexx
messages in an abstract way - i.e. send_rxmsg(string) ). I also have a few
routines to work with ARP, and chances are they will be in the next
release too.
I hope that this library will now make it easy for you to say - "Hey
I've got this neat idea, let me do it." Instead of (what I used to do)
"Aww man, it's too much hassle to open a {window,screen,gadget}".
I would also like feedback on these routines and ways to improve them.
They work fine for me, but maybe not for you. If so, lemme know.
--dominic giampaolo
Appt. # 8067 West
4201 Mass. Ave.
Washington, D.C. 20016
E-Mail : nick@chopin.uunet.uu.net >
or |
uunet!chopin!nick >---- preferred
or |
chopin!nick@uunet.uu.net >
or
giampal@auvm.bitnet