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. 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. 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 For current situation, i want give up this patch, and try to use Haskell DBus implementation by "John Millikin", it's looks fully completely, even DBus-Glib have better integrate with Glib mainloop. I will finish rest work if have better solution for "vararg method" in DBus-Glib. It's worth to finish DBus-Glib binding when John have implement DBus protocol by Haskell? What do you think? -- Andy > > Cheers, > Axel. > > On Dec 21, 2009, at 9:01, Andy Stewart wrote: > >> Andy Stewart <lazycat.mana...@gmail.com> writes: >> >>> Hi Axel, >>> >>> I have finish DBus-Glib_0.80 >>> (http://dbus.freedesktop.org/releases/dbus-glib/dbus- >>> glib-0.80.tar.gz) >>> binding for gtk2hs. >>> >>> Below is patch file: >>> >>> >>> I have finish all functions exception below three functions: >>> void dbus_g_object_register_marshaller_array >>> (GClosureMarshal >>> marshaller, >>> GType rettype, >>> guint n_types, >>> const GType >>> *types); >>> >>> void dbus_g_proxy_connect_signal (DBusGProxy *proxy, >>> const char >>> *signal_name, >>> GCallback handler, >>> void *data, >>> GClosureNotify >>> free_data_func); >>> >>> void dbus_g_proxy_disconnect_signal (DBusGProxy *proxy, >>> const char >>> *signal_name, >>> GCallback handler, >>> void *data); >>> >>> Have no idea how to handle `GClosureMarshal` `GCallback` >>> `GClosureNotify`? >> After i search gnome documentation, i found above three Type implement in >> http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html >> >> And i found just 'GClosure' and 'GClosureNotify' implement in >> 'glib/System/Glib/Signals.chs.pp' file, haven't 'GClosureMarshal' >> implementation. >> >> I think we should implement 'GClosureNotify', 'GClosureMarshal', >> 'GCallback' in file 'glib/System/Glib/Closure.chs.pp', and not >> 'glib/System/Glib/Signals.chs.pp', then we can fix above three functions >> in DBus-Glib. >> >> What do you think? >> >> -- Andy >> >> >> ---------------------------------------------------------------------- >> -------- >> 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 ------------------------------------------------------------------------------ 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