[WASAPI] fix stream types and frequencies enumeration
[xbmc.git] / xbmc / guilib / GUIMoverControl.h
blob1ebaf4dda2754cb4990f6636bb096aac07d40b12
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 /*!
12 \file GUIMoverControl.h
13 \brief
16 #include "GUIControl.h"
17 #include "GUITexture.h"
18 #include "utils/MovingSpeed.h"
20 #define ALLOWED_DIRECTIONS_ALL 0
21 #define ALLOWED_DIRECTIONS_UPDOWN 1
22 #define ALLOWED_DIRECTIONS_LEFTRIGHT 2
24 /*!
25 \ingroup controls
26 \brief
28 class CGUIMoverControl : public CGUIControl
30 public:
31 CGUIMoverControl(int parentID,
32 int controlID,
33 float posX,
34 float posY,
35 float width,
36 float height,
37 const CTextureInfo& textureFocus,
38 const CTextureInfo& textureNoFocus,
39 KODI::UTILS::MOVING_SPEED::MapEventConfig& movingSpeedCfg);
41 ~CGUIMoverControl(void) override = default;
42 CGUIMoverControl* Clone() const override { return new CGUIMoverControl(*this); }
44 void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
45 void Render() override;
46 bool OnAction(const CAction &action) override;
47 void OnUp() override;
48 void OnDown() override;
49 void OnLeft() override;
50 void OnRight() override;
51 void AllocResources() override;
52 void FreeResources(bool immediately = false) override;
53 void DynamicResourceAlloc(bool bOnOff) override;
54 void SetInvalid() override;
55 void SetPosition(float posX, float posY) override;
56 void SetLimits(int iX1, int iY1, int iX2, int iY2);
57 void SetLocation(int iLocX, int iLocY, bool bSetPosition = true);
58 int GetXLocation() const { return m_iLocationX; }
59 int GetYLocation() const { return m_iLocationY; }
60 bool CanFocus() const override { return true; }
62 protected:
63 EVENT_RESULT OnMouseEvent(const CPoint& point, const KODI::MOUSE::CMouseEvent& event) override;
64 bool UpdateColors(const CGUIListItem* item) override;
65 bool SetAlpha(unsigned char alpha);
66 void Move(int iX, int iY);
67 std::unique_ptr<CGUITexture> m_imgFocus;
68 std::unique_ptr<CGUITexture> m_imgNoFocus;
69 unsigned int m_frameCounter;
70 KODI::UTILS::MOVING_SPEED::CMovingSpeed m_movingSpeed;
71 float m_fAnalogSpeed;
72 int m_iX1, m_iX2, m_iY1, m_iY2;
73 int m_iLocationX, m_iLocationY;
75 private:
76 CGUIMoverControl(const CGUIMoverControl& control);