Well, I have a XEmacs that runs using the gtk event loop, and all of the
basic redisplay mechanisms have been rewritten to use Gdk drawing methods.
This involved writing (basically rewriting the *-x.c equivalents)
console-gtk.c
device-gtk.c
event-gtk.c
frame-gtk.c
gccache-gtk.c
glyphs-gtk.c
objects-gtk.c
redisplay-gtk.c
select-gtk.c
Yet to be done are:
gui-gtk.c
menubar-gtk.c
toolbar-gtk.c
scrollbar-gtk.c
glyphs-gtk.c
Right now I just use:
./configure --with-menubars=no --with-scrollbars=no --with-toolbars=no
with the majority of glyphs-gtk.c commented out. With this setup, TTY
frames work just spiffy, and I can then make a gtk device. A test window
pops up (the equivalent of the app_shell in the device-x.c). Creating a
frame on it craps out, but that isn't surprising. It is in one of my
abort() calls sprinkled around there because I was a bit confused on what
they needed to do. :)
I hope to have frame creation working by the end of the day. The _major_
sticking point is that Gtk/Gdk don't expose much of the underlying font
structure, so a lot of stuff (like font-properties list-fonts, etc) don't
work at all. This will be a _large_ impediment to getting the font menus
and Emacs/W3 to work. Then it is on to debugging redisplay. :)
So, the poll is... right now I have some stuff conditionalized on
`STUPID_X_SPECIFIC_GTK_STUFF'. This includes the definition of
gtk-window-id (which gets the raw X-window ID of a Gtk widget so that you
can pass it to external programs) and set-mouse-position (no gtk equivalent
because they think it is evil and the job of the window manager). This
ends up including <gdkx.h> and peeking into places I don't think we should
be peeking into, and using the raw X calls to do this. I _hate_ this,
because it removes one of the supposed benefits of this, which would be a
generic xplatform redisplay substrate.
Do people think a font menu is worth it? I can work around it in Emacs/W3
somehow (I hope :). The font menu would be replaced with a real font
selection dialog box as well. Thoughts, flames, opinions?
-Bill P.