I've solved the prev question partially.
Right now I'm able to register GObject
subtype via bindings-gobject
(see hpase)
I can implement SourceCompletionProvider
using c'g_type_add_interface_static function (but didn't tried yet).
The only issue is to convert Ptr ()
, returned by c'g_object_newv
, to gtk2hs
data type SourceCompletionProvider
. How can I do it? Any hints?
SourceCompletionProvider
is defined like:
newtype SourceCompletionProvider = SourceCompletionProvider (ForeignPtr (SourceCompletionProvider))
What does this definition means? Why it is recursive? Provider is a ForeignPtr
to provider -- looks strange for me.
Thanks.
Solution:
makeNewGObject mkGObject $ castPtr <$> c'g_object_newv myObType 0 nullPtr