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/video/ContextMenus.h | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 xbmc/video/ContextMenus.h (limited to 'xbmc/video/ContextMenus.h') diff --git a/xbmc/video/ContextMenus.h b/xbmc/video/ContextMenus.h new file mode 100644 index 0000000..1cbffe4 --- /dev/null +++ b/xbmc/video/ContextMenus.h @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2016-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 "ContextMenuItem.h" +#include "VideoLibraryQueue.h" +#include "media/MediaType.h" + +#include + +namespace CONTEXTMENU +{ + +class CVideoInfo : public CStaticContextMenuAction +{ +public: + explicit CVideoInfo(MediaType mediaType); + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; + +private: + const MediaType m_mediaType; +}; + +struct CTVShowInfo : CVideoInfo +{ + CTVShowInfo() : CVideoInfo(MediaTypeTvShow) {} +}; + +struct CEpisodeInfo : CVideoInfo +{ + CEpisodeInfo() : CVideoInfo(MediaTypeEpisode) {} +}; + +struct CMusicVideoInfo : CVideoInfo +{ + CMusicVideoInfo() : CVideoInfo(MediaTypeMusicVideo) {} +}; + +struct CMovieInfo : CVideoInfo +{ + CMovieInfo() : CVideoInfo(MediaTypeMovie) {} +}; + +struct CVideoRemoveResumePoint : CStaticContextMenuAction +{ + CVideoRemoveResumePoint() : CStaticContextMenuAction(38209) {} + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoMarkWatched : CStaticContextMenuAction +{ + CVideoMarkWatched() : CStaticContextMenuAction(16103) {} + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoMarkUnWatched : CStaticContextMenuAction +{ + CVideoMarkUnWatched() : CStaticContextMenuAction(16104) {} + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoBrowse : CStaticContextMenuAction +{ + CVideoBrowse() : CStaticContextMenuAction(37015) {} // Browse into + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoResume : IContextMenuItem +{ + std::string GetLabel(const CFileItem& item) const override; + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& _item) const override; +}; + +struct CVideoPlay : IContextMenuItem +{ + std::string GetLabel(const CFileItem& item) const override; + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& _item) const override; +}; + +struct CVideoQueue : CStaticContextMenuAction +{ + CVideoQueue() : CStaticContextMenuAction(13347) {} // Queue item + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoPlayNext : CStaticContextMenuAction +{ + CVideoPlayNext() : CStaticContextMenuAction(10008) {} // Play next + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +struct CVideoPlayAndQueue : CStaticContextMenuAction +{ + CVideoPlayAndQueue() : CStaticContextMenuAction(13412) {} // Play from here + bool IsVisible(const CFileItem& item) const override; + bool Execute(const std::shared_ptr& item) const override; +}; + +} -- cgit v1.2.3