diff options
| author | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
| commit | 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch) | |
| tree | cc9e1f8ea69eebca8416677b2470a5b3f11a850e /xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h | |
| parent | b3d195f0188758a14875a5a2f270e4fd190a679f (diff) | |
| download | kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.gz kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.bz2 kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.zip | |
sync with upstream
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h index a2bef15..6c29693 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | /* | 11 | /* |
| 23 | * Parts with a comment named "internal" are only used inside header and not | 12 | * Parts with a comment named "internal" are only used inside header and not |
| 24 | * used or accessed direct during add-on development! | 13 | * used or accessed direct during add-on development! |
| @@ -34,7 +23,7 @@ extern "C" | |||
| 34 | struct AddonInstance_Visualization; | 23 | struct AddonInstance_Visualization; |
| 35 | 24 | ||
| 36 | typedef enum VIS_ACTION : unsigned int /* internal */ | 25 | typedef enum VIS_ACTION : unsigned int /* internal */ |
| 37 | { | 26 | { |
| 38 | VIS_ACTION_NONE = 0, | 27 | VIS_ACTION_NONE = 0, |
| 39 | VIS_ACTION_NEXT_PRESET, | 28 | VIS_ACTION_NEXT_PRESET, |
| 40 | VIS_ACTION_PREV_PRESET, | 29 | VIS_ACTION_PREV_PRESET, |
| @@ -318,8 +307,7 @@ namespace addon | |||
| 318 | /// Used by an add-on that only supports visualizations. | 307 | /// Used by an add-on that only supports visualizations. |
| 319 | /// | 308 | /// |
| 320 | CInstanceVisualization() | 309 | CInstanceVisualization() |
| 321 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), | 310 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) |
| 322 | m_presetLockedByUser(false) | ||
| 323 | { | 311 | { |
| 324 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) | 312 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) |
| 325 | throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); | 313 | throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); |
| @@ -341,8 +329,7 @@ namespace addon | |||
| 341 | /// @warning Only use `instance` from the CreateInstance call | 329 | /// @warning Only use `instance` from the CreateInstance call |
| 342 | /// | 330 | /// |
| 343 | explicit CInstanceVisualization(KODI_HANDLE instance) | 331 | explicit CInstanceVisualization(KODI_HANDLE instance) |
| 344 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), | 332 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) |
| 345 | m_presetLockedByUser(false) | ||
| 346 | { | 333 | { |
| 347 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) | 334 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) |
| 348 | throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); | 335 | throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); |
| @@ -690,7 +677,7 @@ namespace addon | |||
| 690 | { | 677 | { |
| 691 | addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); | 678 | addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); |
| 692 | } | 679 | } |
| 693 | 680 | ||
| 694 | inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) | 681 | inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) |
| 695 | { | 682 | { |
| 696 | return addon->toAddon.addonInstance->IsDirty(); | 683 | return addon->toAddon.addonInstance->IsDirty(); |
| @@ -758,7 +745,7 @@ namespace addon | |||
| 758 | return addon->toAddon.addonInstance->IsLocked(); | 745 | return addon->toAddon.addonInstance->IsLocked(); |
| 759 | } | 746 | } |
| 760 | 747 | ||
| 761 | bool m_presetLockedByUser; | 748 | bool m_presetLockedByUser = false; |
| 762 | AddonInstance_Visualization* m_instanceData; | 749 | AddonInstance_Visualization* m_instanceData; |
| 763 | }; | 750 | }; |
| 764 | 751 | ||
