59 |
#include "dimregionchooser.h" |
#include "dimregionchooser.h" |
60 |
#include "dimregionedit.h" |
#include "dimregionedit.h" |
61 |
#include "midirules.h" |
#include "midirules.h" |
62 |
|
#ifdef GLIB_THREADS |
63 |
#ifndef OLD_THREADS |
#ifndef OLD_THREADS |
64 |
#include <glibmm/threads.h> |
#include <glibmm/threads.h> |
65 |
#endif |
#endif |
66 |
|
#else |
67 |
|
#include <thread> |
68 |
|
#include <mutex> |
69 |
|
#endif |
70 |
#include "ManagedWindow.h" |
#include "ManagedWindow.h" |
71 |
|
|
72 |
class MainWindow; |
class MainWindow; |
178 |
LoaderSaverBase(const Glib::ustring filename, gig::File* gig); |
LoaderSaverBase(const Glib::ustring filename, gig::File* gig); |
179 |
|
|
180 |
private: |
private: |
181 |
|
#ifdef GLIB_THREADS |
182 |
Glib::Threads::Thread* thread; |
Glib::Threads::Thread* thread; |
183 |
|
Glib::Threads::Mutex progressMutex; |
184 |
|
#else |
185 |
|
std::thread thread; |
186 |
|
std::mutex progressMutex; |
187 |
|
#endif |
188 |
void thread_function(); |
void thread_function(); |
189 |
virtual void thread_function_sub(gig::progress_t& progress) = 0; |
virtual void thread_function_sub(gig::progress_t& progress) = 0; |
190 |
Glib::Dispatcher finished_dispatcher; |
Glib::Dispatcher finished_dispatcher; |
191 |
Glib::Dispatcher progress_dispatcher; |
Glib::Dispatcher progress_dispatcher; |
192 |
Glib::Dispatcher error_dispatcher; |
Glib::Dispatcher error_dispatcher; |
|
Glib::Threads::Mutex progressMutex; |
|
193 |
float progress; |
float progress; |
194 |
}; |
}; |
195 |
|
|