diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-09-28 08:29:55 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-09-28 08:29:55 +1000 |
| commit | f09ba5ffd53bf7d28e0dc516c00a8f69ca7efae9 (patch) | |
| tree | affce5567186d8944686afd824bf4ee4f7ee4d2d /src/ui/include/model_playback.hpp | |
| parent | f168bfab7698f28492c7693263525945a26cbcc8 (diff) | |
| download | tangara-fw-f09ba5ffd53bf7d28e0dc516c00a8f69ca7efae9.tar.gz | |
Use bindey for databinding instead of hand rolling ui updates
Diffstat (limited to 'src/ui/include/model_playback.hpp')
| -rw-r--r-- | src/ui/include/model_playback.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/include/model_playback.hpp b/src/ui/include/model_playback.hpp new file mode 100644 index 00000000..f932dcfd --- /dev/null +++ b/src/ui/include/model_playback.hpp @@ -0,0 +1,26 @@ +/* + * Copyright 2023 jacqueline <me@jacqueline.id.au> + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#pragma once + +#include "bindey/property.h" + +#include "track.hpp" + +namespace ui { +namespace models { + +struct Playback { + bindey::property<bool> is_playing; + bindey::property<std::optional<database::TrackId>> current_track; + bindey::property<std::vector<database::TrackId>> upcoming_tracks; + + bindey::property<uint32_t> current_track_position; + bindey::property<uint32_t> current_track_duration; +}; + +} // namespace models +} // namespace ui
\ No newline at end of file |
