|
1
|
1 #pragma once
|
|
|
2
|
|
|
3 //! Interface for setting current operation progress state to be visible on Windows 7 taskbar. Use progress_meter::get()->acquire() to instantiate.
|
|
|
4 class NOVTABLE progress_meter_instance : public service_base {
|
|
|
5 FB2K_MAKE_SERVICE_INTERFACE(progress_meter_instance, service_base);
|
|
|
6 public:
|
|
|
7 //! Sets the current progress state.
|
|
|
8 //! @param value Progress state, in 0..1 range.
|
|
|
9 virtual void set_progress(float value) = 0;
|
|
|
10 //! Toggles paused state.
|
|
|
11 virtual void set_pause(bool isPaused) = 0;
|
|
|
12
|
|
|
13 static bool serviceRequiresMainThreadDestructor() { return true; }
|
|
|
14 };
|
|
|
15
|
|
|
16 //! Entrypoint interface for instantiating progress_meter_instance objects.
|
|
|
17 class NOVTABLE progress_meter : public service_base {
|
|
|
18 FB2K_MAKE_SERVICE_COREAPI(progress_meter);
|
|
|
19 public:
|
|
|
20 //! Creates a progress_meter_instance object.
|
|
|
21 virtual progress_meter_instance::ptr acquire() = 0;
|
|
|
22 };
|