summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-02 09:23:38 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-10-02 16:42:15 +0200
commit4437d842650c851f45f89cc3499a59e83875b704 (patch)
tree6b7434581c7d1181c537df031ce6901d0a8782ba /vcl
parentf8b9b8ec5686c1453e335d895aa78faba5fdf268 (diff)
WIN handle timer Impl* access via friend function
Not sure if this is the better approach, but this gives the application window dispatch function access to the now private timer implementation, so nobody else can call them. Change-Id: Ic361d2c93116fbd6c85b20f7da3cffbd538b3558 Reviewed-on: https://gerrit.libreoffice.org/43041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/win/saltimer.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 9107dd1a0b19..f87361e55ed8 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -24,10 +24,17 @@
class WinSalTimer : public SalTimer
{
+ // for access to Impl* functions
+ friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef );
+
HANDLE m_nTimerId; ///< Windows timer id
sal_uInt32 m_nTimerStartTicks; ///< system ticks at timer start % SAL_MAX_UINT32
bool m_bPollForMessage; ///< Run yield until a message is caught (most likely the 0ms timer)
+ void ImplStart( sal_uIntPtr nMS );
+ void ImplStop();
+ void ImplEmitTimerCallback();
+
public:
WinSalTimer();
virtual ~WinSalTimer() override;
@@ -38,14 +45,6 @@ public:
inline bool IsValidWPARAM( WPARAM wParam ) const;
inline bool PollForMessage() const;
-
- // The Impl functions are just public to be called from the static
- // SalComWndProc on main thread redirect! Otherwise they would be private.
- // They must be called from the main application thread only!
-
- void ImplStart( sal_uIntPtr nMS );
- void ImplStop();
- void ImplEmitTimerCallback();
};
inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const