Re: programmatic screenshots?

2008-12-03 Thread Stefan Kost
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


gtk-feed

2008-12-03 Thread henrih81

Hello all,

I have been developing a small GTK application for some time now and I have  
reached version 0.2.0 with it. Basically, it's simple RSS feed reader which  
only appears as an icon in the window manager's system tray. As of now,  
it's unfinished and much developing would need to be done. Unfortunately, I  
seem to be lacking free time and I just decided to post this in here, in  
case if anyone would get interested contributing. Otherwise, comments and  
suggestions would also be welcome :)


You can find gtk-feed in here:

http://henux.nor.fi/coding/projects/15-gtk/24-gtk-feed

--
Henri Häkkinen
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk-feed

2008-12-03 Thread Michael Cronenworth

 Original Message 
Subject: gtk-feed
From: [EMAIL PROTECTED]
To: gtk-app-devel-list@gnome.org
Date: 12/03/2008 11:50 AM


Hello all,

I have been developing a small GTK application for some time now and I 
have reached version 0.2.0 with it. Basically, it's simple RSS feed 
reader which only appears as an icon in the window manager's system 
tray. As of now, it's unfinished and much developing would need to be 
done. Unfortunately, I seem to be lacking free time and I just decided 
to post this in here, in case if anyone would get interested 
contributing. Otherwise, comments and suggestions would also be welcome :)


You can find gtk-feed in here:

http://henux.nor.fi/coding/projects/15-gtk/24-gtk-feed



I was going to happily look at it until I tried compiling. You should 
add a requires: gtk-2.14.x to your configure script. I am using 2.12 and 
I ran into an error with gtk_dialog_get_content_area().


2.12 is still kind of new so you may wish to add a #define around the 
GtkDialog widget you are using to also have 2.14 compliant code. Users 
will be able to use your program on a wider variety of distributions.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Emitting events to a non-visible widget

2008-12-03 Thread Zan Dobersek
Is there any way to emit events to a non-visible GtkWidget? By 
non-visible, I'm thinking of a GtkWidget that never gets shown, i.e. 
gtk_widget_show_all or similar never gets called on this widget.


Just to clarify on the events - I'd like to emit button, emotion and key 
events.
As far as I've tried, I saw that the problem occurs because no useful 
x_root or y_root can actually be set to event, when specifically talking 
about a GdkEventButton event. I also fairly doubt about widget's window 
validity when that widget is not visible, since a window needs to be set 
in a GdkEvent.


Can anyone suggest a solution or an effective bypass? I thank you sincerely.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Emitting events to a non-visible widget

2008-12-03 Thread Tristan Van Berkom
On Wed, Dec 3, 2008 at 2:38 PM, Zan Dobersek [EMAIL PROTECTED] wrote:
 Is there any way to emit events to a non-visible GtkWidget? By non-visible,
 I'm thinking of a GtkWidget that never gets shown, i.e. gtk_widget_show_all
 or similar never gets called on this widget.

 Just to clarify on the events - I'd like to emit button, emotion and key
 events.
 As far as I've tried, I saw that the problem occurs because no useful x_root
 or y_root can actually be set to event, when specifically talking about a
 GdkEventButton event. I also fairly doubt about widget's window validity
 when that widget is not visible, since a window needs to be set in a
 GdkEvent.

 Can anyone suggest a solution or an effective bypass? I thank you sincerely.

Sure, lets start with why do you want to send an event to an invisible widget
in the first place ? I'm sure we can figure something more appropriate than
creating an invisible button...

Cheers,
  -Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Emitting events to a non-visible widget

2008-12-03 Thread Zan Dobersek

Tristan Van Berkom wrote:

Sure, lets start with why do you want to send an event to an invisible widget
in the first place ? I'm sure we can figure something more appropriate than
creating an invisible button...


In WebKit's[1] test cases, some tests require a button click or a key
press to be generated at a specific location. Test cases are however
loaded one by one and tested in a WebKitWebView, which is essentially a
GtkWidget that never gets shown when running the tests.

While this could probably be bypassed with some hacking in the WebKit
engine itself, it would be nice to do it through Gtk so a
real-environment imitation could be done, if possible.

Tristan, sorry for doubled reply, forgot to fill the Cc: field the first 
time.


[1] http://trac.webkit.org/wiki/BuildingGtk

___
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?

2008-12-03 Thread Andrew Cowie
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