kodi
PlayerController.h
1 /*
2  * Copyright (C) 2012-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/ISliderCallback.h"
12 #include "input/actions/interfaces/IActionListener.h"
13 #include "utils/MovingSpeed.h"
14 
22 {
23 public:
24  static CPlayerController& GetInstance();
25 
30  bool OnAction(const CAction &action) override;
31 
35  void OnSliderChange(void *data, CGUISliderControl *slider) override;
36 
37 protected:
39  CPlayerController(const CPlayerController&) = delete;
40  CPlayerController& operator=(CPlayerController const&) = delete;
41  ~CPlayerController() override;
42 
43 private:
53  void ShowSlider(int action, int label, float value, float min, float delta, float max, bool modal = false);
54 
55  int m_sliderAction = 0;
57 };
Interface class for callback from the slider dialog.
Definition: ISliderCallback.h:24
bool OnAction(const CAction &action) override
Perform a player control action if appropriate.
Definition: PlayerController.cpp:53
void OnSliderChange(void *data, CGUISliderControl *slider) override
Callback from the slider dialog.
Definition: PlayerController.cpp:540
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: GUISliderControl.h:37
Class to calculate the velocity for a motion effect. To ensure it works, the GetUpdatedDistance metho...
Definition: MovingSpeed.h:72
Player controller class to handle user actions.
Definition: PlayerController.h:21
Interface defining methods to handle GUI actions.
Definition: IActionListener.h:22