Re: Gtk2::Gdk::Drawable problem



In the C api I found gdk_pixbuf_get_from_drawable, but I don't see it in
the XS code.

On Mon, 17 Nov 2003 16:55:45 +0100
Domsodi Gergely <doome uhulinux hu> wrote:


Is there an easier way to obtain a GdkPixbuf from a Gtk2::Gdk::Window?

I want to make a screenshot of a window, and save it to a file. Or am
I heading to a very bad direction? :-)

On Mon, 17 Nov 2003 10:28:53 -0500 (EST)
"muppet" <scott asofyet org> wrote:

Domsodi Gergely said:
Hi!

I get the following error when trying to use the get_image method
of
Gtk2::Gdk::Drawable. It is weird, because I saw this function in the
XS code. (gtk2-perl 1.00).

Can't locate object method "get_image" via package
"Gtk2::Gdk::Drawable" at
/usr/lib/perl5/vendor_perl/UHU/gtk2.pm line 283, <> line 1.


thanks to a missing MODULE directive to reset the PREFIX value, the
method is bound as Gtk2::Gdk::Drawable::drawable_get_image.  the
patch below (which will be in cvs in just a few minutes) corrects
it.

i imagine nobody reported this before now because GdkPixbufs are
rather easier to use than GdkImages.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Index: xs/GdkDrawable.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkDrawable.xs,v
retrieving revision 1.10
diff -u -r1.10 GdkDrawable.xs
--- xs/GdkDrawable.xs       12 Oct 2003 17:57:30 -0000      1.10
+++ xs/GdkDrawable.xs       17 Nov 2003 15:26:05 -0000
@@ -279,6 +279,9 @@
    GdkColor *foreground
    GdkColor *background

+
+MODULE = Gtk2::Gdk::Drawable       PACKAGE = Gtk2::Gdk::Drawable   PREFIX =
gdk_drawable_
+
  ## GdkImage* gdk_drawable_get_image (GdkDrawable *drawable, gint
  #x, gint y,
gint width, gint height)
 GdkImage*
 gdk_drawable_get_image (drawable, x, y, width, height)
@@ -287,4 +290,5 @@
    gint y
    gint width
    gint height
+

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


-- 
muppet <scott at asofyet dot org>



_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


-- 
Domsodi Gergely / UHU-Linux
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


-- 
Domsodi Gergely / UHU-Linux



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