From be933ef2241d79558f91796cc5b3a161f72ebf9c Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 19 Oct 2020 00:52:24 +0200 Subject: sync with upstream --- .../include/kodi/c-api/gui/controls/CMakeLists.txt | 16 +++++ .../include/kodi/c-api/gui/controls/button.h | 35 ++++++++++ .../include/kodi/c-api/gui/controls/edit.h | 79 ++++++++++++++++++++++ .../include/kodi/c-api/gui/controls/fade_label.h | 34 ++++++++++ .../include/kodi/c-api/gui/controls/image.h | 37 ++++++++++ .../include/kodi/c-api/gui/controls/label.h | 32 +++++++++ .../include/kodi/c-api/gui/controls/progress.h | 32 +++++++++ .../include/kodi/c-api/gui/controls/radio_button.h | 35 ++++++++++ .../include/kodi/c-api/gui/controls/rendering.h | 38 +++++++++++ .../kodi/c-api/gui/controls/settings_slider.h | 48 +++++++++++++ .../include/kodi/c-api/gui/controls/slider.h | 48 +++++++++++++ .../include/kodi/c-api/gui/controls/spin.h | 58 ++++++++++++++++ .../include/kodi/c-api/gui/controls/text_box.h | 36 ++++++++++ 13 files changed, 528 insertions(+) create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls') diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt new file mode 100644 index 0000000..2e6cd53 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/CMakeLists.txt @@ -0,0 +1,16 @@ +set(HEADERS button.h + edit.h + fade_label.h + image.h + label.h + progress.h + radio_button.h + rendering.h + settings_slider.h + slider.h + spin.h + text_box.h) + +if(NOT ENABLE_STATIC_LIBS) + core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_controls) +endif() diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h new file mode 100644 index 0000000..84fd822 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_BUTTON_H +#define C_API_GUI_CONTROLS_BUTTON_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_button + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_label2)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); + char* (*get_label2)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_button; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_BUTTON_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h new file mode 100644 index 0000000..ca38b27 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_EDIT_H +#define C_API_GUI_CONTROLS_EDIT_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + //============================================================================ + /// @ingroup cpp_kodi_gui_windows_controls_CEdit_Defs + /// @{ + /// @anchor AddonGUIInputType + /// @brief Text input types used on kodi::gui::controls::CEdit + enum AddonGUIInputType + { + /// Text inside edit control only readable + ADDON_INPUT_TYPE_READONLY = -1, + /// Normal text entries + ADDON_INPUT_TYPE_TEXT = 0, + /// To use on edit control only numeric numbers + ADDON_INPUT_TYPE_NUMBER, + /// To insert seconds + ADDON_INPUT_TYPE_SECONDS, + /// To insert time + ADDON_INPUT_TYPE_TIME, + /// To insert a date + ADDON_INPUT_TYPE_DATE, + /// Used for write in IP addresses + ADDON_INPUT_TYPE_IPADDRESS, + /// Text field used as password entry field with not visible text + ADDON_INPUT_TYPE_PASSWORD, + /// Text field used as password entry field with not visible text but + /// returned as MD5 value + ADDON_INPUT_TYPE_PASSWORD_MD5, + /// Use text field for search purpose + ADDON_INPUT_TYPE_SEARCH, + /// Text field as filter + ADDON_INPUT_TYPE_FILTER, + /// + ADDON_INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW + }; + /// @} + //---------------------------------------------------------------------------- + + typedef struct AddonToKodiFuncTable_kodi_gui_control_edit + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_cursor_position)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + unsigned int position); + unsigned int (*get_cursor_position)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_input_type)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + int type, + const char* heading); + } AddonToKodiFuncTable_kodi_gui_control_edit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_EDIT_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h new file mode 100644 index 0000000..fea014b --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_FADE_LABEL_H +#define C_API_GUI_CONTROLS_FADE_LABEL_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_fade_label + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*add_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_scrolling)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool scroll); + void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_fade_label; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_FADE_LABEL_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h new file mode 100644 index 0000000..4a46e6d --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_IMAGE_H +#define C_API_GUI_CONTROLS_IMAGE_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_image + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_filename)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + const char* filename, + bool use_cache); + void (*set_color_diffuse)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + uint32_t color_diffuse); + } AddonToKodiFuncTable_kodi_gui_control_image; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_IMAGE_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h new file mode 100644 index 0000000..d8a9fe4 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_LABEL_H +#define C_API_GUI_CONTROLS_LABEL_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_label + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_label; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_LABEL_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h new file mode 100644 index 0000000..88638e0 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_PROGRESS_H +#define C_API_GUI_CONTROLS_PROGRESS_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_progress + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); + float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_progress; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_PROGRESS_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h new file mode 100644 index 0000000..a672d95 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_RADIO_BUTTON_H +#define C_API_GUI_CONTROLS_RADIO_BUTTON_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_radio_button + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_selected)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool selected); + bool (*is_selected)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_radio_button; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_RADIO_BUTTON_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h new file mode 100644 index 0000000..d4053a6 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_RENDERING_H +#define C_API_GUI_CONTROLS_RENDERING_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_rendering + { + void (*set_callbacks)( + KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + KODI_GUI_CLIENT_HANDLE clienthandle, + bool (*createCB)(KODI_GUI_CLIENT_HANDLE, int, int, int, int, ADDON_HARDWARE_CONTEXT), + void (*renderCB)(KODI_GUI_CLIENT_HANDLE), + void (*stopCB)(KODI_GUI_CLIENT_HANDLE), + bool (*dirtyCB)(KODI_GUI_CLIENT_HANDLE)); + void (*destroy)(void* kodiBase, KODI_GUI_CONTROL_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_control_rendering; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_RENDERING_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h new file mode 100644 index 0000000..2cbc972 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_SETTINGS_SLIDER_H +#define C_API_GUI_CONTROLS_SETTINGS_SLIDER_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_settings_slider + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label); + void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); + void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); + int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_int_interval)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int interval); + void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); + float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_range)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float start, + float end); + void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); + float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_interval)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float interval); + } AddonToKodiFuncTable_kodi_gui_control_settings_slider; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_SETTINGS_SLIDER_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h new file mode 100644 index 0000000..0a67208 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_SLIDER_H +#define C_API_GUI_CONTROLS_SLIDER_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_slider + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + char* (*get_description)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); + void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); + int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_int_interval)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int interval); + void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float percent); + float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_range)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float start, + float end); + void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); + float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_interval)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float interval); + } AddonToKodiFuncTable_kodi_gui_control_slider; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_SLIDER_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h new file mode 100644 index 0000000..d5e5c86 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_SPIN_H +#define C_API_GUI_CONTROLS_SPIN_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_spin + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); + void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_type)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int type); + void (*add_string_label)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + const char* label, + const char* value); + void (*set_string_value)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + const char* value); + char* (*get_string_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*add_int_label)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + const char* label, + int value); + void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); + void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); + int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_range)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float start, + float end); + void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); + float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_float_interval)(KODI_HANDLE kodiBase, + KODI_GUI_CONTROL_HANDLE handle, + float interval); + } AddonToKodiFuncTable_kodi_gui_control_spin; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_SPIN_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h new file mode 100644 index 0000000..276d04c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2005-2020 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 + +#ifndef C_API_GUI_CONTROLS_TEXT_BOX_H +#define C_API_GUI_CONTROLS_TEXT_BOX_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_control_text_box + { + void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); + void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); + char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); + void (*scroll)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, unsigned int scroll); + void (*set_auto_scrolling)( + KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int delay, int time, int repeat); + } AddonToKodiFuncTable_kodi_gui_control_text_box; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_CONTROLS_TEXT_BOX_H */ -- cgit v1.2.3