summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vcl/idle.hxx3
-rw-r--r--include/vcl/scheduler.hxx11
-rw-r--r--include/vcl/timer.hxx3
3 files changed, 13 insertions, 4 deletions
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index d746cf45e775..5460d3302635 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -39,7 +39,8 @@ public:
void SetIdleHdl( const Link<Idle *, void>& rLink ) { maIdleHdl = rLink; }
const Link<Idle *, void>& GetIdleHdl() const { return maIdleHdl; }
virtual void Invoke() override;
- virtual bool ReadyForSchedule( bool bTimer ) const override;
+ virtual bool ReadyForSchedule( bool bTimerOnly, sal_uInt64 nTimeNow ) const override;
+ virtual bool IsIdle() const override;
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) const override;
Idle& operator=( const Idle& rIdle );
};
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 5771f3af782f..58da1bf1c1c7 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -67,8 +67,15 @@ protected:
friend struct ImplSchedulerData;
virtual void SetDeletionFlags();
- virtual bool ReadyForSchedule( bool bTimer ) const = 0;
- virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) const = 0;
+ /// Is this item ready to be dispatched at @nTimeNow
+ virtual bool ReadyForSchedule( bool bTimerOnly, sal_uInt64 nTimeNow ) const = 0;
+ /// Schedule only when other timers and events are processed
+ virtual bool IsIdle() const = 0;
+ /**
+ * Adjust @nMinPeriod downwards if we want to be notified before
+ * then, @nTimeNow is the current time.
+ */
+ virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const = 0;
public:
Scheduler( const sal_Char *pDebugName = nullptr );
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 94a025ecd697..149ba9099ac9 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -31,7 +31,8 @@ protected:
bool mbAuto;
virtual void SetDeletionFlags() override;
- virtual bool ReadyForSchedule( bool bTimer ) const override;
+ virtual bool ReadyForSchedule( bool bTimerOnly, sal_uInt64 nTimeNow ) const override;
+ virtual bool IsIdle() const override;
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) const override;
public: