Restructuring GDK for 1.3

The GTK+-1.3 branch has been, so far, languishing.
I'd like to work on getting it up to speed. The
biggest bottleneck right now is getting the 
directory structure set up properly for 
multi-platform use.

I spent some time today trying some ideas in a local
copy of my tree, and came up with something that I was fairly
happy with.

The main idea here is that we should have parallism
between the ports so the X specific stuff should
be moved into gdk/x11. The model is that 


includes win32/gdkwindow.i or x11/gdkwindow.i as appropriate. 
(The .i suffix I think is clearer than using .c or .h).

This is a little odd in the context of GDK, because
95% of the content is going to end up in the .i files,
but I think this structure encourages sharing code
where possible and preventing code drift.

All public header files (.h) files should live in the
main directory, and if necessary have a sprinkling
of conditionals. The exception to this is gdkx.h which
is functions which are completely X specific.

There are two other changes I'm planning to make at the
same time:

 1) Split up gdk/gdk.h and gdk/gdktypes.h into small headers
    such as gdkwindow.h and gdkevents.h.

 2) Virtualize GdkDrawable and GdkGC so that alternate drawing
    implementations can be substituted. (So you could
    have, say, postscript drawables) 

 3) Clean up the GdkDrawable / GdkWindow morass.
    (A lot of functions take one where they should
    take the other)
2) is, I think, only marginally useful in itself, but it should
also make the code for the ports cleaner. (X actually
uses such a virtualized interface between the 
device-indepedent and device-dependent layers).

Finally, I'd like to go with 


instead of 


as Tor has done so far. I think there is some consensus
that it makes for cleaner conditionals, and matches
the decision as to what we are going to do for GLib.  

The same structure will apply to gtk/, though only
a very few files should to be split and get .i pieces.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]