Hi Andy,

On Dec 22, 2009, at 13:14, Andy Stewart wrote:

> Hi Axel,
>
> Axel Simon <axel.si...@ens.fr> writes:
>
>> Hi Andy,
>>
>> sorry for not responding. I am not quite sure what the purpose of  
>> the functions below is and thus, I
>> don't know how or even if they should  be bound. They seem to be  
>> used to connect signals. So they
>> either  mirror functions that already exist. It would be good to  
>> understand  the difference between
>> these two sets of functions. Could you find  out why these  
>> functions exist?
> I think those three functions is *little problem*, just create
> Closure.chs.pp file then compare function behaviour with C code.

Sorry, I wasn't asking about how to bind the functions. I was asking  
what these functions are used for. Why are they necessary? Is the  
current functionality to attach signals not sufficient?

> The really problem is many necessary functions (such as
> dbus_g_proxy_call) is "vararg method", and haven't equivalent
> non-vararg functions to replace.

It is possible to call these varargs functions if we do not supply  
any additional argumets and simply pass NULL as the vararg argument.  
Even though c2hs cannot automatically create the 'foreign import'  
declaration, it is possible to write it by hand.


> So i can't write corresponding demo to test.
>
> For "vararg method", there's three solution to fix:
>
> 1-> Add C file in gtk2hs, in it have equivalent non-vararg functions,
> those non-vararg function use *array* as function argument, then  
> binding
> those non-vararg functions.
> But this is bad idea for gtk2hs, we should avoid to write other C  
> functions.
>
> 2-> Patch to DBus-Glib, then wait next version release, then  
> binding it,
> and this solution perhaps slow.
>
> 3-> Use Haskell DBus implementation by "John Millikin",
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/dbus-core
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/dbus-client

If a binding already exists, then it's obviously better to use that  
than to redo the work.

Cheers,
Axel.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to