From cec44f20f0a196f61a3d5c807d685827065eb938 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Thu, 12 Jul 2007 11:56:17 +0000 Subject: wrap four GtkImage functions with docs svn path=/trunk/; revision=2847 --- ChangeLog | 10 +++ docs/reference/ChangeLog | 8 ++ docs/reference/pygtk-gtkimage.xml | 180 ++++++++++++++++++++++++++++++++++++++ gtk/gtk-base.defs | 17 ++-- 4 files changed, 206 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56632b1c..49781b48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-07-12 Gian Mario Tagliaretti + + reviewed by: Johan, Fix bug #371293 + + * gtk/gtk-base.defs: + (gtk_image_new_from_file) + (gtk_image_new_from_pixbuf) + (gtk_image_new_from_pixmap) + (gtk_image_new_from_image): Add wrappers. + 2007-07-12 Gian Mario Tagliaretti reviewed by: Johan, Fix bug #456037 diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index e2880264..0484070f 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,11 @@ +2007-07-12 Gian Mario Tagliaretti + + * pygtk-gtkimage.xml: + (gtk_image_new_from_file) + (gtk_image_new_from_pixbuf) + (gtk_image_new_from_pixmap) + (gtk_image_new_from_image): Add, Fix #371293 + 2007-03-09 Rafael Villar Burke * pygtk-gtklabel.xml: Fix #41645 s/get_user_markup/get_use_markup/ diff --git a/docs/reference/pygtk-gtkimage.xml b/docs/reference/pygtk-gtkimage.xml index bbf2f5b0..faa64e89 100644 --- a/docs/reference/pygtk-gtkimage.xml +++ b/docs/reference/pygtk-gtkimage.xml @@ -148,6 +148,20 @@ linkend="method-gtkimage--clear">clear gtk.image_new_from_icon_name icon_name size + + gtk.image_new_from_pixmap + pixmap + mask + + gtk.image_new_from_image + image + mask + + gtk.image_new_from_file + filename + + gtk.image_new_from_pixbuf + pixbuf @@ -1157,6 +1171,172 @@ icon will be updated appropriately. The "icon-name" and "icon-size" properties are also set by this function. + + + gtk.image_new_from_pixmap + + + gtk.image_new_from_pixmap + pixmap + mask + + + + pixmap : + a gtk.gdk.Pixmap + + + mask : + the bitmap that is the transparency mask. + + + Returns : + a new gtk.Image +widget. + + + + + This function is available in PyGTK 2.12 and above. + + + The gtk.image_new_from_pixmap() function +returns a new gtk.Image object +displaying pixmap with a mask. A gtk.gdk.Pixmap +is a server-side image buffer in the pixel format of the current display. + + + + + gtk.image_new_from_image + + + gtk.image_new_from_image + image + mask + + + + image : + a gtk.gdk.Image + + + mask : + the bitmap that is the transparency mask. + + + Returns : + a new gtk.Image +widget. + + + + + This function is available in PyGTK 2.12 and above. + + + The gtk.image_new_from_image() function +returns a new gtk.Image object +displaying an image with a mask. A gtk.gdk.Image +is a client-side image buffer in the pixel format of the current display. + + + + + gtk.image_new_from_file + + + gtk.image_new_from_file + filename + + + + filename : + a filename + + + Returns : + a new gtk.Image +widget. + + + + + This function is available in PyGTK 2.12 and above. + + + The gtk.image_new_from_file() function +returns a new gtk.Image object +displaying the file filename. If the file isn't found or can't be loaded, +the resulting gtk.Image +will display a "broken image" icon. This function never returns None, +it always returns a valid gtk.Image + widget. + If the file contains an animation, the image will contain an animation. + If you need to detect failures to load the file, use gtk.gdk.pixbuf_new_from_file +to load the file yourself, then create the gtk.Image +from the pixbuf. (Or for animations, use gtk.gdk.PixbufAnimation. +The storage type (get_storage_type) +of the returned image is not defined, it will be whatever is appropriate +for displaying the file. + + + gtk.image_new_from_pixbuf + + + gtk.image_new_from_pixbuf + pixbuf + + + + pixbuf : + a gtk.gdk.Pixbuf + + + + Returns : + a new gtk.Image +widget. + + + + + This function is available in PyGTK 2.12 and above. + + + The gtk.image_new_from_pixbuf() function +returns a new gtk.Image object +displaying pixbuf + Note that this function just creates a gtk.Image from the pixbuf. The +gtk.Image +created will not react to state changes. Should you want that, you should use +gtk.image_new_from_icon_set + + + diff --git a/gtk/gtk-base.defs b/gtk/gtk-base.defs index 9acc5578..fb0ed907 100644 --- a/gtk/gtk-base.defs +++ b/gtk/gtk-base.defs @@ -10139,27 +10139,26 @@ (define-function image_new_from_pixmap (c-name "gtk_image_new_from_pixmap") - (is-constructor-of "GtkImage") (return-type "GtkWidget*") + (caller-owns-return #t) (parameters - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") + '("GdkPixmap*" "pixmap" (null-ok)) + '("GdkBitmap*" "mask" (null-ok)) ) ) (define-function image_new_from_image (c-name "gtk_image_new_from_image") - (is-constructor-of "GtkImage") (return-type "GtkWidget*") + (caller-owns-return #t) (parameters - '("GdkImage*" "image") - '("GdkBitmap*" "mask") + '("GdkImage*" "image" (null-ok)) + '("GdkBitmap*" "mask" (null-ok)) ) ) (define-function image_new_from_file (c-name "gtk_image_new_from_file") - (is-constructor-of "GtkImage") (return-type "GtkWidget*") (parameters '("const-gchar*" "filename") @@ -10168,10 +10167,10 @@ (define-function image_new_from_pixbuf (c-name "gtk_image_new_from_pixbuf") - (is-constructor-of "GtkImage") (return-type "GtkWidget*") + (caller-owns-return #t) (parameters - '("GdkPixbuf*" "pixbuf") + '("GdkPixbuf*" "pixbuf" (null-ok)) ) ) -- cgit v1.2.1