Re: jpg or png in gtk_window background?
- From: John K Luebs <jkluebs luebsphoto com>
- To: Markus Wolters <markuswolters gmx de>
- Cc: "gtk-app-devel gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: jpg or png in gtk_window background?
- Date: Sat, 22 Feb 2003 17:32:06 -0500
On Sat, Feb 22, 2003 at 11:48:58AM +0100, Markus Wolters wrote:
Thanks for that,
but I can't get my gtk_window to work with gdk_window_set_back_pixmap().
Maybe someone can give me a code example?
What in particular is not working?
One thing that is not quite clear from what I referred you to is that
you must pass GTK_TRUE to gtk_widget_set_app_paintable.
Other than that the calls should be pretty self explanatory. I tested
the method described using PyGTK, and it worked fine.
Here is a hint, as a C snippet, based on the Python code I tried:
pixbuf = gdk_pixbuf_new_from_file("image.png", &err);
gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, NULL, 0);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gdk_window_set_back_pixmap(window->window, pixmap, GTK_FALSE);
# A literal PyGTK equivalent
pixbuf = gtk.gdk.pixbuf_new_from_file('image.png')
pixmap = pb.render_pixmap_and_mask()
win = gtk.Window()
] [Thread Prev