Re: [pygtk] GDK bindings?
On Fri, 1 Sep 2000, Martijn Faassen wrote: > Hi there, > > Yesterday I was playing with PyGTK again. Since I was doing some > formatting of fonts on the canvas, eventually I was interested in > getting information about the font dimensions and such. > Unfortunately, much (most?) of GDK does not appear to be exposed to > Python, which was a problem when I wanted to use gdk_string_extends(). > > Is there any work on these bindings, or what are my prospects here? If you have a GdkFont object, use its extents(str) method, which returns the tuple (lbearing,rbearing,width,ascent,descent). > > Regards, > > Martijn James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] GDK bindings?
Hi there, Yesterday I was playing with PyGTK again. Since I was doing some formatting of fonts on the canvas, eventually I was interested in getting information about the font dimensions and such. Unfortunately, much (most?) of GDK does not appear to be exposed to Python, which was a problem when I wanted to use gdk_string_extends(). Is there any work on these bindings, or what are my prospects here? Regards, Martijn ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] GDK Bindings ?
from gtk import * print screen_width(), screen_height() you can use the get_pointer method of GtkWidget to get a (x, y) tuple of the current pointer position. On Sat, Jan 22, 2000 at 06:02:05PM +0100, Martin Preishuber wrote: > Hi there, > > are there any of the bindings for gdk* functions (e.g. > gdk_screen_width or gdk_window_get_pointer) ? > or alternatively, has anyone some idea to realize this problem: > I have some gnome-applet and want to open a popup window, where > the window should appear just over the icon in the panel. > > Thanks, > > Martin > > -- > Martin Preishuber - Student, ECLiPt Core Member, SysAdmin > http://eclipt.uni-klu.ac.at, > mailto:[EMAIL PROTECTED] > > It's OKAY -- I'm an INTELLECTUAL, too. > To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] GDK Bindings ?
Hi there, are there any of the bindings for gdk* functions (e.g. gdk_screen_width or gdk_window_get_pointer) ? or alternatively, has anyone some idea to realize this problem: I have some gnome-applet and want to open a popup window, where the window should appear just over the icon in the panel. Thanks, Martin -- Martin Preishuber - Student, ECLiPt Core Member, SysAdmin http://eclipt.uni-klu.ac.at, mailto:[EMAIL PROTECTED] It's OKAY -- I'm an INTELLECTUAL, too. To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]