GNOME Bugzilla – Bug 708119
Wrong gdk_pixmap_new() parameters in documentation
Last modified: 2014-01-22 06:25:40 UTC
First of all I have to admit that I'm a newbie, but while i was studying gtk2 from the tutorials i found this page https://developer.gnome.org/gtk-tutorial/2.22/x2470.html In this page is written: --->To create an offscreen pixmap, we call the function: GdkPixmap* gdk_pixmap_new (GdkWindow *window, gint width, gint height, gint depth); The window parameter specifies a GDK window that this pixmap takes some of its properties from. width and height specify the size of the pixmap. depth specifies the color depth, that is the number of bits per pixel, for the new window. If the depth is specified as -1, it will match the depth of window. <--- Instead in my header file /usr/include/gtk-2.0/gdk/gdkpixmap.h the prototype for gdk_pixmap_new is GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable, gint width, gint height, gint depth); with the first argument of type GdkDrawable. Am I missing something or something is wrong with the tutorial? (Just in case you know another tutorial on gdk* can you suggest it to me?)
I'd recommend 2.24 at least (latest stable GTK+ 2.x release; 2.22 is unmaintained). Apart from that I get the same results. :)
Hopefully commit 8e721922f116df1821361248164f1a5bd06c6c6e helps.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.