This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getting the size and origin of a GtkWindow



Marius Vollmer <mvo@zagadka.ping.de> writes:

> Russell McManus <russell.mcmanus@msdw.com> writes:
> 
> > I'd like to get and set the origin and size of a GtkWindow, that I've
> > created in guile-gtk.  Is this possible?
> 
> Hmm, I don't think so.  How would you do this from C?  It is probably
> easy to add the missing things to guile-gtk once it is clear in what
> way the Gtk+ API wants to be used.

I won't respond to the totality of your message, because I haven't
tried your change (thanks for that, btw), but I will forward you this
email message that I found on the web:

How to get GtkWindow's position and size?
From: Carlos Pereira <carlos pehoe civil ist utl pt>
To: gtk-app-devel-list redhat com
Subject: How to get GtkWindow's position and size?
Date: Wed, 15 Mar 2000 14:32:28 GMT

>How to get GtkWindow's position and size?

You can use, for example:

gdk_window_get_origin (window->window, &x, &y);
gdk_window_get_size (window->window, &w, &h);

and then:

gdk_window_move_resize (window->window, x, y, w, h);
gdk_window_move (window->window, x, y);
gdk_window_resize (window->window, w, h);


-russ



--
The whole aim of practical politics is to keep the populace alarmed
[and hence clamorous to be led to safety] by menacing it with an
endless series of hobgoblins, all of them imaginary.  
             -- H.L. Mencken

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]