[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile-gtk usage question
From: |
tomas |
Subject: |
guile-gtk usage question |
Date: |
Mon, 14 Oct 2002 13:53:38 +0200 |
User-agent: |
Mutt/1.3.24i |
Hi,
I've downloaded guile-gtk (thanks, Marius!) and am playing a bit
with it. My first try is to make a binding for the gtk-canvas
widget (which is a backport of the gnome-canvas widget, find it
at
<http://www.atai.org/gtk-canvas/gtk-canvas-0.1.tar.gz>
In this process I stumbled on one thing: gtk_canvas_item_new
takes a variable list of arguments, so it needs a custom glue
function. There are two models in guile-gtk I can steal from.
One is gtk-object-new() and friends ant the other
gtk-object-query-args(), the main difference being that the
second has an entry in gtk-1.2.defs.
Now to my questions:
(1) Am I right in assuming that gtk-object-query-args() is
``the way to go'' (that is: the more `modern' model?)
(2) To convert a keyword-values list into a GtkArgs I'd use
args = sgtk_build_args(info, &n_args, scm_args, scm_obj, "foo");
Now, in the examples this scm_obj is the object being
created (and is used for some `protection business', I guess
somehow related with the garbage collector). That means
that I have to
- first create the object
- then set its arguments
instead of simply creating it with args. Is that how it
should be done?
Thanks for any input, I'll put up my first results for review
around next weekend.
Regards
-- tomas
- guile-gtk usage question,
tomas <=