diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2014-07-15 12:04:54 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2014-07-15 12:04:54 +1000 |
commit | baf2d31068737bf24102cee6a7fed33e0d00d1f3 (patch) | |
tree | f814f1a39637d7711ab0ce709fef0b2468fbb270 /cocoa/ScintillaCocoa.h | |
parent | 7b7865ca3062d57ebe990468a9275180f0d60569 (diff) | |
download | scintilla-mirror-baf2d31068737bf24102cee6a7fed33e0d00d1f3.tar.gz |
Implement separate timers for each type of periodic activity and turn them on and off
as required. This saves power as there are fewer wake ups.
A tolerance value is provided so that platforms that support coalescing timers,
Windows 8+ and OS X 10.9+, can use them.
The previous global 100 millisecond timer may still be used by non-core platforms.
Diffstat (limited to 'cocoa/ScintillaCocoa.h')
-rw-r--r-- | cocoa/ScintillaCocoa.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index 61d78c449..122df7b44 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -144,7 +144,11 @@ public: void PaintMargin(NSRect aRect); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); - void SetTicking(bool on); + void TickFor(TickReason reason); + bool FineTickerAvailable(); + bool FineTickerRunning(TickReason reason); + void FineTickerStart(TickReason reason, int millis, int tolerance); + void FineTickerCancel(TickReason reason); bool SetIdle(bool on); void SetMouseCapture(bool on); bool HaveMouseCapture(); @@ -181,6 +185,7 @@ public: static sptr_t DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); + NSTimer *timers[tickPlatform+1]; void TimerFired(NSTimer* timer); void IdleTimerFired(); static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci); |