emacs-devel
[Top][All Lists]
Advanced

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

Re: Merging x*, w32* and mac* sources (was Re: table.el)


From: William M. Perry
Subject: Re: Merging x*, w32* and mac* sources (was Re: table.el)
Date: 12 Dec 2001 10:25:07 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Miles Bader <address@hidden> writes:

> address@hidden (William M. Perry) writes:
> > Well, all of this abstraction work has already been done, and fairly
> > well.  Either GTK or Qt gives you exactly this level of abstraction, and
> > we would not have to rewrite it and maintain it ourselves.
> > 
> > The GTK API is not the greatest in the world, but it is much cleaner than
> > trying to emulate X on windows and mac and...
> 
> Isn't GDK the `X abstraction layer' that GTK uses?

Yes, GDK is the abstraction layer, but if you did just use GDK you would
still have the problems of having separate widget implementations for X,
Win32, MacOS, blah, blah, blah.

> Perhaps it would be possible to use that without always using GTK...

I would have to do some more digging to see what the GDK event layer would
do with events for windows it did not originally create.  I think it just
ignores them if it cannot find a GdkWindow * mapping for it, but it has
been a while since I read the GDK source...........

ahah!  You can install a filter using gdk_window_add_filter().  This
function gets the window-system specific event, a GdkEvent, and a chunk of
data you registered it with.  This function can return GDK_FILTER_REMOVE
if the event should NOT be handled by GDK.  So you could use this to
capture/process events that GDK shouldn't bother with, like for the lwlib
widgets, etc.

Hmmm... this would allow us to use some of the same logic people
integrating Xt widgets in other programs use, but a little more elegantly.

-bp
-- 
Ceterum censeo vi esse delendam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]