aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
commitd63d2c3c6cbbd574dda4f8b00ebe6c661735edd5 (patch)
tree84d0cacfd0b6c1241c236c7860f7cbd7f26901bb /include
downloadenigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.tar.gz
enigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.zip
import of enigma2
Diffstat (limited to 'include')
-rw-r--r--include/connection.h17
-rw-r--r--include/libsig_comp.h33
2 files changed, 50 insertions, 0 deletions
diff --git a/include/connection.h b/include/connection.h
new file mode 100644
index 00000000..3ccaec19
--- /dev/null
+++ b/include/connection.h
@@ -0,0 +1,17 @@
+#ifndef __connection_h
+#define __connection_h
+
+#include <libsig_comp.h>
+#include <lib/base/object.h>
+
+class eConnection: public virtual iObject, public Connection
+{
+ int ref;
+public:
+DEFINE_REF(eConnection);
+public:
+ eConnection(const Connection &conn): Connection(conn), ref(0) { };
+ virtual ~eConnection() { disconnect(); }
+};
+
+#endif
diff --git a/include/libsig_comp.h b/include/libsig_comp.h
new file mode 100644
index 00000000..83550ed5
--- /dev/null
+++ b/include/libsig_comp.h
@@ -0,0 +1,33 @@
+#ifndef __LIBSIG_COMP_H
+#define __LIBSIG_COMP_H
+
+#include <sigc++/sigc++.h>
+#include <sigc++/bind.h>
+
+#ifdef SIGC_CXX_NAMESPACES
+using namespace SigC;
+#endif
+
+#define CONNECT(SENDER, EMPFAENGER) SENDER.connect(slot(*this, &EMPFAENGER))
+// use this Makro to connect with a method
+// void bla::foo(int x);
+// to an
+// Signal<void, int> testSig;
+//
+// CONNECT(testSig, bla::foo);
+// signal and method (slot) must have the same signature
+
+#define CONNECT_1_0(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
+// use this for connect with a method
+// void bla::foo(int);
+// to an
+// Signal0<void> testSig;
+// CONNECT_1_0(testSig, bla:foo, 0);
+// here the signal has no parameter, but the slot have an int
+// the last parameter of the CONNECT_1_0 makro is the value that given to the paramater of the Slot method
+
+#define CONNECT_2_0(SENDER, EMPFAENGER, PARAM1, PARAM2) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM1, PARAM2 ) )
+
+#define CONNECT_2_1(SENDER, EMPFAENGER, PARAM) SENDER.connect( bind( slot(*this, &EMPFAENGER) ,PARAM ) )
+
+#endif // __LIBSIG_COMP_H