I'm creating ReferenceInputStream as a subclass of InputStream and Seekable from gi-gio, so I need to implement virtual methods skip, read_fn and close_fn from InputStream, and can_seek, can_truncate, seek, tell, and truncate from Seekable.
Apparently the correct GObject way to do this is to set the methods of the class during class initialisation (in Haskell, objectClassInit in DerivedGObject). However, I have no way of converting the GObjectClass value into InputStreamClass or SeekableClass, because those types are not exposed in Haskell (or even defined AFAIK).
I'm creating
ReferenceInputStreamas a subclass ofInputStreamandSeekablefrom gi-gio, so I need to implement virtual methodsskip,read_fnandclose_fnfromInputStream, andcan_seek,can_truncate,seek,tell, andtruncatefromSeekable.Apparently the correct GObject way to do this is to set the methods of the class during class initialisation (in Haskell,
objectClassInitinDerivedGObject). However, I have no way of converting theGObjectClassvalue intoInputStreamClassorSeekableClass, because those types are not exposed in Haskell (or even defined AFAIK).