summaryrefslogtreecommitdiff
path: root/vcl/inc/osx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-09-26 19:06:51 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-09-29 19:07:37 +0200
commita60f687b5dd684260fc976c1216d65d30e77e5de (patch)
treea1f1f0af44633622c4755477341d3a587948c2d7 /vcl/inc/osx
parent36535c2bef619b3a4090f6f880b975cb6d4dcb11 (diff)
tdf#112605 OSX refactor SalAquaTimer
Drops all the static calls and variables from SalAquaTimer and moves all timer handling logic inside the class. This also fixes the leak in timerElapsed. Change-Id: Ie7a1a8fffb70b8579ec6876eed10a275d2f06d27 Reviewed-on: https://gerrit.libreoffice.org/42913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/osx')
-rw-r--r--vcl/inc/osx/saltimer.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/vcl/inc/osx/saltimer.h b/vcl/inc/osx/saltimer.h
index 86964115d648..f70bd65491b8 100644
--- a/vcl/inc/osx/saltimer.h
+++ b/vcl/inc/osx/saltimer.h
@@ -43,6 +43,12 @@ public:
class AquaSalTimer : public SalTimer
{
+ NSTimer *m_pRunningTimer;
+ sal_Int32 m_nTimerStartTicks; ///< system ticks at timer start % SAL_MAX_INT32
+
+ void queueDispatchTimerEvent( bool bAtStart );
+ void callTimerCallback();
+
public:
AquaSalTimer();
virtual ~AquaSalTimer() override;
@@ -50,11 +56,11 @@ public:
void Start( sal_uLong nMS ) override;
void Stop() override;
- static void handleStartTimerEvent( NSEvent* pEvent );
- static void handleDispatchTimerEvent();
+ void handleStartTimerEvent( NSEvent* pEvent );
+ void handleDispatchTimerEvent( NSEvent* pEvent );
+ void handleTimerElapsed();
- static NSTimer* pRunningTimer;
- static bool bDispatchTimer;
+ bool IsTimerElapsed() const;
};
#endif // INCLUDED_VCL_INC_OSX_SALTIMER_H