Re: Less GdkWindows in the API



On Sun, 2010-01-24 at 13:13 +0100, Murray Cumming wrote: 
> I have always disliked how GTK+'s API often leaks the concept of X
> windows, often called just "windows", by which a GdkWindow is usually
> implied. That's obviously confusing to people who think of windows as
> top-level application windows, like GtkWindow.

Certainly it's caused us great difficulty trying to explain the
difference to people. If it had been named, well, anything other than
"Window", it would have been helpful.

We tend to use language like "get the underlying native resource" which
of course doesn't mean anything, but at least isn't "Window".

As Murray points out, this is all due to GDK [originally] being a thin
wrapper around Xlib.

The number of times I have seen people on gtk-list or in #gtk+ be told
to go read the Xlib programming manual to understand what GdkEvents are
is frustrating. I originally had the idea that using GTK would mean I
didn't have to know much about X ir Xlib. I may have been wrong about
that, but that's the impression I had.

[The fact that GDK is heavily X inspired doesn't bother me; it's still
an abstraction layer and does a fine job of it. It just seems that it
leaks up into GTK a bit too much — notably all the GdkEvents in
GtkWidget signals, and, as Murray raised, the very developer-visible
existence of GdkWindow and GtkEventBox]

AfC
Sydney

Attachment: signature.asc
Description: This is a digitally signed message part



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