Der Lockruf des Kaos schrieb:
>Before i posted to the List, i already managed too bind the Non-Member
>Functions to the Handler (e.g. ecore_event_handler_add)
>
>int Test( void *d, int t, void *e ) { return 0; }
>ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL, &Test, NULL );
>
>I think it's the same in Factory.*.
>
>My Problem is, if i have a class and a Memberfunctions Test like the one
>above, i can't right of it. ( xnowfall tells us a plausible Reason why it
>doesn't fit like i tried it )
>This Version would look like
>
>int
>ClassA::Test( void *d, int t, void *e ) { return 0; }
>ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL, <CannotBindIt>, NULL );
><CannotBindIt>: &ClassA::Test, &ClassA->Test, bind<...>(...)
>Nothing worked.
>
>I guess this Example from avisynth is for Non-ClassMember Functions, or am i
>wrong?
>
>
>Greets,
> Christian
>
Don't pass member-functions. This cannot work in c. But you can use
friend-functions instead. Take a look on
http://www.parashift.com/c++-faq-lite/pointers-to-members.html
For example:
class myclass{
friend int _my_callback(void * data, int t, void *e);
int my_private_int;
...
};
int _my_callback(void * data, int t, void *e){
myclass* mc;
mc = (myclass*) data;
return mc->my_private_int = 0;
}
...
myclass foo;
ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL, _my_callback, &foo );
...
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users