diff options
Diffstat (limited to 'libjava/classpath/native/jni/qt-peer/mainthreadinterface.h')
-rw-r--r-- | libjava/classpath/native/jni/qt-peer/mainthreadinterface.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libjava/classpath/native/jni/qt-peer/mainthreadinterface.h b/libjava/classpath/native/jni/qt-peer/mainthreadinterface.h new file mode 100644 index 00000000000..e17b7865219 --- /dev/null +++ b/libjava/classpath/native/jni/qt-peer/mainthreadinterface.h @@ -0,0 +1,36 @@ +#ifndef MAINTHREADINTERFACE_H +#define MAINTHREADINTERFACE_H + +#include <jni.h> +#include <QApplication> +#include <QObject> +#include <QWidget> +#include <QEvent> + +class AWTEvent : public QEvent { + + public: + AWTEvent() : QEvent( QEvent::User ) + { + } + + virtual void runEvent() + { + } + +}; + +class MainThreadInterface : public QObject { + + private: + QApplication *mainApp; + + public: + MainThreadInterface(QApplication *parent); + bool event ( QEvent * e ); + void postEventToMain(AWTEvent *event); +}; + +extern MainThreadInterface *mainThread; + +#endif |