From 57b7c82560088149010b000bc78a3a6d8f2f8834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 29 Apr 2011 15:45:30 +0200 Subject: Add QWidgetWindow to bridge events from QWindow to QWidget. Gets rid of QWidget dependencies in QWindow and QWindowSurface. Events are not delivered to the correct child widget yet. --- src/opengl/qwindowsurface_gl_p.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/opengl/qwindowsurface_gl_p.h') diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h index c71ce59c4d..8dc3a4583a 100644 --- a/src/opengl/qwindowsurface_gl_p.h +++ b/src/opengl/qwindowsurface_gl_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE class QPaintDevice; class QPoint; class QRegion; -class QWidget; +class QWindow; struct QGLWindowSurfacePrivate; Q_OPENGL_EXPORT QGLWidget* qt_gl_share_widget(); @@ -84,11 +84,11 @@ class Q_OPENGL_EXPORT QGLWindowSurface : public QObject, public QWindowSurface / { Q_OBJECT public: - QGLWindowSurface(QWidget *window); + QGLWindowSurface(QWindow *window); ~QGLWindowSurface(); QPaintDevice *paintDevice(); - void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset); + void flush(QWindow *window, const QRegion ®ion, const QPoint &offset); #if !defined(Q_WS_QPA) void setGeometry(const QRect &rect); @@ -102,8 +102,6 @@ public: void beginPaint(const QRegion ®ion); void endPaint(const QRegion ®ion); - QImage *buffer(const QWidget *widget); - WindowSurfaceFeatures features() const; QGLContext *context() const; @@ -117,7 +115,7 @@ private slots: void deleted(QObject *object); private: - void hijackWindow(QWidget *widget); + void hijackWindow(QWindow *window); bool initializeOffscreenTexture(const QSize &size); QGLWindowSurfacePrivate *d_ptr; -- cgit v1.2.3 From 6ce6b8a378b0d97ba950240ffb048a4b7e485235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 20 Jun 2011 13:29:26 +0200 Subject: Rename QWindowSurface -> QBackingStore and split into platform / public. Also get rid of GL window surface and related classes. --- src/opengl/qwindowsurface_gl_p.h | 127 --------------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 src/opengl/qwindowsurface_gl_p.h (limited to 'src/opengl/qwindowsurface_gl_p.h') diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h deleted file mode 100644 index c7b0d10efa..0000000000 --- a/src/opengl/qwindowsurface_gl_p.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtOpenGL module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QWINDOWSURFACE_GL_P_H -#define QWINDOWSURFACE_GL_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of the QLibrary class. This header file may change from -// version to version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QPaintDevice; -class QPoint; -class QRegion; -class QWindow; -struct QGLWindowSurfacePrivate; - -Q_OPENGL_EXPORT QGLWidget* qt_gl_share_widget(); -Q_OPENGL_EXPORT void qt_destroy_gl_share_widget(); - -class QGLWindowSurfaceGLPaintDevice : public QGLPaintDevice -{ -public: - QPaintEngine* paintEngine() const; - void endPaint(); - QSize size() const; - int metric(PaintDeviceMetric m) const; - QGLContext* context() const; - QGLWindowSurfacePrivate* d; -}; - -class Q_OPENGL_EXPORT QGLWindowSurface : public QObject, public QWindowSurface // , public QPaintDevice -{ - Q_OBJECT -public: - QGLWindowSurface(QWindow *window); - ~QGLWindowSurface(); - - QPaintDevice *paintDevice(); - void flush(QWindow *window, const QRegion ®ion, const QPoint &offset); - -#if !defined(Q_WS_QPA) - void setGeometry(const QRect &rect); -#else - virtual void resize(const QSize &size); -#endif - - void updateGeometry(); - bool scroll(const QRegion &area, int dx, int dy); - - void beginPaint(const QRegion ®ion); - void endPaint(const QRegion ®ion); - - WindowSurfaceFeatures features() const; - - QGLContext *context() const; - - static QGLFormat surfaceFormat; - - enum SwapMode { AutomaticSwap, AlwaysFullSwap, AlwaysPartialSwap, KillSwap }; - static SwapMode swapBehavior; - -private slots: - void deleted(QObject *object); - -private: - void hijackWindow(QWindow *window); - bool initializeOffscreenTexture(const QSize &size); - - QGLWindowSurfacePrivate *d_ptr; -}; - -QT_END_NAMESPACE - -#endif // QWINDOWSURFACE_GL_P_H - -- cgit v1.2.3