Drawable/Window confusion

It appears that gdk constantly assumes that window and drawable are
interchangable.  However, this is not entirely the case as some
commands like XSetWindowBackgroundPixmap really require windows
and not pixmaps.  (This makes it very hard to wrapper as Pixmap is
not a direct decendant of Window.)

I would like to change all the gdk_window_* commands that
are applicable to pixmaps and bitmaps to gdk_drawable_* and
mark the current one deprecated.  Also the internal name 
of GtkWindowPrivate should become GtkDrawablePrivate as well.
(Typedef for name compatablity.)  Although these changes are purely
consmetic they would make using the kit much easier.

Also there are things like gdk_pixmap_new which take the
first argument as a GtkWindow when any drawable will work.
However, I don't know the exact nature of all of the calls, so
I could only make a guess at how to fix all the occurances.
Shall I proceed with those changes? 

One last item, I would like to add it a gdk_gc_dup command that
clones a gc from another.  It is a basic X-ism that makes using
the kit overly burdensome at times.  A XGCdup command is easy to faked
by making a temporary pixmap to make the new gc from.  It can then
use XCopyGC to copy the values through.  Would this be a useful
piece of code?  


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