GDK, and `gdk_pixmap_create_from_xpm_d': NULL window




Hi, 

I'm quite desperate here, having first tried to live with imlib, 
I now tried another approach to my problem, inspired from Harlow's
book, chapter about sprites and animation.

My goal is simple: draw some background image, and on top of it
another image having some non-zero mask. Well, I can't even test
my code, because as soon as I run it, the message:

Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap
Segmentation fault

I assume the source of this problem is my call to:
GdkPixmap grid  = gdk_pixmap_create_from_xpm_d ( widget->window,
                        &gridmask, &color, white60 );

The widget is a drawing area, but why is its window NULL? 
When is a widget's window initialised?
Or am I completely wrong, does the problem reside somewhere else?

I'm really sorry if all this seem so trivial questions, but just
as GTK is documented well enough, for GDK the only documentation 
is the code, and unfortanetely I don't have all the time in the world. ;-(

Perhaps someone has got some ideas about how I should handle
this best? Perhaps it's an overkill to use gtk/gdk? Perhaps
someone knows about some libraries I'm unaware of and which do
exactly what I'd like to do? 

Many many thanks,
Nancy




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