summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-23 11:39:20 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-11-27 22:49:59 +0000
commite5ca416e2f2f17d6a4213094b547ccb6d44d4e56 (patch)
treed17fa117822dccfa73658dfe83070da630376e51 /src/plugins/platforms/windows/qwindowscontext.h
parent4aedfcc4b949bd0ae0e361738e142051e1ba9b21 (diff)
Windows QPA: Add API for setting the application orientation preference.
Dynamically load the Win32 API functions for setting the rotation preference and map this to static functions taking a Qt::ScreenOrientation in QWindowsScreen. Task-number: QTBUG-49541 Change-Id: I1c81cf6274d79a023a2ee755dd7c085ffd7cc015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.h')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index 641e3ed41f..d08fc8f726 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -94,6 +94,8 @@ struct QWindowsUser32DLL
typedef BOOL (WINAPI *SetProcessDPIAware)();
typedef BOOL (WINAPI *AddClipboardFormatListener)(HWND);
typedef BOOL (WINAPI *RemoveClipboardFormatListener)(HWND);
+ typedef BOOL (WINAPI *GetDisplayAutoRotationPreferences)(DWORD *);
+ typedef BOOL (WINAPI *SetDisplayAutoRotationPreferences)(DWORD);
// Functions missing in Q_CC_GNU stub libraries.
SetLayeredWindowAttributes setLayeredWindowAttributes;
@@ -116,6 +118,10 @@ struct QWindowsUser32DLL
// Clipboard listeners, Windows Vista onwards
AddClipboardFormatListener addClipboardFormatListener;
RemoveClipboardFormatListener removeClipboardFormatListener;
+
+ // Rotation API
+ GetDisplayAutoRotationPreferences getDisplayAutoRotationPreferences;
+ SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences;
};
struct QWindowsShell32DLL