summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Music.h
blob: 95cac0f0a434d7d206bb9721ccb348afd21532df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include <cstdint>
#include <chrono>
#include <Components/Gfx/Gfx.h>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include <libs/lvgl/src/lv_core/lv_style.h>
#include <libs/lvgl/src/lv_core/lv_obj.h>
#include <Components/Battery/BatteryController.h>
#include <Components/Ble/BleController.h>
#include "../../Version.h"
#include <Components/Ble/MusicService.h>
#include <string>

namespace Pinetime {
  namespace Applications {
    namespace Screens {

      class Music : public Screen{
        public:
          Music(DisplayApp* app, Pinetime::Controllers::MusicService &music);
          ~Music() override;

          bool Refresh() override;
          bool OnButtonPushed() override;

          void OnObjectEvent(lv_obj_t* obj, lv_event_t event);

        private:
          lv_obj_t * btnPrev;
          lv_obj_t * btnPlayPause;
          lv_obj_t * btnNext;
          lv_obj_t * btnVolDown;
          lv_obj_t * btnVolUp;
          lv_obj_t * txtArtist;
          lv_obj_t * txtTrack;
          lv_obj_t * txtPlayPause;

          bool running = true;
          Pinetime::Controllers::MusicService &musicService;
          std::string m_artist;
          std::string m_album;
          std::string m_track;
          unsigned char m_status;
      };
    }
  }
}