[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile-gtk
From: |
Andy Wingo |
Subject: |
Re: guile-gtk |
Date: |
Sun, 21 Nov 2004 19:00:51 +0200 |
Hey Bill,
On Wed, 2004-11-17 at 06:05 -0800, Bill Schottstaedt wrote:
> Another choice is libxm which has support for all versions
> of gtk since 2.0.
It's a different choice indeed, a bit closer to the C.
Some libxm examples from snd-gtk.scm:
(gtk_range_set_update_policy (GTK_RANGE (GTK_SCALE scale))
GTK_UPDATE_CONTINUOUS)
(g_signal_connect_closure_by_id
(GPOINTER adj)
(g_signal_lookup "value_changed" (G_OBJECT_TYPE (GTK_OBJECT adj)))
0
(g_cclosure_new
(lambda (w d) (func (.value (GTK_ADJUSTMENT adj)))) #f #f) #f)))
The same code in guile-gnome would be:
(set-update-policy scale 'continuous)
;; you could use the full name, gtk-range-set-update-policy
;; or, with gobject properties, (set scale 'update-policy 'continuous)
(connect adj 'value-changed
(lambda (x) (func (gtk-adjustment:value adj)) #f))
So on the one hand, guile-gnome feels more schemey, but on the other,
gtk-adjustment:value doesn't actually exist right now (GtkAdjustment
needs more love). In libxm everything that you have in C should be
available in scheme without extra love.
Regards,
--
Andy Wingo <address@hidden>
http://ambient.2y.net/wingo/