xbmc
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/Key.h"
13 #include "interfaces/IActionListener.h"
14 #include "utils/MovingSpeed.h"
15 
23 {
24 public:
25  static CPlayerController& GetInstance();
26 
31  bool OnAction(const CAction &action) override;
32 
36  void OnSliderChange(void *data, CGUISliderControl *slider) override;
37 
38 protected:
40  CPlayerController(const CPlayerController&) = delete;
41  CPlayerController& operator=(CPlayerController const&) = delete;
42  ~CPlayerController() override;
43 
44 private:
54  void ShowSlider(int action, int label, float value, float min, float delta, float max, bool modal = false);
55 
56  int m_sliderAction = 0;
58 };
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:51
void OnSliderChange(void *data, CGUISliderControl *slider) override
Callback from the slider dialog.
Definition: PlayerController.cpp:538
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: IActionListener.h:13
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:22