Mercurial > foo_out_sdl
diff foosdk/sdk/foobar2000/SDK/progress_meter.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/foosdk/sdk/foobar2000/SDK/progress_meter.h Mon Jan 05 02:15:46 2026 -0500 @@ -0,0 +1,22 @@ +#pragma once + +//! Interface for setting current operation progress state to be visible on Windows 7 taskbar. Use progress_meter::get()->acquire() to instantiate. +class NOVTABLE progress_meter_instance : public service_base { + FB2K_MAKE_SERVICE_INTERFACE(progress_meter_instance, service_base); +public: + //! Sets the current progress state. + //! @param value Progress state, in 0..1 range. + virtual void set_progress(float value) = 0; + //! Toggles paused state. + virtual void set_pause(bool isPaused) = 0; + + static bool serviceRequiresMainThreadDestructor() { return true; } +}; + +//! Entrypoint interface for instantiating progress_meter_instance objects. +class NOVTABLE progress_meter : public service_base { + FB2K_MAKE_SERVICE_COREAPI(progress_meter); +public: + //! Creates a progress_meter_instance object. + virtual progress_meter_instance::ptr acquire() = 0; +};
