| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QBACKINGSTORE_H |
| 5 | #define QBACKINGSTORE_H |
| 6 | |
| 7 | #include <QtGui/qtguiglobal.h> |
| 8 | #include <QtCore/qrect.h> |
| 9 | |
| 10 | #include <QtGui/qwindow.h> |
| 11 | #include <QtGui/qregion.h> |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | |
| 15 | |
| 16 | class QRegion; |
| 17 | class QRect; |
| 18 | class QPoint; |
| 19 | class QImage; |
| 20 | class QBackingStorePrivate; |
| 21 | class QPlatformBackingStore; |
| 22 | |
| 23 | class Q_GUI_EXPORT QBackingStore |
| 24 | { |
| 25 | public: |
| 26 | explicit QBackingStore(QWindow *window); |
| 27 | ~QBackingStore(); |
| 28 | |
| 29 | QWindow *window() const; |
| 30 | |
| 31 | QPaintDevice *paintDevice(); |
| 32 | |
| 33 | void flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint()); |
| 34 | |
| 35 | void resize(const QSize &size); |
| 36 | QSize size() const; |
| 37 | |
| 38 | bool scroll(const QRegion &area, int dx, int dy); |
| 39 | |
| 40 | void beginPaint(const QRegion &); |
| 41 | void endPaint(); |
| 42 | |
| 43 | void setStaticContents(const QRegion ®ion); |
| 44 | QRegion staticContents() const; |
| 45 | bool hasStaticContents() const; |
| 46 | |
| 47 | QPlatformBackingStore *handle() const; |
| 48 | |
| 49 | private: |
| 50 | QScopedPointer<QBackingStorePrivate> d_ptr; |
| 51 | }; |
| 52 | |
| 53 | QT_END_NAMESPACE |
| 54 | |
| 55 | #endif // QBACKINGSTORE_H |
| 56 | |