The great move to gdk/x11/
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: The great move to gdk/x11/
- Date: 08 Nov 1999 15:44:56 -0500
OK, I made an initial commit of moving all the X-specific code
in GDK into the x11/ subdirectory.
I decided against going with include files in favor of simply
using simply using separate object files for the windowing-system
indepedent and dependent parts of each module.
To avoid having duplicate file names (making working with emacs,
etc, easier) I used the naming convention:
gdk/gdkfont.c
gdk/x11/gdkfont-x11.c
Right there is some schizophrenia in the way I handled making
the various structures in GDK suitable for this move:
For some XXXPrivate structures
(GdkCursorPrivate / GdkRegionPrivate / GdkVisualPrivate)
I moved the private structure wholesale into gdk/x11/gdkprivate-x11.h.
For other XXXPrivate structures
(GdkColormapPrivate / GdkFontPrivate / GdkImagePrivate)
I split the structure into a windowing-system-dependent part
that includes a copy of the window-system-independent part nested
inside.
Finally, for a few other structures
(GdkDrawablePrivate / GdkWindowPrivate / GdkGCPrivate)
where windowing-system-independent includes a pointer to
an auxilliary structure which holds the windowing-system-dependent
data.
This variety corresponds partly to some indecision on my part
as to how things should be, and partly to a real variety in
the circumstances for various structures.
(Eventually, I want GdkDrawable, GdkGC, and probably GdkRegion
to be virtualized sufficiently so that a custom implementation
can be supplied at runtime.)
There will be still some changes in this stuff, but I'll be
interested in hearing from Tor and Shawn what works well for
them, and what doesn't work.
I'd also be interested in comments from anybody else brave enough
to dive into my current mess. (My feeling in checking this in
right now is somewhat akin to the feeling of having visitors without
a chance to clean up one's apartment first.)
I've appended a short module-by-module status summary below.
Regards,
Owen
gdk
Much of the contents have been moved to x11/gtkmain.c.
I've added a little argument-parsing abstraction.
(Currently called gdk_arg_context_*) that allows
arguments from multiple places to be combined - that
probably needs to be either fixed up and moved into
GLib or replaced with some existing solution like
popt.
gdkcc
This will be removed for GTK+-1.4. Right now, it has been moved
completely into the x11/ directory to avoid having to port it.
gdkcolor
There are a few common utility functions, and the rest
is in the port-specific files.
gdkcursor
No shared code - completely port-specific.
gdkdnd
No shared code - completely arch-specific. It's possible that some
common code for handling GdkDragContext could exist, but the
GdkDragContextPrivate will be different on each port.
gdkdrawable
Pretty much done. GdkDrawable is completely virtualized.
gdkevents
There are a few common utility functions, and the rest
is in the port-specific files.
gdkfont
Pretty much done for now - gdkfont.c contains a number of functions
reimplemented as utility functions, and the rest is
ports-specific. It will be obsoleted by pango before 1.4.
gdkgc
GdkGC is virtualized to go along with GdkDrawable. There are
a couple of functions I punted on for now and moved into the
port-specific files - the clipmask functions (because gdkregion
is not finalized) and also gdk_gc_copy, which I'm not sure
I like enough to put into the vtable.
gdkim
All in the port-specific directories. The abstraction here probably
will be changed at some point to something more convenient and
more Unicode-based.
gdkimage
GdkImage is virtualized - all of the code except for ref/unref
is in the port-specific files.
gdkinput
Right now all the code is port-specific. It should be possible
to share the code in gdkinputnone.c, but probably not worth it;
I'd like to get rid of the gdk_input_vtable in X11 code -
it doesn't make sense since you can't switch the type of input
on the fly.
gdkpixmap
All moved into the port-specific file for now. The xpm loader
should be changed to render with GdkRGB, and thus be
windowing-system independent, but that requires
first making GdkRGB able to render onto any arbitrary visual.
gdkproperty
All port-specific. Possibly should be X-specific with a higher-level
clipboard API on top of it.
gdkregion
Right now punted to being port-specific, but that probably needs
to change with the virtualized drawables and GC's.
gdkrgb
With a few changes to debugging code, it was already port-independent.
gdkselection
Completely port specific. (In fact, really doesn't make sense
on anything other than X; a higher-level clipboard facility
should be provided somewhere, though.)
gdkvisual
Completely port-specific. (The concepts are rather X-specific)
gdkwindow
The window-private data is split between windowing-system independent
parts and windowing system dependent parts. There are a few
functions in gdk/gdkwindow.c and the rest is moved off
into x11/gdkwindow-x11.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]