summaryrefslogtreecommitdiff
path: root/vcl/inc/win/saldata.hxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-09-19 15:48:24 +0200
committerMichael Meeks <michael.meeks@collabora.com>2014-09-23 21:30:47 +0100
commit211b3192f05c4120fa2dd0e23988e74bdd310830 (patch)
tree344aa042f1097d7ef3021afdbf7db5846dc7a419 /vcl/inc/win/saldata.hxx
parent08a990fd27f5a416c2a73902792e93df7499d703 (diff)
fdo#84000: Reimplement the Windows WinSalTimer using Timer Queues.
Timer Queues http://msdn.microsoft.com/en-us/library/windows/desktop/ms686796%28v=vs.85%29.aspx allow creating & maintaing high-precision timers. This commit switches the WinSalTimer implementation from using the Timers: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644900%28v=vs.85%29.aspx to Timer Queue Timers. The 'classic' Timers do not have better precision than some 15.6ms (the documentation mentions 10ms, but some measuring seems to confirm that it is more than that). With the Timer Queue Timers, we now have 1ms precision. Incorporates some cleanup from Michael Meeks <michael.meeks@collabora.com>. Change-Id: I0312a0c9fdc2779258698b24389b24c39e643473
Diffstat (limited to 'vcl/inc/win/saldata.hxx')
-rw-r--r--vcl/inc/win/saldata.hxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index d047fc54a857..409ca3eb13e6 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -83,11 +83,11 @@ public:
long* mpDitherDiff; // Dither mapping table
BYTE* mpDitherLow; // Dither mapping table
BYTE* mpDitherHigh; // Dither mapping table
- sal_uLong mnTimerMS; // Current Time (in MS) of the Timer
- sal_uLong mnTimerOrgMS; // Current Original Time (in MS)
+ sal_uLong mnTimerMS; // Current Time (in MS) of the Timer
+ sal_uLong mnTimerOrgMS; // Current Original Time (in MS)
DWORD mnNextTimerTime;
DWORD mnLastEventTime;
- UINT mnTimerId; // windows timer id
+ HANDLE mnTimerId; ///< Windows timer id
bool mbInTimerProc; // timer event is currently being dispatched
HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
@@ -181,8 +181,7 @@ void ImplSalAcquireYieldMutex( sal_uLong nCount );
LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
-#define SALTIMERPROC_RECURSIVE 0xffffffff
-void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime );
+void EmitTimerCallback(bool bAllowRecursive);
void SalTestMouseLeave();
bool ImplWriteLastError( DWORD lastError, const char *szApiCall );
@@ -286,6 +285,9 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
// POSTFOCUS-Message; wParam == bFocus; lParam == 0
#define SALOBJ_MSG_POSTFOCUS (WM_USER+161)
+// Call the Timer's callback from the main thread
+#define SAL_MSG_TIMER_CALLBACK (WM_USER+162)
+
// A/W-Wrapper
BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );