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 /qt/ScintillaEditBase/ScintillaQt.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 'qt/ScintillaEditBase/ScintillaQt.h')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.h b/qt/ScintillaEditBase/ScintillaQt.h index ff4d65992..16bafbf7c 100644 --- a/qt/ScintillaEditBase/ScintillaQt.h +++ b/qt/ScintillaEditBase/ScintillaQt.h @@ -14,6 +14,7 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <assert.h> #include <ctype.h> #include <time.h> #include <string> @@ -88,7 +89,6 @@ signals: void command(uptr_t wParam, sptr_t lParam); private slots: - void tick(); void onIdle(); void execCommand(QAction *action); void SelectionChanged(); @@ -114,7 +114,11 @@ private: virtual void NotifyChange(); virtual void NotifyFocus(bool focus); virtual void NotifyParent(SCNotification scn); - virtual void SetTicking(bool on); + int timers[tickDwell+1]; + 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 on); virtual void SetMouseCapture(bool on); virtual bool HaveMouseCapture(); @@ -143,6 +147,8 @@ protected: void DragLeave(); void Drop(const Point &point, const QMimeData *data, bool move); + void timerEvent(QTimerEvent *event); + private: QAbstractScrollArea *scrollArea; |