public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
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: Mon, 29 Jan 2001 15:36:00 -0000	[thread overview]
Message-ID: <87puh6x7mw.fsf@zagadka.ping.de> (raw)
In-Reply-To: <200101292106.QAA10520@hqsmh3.ms.com>

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.

Hmm^2, the right way probably involves GtkAllocation which doesn't
exist in guile-gtk yet.  I don't think we want to add support for it
because it is too similar to a rectangle.

Hmm^3, [time passes] I just added a `cname' field option to
build-guile-gtk.  You can now say things like

    (define-object GtkWidget (GtkObject)
      (fields
       (uint requisition-width (cname requisition.height))
       (uint requisition-height (cname requisition.width))
       (int allocation-x (cname allocation.x))
       (int allocation-y (cname allocation.y))
       (uint allocation-width (cname allocation.width))
       (uint allocation-height (cname allocation.height))
       (GtkStyle style)
       (GdkWindow window)))

in the defs files and access the allocation.x field of a GtkWidget w
like so

    (gtk-widget-allocation-x w)

Nice and esay, eh? :)

Please update from CVS to get this change.  But I guess this is not
really what you want to have, right?

[ Maybe we should automatically translate dashes to dots in field
  names.  Dashes are illegal in C identifiers anyway... ]

  reply	other threads:[~2001-01-29 15:36 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 [this message]
2001-01-29 17:50   ` Russell McManus
2001-02-04 10:12     ` Marius Vollmer
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=87puh6x7mw.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).