summaryrefslogtreecommitdiff
path: root/include/vcl/scheduler.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/vcl/scheduler.hxx')
-rw-r--r--include/vcl/scheduler.hxx39
1 files changed, 24 insertions, 15 deletions
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 6c4e2116b589..6b27e05530e8 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -21,23 +21,18 @@
#define INCLUDED_VCL_SCHEDULER_HXX
#include <vcl/dllapi.h>
+#include <list>
+
-struct ImplSVData;
class Scheduler;
struct ImplSchedulerData
{
- ImplSchedulerData* mpNext; // Pointer to the next element in list
- Scheduler* mpScheduler; // Pointer to VCL Scheduler instance
- bool mbDelete; // Destroy this scheduler?
- bool mbInScheduler; // Scheduler currently processed?
- sal_uInt64 mnUpdateTime; // Last Update Time
- sal_uInt32 mnUpdateStack; // Update Stack
-
- void Invoke();
-
- static ImplSchedulerData *GetMostImportantTask( bool bTimer );
+ bool mbDelete; // Destroy this scheduler?
+ Scheduler* mpScheduler; // Pointer to VCL Scheduler instance
};
+#define MAX_TIMER_PERIOD SAL_MAX_UINT64
+
enum class SchedulerPriority {
HIGHEST = 0,
HIGH = 1,
@@ -56,6 +51,7 @@ protected:
const sal_Char *mpDebugName; /// Useful for debugging
SchedulerPriority mePriority; /// Scheduler priority
bool mbActive; /// Currently in the scheduler
+ sal_uInt64 mnUpdateTime; /// Last Update Time
friend struct ImplSchedulerData;
virtual void SetDeletionFlags();
@@ -82,15 +78,28 @@ public:
bool IsActive() const { return mbActive; }
void SetInActive() { mbActive = false; }
- Scheduler& operator=( const Scheduler& rScheduler );
- static void ImplDeInitScheduler();
+ Scheduler& operator=( const Scheduler& rScheduler );
+ static void ImplDeInitScheduler(bool bAll=true);
+ static void ImplInitScheduler();
- // Process one pending Timer with highhest priority
+ // Process one pending Timer with highest priority
static void CallbackTaskScheduling( bool ignore );
- /// Process one pending task ahead of time with highhest priority.
+ /// Process one pending task ahead of time with highest priority.
static void ProcessTaskScheduling( bool bTimer );
+
+private:
+ bool mbInScheduler; // Scheduler currently processed?
+ sal_uInt32 mnUpdateStack; // Update Stack
+
+ bool ImplHandleTaskScheduling(sal_uInt64& nMinPeriod, sal_uInt64 nTime);
+ void ImplInvoke(sal_uInt64 nTime);
+ static Scheduler* ImplGetHighestPrioTask( bool bTimer );
+ bool ImplIsScheduleReady(sal_uInt32 nUpdateStack);
+ void ImplDispose();
};
+typedef ::std::list< ImplSchedulerData* > ImplScheduler_t;
+
#endif // INCLUDED_VCL_SCHEDULER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */