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 | a4d36c2b76d188199d9b16b4556d9aa88c412731 (patch) | |
| tree | b79d163e39dcfcc214e3c4c95111cba90b664203 /cocoa/ScintillaCocoa.h | |
| parent | a04e3bb80fe893b98f7bd4d66d4bb44ad50b5b13 (diff) | |
| download | scintilla-mirror-a4d36c2b76d188199d9b16b4556d9aa88c412731.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); |
