summaryrefslogtreecommitdiffstats
path: root/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformheaders/windowsfunctions/qwindowswindowfunctions.h')
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
index d0826bdb50..e51c2fde67 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
@@ -90,6 +90,15 @@ public:
if (func)
func(behavior);
}
+
+ typedef bool (*IsTabletModeType)();
+ static const QByteArray isTabletModeIdentifier() { return QByteArrayLiteral("WindowsIsTabletMode"); }
+
+ static bool isTabletMode()
+ {
+ IsTabletModeType func = reinterpret_cast<IsTabletModeType>(QGuiApplication::platformFunction(isTabletModeIdentifier()));
+ return func && func();
+ }
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QWindowsWindowFunctions::TouchWindowTouchTypes)