mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-01 14:27:59 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
73
extern/shiny/Editor/Editor.hpp
vendored
Normal file
73
extern/shiny/Editor/Editor.hpp
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
#ifndef SH_EDITOR_H
|
||||
#define SH_EDITOR_H
|
||||
|
||||
#if SHINY_BUILD_MATERIAL_EDITOR
|
||||
class QApplication;
|
||||
|
||||
#include <boost/thread/condition_variable.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
class thread;
|
||||
}
|
||||
|
||||
namespace sh
|
||||
{
|
||||
class MainWindow;
|
||||
|
||||
struct SynchronizationState
|
||||
{
|
||||
boost::mutex mUpdateMutex;
|
||||
boost::mutex mActionMutex;
|
||||
boost::mutex mQueryMutex;
|
||||
};
|
||||
|
||||
class Editor
|
||||
{
|
||||
public:
|
||||
|
||||
Editor();
|
||||
~Editor();
|
||||
|
||||
void show();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
bool mInitialized;
|
||||
|
||||
MainWindow* mMainWindow;
|
||||
QApplication* mApplication;
|
||||
|
||||
SynchronizationState mSync;
|
||||
|
||||
boost::thread* mThread;
|
||||
|
||||
void runThread();
|
||||
|
||||
void processShowWindow();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Dummy implementation, so that the user's code does not have to be polluted with #ifdefs
|
||||
namespace sh
|
||||
{
|
||||
|
||||
class Editor
|
||||
{
|
||||
public:
|
||||
Editor() {}
|
||||
~Editor() {}
|
||||
void show() {}
|
||||
void update() {}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue