On Wed, 2008-07-23 at 13:32 +0200, Gabriele Greco wrote: > I need to make a screenshot of a GtkWindow from the program itself
We used code from gnome-utils's gnome-screenshot/gnome-screenshot.c and gnome-screenshot/screenshot-utils.c to add a capture capability to java-gnome (we wanted window decorations and all, not just the GdkWindow behind something; the drop shadows are nice too). We use this when generating our API documentation, for example: http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/AboutDialog.html I certainly appreciate now that gathering a screenshot (window borders and all) is very tricky and involves some voodoo mucking about with X. I am quite thankful that such code existed to be reused. Unfortunately it's not a library as yet, so we had to copy it manually. Our import of it was a bit hack-and-slash, but our versions of the above two files, as gnome_screenshot_capture.c and gnome_screenshot_utils.c, can be found in a checkout of a java-gnome in the src/jni/ directory, ie http://research.operationaldynamics.com/bzr/java-gnome/mainline/src/jni/ AfC Sydney -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management. We actively carry out research and development in these areas on behalf of our clients, and enable successful use of open source in their mission critical enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list