From a4d36c2b76d188199d9b16b4556d9aa88c412731 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Tue, 15 Jul 2014 12:04:54 +1000 Subject: 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. --- src/Editor.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Editor.h') diff --git a/src/Editor.h b/src/Editor.h index 53da90906..d80292a0a 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -500,7 +500,13 @@ protected: // ScintillaBase subclass needs access to much of Editor void Tick(); bool Idle(); - virtual void SetTicking(bool on) = 0; + virtual void SetTicking(bool on); + enum TickReason { tickCaret, tickScroll, tickWiden, tickDwell, tickPlatform }; + virtual void TickFor(TickReason reason); + virtual bool FineTickerAvailable(); + virtual bool FineTickerRunning(TickReason reason); + virtual void FineTickerStart(TickReason reason, int millis, int tolerance); + virtual void FineTickerCancel(TickReason reason); virtual bool SetIdle(bool) { return false; } virtual void SetMouseCapture(bool on) = 0; virtual bool HaveMouseCapture() = 0; -- cgit v1.2.3