tentative redesign of MIDI looping, will probably fix #5050 but needs more extensive...
[ardour.git] / libs / ardour / ardour / midi_model.h
index d1fba0a8ea3570535bb63be391ba8a728f19d003..0d11f940b9ddf6d219ddab6abe10ced11ff293a8 100644 (file)
@@ -25,7 +25,7 @@
 #include <deque>
 #include <utility>
 #include <boost/utility.hpp>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include "pbd/command.h"
 #include "ardour/types.h"
 #include "ardour/midi_buffer.h"
@@ -152,6 +152,7 @@ public:
                int set_state (const XMLNode&, int version);
                XMLNode & get_state ();
 
+               void remove (SysExPtr sysex);
                void operator() ();
                void undo ();
 
@@ -168,6 +169,8 @@ public:
                typedef std::list<Change> ChangeList;
                ChangeList _changes;
 
+               std::list<SysExPtr> _removed;
+
                XMLNode & marshal_change (const Change &);
                Change unmarshal_change (XMLNode *);
        };
@@ -267,19 +270,19 @@ protected:
 
 private:
        struct WriteLockImpl : public AutomatableSequence<TimeType>::WriteLockImpl {
-               WriteLockImpl(Glib::Mutex::Lock* source_lock, Glib::RWLock& s, Glib::Mutex& c)
+               WriteLockImpl(Glib::Threads::Mutex::Lock* slock, Glib::Threads::RWLock& s, Glib::Threads::Mutex& c)
                        : AutomatableSequence<TimeType>::WriteLockImpl(s, c)
-                       , source_lock(source_lock)
+                       , source_lock (slock)
                {}
                ~WriteLockImpl() {
                        delete source_lock;
                }
-               Glib::Mutex::Lock* source_lock;
+               Glib::Threads::Mutex::Lock* source_lock;
        };
 
 public:
-       virtual WriteLock edit_lock();
-       virtual WriteLock write_lock();
+       WriteLock edit_lock();
+       WriteLock write_lock();
 
 private:
        friend class DeltaCommand;
@@ -289,6 +292,8 @@ private:
        void control_list_interpolation_changed (Evoral::Parameter, Evoral::ControlList::InterpolationStyle);
        void automation_list_automation_state_changed (Evoral::Parameter, AutoState);
 
+       void control_list_marked_dirty ();
+
        PBD::ScopedConnectionList _midi_source_connections;
 
        // We cannot use a boost::shared_ptr here to avoid a retain cycle