From c04dcc2e7d834218ef2d4194331e383402495ae1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 20:07:22 +0200 Subject: Adding upstream version 2:20.4+dfsg. Signed-off-by: Daniel Baumann --- xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h (limited to 'xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h') diff --git a/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h b/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h new file mode 100644 index 0000000..c23fb92 --- /dev/null +++ b/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2012-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "pvr/PVRChannelNumberInputHandler.h" +#include "pvr/dialogs/GUIDialogPVRItemsViewBase.h" +#include "threads/SystemClock.h" + +#include +#include +#include + +namespace PVR +{ +enum class PVREvent; + +class CPVRChannelGroup; + +class CGUIDialogPVRChannelsOSD : public CGUIDialogPVRItemsViewBase, + public CPVRChannelNumberInputHandler +{ +public: + CGUIDialogPVRChannelsOSD(); + ~CGUIDialogPVRChannelsOSD() override; + bool OnMessage(CGUIMessage& message) override; + bool OnAction(const CAction& action) override; + + /*! + * @brief CEventStream callback for PVR events. + * @param event The event. + */ + void Notify(const PVREvent& event); + + // CPVRChannelNumberInputHandler implementation + void GetChannelNumbers(std::vector& channelNumbers) override; + void OnInputDone() override; + +protected: + void OnInitWindow() override; + void OnDeinitWindow(int nextWindowID) override; + void RestoreControlStates() override; + void SaveControlStates() override; + void SetInvalid() override; + +private: + void GotoChannel(int iItem); + void Update(); + void SaveSelectedItemPath(int iGroupID); + std::string GetLastSelectedItemPath(int iGroupID) const; + + std::shared_ptr m_group; + std::map m_groupSelectedItemPaths; + XbmcThreads::EndTime<> m_refreshTimeout; +}; +} // namespace PVR -- cgit v1.2.3