Merge pull request #4222 from Montellese/jsonrpc_audiolibrary_fixes
[vuplus_xbmc] / xbmc / video / PlayerController.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2012-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "dialogs/GUIDialogSlider.h"
24
25 /*! \brief Player controller class to handle user actions.
26
27  Handles actions that are normally suited to fullscreen playback, such as
28  altering subtitles and audio tracks, changing aspect ratio, subtitle placement,
29  and placement of the video on screen.
30  */
31 class CPlayerController : public ISliderCallback
32 {
33 public:
34   CPlayerController();
35   virtual ~CPlayerController();
36
37   /*! \brief Perform a player control action if appropriate.
38   \param action the action to perform.
39   \return true if the action is considered handled, false if it should be handled elsewhere.
40   */
41   bool OnAction(const CAction &action);
42
43   /*! \brief Callback from the slider dialog.
44    \sa CGUIDialogSlider
45    */
46   virtual void OnSliderChange(void *data, CGUISliderControl *slider);
47
48 private:
49   /*! \brief pop up a slider dialog for a particular action
50    \param action id of the action the slider responds to
51    \param label id of the label to display
52    \param value value to set on the slider
53    \param min minimum value the slider may take
54    \param delta change value to advance the slider by with each click
55    \param max maximal value the slider may take
56    \param modal true if we should wait for the slider to finish. Defaults to false
57    */
58   void ShowSlider(int action, int label, float value, float min, float delta, float max, bool modal = false);
59
60   int m_sliderAction; ///< \brief set to the action id for a slider being displayed \sa ShowSlider
61 };