This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: texinfo documentation
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/