iOS: implement QIOSWindow::winId()

Change-Id: I3dd7accae43bcf7d4d6dfd8b272ab65d67bd935c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2013-02-06 11:34:14 +01:00 committed by Tor Arne Vestbø
parent 15bdf85f28
commit 4993d3ed6b
3 changed files with 4 additions and 3 deletions

View File

@ -160,7 +160,8 @@ GLuint QIOSContext::defaultFramebufferObject(QPlatformSurface *surface) const
framebufferObject.renderbufferHeight != platformWindow->effectiveHeight()) { framebufferObject.renderbufferHeight != platformWindow->effectiveHeight()) {
glBindRenderbuffer(GL_RENDERBUFFER, framebufferObject.colorRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, framebufferObject.colorRenderbuffer);
CAEAGLLayer *layer = static_cast<CAEAGLLayer *>(platformWindow->nativeView().layer); UIView *view = reinterpret_cast<UIView *>(platformWindow->winId());
CAEAGLLayer *layer = static_cast<CAEAGLLayer *>(view.layer);
[m_eaglContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer]; [m_eaglContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferObject.renderbufferWidth); glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferObject.renderbufferWidth);

View File

@ -158,7 +158,7 @@ void *QIOSIntegration::nativeResourceForWindow(const QByteArray &resource, QWind
QIOSWindow *platformWindow = static_cast<QIOSWindow *>(window->handle()); QIOSWindow *platformWindow = static_cast<QIOSWindow *>(window->handle());
if (lowerCaseResource == "uiview") if (lowerCaseResource == "uiview")
return platformWindow->nativeView(); return reinterpret_cast<void *>(platformWindow->winId());
return 0; return 0;
} }

View File

@ -76,7 +76,7 @@ public:
int effectiveWidth() const; int effectiveWidth() const;
int effectiveHeight() const; int effectiveHeight() const;
UIView *nativeView() const { return m_view; } WId winId() const { return WId(m_view); };
QList<QWindowSystemInterface::TouchPoint> &touchPoints() { return m_touchPoints; } QList<QWindowSystemInterface::TouchPoint> &touchPoints() { return m_touchPoints; }
QHash<UITouch *, int> &activeTouches() { return m_activeTouches; } QHash<UITouch *, int> &activeTouches() { return m_activeTouches; }