summaryrefslogtreecommitdiffstats
path: root/xbmc/video/ContextMenus.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /xbmc/video/ContextMenus.h
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/video/ContextMenus.h')
-rw-r--r--xbmc/video/ContextMenus.h114
1 files changed, 114 insertions, 0 deletions
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 <memory>
+
+namespace CONTEXTMENU
+{
+
+class CVideoInfo : public CStaticContextMenuAction
+{
+public:
+ explicit CVideoInfo(MediaType mediaType);
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& 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<CFileItem>& item) const override;
+};
+
+struct CVideoMarkWatched : CStaticContextMenuAction
+{
+ CVideoMarkWatched() : CStaticContextMenuAction(16103) {}
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& item) const override;
+};
+
+struct CVideoMarkUnWatched : CStaticContextMenuAction
+{
+ CVideoMarkUnWatched() : CStaticContextMenuAction(16104) {}
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& item) const override;
+};
+
+struct CVideoBrowse : CStaticContextMenuAction
+{
+ CVideoBrowse() : CStaticContextMenuAction(37015) {} // Browse into
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& 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<CFileItem>& _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<CFileItem>& _item) const override;
+};
+
+struct CVideoQueue : CStaticContextMenuAction
+{
+ CVideoQueue() : CStaticContextMenuAction(13347) {} // Queue item
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& item) const override;
+};
+
+struct CVideoPlayNext : CStaticContextMenuAction
+{
+ CVideoPlayNext() : CStaticContextMenuAction(10008) {} // Play next
+ bool IsVisible(const CFileItem& item) const override;
+ bool Execute(const std::shared_ptr<CFileItem>& 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<CFileItem>& item) const override;
+};
+
+}