summaryrefslogtreecommitdiffstats
path: root/qwidgethostnative.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-07-08 07:44:30 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-07-08 07:44:30 +0200
commit3d75736bb30623c5858fec33ad8c0a3419d35c52 (patch)
tree766f0f5b7db7f175b5578d8c4c79798119d04d3d /qwidgethostnative.h
Replicate the repo...HEADmaster
Diffstat (limited to 'qwidgethostnative.h')
-rw-r--r--qwidgethostnative.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/qwidgethostnative.h b/qwidgethostnative.h
new file mode 100644
index 0000000..e753b75
--- /dev/null
+++ b/qwidgethostnative.h
@@ -0,0 +1,34 @@
+#ifndef QWIDGETHOSTNATIVE_H
+#define QWIDGETHOSTNATIVE_H
+
+#include <QtGui>
+
+#if defined(QT_JAMBI_RUN)
+# define QWIDGETHOSTNATIVE_BASECLASS QWidget
+#elif defined(Q_OS_WIN32)
+# include "qwinwidget.h"
+# define QWIDGETHOSTNATIVE_BASECLASS QWinWidget
+#else
+# include <QtGui/QX11EmbedWidget>
+# define QWIDGETHOSTNATIVE_BASECLASS QX11EmbedWidget
+#endif
+
+#include <jni.h>
+
+class QWidgetHostNative: public QWIDGETHOSTNATIVE_BASECLASS
+{
+public:
+ QWidgetHostNative(jobject parentWindow);
+
+protected:
+ void childEvent(QChildEvent *e);
+ bool eventFilter(QObject *o, QEvent *e);
+ void focusInEvent(QFocusEvent *e);
+ bool event(QEvent *);
+ void resizeEvent(QResizeEvent *);
+
+private:
+ WId getWindowHandle(jobject window);
+};
+
+#endif