add getmmistate
[enigma2.git] / include / libsig_comp.h
1 #ifndef __LIBSIG_COMP_H
2 #define __LIBSIG_COMP_H
3
4 #include <sigc++/sigc++.h>
5 #include <sigc++/bind.h>
6
7 #ifdef SIGC_CXX_NAMESPACES
8 using namespace SigC;
9 #endif
10
11 #define CONNECT(SENDER, EMPFAENGER) SENDER.connect(slot(*this, &EMPFAENGER))
12 // use this Makro to connect with a method
13 // void bla::foo(int x);
14 // to an
15 // Signal<void, int> testSig;
16 //
17 // CONNECT(testSig, bla::foo);
18 // signal and method (slot) must have the same signature
19
20 #define CONNECT_1_0(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
21 // use this for connect with a method
22 // void bla::foo(int);
23 // to an
24 // Signal0<void> testSig;
25 // CONNECT_1_0(testSig, bla:foo, 0);
26 // here the signal has no parameter, but the slot have an int
27 // the last parameter of the CONNECT_1_0 makro is the value that given to the paramater of the Slot method
28
29 #define CONNECT_2_0(SENDER, EMPFAENGER, PARAM1, PARAM2) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM1, PARAM2 ) )
30
31 #define CONNECT_2_1(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
32
33 #endif // __LIBSIG_COMP_H