Free Pascal interface to GDK/GTK
================================

Files/Directories:
------------------
README   : This file.
Makefile : The main Makefile for this package.
gdk      : Contains the unit files to use the gdk and glib libraries.
gtk      : Contains the unit files to use the gtk library.
examples : Contains example pascal programs.
           (Kindly donated by Frank Loemker, for which my thanks)

Compiling the units:
--------------------

there are 3 targets for the makefile

make all      : compiles everything
make install  : make all, and install
make clean    : clean up object and unit files.
make examples : make all examples in examples directory

You can set the following variables:

PP             : compiler to use. must be an absolute path !!
UNITDIR        : where are the RTL units ? (not required if your ppc386 is
                 well set up)
OPT            : additional options you want to give the compiler.
UNITINSTALLDIR : Where to install the units.
BININSTALLDIR  : Where to install programs (none at the moment).


Using the units:
----------------

1) In C, you only need to input gtk.h. Here you need to input all files
   that you're likely to use, so you may have to experiment.

2) Names :
   + Pascal reserved words in types, record element names etc. have been
     prepended with the word 'the'. so 'label' has become 'thelabel'
   + functions have been kept with the same names.
   + for types : gdk names have been kept. Pointers to a type are defined
     as the type name, prepended with P. So 'GtkWidget *' becomes
     'PGtkWidget'.
     In gtkobject, names also have been kept.
     In all other files, types have been prepended with T, that is, the C
     type 'GtkWidget' has become 'TGtkWidget'
     
     This is annoying, but C is case sensitive, and Pascal is not, so
     there you have it...
     
     When translating, I've tried to stick to this scheme as closely as I
     could. One day, however, all will be done in a uniform manner...

3) Macros. Many C macros have not been translated. The typecasting macros 
   have been dropped, since they're useless under pascal.
   Macros to access record members have been translated, BUT they are 
   to be considered as READ-ONLY. So they can be used to retrieve a value,
   but not to store one.
   e.g.
      function GTK_WIDGET_FLAGS(wid : pgtkwidget) : longint;
   can be used to retrieve the widget flags, but not to set them.
   so things like 
     GTK_WIDGET_FLAGS(wid):=GTK_WIDGET_FLAGS(wid) and someflag;
   will not work, since this is a function, and NOT a macro as in C.
  
4) Packed records. GCC allows you to specify members of a record in
   bit format. Since this is impossible in pascal, functions and procedures
   to get/set these elements have been made.
   e.g.
     function width_set(var a : TGtkCListColumn) : gint;
     procedure set_width_set(var a : TGtkCListColumn; __width_set : gint);
   can be used to get or set the width in a TGtkCListColumn...
   in general, it's the name with '_set' appended for getting a value
   (set from 'a set') , and  'set_' prepended (from 'to set') and again
   '_set' appended.
   
   
And that is about all there is to say about it.

Enjoy !
Michael.
