123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef QWINDOWSWINDOWFUNCTIONS_H
- #define QWINDOWSWINDOWFUNCTIONS_H
- #include <QtCore/QByteArray>
- #include <QtGui/QGuiApplication>
- QT_BEGIN_NAMESPACE
- class QWindow;
- class QWindowsWindowFunctions {
- public:
- enum TouchWindowTouchType {
- NormalTouch = 0x00000000,
- FineTouch = 0x00000001,
- WantPalmTouch = 0x00000002
- };
- Q_DECLARE_FLAGS(TouchWindowTouchTypes, TouchWindowTouchType)
- enum WindowActivationBehavior {
- DefaultActivateWindow,
- AlwaysActivateWindow
- };
- typedef void (*SetTouchWindowTouchType)(QWindow *window, QWindowsWindowFunctions::TouchWindowTouchTypes touchType);
- static const QByteArray setTouchWindowTouchTypeIdentifier() { return QByteArrayLiteral("WindowsSetTouchWindowTouchType"); }
- static void setTouchWindowTouchType(QWindow *window, TouchWindowTouchTypes type)
- {
- SetTouchWindowTouchType func = reinterpret_cast<SetTouchWindowTouchType>(QGuiApplication::platformFunction(setTouchWindowTouchTypeIdentifier()));
- if (func)
- func(window, type);
- }
- typedef void (*SetHasBorderInFullScreen)(QWindow *window, bool border);
- static const QByteArray setHasBorderInFullScreenIdentifier() { return QByteArrayLiteral("WindowsSetHasBorderInFullScreen"); }
- static void setHasBorderInFullScreen(QWindow *window, bool border)
- {
- SetHasBorderInFullScreen func = reinterpret_cast<SetHasBorderInFullScreen>(QGuiApplication::platformFunction(setHasBorderInFullScreenIdentifier()));
- if (func)
- func(window, border);
- }
- typedef void (*SetWindowActivationBehaviorType)(WindowActivationBehavior);
- static const QByteArray setWindowActivationBehaviorIdentifier() { return QByteArrayLiteral("WindowsSetWindowActivationBehavior"); }
- static void setWindowActivationBehavior(WindowActivationBehavior behavior)
- {
- SetWindowActivationBehaviorType func = reinterpret_cast<SetWindowActivationBehaviorType>(QGuiApplication::platformFunction(setWindowActivationBehaviorIdentifier()));
- if (func)
- func(behavior);
- }
- };
- Q_DECLARE_OPERATORS_FOR_FLAGS(QWindowsWindowFunctions::TouchWindowTouchTypes)
- QT_END_NAMESPACE
- #endif
|