From 52c970b2d32cce2090efbbaaed6ff50de80958df Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 23 Feb 2008 18:48:59 +0000 Subject: Rearrange event port referencing stuff to make a bit more sense. git-svn-id: http://svn.drobilla.net/lad/patchage@1159 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageEvent.hpp | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'src/PatchageEvent.hpp') diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 1f15543..e9357ba 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -26,8 +26,6 @@ #include "PatchagePort.hpp" class Patchage; -class Driver; - /** A Driver event to be processed by the GUI thread. */ @@ -44,30 +42,26 @@ public: DISCONNECTION }; - PatchageEvent(Driver* d = NULL, Type type=NULL_EVENT) - : _driver(d) - , _str(NULL) + PatchageEvent(Type type=NULL_EVENT) + : _str(NULL) , _type(type) {} - PatchageEvent(Driver* driver, Type type, const char* str) - : _driver(driver) - , _str(strdup(str)) // FIXME: not realtime (jack) :( + PatchageEvent(Type type, const char* str) + : _str(strdup(str)) // FIXME: not realtime (jack) :( , _type(type) {} template - PatchageEvent(Driver* driver, Type type, P port) - : _driver(driver) - , _str(NULL) + PatchageEvent(Type type, P port) + : _str(NULL) , _port_1(port) , _type(type) {} template - PatchageEvent(Driver* driver, Type type, P port_1, P port_2) - : _driver(driver) - , _str(NULL) + PatchageEvent(Type type, P port_1, P port_2) + : _str(NULL) , _port_1(port_1, false) , _port_2(port_2, true) , _type(type) @@ -83,9 +77,6 @@ public: PortRef(jack_port_id_t jack_id, bool ign=false) : type(JACK_ID) { id.jack_id = jack_id; } - PortRef(jack_port_t* jack_port, bool ign=false) - : type(JACK_PORT) { id.jack_port = jack_port; } - #ifdef HAVE_ALSA PortRef(snd_seq_addr_t addr, bool in) : type(ALSA_ADDR) { id.alsa_addr = addr; is_input = in; } @@ -93,10 +84,9 @@ public: bool is_input; #endif - enum { NULL_PORT_REF, JACK_ID, JACK_PORT, ALSA_ADDR } type; + enum { NULL_PORT_REF, JACK_ID, ALSA_ADDR } type; union { - jack_port_t* jack_port; jack_port_id_t jack_id; #ifdef HAVE_ALSA snd_seq_addr_t alsa_addr; @@ -105,7 +95,6 @@ public: }; private: - Driver* _driver; char* _str; PortRef _port_1; PortRef _port_2; -- cgit v1.2.1