diff options
| author | manuel <manuel@mausz.at> | 2019-04-29 12:22:05 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2019-04-29 12:22:05 +0200 |
| commit | e317daf081a1048904fdf0b548946fa3ba6593a7 (patch) | |
| tree | 285a58fe8c6b4a95c9a6020afbe7bcc9cb913ea7 /xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h | |
| parent | 483c0b88bfc1b798396c31a4dd2f5239399ce59e (diff) | |
| download | kodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.tar.gz kodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.tar.bz2 kodi-pvr-build-e317daf081a1048904fdf0b548946fa3ba6593a7.zip | |
sync with upstream
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.h | 34 |
1 files changed, 32 insertions, 2 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 index 30b6d89..a3b8bcb 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h | |||
| @@ -106,7 +106,7 @@ namespace gui | |||
| 106 | /// **Example:** | 106 | /// **Example:** |
| 107 | /// ~~~~~~~~~~~~~{.cpp} | 107 | /// ~~~~~~~~~~~~~{.cpp} |
| 108 | /// .. | 108 | /// .. |
| 109 | /// int wid = kodi::gui::GetCurrentWindowDialogId() | 109 | /// int wid = kodi::gui::GetCurrentWindowDialogId(); |
| 110 | /// .. | 110 | /// .. |
| 111 | /// ~~~~~~~~~~~~~ | 111 | /// ~~~~~~~~~~~~~ |
| 112 | /// | 112 | /// |
| @@ -130,7 +130,7 @@ namespace gui | |||
| 130 | /// **Example:** | 130 | /// **Example:** |
| 131 | /// ~~~~~~~~~~~~~{.cpp} | 131 | /// ~~~~~~~~~~~~~{.cpp} |
| 132 | /// .. | 132 | /// .. |
| 133 | /// int wid = kodi::gui::GetCurrentWindowId() | 133 | /// int wid = kodi::gui::GetCurrentWindowId(); |
| 134 | /// .. | 134 | /// .. |
| 135 | /// ~~~~~~~~~~~~~ | 135 | /// ~~~~~~~~~~~~~ |
| 136 | /// | 136 | /// |
| @@ -141,5 +141,35 @@ namespace gui | |||
| 141 | } | 141 | } |
| 142 | //-------------------------------------------------------------------------- | 142 | //-------------------------------------------------------------------------- |
| 143 | 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 | |||
| 144 | } /* namespace gui */ | 174 | } /* namespace gui */ |
| 145 | } /* namespace kodi */ | 175 | } /* namespace kodi */ |
