[Gtk-sharp-list] grabbing a screenshot from C#?
dave at linuxprogrammer.org
Fri Apr 6 12:04:54 EDT 2007
I was looking at the source code for the gnome-screenshot app in the
gnome-utils package to see how they take a screenshot of the entire desktop
and get it into a Pixbuf.
The code basically goes like this (pseudo-C-code):
GdkWindow *root = gdk_window_foreign_new(GDK_ROOT_WINDOW());
GdkPixbuf *screenshot = gdk_pixbuf_get_from_drawable(NULL, root, NULL, ...);
I'd like to be able to do this from my Gtk#/Gdk# application but I can't
seem to figure out the equivalent function of the GDK_ROOT_WINDOW() call.
I see that I can use Pixbuf.CreateFromDrawable() to do the same thing as the
Does anybody know how to get the Gdk root window (i.e. desktop window)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list