From: Marius Vollmer <mvo@zagadka.ping.de>
To: Russell McManus <russell.mcmanus@msdw.com>
Cc: guile-gtk@sourceware.cygnus.com
Subject: Re: getting the size and origin of a GtkWindow
Date: Sun, 04 Feb 2001 10:12:00 -0000 [thread overview]
Message-ID: <87snlu74b3.fsf@zagadka.ping.de> (raw)
In-Reply-To: <jqapuh5u7tz.fsf@msdw.com>
Russell McManus <russell.mcmanus@msdw.com> writes:
> 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?
>
> >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);
Ahh, I see. gdk-window-get-size is already there, but
gdk-window-get-origin needs to be added (which I have done in CVS).
You can use them like this:
(define w (gtk-window-new 'toplevel))
...
(gdk-window-get-size (gtk-widget-window w))
=> (200 . 200)
As you can see, the functions return the two coordinates as a cons of
two numbers.
Does this help?
next prev parent reply other threads:[~2001-02-04 10:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-29 13:07 Russell McManus
2001-01-29 15:36 ` Marius Vollmer
2001-01-29 17:50 ` Russell McManus
2001-02-04 10:12 ` Marius Vollmer [this message]
2001-02-05 4:55 ` Russell McManus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87snlu74b3.fsf@zagadka.ping.de \
--to=mvo@zagadka.ping.de \
--cc=guile-gtk@sourceware.cygnus.com \
--cc=russell.mcmanus@msdw.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).