Debian Codegraph @

wayland/dwayland/dhighdpi.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2017 - 2022 Uniontech Software Technology Co.,Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #ifndef DHIGHDPI_H
6 #define DHIGHDPI_H
7
8 #include "global.h"
9
10 #include <QPointF>
11 #include <qpa/qplatformscreen.h>
12 #include <qpa/qplatformwindow.h>
13 #include <qpa/qplatformbackingstore.h>
14
15 QT_BEGIN_NAMESPACE
16 class QWindow;
17 class QPlatformWindow;
18
19 namespace QtWaylandClient {
20 class QWaylandScreen;
21 }
22 QT_END_NAMESPACE
23
24 typedef struct xcb_connection_t xcb_connection_t;
25
26 DPP_BEGIN_NAMESPACE
27
28 class HighDpiImage;
29 class DHighDpi
30 {
31 public:
32 static QPointF fromNativePixels(const QPointF &pixelPoint, const QWindow *window);
33
34 static void init();
35 static bool isActive();
36 static bool overrideBackingStore();
37 static QDpi logicalDpi(QtWaylandClient::QWaylandScreen *s);
38 static qreal devicePixelRatio(QPlatformWindow *w);
39
40 static void removeScreenFactorCache(QScreen *screen);
41
42 private:
43
44 static bool active;
45 static QDpi oldDpi;
46 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
47 static QHash<QPlatformScreen*, qreal> screenFactorMap;
48 #endif
49 };
50
51 DPP_END_NAMESPACE
52
53 #endif // DHIGHDPI_H