[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using/wrapping container?
From: |
Andy Wingo |
Subject: |
Re: using/wrapping container? |
Date: |
Mon, 15 Nov 2004 20:07:25 +0200 |
Hi Jan,
An interesting problem.
On Sun, 2004-11-14 at 02:37 +0100, Jan Nieuwenhuizen wrote:
> Jan Nieuwenhuizen writes:
>
> The problem condenses in that the gnome-canvas-path-def cannot be set
>
> This
>
> (let ((bezier (make <gnome-canvas-bpath> #:bpath def)))
>
> yields
>
> <unnamed port>: In procedure scm->gvalue in expression (scm->gvalue
> pspec-value-type option-value):
> <unnamed port>: Don't know how to make values of type #<gtype gpointer>
See the recent thread on gtk-devel-list about brokenness in
libgnomecanvas; I wrote gst-editor with it a long time ago, and was OK,
but it seems the tides are shifting.
Anyway, the problem is that although g-wrap can make nice wrap/unwrap
procedures for boxed objects as function arguments/return values,
guile-gobject doesn't know about them when marshalling/demarshalling
GValue types. I've been meaning to get around to linking these things,
and I think with the new wrap-custom-pointer! macros in (gnome gw
support gobject) we might have the right abstraction to do this. I'll
get around to it eventually, but if you want to take a stab at it, go
right ahead.
I think the solution will require a registry of { gtype, marshal,
demarshal } structs in glib/gnome/gobject/gvalue.c. The prototypes would
be like
GValue* (*marshal) (SCM value)
SCM (*demarshal) (GValue *value)
And gtype would be the gtype.
Patches welcome :-)
--
Andy Wingo <address@hidden>
http://ambient.2y.net/wingo/