summaryrefslogtreecommitdiffstats
path: root/src/platformheaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformheaders')
-rw-r--r--src/platformheaders/doc/qtplatformheaders.qdocconf1
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.h15
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc49
3 files changed, 65 insertions, 0 deletions
diff --git a/src/platformheaders/doc/qtplatformheaders.qdocconf b/src/platformheaders/doc/qtplatformheaders.qdocconf
index fc8a9d8731..989df524e6 100644
--- a/src/platformheaders/doc/qtplatformheaders.qdocconf
+++ b/src/platformheaders/doc/qtplatformheaders.qdocconf
@@ -27,6 +27,7 @@ qhp.QtPlatformHeaders.subprojects.classes.sortPages = true
depends += \
qtcore \
qtgui \
+ qtwidgets \
qtdoc
headerdirs += ..
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
index 2b1efcdd6d..d0826bdb50 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
@@ -57,6 +57,11 @@ public:
Q_DECLARE_FLAGS(TouchWindowTouchTypes, TouchWindowTouchType)
+ enum WindowActivationBehavior {
+ DefaultActivateWindow,
+ AlwaysActivateWindow
+ };
+
typedef void (*SetTouchWindowTouchType)(QWindow *window, QWindowsWindowFunctions::TouchWindowTouchTypes touchType);
static const QByteArray setTouchWindowTouchTypeIdentifier() { return QByteArrayLiteral("WindowsSetTouchWindowTouchType"); }
@@ -75,6 +80,16 @@ public:
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)
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
index d6b8764e7b..196f9f22ce 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
@@ -95,3 +95,52 @@
See also \l [QtDoc] {Fullscreen OpenGL Based Windows}
*/
+
+/*!
+ \enum QWindowsWindowFunctions::WindowActivationBehavior
+
+ This enum specifies the behavior of QWidget::activateWindow() and
+ QWindow::requestActivate().
+
+ \value DefaultActivateWindow The window is activated according to the default
+ behavior of the Windows operating system. This means the window will not
+ be activated in some circumstances (most notably when the calling process
+ is not the active process); only the taskbar entry will be flashed.
+ \value AlwaysActivateWindow The window is always activated, even when the
+ calling process is not the active process.
+
+ \sa QWidget::activateWindow(), QWindow::requestActivate()
+ \since 5.7
+*/
+
+/*!
+ \typedef QWindowsWindowFunctions::SetWindowActivationBehaviorType
+
+ This is the typedef for the function returned by QGuiApplication::platformFunction()
+ when passed setWindowActivationBehaviorIdentifier().
+
+ \sa QWidget::activateWindow(), QWindow::requestActivate()
+ \since 5.7
+*/
+
+/*!
+ \fn QByteArray setWindowActivationBehaviorIdentifier()
+
+ This function returns a bytearray that can be used to query
+ QGuiApplication::platformFunction() to retrieve the SetWindowActivationBehaviorType
+ function.
+
+ \sa QWidget::activateWindow(), QWindow::requestActivate()
+ \since 5.7
+*/
+
+/*!
+ \fn void QWindowsWindowFunctions::setWindowActivationBehavior(WindowActivationBehavior behavior)
+
+ This is a convenience function that can be used directly instead of resolving
+ the function pointer. \a behavior will be relayed to the function retrieved
+ by QGuiApplication.
+
+ \sa QWidget::activateWindow(), QWindow::requestActivate()
+ \since 5.7
+*/