Re: [gtk-list] pixmaps in gdk window
- From: Eden Li <tile primenet com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] pixmaps in gdk window
- Date: Wed, 7 Jul 1999 03:24:08 +0000 (GMT)
gdk_pixmap_create_from_xpm_d() uses the GdkWindow* to get the colormap,
you can pass NULL as the first argument if you supply a proper colormap.
You can use a system default colormap returned by
gdk_colormap_get_system(). The thing about GtkWidgets and their
corresponding GdkWindow is that it doesn't get used until the widget is
realized. Either you can use the default colormap or realize your widget
with gtk_widget_realize() or you can just pass NULL and use the default
colormap as described above.
Try reading a few docs about GdkPixmap and GdkColormap at
http://gtk.org/rdp/gdk/book1.html, and for a more in depth tutorial about
GDK itself try http://pobox.com/~hp/gnome-app-devel.html (sample chapters
from an upcoming book by Havoc Pennington).
Hope this helps.
Eden Li
tile@linuxgames.com
On Tue, 6 Jul 1999, David Allen wrote:
|I'm using gdk_pixmap_create_from_xpm_d which works, but produces a warning
|that I'm creating a pixmap with a null window. The window that I'm passing
|it is a gtk window, not a gdk window like it wants, so I give it
|mywindow->window pointing at a gdk_window element. I've checked it, and it
|is NULL. After initializing, creating, and showing the window, the gdkwindow
|element of it is still null.
|
|Should I do something like mywindow->window = gdk_window_new(....) and if
|so, what args should I use? Would creating a gdk window underneath my
|toplevel gtk window have any adverse side effects?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]