From 5c287474541c865cc9e3e7caa1a6b819041d8279 Mon Sep 17 00:00:00 2001 From: Jorgen Lind Date: Fri, 2 May 2014 11:04:49 +0200 Subject: Use QtPlatformHeaders to set platform specific functionality This involves exposing a new function in the QPlatformNativeInterface which gets a public function for QGuiApplication Proof of concept is done through implementing _NET_WM_WINDOW_TYPE setters for xcb Change-Id: Ic9544e775fb71cc9b30273595ec41b1cdb1c9d64 Reviewed-by: Laszlo Agocs --- src/platformheaders/doc/src/qtplatformheaders.qdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/platformheaders/doc/src/qtplatformheaders.qdoc') diff --git a/src/platformheaders/doc/src/qtplatformheaders.qdoc b/src/platformheaders/doc/src/qtplatformheaders.qdoc index 4ed740d296..74df288d3d 100644 --- a/src/platformheaders/doc/src/qtplatformheaders.qdoc +++ b/src/platformheaders/doc/src/qtplatformheaders.qdoc @@ -61,8 +61,22 @@ platforms a different class will be used. These classes are all placed in the Qt Platform Headers module. + Platform headers can be used in conjunction with + QGuiApplication::platformFunction() to give a type safe interface to + platform specific functionality. It is possible for headers defined in + QtPlatformHeaders to define typedefs for functions that can be returned by + a platform plugin from QGuiApplication::platformFunction(). Headers in + QtPlatformHeaders can also implement wrapper functions for the function + pointer, giving a static function that can be called from any context after + the platform integration has been created. An implementation of this + pattern is QXcbWindowFunctions::setWmWindowType(). This function retrieves + a function pointer from QGuiApplication::platformFunction, and executes + that function if the requested function was returned. + \note Similar to the other QPA APIs, there are no binary compatibility guarantees for these classes, meaning that an application using these classes is only guaranteed to work with the Qt version it was developed against. Unlike QPA however, source compatibility is guaranteed. + + \sa QXcbWindowFunctions */ -- cgit v1.2.3