On 9/29/07, Enlightenment CVS <[EMAIL PROTECTED]> wrote: > Enlightenment CVS committal > > Author : leviathan > Project : e17 > Module : libs/etk-perl > > Dir : e17/libs/etk-perl/xs > > > Modified Files: > Object.xs > > > Log Message: > fix signal handling so it compiles now > Note: things will break randomly now, signals have to be re-thought in > etk-perl
Sorry for lack of docs so far, but I'll try to provide advices as things break... > =================================================================== > RCS file: /cvs/e/e17/libs/etk-perl/xs/Object.xs,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -u -3 -r1.1 -r1.2 > --- Object.xs 3 Jul 2007 19:26:05 -0000 1.1 > +++ Object.xs 29 Sep 2007 20:09:49 -0000 1.2 > @@ -33,7 +33,7 @@ > } > > static void > -callback_VOID__VOID(Etk_Object *object, void *data) > +callback_VOID(Etk_Object *object, void *data) Every signal now should return "Etk_Bool", these will have the same meaning as ecore_timer_add() callbacks: TRUE = keep running, FALSE = stop, but it actually doesn't disconnect, but stop the emission. This was done in order to remove etk_signal_stop(). Instead of using it we should return ETK_FALSE. etk_signal_stop() was flawed, using a linked list that would break when using threads. This may be the reason of random failures, since you're not returning, so depending on your platform you'll get 0 (ETK_FALSE) or even random garbage, stopping signal emission. Also note that the accumulator is gone. > + if(marsh == etk_marshaller_VOID) > + etk_signal_connect_full_by_name(signal_name, obj, > ETK_CALLBACK(callback_VOID), cbd, swapped, after); note that now you can use "etk_signal_connect_full_by_code()" to avoid string lookups. the "code" is the value returned at Etk_Signal_Description->signal_code_store, usually this is exported using an integer, like ETK_OBJECT_DESTROYED_SIGNAL. Also, when you connect a callback you now get a handle, also called "scb" (signal callback), you can use it in order to disconnect this exactly connection and not all connections with the give callback or even callback+data... you can connect the same function with the same data as much as desired and disconnect them individually, this is usefull for bindings/wrappers. -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel