summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/uikit/quikitwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/uikit/quikitwindow.h')
-rw-r--r--src/plugins/platforms/uikit/quikitwindow.h54
1 files changed, 53 insertions, 1 deletions
diff --git a/src/plugins/platforms/uikit/quikitwindow.h b/src/plugins/platforms/uikit/quikitwindow.h
index d5a66902a5..9e73754fc8 100644
--- a/src/plugins/platforms/uikit/quikitwindow.h
+++ b/src/plugins/platforms/uikit/quikitwindow.h
@@ -43,7 +43,54 @@
#define QUIKITWINDOW_H
#include <QPlatformWindow>
-#include <UIKit/UIKit.h>
+
+#import <UIKit/UIKit.h>
+#import <OpenGLES/ES1/gl.h>
+#import <OpenGLES/ES1/glext.h>
+#import <OpenGLES/EAGL.h>
+
+@interface EAGLView : UIView <UIKeyInput>
+{
+ QPlatformWindow *mWindow;
+ EAGLContext *mContext;
+
+ GLint mFramebufferWidth;
+ GLint mFramebufferHeight;
+
+ GLuint mFramebuffer, mColorRenderbuffer, mDepthRenderbuffer;
+
+ // ------- Text Input ----------
+ UITextAutocapitalizationType autocapitalizationType;
+ UITextAutocorrectionType autocorrectionType;
+ BOOL enablesReturnKeyAutomatically;
+ UIKeyboardAppearance keyboardAppearance;
+ UIKeyboardType keyboardType;
+ UIReturnKeyType returnKeyType;
+ BOOL secureTextEntry;
+}
+
+- (void)setContext:(EAGLContext *)newContext;
+- (void)presentFramebuffer;
+- (void)deleteFramebuffer;
+- (void)createFramebuffer;
+- (void)makeCurrent;
+- (void)setWindow:(QPlatformWindow *)window;
+- (void)sendMouseEventForTouches:(NSSet *)touches withEvent:(UIEvent *)event fakeButtons:(Qt::MouseButtons)buttons;
+
+
+// ------- Text Input ----------
+
+@property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
+@property(nonatomic) UITextAutocorrectionType autocorrectionType;
+@property(nonatomic) BOOL enablesReturnKeyAutomatically;
+@property(nonatomic) UIKeyboardAppearance keyboardAppearance;
+@property(nonatomic) UIKeyboardType keyboardType;
+@property(nonatomic) UIReturnKeyType returnKeyType;
+@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry;
+
+@end
+
+class EAGLPlatformContext;
QT_BEGIN_NAMESPACE
@@ -56,13 +103,18 @@ public:
~QUIKitWindow();
UIWindow *nativeWindow() const { return mWindow; }
+ UIView *nativeView() const { return mView; }
void setGeometry(const QRect &rect);
UIWindow *ensureNativeWindow();
+ QPlatformGLContext *glContext() const;
+
private:
QUIKitScreen *mScreen;
UIWindow *mWindow;
+ EAGLView *mView;
+ mutable EAGLPlatformContext *mContext;
};
QT_END_NAMESPACE