On Jul 10, 2007, at 6:25, Peter Gavin wrote:
> I've been itching to extend the GValue API. GStreamer makes extensive
> use of GValue, and it would be useful to have a more complete
> interface to it.
> I've started writing some code, mostly based around this:
> class GValueStorable a where
> gValueGType :: a -> GType
> gValueGet :: GValue -> IO (Maybe a)
> gValueSet :: GValue -> a -> IO Bool
> An instance would be declared for each Haskell type that can be put
> into a GValue.
> So, should I continue going this way, or does anyone have a better
That would be a way to make GValue more convenient. On the other
hand, we do not need GValues very much and they are going to be
purged from the ModelView widgets as we found a way of dealing with
these dynamic types in a static way. I think that we should avoid
exposing GValues to the user of Gtk2Hs.
Does GStreamer need a GValue interface? Is there no fixed set of
types that can be exposed as normal Haskell types?
The class you suggest looks reasonable. But I think we should clarify
if we need to expose GValue to the end user.