Re: programmatic screenshots?
On Wed, 2008-12-03 at 12:19 +0200, Stefan Kost wrote: > do you have it in a form, where you have one *.c and one *.h file with > lots of static functions and one public function More or less. It's in the Java bindings as a function[1] that returns a Pixbuf, as in: pixbuf = Screenshot.capture(); which a few layers later reaches this: http://research.operationaldynamics.com/bzr/java-gnome/mainline/src/jni/gnome_screenshot_capture.c http://research.operationaldynamics.com/bzr/java-gnome/mainline/src/jni/gnome_screenshot.h which in turn just calls the stuff from what in gnome-utils is gnome-screenshot/screenshot-utils.c and friends. AfC Sydney [1]: yes yes, I realize full well that a class method is still a method in Java speak. Still, I've taken to calling them functions since everyone else tends to use "method" to exclusively refer to functions that are members of, and operate on, object instances. Whatever. Anyway, http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/screenshot/Screenshot.html -- 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: enabling successful deployment of mission critical information technology in 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
Re: programmatic screenshots?
hi, Andrew Cowie schrieb: > On Mon, 2008-12-01 at 08:51 -0800, Garth's KidStuff wrote: > >> I'm runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take a screenshot >> from inside the app. Any hints? >> > > We used an adaptation of the gnome-screenshot code in gnome-utils's > gnome-screenshot/gnome-screenshot.c > > It is *very * voodoo (in the sense that it makes all kinds of low level > X calls which aren't the sort of thing that us mere mortal application > developers using GTK have to know about, usually) but works quite > nicely, especially the fact that it captures window decorations and adds > a nice drop shadow. Pity it isn't out there in library form, but c'est > la vie. > do you have it in a form, where you have one *.c and one *.h file with lots of static functions and one public function in the kind of: take_screen_shot(GtkWindow *window,gchar *filename); If so, could you share that code? Stefan > AfC > Sydney > > > > > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: programmatic screenshots?
On Mon, 2008-12-01 at 08:51 -0800, Garth's KidStuff wrote: > I'm runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take a screenshot > from inside the app. Any hints? We used an adaptation of the gnome-screenshot code in gnome-utils's gnome-screenshot/gnome-screenshot.c It is *very * voodoo (in the sense that it makes all kinds of low level X calls which aren't the sort of thing that us mere mortal application developers using GTK have to know about, usually) but works quite nicely, especially the fact that it captures window decorations and adds a nice drop shadow. Pity it isn't out there in library form, but c'est la vie. AfC Sydney ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: programmatic screenshots?
- Original Message -From: Tadej Borovšak Date: Tuesday, December 2, 2008 12:34 pmSubject: Re: programmatic screenshots?To: [EMAIL PROTECTED]: Stefan Kost , gtk-app-devel-list@gnome.org, Garth's KidStuff > Hi.> > This function in quite new addition to gtk - it is only > available in> gtk 2.14. Maybe your gtk is not recent enough?> > > 2008/12/2 :> > - Original Message -From: Stefan Kost Date: Tuesday, > December 2, 2008 2:29 amSubject: Re: programmatic > screenshots?To: Garth's KidStuff Cc: gtk-app-devel-> [EMAIL PROTECTED]> Garth's KidStuff schrieb:> > Hey All,> >> > I'm > runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take > a > screenshot> > from inside the app. Any hints?> >> > Thanks in > advance.> >> > -Garth> >> > > > http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/tests/bt-check.c?view=markup> look at check_make_widget_screenshot() at the bottom. Please > note that> it cannot capture window-decorations :/.> > Stefan> ___> gtk-app-devel-list mailing list> gtk-app-devel-list@gnome.org> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>If you don't really want a screenshot, but want to capture an image of the program you're running try using gtk_widget_get_snapshot(). The link is: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#gtk-widget-get-snapshot .Make the first parameter your toplevel window and the second NULL. This should return a pixmap of the window at the time it was called. However, I couldn't get it to work because I don't have the gtk_widget_get_snapshot() function anywhere; it's not in any of the header file that I saw. If you or anyone knows where this function is I'd like to know: it looks useful.Dave> > ___> > gtk-app-devel-list mailing list> > gtk-app-devel-list@gnome.org> > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list> >> > -- > Tadej Borovšak> [EMAIL PROTECTED]> [EMAIL PROTECTED]>That was it. I'm still on gtk 2.12. That seems to be the latest version Gentoo has. I guess I'll have to wait until they get the latest version.Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: programmatic screenshots?
Hi. This function in quite new addition to gtk - it is only available in gtk 2.14. Maybe your gtk is not recent enough? 2008/12/2 <[EMAIL PROTECTED]>: > - Original Message -From: Stefan Kost Date: Tuesday, December 2, 2008 > 2:29 amSubject: Re: programmatic screenshots?To: Garth's KidStuff Cc: > gtk-app-devel-list@gnome.org> Garth's KidStuff schrieb:> > Hey All,> >> > I'm > runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take > a screenshot> > > from inside the app. Any hints?> >> > Thanks in advance.> >> > -Garth> >> > > > > http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/tests/bt-check.c?view=markup> > look at check_make_widget_screenshot() at the bottom. Please > note that> it > cannot capture window-decorations :/.> > Stefan> > ___> gtk-app-devel-list mailing > list> gtk-app-devel-list@gnome.org> > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>If you don't really > want a screenshot, but want to capture an image of the program you're running > try using gtk_widget_get_snapshot(). The link is: > http://library.gnome.org/devel/gtk/stable/GtkWidget.html#gtk-widget-get-snapshot > .Make the first parameter your toplevel window and the second NULL. This > should return a pixmap of the window at the time it was called. However, I > couldn't get it to work because I don't have the gtk_widget_get_snapshot() > function anywhere; it's not in any of the header file that I saw. If you or > anyone knows where this function is I'd like to know: it looks useful.Dave > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > -- Tadej Borovšak [EMAIL PROTECTED] [EMAIL PROTECTED] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: programmatic screenshots?
- Original Message -From: Stefan Kost Date: Tuesday, December 2, 2008 2:29 amSubject: Re: programmatic screenshots?To: Garth's KidStuff Cc: gtk-app-devel-list@gnome.org> Garth's KidStuff schrieb:> > Hey All,> >> > I'm runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take > a screenshot> > from inside the app. Any hints?> >> > Thanks in advance.> >> > -Garth> >> > > http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/tests/bt-check.c?view=markup> look at check_make_widget_screenshot() at the bottom. Please > note that> it cannot capture window-decorations :/.> > Stefan> ___> gtk-app-devel-list mailing list> gtk-app-devel-list@gnome.org> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list>If you don't really want a screenshot, but want to capture an image of the program you're running try using gtk_widget_get_snapshot(). The link is: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#gtk-widget-get-snapshot .Make the first parameter your toplevel window and the second NULL. This should return a pixmap of the window at the time it was called. However, I couldn't get it to work because I don't have the gtk_widget_get_snapshot() function anywhere; it's not in any of the header file that I saw. If you or anyone knows where this function is I'd like to know: it looks useful.Dave ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: programmatic screenshots?
Garth's KidStuff schrieb: > Hey All, > > I'm runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take a screenshot > from inside the app. Any hints? > > Thanks in advance. > > -Garth > > http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/tests/bt-check.c?view=markup look at check_make_widget_screenshot() at the bottom. Please note that it cannot capture window-decorations :/. Stefan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
programmatic screenshots?
Hey All, I'm runnign a Gtk++ app under ubuntu 8.04 and I'd liek to take a screenshot from inside the app. Any hints? Thanks in advance. -Garth -- Garth Upshaw Garth's KidStuff ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list