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
13QT_BEGIN_NAMESPACE
14
15
16class QRegion;
17class QRect;
18class QPoint;
19class QImage;
20class QBackingStorePrivate;
21class QPlatformBackingStore;
22
23class Q_GUI_EXPORT QBackingStore
24{
25public:
26 explicit QBackingStore(QWindow *window);
27 ~QBackingStore();
28
29 QWindow *window() const;
30
31 QPaintDevice *paintDevice();
32
33 void flush(const QRegion &region, 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 &region);
44 QRegion staticContents() const;
45 bool hasStaticContents() const;
46
47 QPlatformBackingStore *handle() const;
48
49private:
50 QScopedPointer<QBackingStorePrivate> d_ptr;
51};
52
53QT_END_NAMESPACE
54
55#endif // QBACKINGSTORE_H
56

source code of qtbase/src/gui/painting/qbackingstore.h