After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708119 - Wrong gdk_pixmap_new() parameters in documentation
Wrong gdk_pixmap_new() parameters in documentation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
2.24.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-09-15 16:56 UTC by Giovanni
Modified: 2014-01-22 06:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Giovanni 2013-09-15 16:56:35 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?)
Comment 1 André Klapper 2013-09-16 09:54:58 UTC
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. :)
Comment 2 William Jon McCann 2014-01-22 06:12:44 UTC
Hopefully commit 8e721922f116df1821361248164f1a5bd06c6c6e helps.
Comment 3 William Jon McCann 2014-01-22 06:25:40 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.