public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Marko Rauhamaa <marko@pacujo.net>
To: guile-gtk@sources.redhat.com
Subject: Re: texinfo documentation
Date: Sun, 25 May 2003 23:28:00 -0000	[thread overview]
Message-ID: <m3u1bibomb.fsf@lumo.pacujo.net> (raw)
In-Reply-To: <87el2mmymo.fsf@zip.com.au>

Kevin Ryde <user42@zip.com.au>:

> Marko Rauhamaa <marko@pacujo.net> writes:
> >
> > Kevin Ryde <user42@zip.com.au>:
> >
> >> `app'
> >>      Don't be tempted to define `app' to some sort of widget or the
> >>      like.  In Guile 1.6.4 `app' is used for the implementation of the
> >>      module system.
> >
> > What does that mean?
> 
> Exactly what it says.  Try defining app to something and then doing a
> use-modules.

Oh, if you mean:

  `app'
      This global symbol is reserved by guile. Don't define it.

then better state it that way.

I was confused because I didn't know why I would "be tempted to define"
it "to some sort of widget".

> > I don't know (yet) how much of the whole story needs to be exposed to
> > the application developer, but the GTK functions dealing with signals
> > come in two C variants: regular and full. The guile code always uses the
> > full variant but strips the "-full" suffix from the procedure name.
> 
> I haven't looked closely enough to see if full variants work or can be
> usefully used from scheme code.  The regular forms are presumably what
> will be used most often.

There are no scheme procedures for the full variants. (But guile-gtk
secretly uses the full variants to implement the plain-vanilla
variants.)

> > Also: GdkRectangle is a pair of pairs. However, whenever it is an input
> > parameter, GdkRectangle is expanded into (x y w h). Thus the
> > pair-of-pairs format is used only to return a GdkRectangle.
> 
> That's rather inconsistent, and will probably make life hard if one
> wants to pass a returned value on to another function.

Some of the inconsistency is there in the C functions themselves. But
guile-gtk expands rectangles "consistently" everywhere. The reason is
obviously that it's nicer to call

   (gdk-useful-function window x y w h)

than

   (gdk-useful-function window (cons (cons x y) (cons w h)))


Well, you probably need rectangles most often to process exposures. It
would be nice to be able to call:

   (gdk-gc-set-clip-rectangle gc (gdk-event-area e))

instead of

   (let ((r (gdk-event-area e)))
      (gdk-gc-set-clip-rectangle (caar r) (cdar r) (cadr r) (cddr r)))

Since gdk-gc-set-clip-rectangle was added recently by me (following
existing examples), I could change it to take a rectangle.


Marko

-- 
Marko Rauhamaa      mailto:marko@pacujo.net     http://pacujo.net/marko/

  reply	other threads:[~2003-05-25 23:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12  1:21 Kevin Ryde
2003-05-12  1:52 ` Marko Rauhamaa
2003-05-23 22:01   ` Kevin Ryde
2003-05-23 23:36     ` Marko Rauhamaa
2003-05-23 23:57       ` Kevin Ryde
2003-05-24  0:05         ` Marko Rauhamaa
2003-05-24  2:19           ` Kevin Ryde
     [not found]             ` <m3llwwdhjf.fsf@lumo.pacujo.net>
2003-05-25 22:48               ` Kevin Ryde
2003-05-25 23:28                 ` Marko Rauhamaa [this message]
2003-05-26  0:06                   ` Kevin Ryde
2003-05-26  2:42                     ` Marko Rauhamaa
2003-05-29 23:37                       ` Kevin Ryde
2003-05-30  1:06                         ` Marko Rauhamaa
2003-06-13 22:05                           ` gdk-string-to-compound (was: texinfo documentation) Kevin Ryde
2003-07-07 22:30                             ` gdk-string-to-compound Kevin Ryde
2003-05-29 23:43                       ` texinfo documentation Kevin Ryde
2003-06-01  4:31                         ` Marko Rauhamaa
2003-06-02 23:51                           ` gdk-window-get-origin (was: texinfo documentation) Kevin Ryde
2003-07-07 22:29                         ` gdk-window-get-geometry " Kevin Ryde
2003-05-26  0:07                   ` gdk-rectangle-new " Kevin Ryde
2003-05-26  1:20                     ` Marko Rauhamaa

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=m3u1bibomb.fsf@lumo.pacujo.net \
    --to=marko@pacujo.net \
    --cc=guile-gtk@sources.redhat.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).