Andy Stewart <lazycat.mana...@gmail.com> writes:

> Hi Axel,
>
> Axel Simon <axel.si...@in.tum.de> writes:
>
>> Hi all,
>>
>> I think I've just pushed some patches, although I'm not sure they went  
>> through.
>>
>> The patches should make gio, gtk and pango build but gstreamer is  
>> still broken and other packages that use signals will break. The news  
>> are:
>>
>> - the connect_ functions are now generated in each module and never  
>> exported to other modules (this breaks other modules that used to  
>> import the Signal module of gtk)
>>
>> - the gtkmarshal.list file is now copied to gtk (and called  
>> marshal.list). Some instances here that are not
>>    used by gtk should be removed from this file.
>>
>> - pango now builds correctly with the global Gtk2HsSetup.hs
>>
>> - Gtk2HsSetup.hs has changed and is now able to build several type  
>> hierarchies (used in gstreamer)
>>
>> - gtk now has a flag whether it should depend on gio or not
>>
>> - gio now only depends on glib
> Excellent!
> I have test it, works fine. :)
>
>>
>> Please, Andy, feel free to fix things but don't revert stuff just  
>> because it doesn't build.
> I push below patches:
>
> Fri May 14 21:50:32 CST 2010  Andy Stewart <lazycat.mana...@gmail.com>
>   * Remove `Graphics.UI.Gtk.Signals.chs.template` and unnecessary signals 
> from marshal.list.
>
> Fri May 14 15:16:17 CST 2010  Andy Stewart <lazycat.mana...@gmail.com>
>   * Make gconf just depend on glib
>
> Fri May 14 12:09:03 CST 2010  Andy Stewart <lazycat.mana...@gmail.com>
>   * Fix gio compile error.
>
>
> But i have problem with https://patch-tag.com/r/AndyStewart/gio-branch/home
>
> After i adjust gio-branch code, I got below error:
>
> System/GIO/Volumes/Volume.chs:204:8:
>     Couldn't match expected type `GObject' against inferred type `()'
>       Expected type: FunPtr
>                        (Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO ())
>       Inferred type: FunPtr
>                        (Ptr () -> Ptr AsyncResult -> Ptr () -> IO ())
>     In the fifth argument of `g_volume_mount', namely `cCallback'
>     In the expression:
>         g_volume_mount
>           cVolume
>           (cFromFlags flags)
>           cMountOperation
>           cCancellable
>           cCallback
>           (castFunPtrToPtr cCallback)
>
> Here the define of `marshalAsyncReadyCallback`:
>
> GAsyncReadyCallback ()
>
> void                (*GAsyncReadyCallback)              (GObject 
> *source_object,
>                                                          GAsyncResult *res,
>                                                          gpointer user_data);
>
> type AsyncReadyCallback = GObject -> AsyncResult -> IO ()
> type CAsyncReadyCallback = Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO ()
>
> foreign import ccall "wrapper"
>     makeAsyncReadyCallback :: CAsyncReadyCallback
>                            -> IO {# type GAsyncReadyCallback #}
>
> marshalAsyncReadyCallback :: AsyncReadyCallback -> IO {# type 
> GAsyncReadyCallback #}
> marshalAsyncReadyCallback asyncReadyCallback =
>     makeAsyncReadyCallback cAsyncReadyCallback
>     where cAsyncReadyCallback :: CAsyncReadyCallback
>           cAsyncReadyCallback cObject cAsyncResult cCallback = do
>             object <- peekGObject cObject
>             asyncResult <- peekGObject cAsyncResult
>             asyncReadyCallback object asyncResult
>             freeHaskellFunPtr (castPtrToFunPtr cCallback)
>
> `marshalAsyncReadyCallback` should return 
>
>    FunPtr "(Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO ())", 
>    
> but after i make gio generate signals itself, it return
>
>    FunPtr "(Ptr () -> Ptr AsyncResult -> Ptr () -> IO ())"
>
> But from the define of `marshalAsyncReadyCallback`, looks fine.
>
> I still in investigation, or new patches add something need i noticed?
>
> I have push new patches to
> https://patch-tag.com/r/AndyStewart/gio-branch/home
>
> Can you take a look it? ( darcs get 
> andystew...@patch-tag.com:/r/AndyStewart/gio-branch )
Axel, please help me.

Same gio code can't pass with newest gtk2hs, but works fine with
previous snapshot gtk2hs.

I really no idea what's wrong?

Thanks,

  -- Andy


------------------------------------------------------------------------------

_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to