X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fpush2%2Fpush2.h;h=7e480495ad6e5bba6c90fcb8ff30679f177d8b11;hb=cf28d717837857f1d568343bf17cc0b36db62269;hp=dab96260c62bbbb55ed04c9e054efc64e8507b0d;hpb=6dbe3a1e3b0692bc49df74aedf96b341e1f6efbd;p=ardour.git diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h index dab96260c6..7e480495ad 100644 --- a/libs/surfaces/push2/push2.h +++ b/libs/surfaces/push2/push2.h @@ -74,10 +74,19 @@ class Push2 : public ARDOUR::ControlProtocol static bool probe (); static void* request_factory (uint32_t); + bool has_editor () const { return true; } + void* get_gui () const; + void tear_down_gui (); + int set_active (bool yn); XMLNode& get_state(); int set_state (const XMLNode & node, int version); + PBD::Signal0 ConnectionChange; + + boost::shared_ptr input_port(); + boost::shared_ptr output_port(); + private: libusb_device_handle *handle; uint8_t frame_header[16]; @@ -452,6 +461,24 @@ class Push2 : public ARDOUR::ControlProtocol bool pad_filter (ARDOUR::MidiBuffer& in, ARDOUR::MidiBuffer& out) const; boost::weak_ptr first_selected_stripable; + + PBD::ScopedConnection port_reg_connection; + void port_registration_handler (); + + enum ConnectionState { + InputConnected = 0x1, + OutputConnected = 0x2 + }; + + int connection_state; + bool connection_handler (boost::weak_ptr, std::string name1, boost::weak_ptr, std::string name2, bool yn); + PBD::ScopedConnection port_connection; + + /* GUI */ + + mutable void *gui; + void build_gui (); + };