summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h175
1 files changed, 0 insertions, 175 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
deleted file mode 100644
index b5a6393..0000000
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h
+++ /dev/null
@@ -1,175 +0,0 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "../AddonBase.h"
12#include "definitions.h"
13
14namespace kodi
15{
16namespace gui
17{
18
19 //============================================================================
20 ///
21 // \defgroup cpp_kodi_gui ::general
22 /// \addtogroup cpp_kodi_gui
23 /// @{
24 /// @brief **Allow use of binary classes and function to use on add-on's**
25 ///
26 /// Permits the use of the required functions of the add-on to Kodi. This class
27 /// also contains some functions to the control.
28 ///
29 /// These are pure functions them no other initialization need.
30 ///
31 /// It has the header \ref kodi/gui/General.h "#include <kodi/gui/General.h>" be included
32 /// to enjoy it.
33 ///
34
35 //==========================================================================
36 ///
37 /// \ingroup cpp_kodi_gui
38 /// @brief Performs a graphical lock of rendering engine
39 ///
40 inline void ATTRIBUTE_HIDDEN Lock()
41 {
42 using namespace ::kodi::addon;
43 CAddonBase::m_interface->toKodi->kodi_gui->general->lock();
44 }
45
46 //--------------------------------------------------------------------------
47
48 //==========================================================================
49 ///
50 /// \ingroup cpp_kodi_gui
51 /// @brief Performs a graphical unlock of previous locked rendering engine
52 ///
53 inline void ATTRIBUTE_HIDDEN Unlock()
54 {
55 using namespace ::kodi::addon;
56 CAddonBase::m_interface->toKodi->kodi_gui->general->unlock();
57 }
58 //--------------------------------------------------------------------------
59
60 //==========================================================================
61 ///
62 /// \ingroup cpp_kodi_gui
63 /// @brief Return the the current screen height with pixel
64 ///
65 inline int ATTRIBUTE_HIDDEN GetScreenHeight()
66 {
67 using namespace ::kodi::addon;
68 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_screen_height(CAddonBase::m_interface->toKodi->kodiBase);
69 }
70 //--------------------------------------------------------------------------
71
72 //==========================================================================
73 ///
74 /// \ingroup cpp_kodi_gui
75 /// @brief Return the the current screen width with pixel
76 ///
77 inline int ATTRIBUTE_HIDDEN GetScreenWidth()
78 {
79 using namespace ::kodi::addon;
80 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_screen_width(CAddonBase::m_interface->toKodi->kodiBase);
81 }
82 //--------------------------------------------------------------------------
83
84 //==========================================================================
85 ///
86 /// \ingroup cpp_kodi_gui
87 /// @brief Return the the current screen rendering resolution
88 ///
89 inline int ATTRIBUTE_HIDDEN GetVideoResolution()
90 {
91 using namespace ::kodi::addon;
92 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_video_resolution(CAddonBase::m_interface->toKodi->kodiBase);
93 }
94 //--------------------------------------------------------------------------
95
96 //==========================================================================
97 ///
98 /// \ingroup cpp_kodi_gui
99 /// @brief Returns the id for the current 'active' dialog as an integer.
100 ///
101 /// @return The currently active dialog Id
102 ///
103 ///
104 ///-------------------------------------------------------------------------
105 ///
106 /// **Example:**
107 /// ~~~~~~~~~~~~~{.cpp}
108 /// ..
109 /// int wid = kodi::gui::GetCurrentWindowDialogId();
110 /// ..
111 /// ~~~~~~~~~~~~~
112 ///
113 inline int ATTRIBUTE_HIDDEN GetCurrentWindowDialogId()
114 {
115 using namespace ::kodi::addon;
116 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_current_window_dialog_id(CAddonBase::m_interface->toKodi->kodiBase);
117 }
118 //--------------------------------------------------------------------------
119
120 //==========================================================================
121 ///
122 /// \ingroup cpp_kodi_gui
123 /// @brief Returns the id for the current 'active' window as an integer.
124 ///
125 /// @return The currently active window Id
126 ///
127 ///
128 ///-------------------------------------------------------------------------
129 ///
130 /// **Example:**
131 /// ~~~~~~~~~~~~~{.cpp}
132 /// ..
133 /// int wid = kodi::gui::GetCurrentWindowId();
134 /// ..
135 /// ~~~~~~~~~~~~~
136 ///
137 inline int ATTRIBUTE_HIDDEN GetCurrentWindowId()
138 {
139 using namespace ::kodi::addon;
140 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_current_window_id(CAddonBase::m_interface->toKodi->kodiBase);
141 }
142 //--------------------------------------------------------------------------
143
144 //==========================================================================
145 ///
146 /// \ingroup cpp_kodi_gui
147 /// \brief To get hardware specific device context interface
148 ///
149 /// \return The currently active device context
150 ///
151 /// \warning This function is only be supported under Windows, on all other
152 /// OS it return `nullptr`!
153 ///
154 /// \note Returned Windows class pointer is `ID3D11DeviceContext1`.
155 ///
156 ///
157 ///-------------------------------------------------------------------------
158 ///
159 /// **Example:**
160 /// ~~~~~~~~~~~~~{.cpp}
161 /// #include <d3d11_1.h>
162 /// ..
163 /// ID3D11DeviceContext1* context = static_cast<ID3D11DeviceContext1*>(kodi::gui::GetHWContext());
164 /// ..
165 /// ~~~~~~~~~~~~~
166 ///
167 inline void* GetHWContext()
168 {
169 using namespace ::kodi::addon;
170 return CAddonBase::m_interface->toKodi->kodi_gui->general->get_hw_context(CAddonBase::m_interface->toKodi->kodiBase);
171 }
172 //--------------------------------------------------------------------------
173
174} /* namespace gui */
175} /* namespace kodi */