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/CMakeLists.txt | 8 + .../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 + .../include/kodi/c-api/gui/definitions.h | 106 +++ .../include/kodi/c-api/gui/dialogs/CMakeLists.txt | 14 + .../include/kodi/c-api/gui/dialogs/context_menu.h | 33 + .../kodi/c-api/gui/dialogs/extended_progress.h | 43 ++ .../include/kodi/c-api/gui/dialogs/filebrowser.h | 77 +++ .../include/kodi/c-api/gui/dialogs/keyboard.h | 74 ++ .../include/kodi/c-api/gui/dialogs/numeric.h | 54 ++ .../include/kodi/c-api/gui/dialogs/ok.h | 37 + .../include/kodi/c-api/gui/dialogs/progress.h | 45 ++ .../include/kodi/c-api/gui/dialogs/select.h | 42 ++ .../include/kodi/c-api/gui/dialogs/text_viewer.h | 30 + .../include/kodi/c-api/gui/dialogs/yes_no.h | 50 ++ .../kodi-dev-kit/include/kodi/c-api/gui/general.h | 37 + .../include/kodi/c-api/gui/input/CMakeLists.txt | 5 + .../include/kodi/c-api/gui/input/action_ids.h | 763 +++++++++++++++++++++ .../include/kodi/c-api/gui/list_item.h | 54 ++ .../kodi-dev-kit/include/kodi/c-api/gui/window.h | 183 +++++ 31 files changed, 2183 insertions(+) create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt 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 create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui') diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt new file mode 100644 index 0000000..53c4e60 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/CMakeLists.txt @@ -0,0 +1,8 @@ +set(HEADERS definitions.h + general.h + list_item.h + window.h) + +if(NOT ENABLE_STATIC_LIBS) + core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui) +endif() 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 */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h new file mode 100644 index 0000000..ec60bc2 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2005-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 + +#ifndef C_API_GUI_DEFINITIONS_H +#define C_API_GUI_DEFINITIONS_H + +#include "../addon_base.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef void* KODI_GUI_HANDLE; + typedef void* KODI_GUI_CLIENT_HANDLE; + typedef void* KODI_GUI_CONTROL_HANDLE; + typedef void* KODI_GUI_LISTITEM_HANDLE; + typedef void* KODI_GUI_WINDOW_HANDLE; + + struct AddonToKodiFuncTable_kodi_gui_general; + struct AddonToKodiFuncTable_kodi_gui_control_button; + struct AddonToKodiFuncTable_kodi_gui_control_edit; + struct AddonToKodiFuncTable_kodi_gui_control_fade_label; + struct AddonToKodiFuncTable_kodi_gui_control_label; + struct AddonToKodiFuncTable_kodi_gui_control_image; + struct AddonToKodiFuncTable_kodi_gui_control_progress; + struct AddonToKodiFuncTable_kodi_gui_control_radio_button; + struct AddonToKodiFuncTable_kodi_gui_control_rendering; + struct AddonToKodiFuncTable_kodi_gui_control_settings_slider; + struct AddonToKodiFuncTable_kodi_gui_control_slider; + struct AddonToKodiFuncTable_kodi_gui_control_spin; + struct AddonToKodiFuncTable_kodi_gui_control_text_box; + struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu; + struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress; + struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser; + struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard; + struct AddonToKodiFuncTable_kodi_gui_dialogNumeric; + struct AddonToKodiFuncTable_kodi_gui_dialogOK; + struct AddonToKodiFuncTable_kodi_gui_dialogProgress; + struct AddonToKodiFuncTable_kodi_gui_dialogSelect; + struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer; + struct AddonToKodiFuncTable_kodi_gui_dialogYesNo; + struct AddonToKodiFuncTable_kodi_gui_listItem; + struct AddonToKodiFuncTable_kodi_gui_window; + + typedef struct AddonToKodiFuncTable_kodi_gui + { + struct AddonToKodiFuncTable_kodi_gui_general* general; + struct AddonToKodiFuncTable_kodi_gui_control_button* control_button; + struct AddonToKodiFuncTable_kodi_gui_control_edit* control_edit; + struct AddonToKodiFuncTable_kodi_gui_control_fade_label* control_fade_label; + struct AddonToKodiFuncTable_kodi_gui_control_label* control_label; + struct AddonToKodiFuncTable_kodi_gui_control_image* control_image; + struct AddonToKodiFuncTable_kodi_gui_control_progress* control_progress; + struct AddonToKodiFuncTable_kodi_gui_control_radio_button* control_radio_button; + struct AddonToKodiFuncTable_kodi_gui_control_rendering* control_rendering; + struct AddonToKodiFuncTable_kodi_gui_control_settings_slider* control_settings_slider; + struct AddonToKodiFuncTable_kodi_gui_control_slider* control_slider; + struct AddonToKodiFuncTable_kodi_gui_control_spin* control_spin; + struct AddonToKodiFuncTable_kodi_gui_control_text_box* control_text_box; + KODI_HANDLE control_dummy1; + KODI_HANDLE control_dummy2; + KODI_HANDLE control_dummy3; + KODI_HANDLE control_dummy4; + KODI_HANDLE control_dummy5; + KODI_HANDLE control_dummy6; + KODI_HANDLE control_dummy7; + KODI_HANDLE control_dummy8; + KODI_HANDLE control_dummy9; + KODI_HANDLE control_dummy10; /* This and above used to add new controls */ + struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu* dialogContextMenu; + struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress* dialogExtendedProgress; + struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser* dialogFileBrowser; + struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard* dialogKeyboard; + struct AddonToKodiFuncTable_kodi_gui_dialogNumeric* dialogNumeric; + struct AddonToKodiFuncTable_kodi_gui_dialogOK* dialogOK; + struct AddonToKodiFuncTable_kodi_gui_dialogProgress* dialogProgress; + struct AddonToKodiFuncTable_kodi_gui_dialogSelect* dialogSelect; + struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer* dialogTextViewer; + struct AddonToKodiFuncTable_kodi_gui_dialogYesNo* dialogYesNo; + KODI_HANDLE dialog_dummy1; + KODI_HANDLE dialog_dummy2; + KODI_HANDLE dialog_dummy3; + KODI_HANDLE dialog_dummy4; + KODI_HANDLE dialog_dummy5; + KODI_HANDLE dialog_dummy6; + KODI_HANDLE dialog_dummy7; + KODI_HANDLE dialog_dummy8; + KODI_HANDLE dialog_dummy9; + KODI_HANDLE dialog_dummy10; /* This and above used to add new dialogs */ + struct AddonToKodiFuncTable_kodi_gui_listItem* listItem; + struct AddonToKodiFuncTable_kodi_gui_window* window; + } AddonToKodiFuncTable_kodi_gui; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DEFINITIONS_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt new file mode 100644 index 0000000..bc35e91 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/CMakeLists.txt @@ -0,0 +1,14 @@ +set(HEADERS context_menu.h + extended_progress.h + filebrowser.h + keyboard.h + numeric.h + ok.h + progress.h + select.h + text_viewer.h + yes_no.h) + +if(NOT ENABLE_STATIC_LIBS) + core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_dialogs) +endif() diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h new file mode 100644 index 0000000..8bb5370 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h @@ -0,0 +1,33 @@ +/* + * 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_DIALOGS_CONTEXT_MENU_H +#define C_API_GUI_DIALOGS_CONTEXT_MENU_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu + { + int (*open)(KODI_HANDLE kodiBase, + const char* heading, + const char* entries[], + unsigned int size); + } AddonToKodiFuncTable_kodi_gui_dialogContextMenu; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_CONTEXT_MENU_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h new file mode 100644 index 0000000..e53588f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h @@ -0,0 +1,43 @@ +/* + * 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_DIALOGS_EXTENDED_PROGRESS_H +#define C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress + { + KODI_GUI_HANDLE (*new_dialog)(KODI_HANDLE kodiBase, const char* title); + void (*delete_dialog)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + char* (*get_title)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*set_title)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* title); + char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* text); + bool (*is_finished)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*mark_finished)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + float (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, float percentage); + void (*set_progress)(KODI_HANDLE kodiBase, + KODI_GUI_HANDLE handle, + int currentItem, + int itemCount); + } AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h new file mode 100644 index 0000000..7ae4fac --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h @@ -0,0 +1,77 @@ +/* + * 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_DIALOGS_FILEBROWSER_H +#define C_API_GUI_DIALOGS_FILEBROWSER_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser + { + bool (*show_and_get_directory)(KODI_HANDLE kodiBase, + const char* shares, + const char* heading, + const char* path_in, + char** path_out, + bool writeOnly); + bool (*show_and_get_file)(KODI_HANDLE kodiBase, + const char* shares, + const char* mask, + const char* heading, + const char* path_in, + char** path_out, + bool use_thumbs, + bool use_file_directories); + bool (*show_and_get_file_from_dir)(KODI_HANDLE kodiBase, + const char* directory, + const char* mask, + const char* heading, + const char* path_in, + char** path_out, + bool use_thumbs, + bool use_file_directories, + bool singleList); + bool (*show_and_get_file_list)(KODI_HANDLE kodiBase, + const char* shares, + const char* mask, + const char* heading, + char*** file_list, + unsigned int* entries, + bool use_thumbs, + bool use_file_directories); + bool (*show_and_get_source)(KODI_HANDLE kodiBase, + const char* path_in, + char** path_out, + bool allow_network_shares, + const char* additional_share, + const char* type); + bool (*show_and_get_image)(KODI_HANDLE kodiBase, + const char* shares, + const char* heading, + const char* path_in, + char** path_out); + bool (*show_and_get_image_list)(KODI_HANDLE kodiBase, + const char* shares, + const char* heading, + char*** file_list, + unsigned int* entries); + void (*clear_file_list)(KODI_HANDLE kodiBase, char*** file_list, unsigned int entries); + } AddonToKodiFuncTable_kodi_gui_dialogFileBrowser; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_FILEBROWSER_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h new file mode 100644 index 0000000..fc3c34c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h @@ -0,0 +1,74 @@ +/* + * 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_DIALOGS_KEYBOARD_H +#define C_API_GUI_DIALOGS_KEYBOARD_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard + { + bool (*show_and_get_input_with_head)(KODI_HANDLE kodiBase, + const char* text_in, + char** text_out, + const char* heading, + bool allow_empty_result, + bool hiddenInput, + unsigned int auto_close_ms); + bool (*show_and_get_input)(KODI_HANDLE kodiBase, + const char* text_in, + char** text_out, + bool allow_empty_result, + unsigned int auto_close_ms); + bool (*show_and_get_new_password_with_head)(KODI_HANDLE kodiBase, + const char* password_in, + char** password_out, + const char* heading, + bool allow_empty_result, + unsigned int auto_close_ms); + bool (*show_and_get_new_password)(KODI_HANDLE kodiBase, + const char* password_in, + char** password_out, + unsigned int auto_close_ms); + bool (*show_and_verify_new_password_with_head)(KODI_HANDLE kodiBase, + char** password_out, + const char* heading, + bool allow_empty_result, + unsigned int auto_close_ms); + bool (*show_and_verify_new_password)(KODI_HANDLE kodiBase, + char** password_out, + unsigned int auto_close_ms); + int (*show_and_verify_password)(KODI_HANDLE kodiBase, + const char* password_in, + char** password_out, + const char* heading, + int retries, + unsigned int auto_close_ms); + bool (*show_and_get_filter)(KODI_HANDLE kodiBase, + const char* text_in, + char** text_out, + bool searching, + unsigned int auto_close_ms); + bool (*send_text_to_active_keyboard)(KODI_HANDLE kodiBase, + const char* text, + bool close_keyboard); + bool (*is_keyboard_activated)(KODI_HANDLE kodiBase); + } AddonToKodiFuncTable_kodi_gui_dialogKeyboard; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_KEYBOARD_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h new file mode 100644 index 0000000..df23cd7 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h @@ -0,0 +1,54 @@ +/* + * 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_DIALOGS_NUMERIC_H +#define C_API_GUI_DIALOGS_NUMERIC_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric + { + bool (*show_and_verify_new_password)(KODI_HANDLE kodiBase, char** password); + int (*show_and_verify_password)(KODI_HANDLE kodiBase, + const char* password, + const char* heading, + int retries); + bool (*show_and_verify_input)(KODI_HANDLE kodiBase, + const char* verify_in, + char** verify_out, + const char* heading, + bool verify_input); + bool (*show_and_get_time)(KODI_HANDLE kodiBase, struct tm* time, const char* heading); + bool (*show_and_get_date)(KODI_HANDLE kodiBase, struct tm* date, const char* heading); + bool (*show_and_get_ip_address)(KODI_HANDLE kodiBase, + const char* ip_address_in, + char** ip_address_out, + const char* heading); + bool (*show_and_get_number)(KODI_HANDLE kodiBase, + const char* input_in, + char** input_out, + const char* heading, + unsigned int auto_close_ms); + bool (*show_and_get_seconds)(KODI_HANDLE kodiBase, + const char* time_in, + char** time_out, + const char* heading); + } AddonToKodiFuncTable_kodi_gui_dialogNumeric; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_NUMERIC_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h new file mode 100644 index 0000000..9f37051 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.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_DIALOGS_OK_H +#define C_API_GUI_DIALOGS_OK_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogOK + { + void (*show_and_get_input_single_text)(KODI_HANDLE kodiBase, + const char* heading, + const char* text); + void (*show_and_get_input_line_text)(KODI_HANDLE kodiBase, + const char* heading, + const char* line0, + const char* line1, + const char* line2); + } AddonToKodiFuncTable_kodi_gui_dialogOK; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_OK_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h new file mode 100644 index 0000000..f1c8972 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h @@ -0,0 +1,45 @@ +/* + * 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_DIALOGS_PROGRESS_H +#define C_API_GUI_DIALOGS_PROGRESS_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogProgress + { + KODI_GUI_HANDLE (*new_dialog)(KODI_HANDLE kodiBase); + void (*delete_dialog)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*open)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*set_heading)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, const char* heading); + void (*set_line)(KODI_HANDLE kodiBase, + KODI_GUI_HANDLE handle, + unsigned int lineNo, + const char* line); + void (*set_can_cancel)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, bool canCancel); + bool (*is_canceled)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*set_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int percentage); + int (*get_percentage)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + void (*show_progress_bar)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, bool pnOff); + void (*set_progress_max)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int max); + void (*set_progress_advance)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle, int nSteps); + bool (*abort)(KODI_HANDLE kodiBase, KODI_GUI_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_dialogProgress; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_PROGRESS_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h new file mode 100644 index 0000000..41ab82f --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h @@ -0,0 +1,42 @@ +/* + * 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_DIALOGS_SELECT_H +#define C_API_GUI_DIALOGS_SELECT_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogSelect + { + int (*open)(KODI_HANDLE kodiBase, + const char* heading, + const char* entries[], + unsigned int size, + int selected, + unsigned int autoclose); + bool (*open_multi_select)(KODI_HANDLE kodiBase, + const char* heading, + const char* entryIDs[], + const char* entryNames[], + bool entriesSelected[], + unsigned int size, + unsigned int autoclose); + } AddonToKodiFuncTable_kodi_gui_dialogSelect; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_SELECT_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h new file mode 100644 index 0000000..eb38b0b --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h @@ -0,0 +1,30 @@ +/* + * 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_DIALOGS_TEXT_VIEWER_H +#define C_API_GUI_DIALOGS_TEXT_VIEWER_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer + { + void (*open)(KODI_HANDLE kodiBase, const char* heading, const char* text); + } AddonToKodiFuncTable_kodi_gui_dialogTextViewer; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_TEXT_VIEWER_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h new file mode 100644 index 0000000..01ed806 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h @@ -0,0 +1,50 @@ +/* + * 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_DIALOGS_YES_NO_H +#define C_API_GUI_DIALOGS_YES_NO_H + +#include "../definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_dialogYesNo + { + bool (*show_and_get_input_single_text)(KODI_HANDLE kodiBase, + const char* heading, + const char* text, + bool* canceled, + const char* noLabel, + const char* yesLabel); + bool (*show_and_get_input_line_text)(KODI_HANDLE kodiBase, + const char* heading, + const char* line0, + const char* line1, + const char* line2, + const char* noLabel, + const char* yesLabel); + bool (*show_and_get_input_line_button_text)(KODI_HANDLE kodiBase, + const char* heading, + const char* line0, + const char* line1, + const char* line2, + bool* canceled, + const char* noLabel, + const char* yesLabel); + } AddonToKodiFuncTable_kodi_gui_dialogYesNo; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_DIALOGS_YES_NO_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h new file mode 100644 index 0000000..d0d256c --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.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_GENERAL_H +#define C_API_GUI_GENERAL_H + +#include "definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_general + { + void (*lock)(); + void (*unlock)(); + int (*get_screen_height)(KODI_HANDLE kodiBase); + int (*get_screen_width)(KODI_HANDLE kodiBase); + int (*get_video_resolution)(KODI_HANDLE kodiBase); + int (*get_current_window_dialog_id)(KODI_HANDLE kodiBase); + int (*get_current_window_id)(KODI_HANDLE kodiBase); + ADDON_HARDWARE_CONTEXT (*get_hw_context)(KODI_HANDLE kodiBase); + } AddonToKodiFuncTable_kodi_gui_general; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_GENERAL_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt new file mode 100644 index 0000000..c0bbd11 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/CMakeLists.txt @@ -0,0 +1,5 @@ +set(HEADERS action_ids.h) + +if(NOT ENABLE_STATIC_LIBS) + core_add_library(addons_kodi-dev-kit_include_kodi_c-api_gui_input) +endif() diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h new file mode 100644 index 0000000..274f3d9 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h @@ -0,0 +1,763 @@ +/* + * 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_ACTION_IDS_H +#define C_API_GUI_ACTION_IDS_H + +/// @defgroup cpp_kodi_gui_Defs_action_ids enum ADDON_ACTION +/// @ingroup cpp_kodi_gui_Defs +/// @brief **Action Id's**\n +/// Actions that we have defined. +/// +///@{ +enum ADDON_ACTION +{ + /// @ingroup cpp_kodi_gui_key_action_ids + ///@{ + + /// @brief `0 `: None. + ADDON_ACTION_NONE = 0, + + /// @brief `1 `: Move left. + ADDON_ACTION_MOVE_LEFT = 1, + + /// @brief `2 `: Move right. + ADDON_ACTION_MOVE_RIGHT = 2, + + /// @brief `3 `: Move up. + ADDON_ACTION_MOVE_UP = 3, + + /// @brief `4 `: Move down. + ADDON_ACTION_MOVE_DOWN = 4, + + /// @brief `5 `: Page up. + ADDON_ACTION_PAGE_UP = 5, + + /// @brief `6 `: Page down. + ADDON_ACTION_PAGE_DOWN = 6, + + /// @brief `7 `: Select item. + ADDON_ACTION_SELECT_ITEM = 7, + + /// @brief `8 `: Highlight item. + ADDON_ACTION_HIGHLIGHT_ITEM = 8, + + /// @brief `9 `: Parent directory. + ADDON_ACTION_PARENT_DIR = 9, + + /// @brief `10 `: Previous menu. + ADDON_ACTION_PREVIOUS_MENU = 10, + + /// @brief `11 `: Show info. + ADDON_ACTION_SHOW_INFO = 11, + + /// @brief `12 `: Pause. + ADDON_ACTION_PAUSE = 12, + + /// @brief `13 `: Stop. + ADDON_ACTION_STOP = 13, + + /// @brief `14 `: Next item. + ADDON_ACTION_NEXT_ITEM = 14, + + /// @brief `15 `: Previous item. + ADDON_ACTION_PREV_ITEM = 15, + + /// @brief `16 `: Can be used to specify specific action in a window, Playback control is handled in ADDON_ACTION_PLAYER_* + ADDON_ACTION_FORWARD = 16, + + /// @brief `17 `: Can be used to specify specific action in a window, Playback control is handled in ADDON_ACTION_PLAYER_* + ADDON_ACTION_REWIND = 17, + + /// @brief `18 `: Toggle between GUI and movie or GUI and visualisation. + ADDON_ACTION_SHOW_GUI = 18, + + /// @brief `19 `: Toggle quick-access zoom modes. Can b used in videoFullScreen.zml window id=2005 + ADDON_ACTION_ASPECT_RATIO = 19, + + /// @brief `20 `: Seek +1% in the movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_STEP_FORWARD = 20, + + /// @brief `21 `: Seek -1% in the movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_STEP_BACK = 21, + + /// @brief `22 `: Seek +10% in the movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_BIG_STEP_FORWARD = 22, + + /// @brief `23 `: Seek -10% in the movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_BIG_STEP_BACK = 23, + + /// @brief `24 `: Show/hide OSD. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SHOW_OSD = 24, + + /// @brief `25 `: Turn subtitles on/off. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SHOW_SUBTITLES = 25, + + /// @brief `26 `: Switch to next subtitle of movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_NEXT_SUBTITLE = 26, + + /// @brief `27 `: Show debug info for VideoPlayer + ADDON_ACTION_PLAYER_DEBUG = 27, + + /// @brief `28 `: Show next picture of slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_NEXT_PICTURE = 28, + + /// @brief `29 `: Show previous picture of slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_PREV_PICTURE = 29, + + /// @brief `30 `: Zoom in picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_OUT = 30, + + /// @brief `31 `: Zoom out picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_IN = 31, + + /// @brief `32 `: Used to toggle between source view and destination view. Can be used in myfiles.xml window id=3 + ADDON_ACTION_TOGGLE_SOURCE_DEST = 32, + + /// @brief `33 `: Used to toggle between current view and playlist view. Can b used in all mymusic xml files + ADDON_ACTION_SHOW_PLAYLIST = 33, + + /// @brief `34 `: Used to queue a item to the playlist. Can b used in all mymusic xml files + ADDON_ACTION_QUEUE_ITEM = 34, + + /// @brief `35 `: Not used anymore + ADDON_ACTION_REMOVE_ITEM = 35, + + /// @brief `36 `: Not used anymore + ADDON_ACTION_SHOW_FULLSCREEN = 36, + + /// @brief `37 `: Zoom 1x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_NORMAL = 37, + + /// @brief `38 `: Zoom 2x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_1 = 38, + + /// @brief `39 `: Zoom 3x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_2 = 39, + + /// @brief `40 `: Zoom 4x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_3 = 40, + + /// @brief `41 `: Zoom 5x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_4 = 41, + + /// @brief `42 `: Zoom 6x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_5 = 42, + + /// @brief `43 `: Zoom 7x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_6 = 43, + + /// @brief `44 `: Zoom 8x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_7 = 44, + + /// @brief `45 `: Zoom 9x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_8 = 45, + + /// @brief `46 `: Zoom 10x picture during slideshow. Can b used in slideshow.xml window id=2007 + ADDON_ACTION_ZOOM_LEVEL_9 = 46, + + /// @brief `47 `: Select next arrow. Can b used in: settingsScreenCalibration.xml windowid=11 + ADDON_ACTION_CALIBRATE_SWAP_ARROWS = 47, + + /// @brief `48 `: Reset calibration to defaults. Can b used in: `settingsScreenCalibration.xml` windowid=11/settingsUICalibration.xml windowid=10 + ADDON_ACTION_CALIBRATE_RESET = 48, + + /// @brief `49 `: Analog thumbstick move. Can b used in: `slideshow.xml` + /// windowid=2007/settingsScreenCalibration.xml windowid=11/settingsUICalibration.xml + /// windowid=10 + /// @note see also ADDON_ACTION_ANALOG_MOVE_X_LEFT, ADDON_ACTION_ANALOG_MOVE_X_RIGHT, + /// ADDON_ACTION_ANALOG_MOVE_Y_UP, ADDON_ACTION_ANALOG_MOVE_Y_DOWN + ADDON_ACTION_ANALOG_MOVE = 49, + + /// @brief `50 `: Rotate current picture clockwise during slideshow. Can be used in slideshow.xml window id=2007 + ADDON_ACTION_ROTATE_PICTURE_CW = 50, + + /// @brief `51 `: Rotate current picture counterclockwise during slideshow. Can be used in slideshow.xml window id=2007 + ADDON_ACTION_ROTATE_PICTURE_CCW = 51, + + /// @brief `52 `: Decrease subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SUBTITLE_DELAY_MIN = 52, + + /// @brief `53 `: Increase subtitle/movie Delay. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SUBTITLE_DELAY_PLUS = 53, + + /// @brief `54 `: Increase avsync delay. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_AUDIO_DELAY_MIN = 54, + + /// @brief `55 `: Decrease avsync delay. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_AUDIO_DELAY_PLUS = 55, + + /// @brief `56 `: Select next language in movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_AUDIO_NEXT_LANGUAGE = 56, + + /// @brief `57 `: Switch 2 next resolution. Can b used during screen calibration settingsScreenCalibration.xml windowid=11 + ADDON_ACTION_CHANGE_RESOLUTION = 57, + + /// @brief `58 `: remote keys 0-9. are used by multiple windows + /// for example in videoFullScreen.xml window id=2005 you can + /// enter time (mmss) to jump to particular point in the movie + /// with spincontrols you can enter 3digit number to quickly set + /// spincontrol to desired value + /// + /// Remote key 0 + ADDON_ACTION_REMOTE_0 = 58, + + /// @brief `59 `: Remote key 1 + ADDON_ACTION_REMOTE_1 = 59, + + /// @brief `60 `: Remote key 2 + ADDON_ACTION_REMOTE_2 = 60, + + /// @brief `61 `: Remote key 3 + ADDON_ACTION_REMOTE_3 = 61, + + /// @brief `62 `: Remote key 4 + ADDON_ACTION_REMOTE_4 = 62, + + /// @brief `63 `: Remote key 5 + ADDON_ACTION_REMOTE_5 = 63, + + /// @brief `64 `: Remote key 6 + ADDON_ACTION_REMOTE_6 = 64, + + /// @brief `65 `: Remote key 7 + ADDON_ACTION_REMOTE_7 = 65, + + /// @brief `66 `: Remote key 8 + ADDON_ACTION_REMOTE_8 = 66, + + /// @brief `67 `: Remote key 9 + ADDON_ACTION_REMOTE_9 = 67, + + /// @brief `69 `: Show player process info (video decoder, pixel format, pvr signal strength and the like + ADDON_ACTION_PLAYER_PROCESS_INFO = 69, + + /// @brief `70 `: Program select. + ADDON_ACTION_PLAYER_PROGRAM_SELECT = 70, + + /// @brief `71 `: Resolution select. + ADDON_ACTION_PLAYER_RESOLUTION_SELECT = 71, + + /// @brief `76 `: Jumps a few seconds back during playback of movie. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SMALL_STEP_BACK = 76, + + /// @brief `77 `: FF in current file played. global action, can be used anywhere + ADDON_ACTION_PLAYER_FORWARD = 77, + + /// @brief `78 `: RW in current file played. global action, can be used anywhere + ADDON_ACTION_PLAYER_REWIND = 78, + + /// @brief `79 `: Play current song. Unpauses song and sets playspeed to 1x. global action, can be used anywhere + ADDON_ACTION_PLAYER_PLAY = 79, + + /// @brief `80 `: Delete current selected item. Can be used in myfiles.xml window id=3 and in myvideoTitle.xml window id=25 + ADDON_ACTION_DELETE_ITEM = 80, + + /// @brief `81 `: Copy current selected item. Can be used in myfiles.xml window id=3 + ADDON_ACTION_COPY_ITEM = 81, + + /// @brief `82 `: move current selected item. Can be used in myfiles.xml window id=3 + ADDON_ACTION_MOVE_ITEM = 82, + + /// @brief `85 `: Take a screenshot. + ADDON_ACTION_TAKE_SCREENSHOT = 85, + + /// @brief `87 `: Rename item. + ADDON_ACTION_RENAME_ITEM = 87, + + /// @brief `87 `: Volume up. + ADDON_ACTION_VOLUME_UP = 88, + + /// @brief `87 `: Volume down. + ADDON_ACTION_VOLUME_DOWN = 89, + + /// @brief `90 `: Volume amplication. + ADDON_ACTION_VOLAMP = 90, + + /// @brief `90 `: Mute. + ADDON_ACTION_MUTE = 91, + + /// @brief `90 `: Nav back. + ADDON_ACTION_NAV_BACK = 92, + + /// @brief `90 `: Volume amp up, + ADDON_ACTION_VOLAMP_UP = 93, + + /// @brief `94 `: Volume amp down. + ADDON_ACTION_VOLAMP_DOWN = 94, + + /// @brief `95 `: Creates an episode bookmark on the currently playing video file containing more than one + /// episode + ADDON_ACTION_CREATE_EPISODE_BOOKMARK = 95, + + /// @brief `96 `: Creates a bookmark of the currently playing video file + ADDON_ACTION_CREATE_BOOKMARK = 96, + + /// @brief `97 `: Goto the next chapter, if not available perform a big step forward + ADDON_ACTION_CHAPTER_OR_BIG_STEP_FORWARD = 97, + + /// @brief `98 `: Goto the previous chapter, if not available perform a big step back + ADDON_ACTION_CHAPTER_OR_BIG_STEP_BACK = 98, + + /// @brief `99 `: Switch to next subtitle of movie, but will not enable/disable the subtitles. Can be used + /// in videoFullScreen.xml window id=2005 + ADDON_ACTION_CYCLE_SUBTITLE = 99, + + /// @brief `100`: Mouse action values start. + /// + /// Ends with @ref ADDON_ACTION_MOUSE_END. + ADDON_ACTION_MOUSE_START = 100, + + /// @brief `100`: Mouse left click. + ADDON_ACTION_MOUSE_LEFT_CLICK = 100, + + /// @brief `101`: Mouse right click. + ADDON_ACTION_MOUSE_RIGHT_CLICK = 101, + + /// @brief `102`: Mouse middle click. + ADDON_ACTION_MOUSE_MIDDLE_CLICK = 102, + + /// @brief `103`: Mouse double click. + ADDON_ACTION_MOUSE_DOUBLE_CLICK = 103, + + /// @brief `104`: Mouse wheel up. + ADDON_ACTION_MOUSE_WHEEL_UP = 104, + + /// @brief `105`: Mouse wheel down. + ADDON_ACTION_MOUSE_WHEEL_DOWN = 105, + + /// @brief `106`: Mouse drag. + ADDON_ACTION_MOUSE_DRAG = 106, + + /// @brief `107`: Mouse move. + ADDON_ACTION_MOUSE_MOVE = 107, + + /// @brief `108`: Mouse long click. + ADDON_ACTION_MOUSE_LONG_CLICK = 108, + + /// @brief `109`: Mouse drag end. + ADDON_ACTION_MOUSE_DRAG_END = 109, + + /// @brief `109`: Mouse action values end. + /// + /// Starts with @ref ADDON_ACTION_MOUSE_START. + ADDON_ACTION_MOUSE_END = 109, + + /// @brief `110`: Backspace. + ADDON_ACTION_BACKSPACE = 110, + + /// @brief `111`: Scroll up. + ADDON_ACTION_SCROLL_UP = 111, + + /// @brief `112`: Scroll down. + ADDON_ACTION_SCROLL_DOWN = 112, + + /// @brief `113`: Analog forward. + ADDON_ACTION_ANALOG_FORWARD = 113, + + /// @brief `114`: Analog rewind. + ADDON_ACTION_ANALOG_REWIND = 114, + + /// @brief `115`: move item up in playlist + ADDON_ACTION_MOVE_ITEM_UP = 115, + + /// @brief `116`: move item down in playlist + ADDON_ACTION_MOVE_ITEM_DOWN = 116, + + /// @brief `117`: pops up the context menu + ADDON_ACTION_CONTEXT_MENU = 117, + + /// @brief `118`: stuff for virtual keyboard shortcuts + ADDON_ACTION_SHIFT = 118, + + /// @brief `119`: stuff for virtual keyboard shortcuts + ADDON_ACTION_SYMBOLS = 119, + + /// @brief `120`: stuff for virtual keyboard shortcuts + ADDON_ACTION_CURSOR_LEFT = 120, + + /// @brief `121`: stuff for virtual keyboard shortcuts + ADDON_ACTION_CURSOR_RIGHT = 121, + + /// @brief `122`: Build in function + ADDON_ACTION_BUILT_IN_FUNCTION = 122, + + /// @brief `114`: Displays current time, can be used in videoFullScreen.xml window id=2005 + ADDON_ACTION_SHOW_OSD_TIME = 123, + + /// @brief `124`: Seeks forward, and displays the seek bar. + ADDON_ACTION_ANALOG_SEEK_FORWARD = 124, + + /// @brief `125`: Seeks backward, and displays the seek bar. + ADDON_ACTION_ANALOG_SEEK_BACK = 125, + + /// @brief `126`: Visualization preset show. + ADDON_ACTION_VIS_PRESET_SHOW = 126, + + /// @brief `128`: Visualization preset next. + ADDON_ACTION_VIS_PRESET_NEXT = 128, + + /// @brief `129`: Visualization preset previous. + ADDON_ACTION_VIS_PRESET_PREV = 129, + + /// @brief `130`: Visualization preset lock. + ADDON_ACTION_VIS_PRESET_LOCK = 130, + + /// @brief `131`: Visualization preset random. + ADDON_ACTION_VIS_PRESET_RANDOM = 131, + + /// @brief `132`: Visualization preset plus. + ADDON_ACTION_VIS_RATE_PRESET_PLUS = 132, + + /// @brief `133`: Visualization preset minus. + ADDON_ACTION_VIS_RATE_PRESET_MINUS = 133, + + /// @brief `134`: Show Videomenu + ADDON_ACTION_SHOW_VIDEOMENU = 134, + + /// @brief `135`: Enter. + ADDON_ACTION_ENTER = 135, + + /// @brief `136`: Increase rating. + ADDON_ACTION_INCREASE_RATING = 136, + + /// @brief `137`: Decrease rating. + ADDON_ACTION_DECREASE_RATING = 137, + + /// @brief `138`: Switch to next scene/cutpoint in movie. + ADDON_ACTION_NEXT_SCENE = 138, + + /// @brief `139`: Switch to previous scene/cutpoint in movie. + ADDON_ACTION_PREV_SCENE = 139, + + /// @brief `140`: Jump through a list or container to next letter. + ADDON_ACTION_NEXT_LETTER = 140, + + /// @brief `141`: Jump through a list or container to previous letter. + ADDON_ACTION_PREV_LETTER = 141, + + /// @brief `142`: Jump direct to a particular letter using SMS-style input + /// + /// Jump to SMS2. + ADDON_ACTION_JUMP_SMS2 = 142, + + /// @brief `143`: Jump to SMS3. + ADDON_ACTION_JUMP_SMS3 = 143, + + /// @brief `144`: Jump to SMS4. + ADDON_ACTION_JUMP_SMS4 = 144, + + /// @brief `145`: Jump to SMS5. + ADDON_ACTION_JUMP_SMS5 = 145, + + /// @brief `146`: Jump to SMS6. + ADDON_ACTION_JUMP_SMS6 = 146, + + /// @brief `147`: Jump to SMS7. + ADDON_ACTION_JUMP_SMS7 = 147, + + /// @brief `148`: Jump to SMS8. + ADDON_ACTION_JUMP_SMS8 = 148, + + /// @brief `149`: Jump to SMS9. + ADDON_ACTION_JUMP_SMS9 = 149, + + /// @brief `150`: Filter clear. + ADDON_ACTION_FILTER_CLEAR = 150, + + /// @brief `151`: Filter SMS2. + ADDON_ACTION_FILTER_SMS2 = 151, + + /// @brief `152`: Filter SMS3. + ADDON_ACTION_FILTER_SMS3 = 152, + + /// @brief `153`: Filter SMS4. + ADDON_ACTION_FILTER_SMS4 = 153, + + /// @brief `154`: Filter SMS5. + ADDON_ACTION_FILTER_SMS5 = 154, + + /// @brief `155`: Filter SMS6. + ADDON_ACTION_FILTER_SMS6 = 155, + + /// @brief `156`: Filter SMS7. + ADDON_ACTION_FILTER_SMS7 = 156, + + /// @brief `157`: Filter SMS8. + ADDON_ACTION_FILTER_SMS8 = 157, + + /// @brief `158`: Filter SMS9. + ADDON_ACTION_FILTER_SMS9 = 158, + + /// @brief `159`: First page. + ADDON_ACTION_FIRST_PAGE = 159, + + /// @brief `160`: Last page. + ADDON_ACTION_LAST_PAGE = 160, + + /// @brief `161`: Audio delay. + ADDON_ACTION_AUDIO_DELAY = 161, + + /// @brief `162`: Subtitle delay. + ADDON_ACTION_SUBTITLE_DELAY = 162, + + /// @brief `163`: Menu. + ADDON_ACTION_MENU = 163, + + /// @brief `164`: Set rating. + ADDON_ACTION_SET_RATING = 164, + + /// @brief `170`: Record. + ADDON_ACTION_RECORD = 170, + + /// @brief `180`: Paste. + ADDON_ACTION_PASTE = 180, + + /// @brief `181`: Next control. + ADDON_ACTION_NEXT_CONTROL = 181, + + /// @brief `182`: Previous control. + ADDON_ACTION_PREV_CONTROL = 182, + + /// @brief `183`: Channel switch. + ADDON_ACTION_CHANNEL_SWITCH = 183, + + /// @brief `184`: Channel up. + ADDON_ACTION_CHANNEL_UP = 184, + + /// @brief `185`: Channel down. + ADDON_ACTION_CHANNEL_DOWN = 185, + + /// @brief `186`: Next channel group. + ADDON_ACTION_NEXT_CHANNELGROUP = 186, + + /// @brief `187`: Previous channel group. + ADDON_ACTION_PREVIOUS_CHANNELGROUP = 187, + + /// @brief `188`: PVR play. + ADDON_ACTION_PVR_PLAY = 188, + + /// @brief `189`: PVR play TV. + ADDON_ACTION_PVR_PLAY_TV = 189, + + /// @brief `190`: PVR play radio. + ADDON_ACTION_PVR_PLAY_RADIO = 190, + + /// @brief `191`: PVR show timer rule. + ADDON_ACTION_PVR_SHOW_TIMER_RULE = 191, + + /// @brief `192`: Channel number sep + ADDON_ACTION_CHANNEL_NUMBER_SEP = 192, + + /// @brief `193`: PVR announce reminders + ADDON_ACTION_PVR_ANNOUNCE_REMINDERS = 193, + + /// @brief `199`: Switch 2 desktop resolution + ADDON_ACTION_TOGGLE_FULLSCREEN = 199, + + /// @brief `200`: Toggle watched status (videos) + ADDON_ACTION_TOGGLE_WATCHED = 200, + + /// @brief `201`: Scan item + ADDON_ACTION_SCAN_ITEM = 201, + + /// @brief `202`: Switch digital <-> analog + ADDON_ACTION_TOGGLE_DIGITAL_ANALOG = 202, + + /// @brief `203`: Reloads CButtonTranslator's keymaps + ADDON_ACTION_RELOAD_KEYMAPS = 203, + + /// @brief `204`: Start the GUIControlProfiler running + ADDON_ACTION_GUIPROFILE_BEGIN = 204, + + /// @brief `215`: Teletext Color button Red to control TopText + ADDON_ACTION_TELETEXT_RED = 215, + + /// @brief `216`: Teletext Color button Green to control TopText + ADDON_ACTION_TELETEXT_GREEN = 216, + + /// @brief `217`: Teletext Color button Yellow to control TopText + ADDON_ACTION_TELETEXT_YELLOW = 217, + + /// @brief `218`: Teletext Color button Blue to control TopText + ADDON_ACTION_TELETEXT_BLUE = 218, + + /// @brief `219`: Increase par. + ADDON_ACTION_INCREASE_PAR = 219, + + /// @brief `220`: Decrease par. + ADDON_ACTION_DECREASE_PAR = 220, + + /// @brief `227`: Shift up video image in VideoPlayer + ADDON_ACTION_VSHIFT_UP = 227, + + /// @brief `228`: Shift down video image in VideoPlayer + ADDON_ACTION_VSHIFT_DOWN = 228, + + /// @brief `229`: Play/pause. If playing it pauses, if paused it plays. + ADDON_ACTION_PLAYER_PLAYPAUSE = 229, + + /// @brief `230`: Shift up subtitles in VideoPlayer + ADDON_ACTION_SUBTITLE_VSHIFT_UP = 230, + + /// @brief `231`: Shift down subtitles in VideoPlayer + ADDON_ACTION_SUBTITLE_VSHIFT_DOWN = 231, + + /// @brief `232`: Toggle vertical alignment of subtitles + ADDON_ACTION_SUBTITLE_ALIGN = 232, + + /// @brief `233`: Filter. + ADDON_ACTION_FILTER = 233, + + /// @brief `234`: Switch player. + ADDON_ACTION_SWITCH_PLAYER = 234, + + /// @brief `235`: Stereo mode next. + ADDON_ACTION_STEREOMODE_NEXT = 235, + + /// @brief `236`: Stereo mode previous. + ADDON_ACTION_STEREOMODE_PREVIOUS = 236, + + /// @brief `237`: Turns 3d mode on/off. + ADDON_ACTION_STEREOMODE_TOGGLE = 237, + + /// @brief `238`: Stereo mode select. + ADDON_ACTION_STEREOMODE_SELECT = 238, + + /// @brief `239`: Stereo mode to mono. + ADDON_ACTION_STEREOMODE_TOMONO = 239, + + /// @brief `240`: Stereo mode set. + ADDON_ACTION_STEREOMODE_SET = 240, + + /// @brief `241`: Settings reset. + ADDON_ACTION_SETTINGS_RESET = 241, + + /// @brief `242`: Settings level change. + ADDON_ACTION_SETTINGS_LEVEL_CHANGE = 242, + + /// @brief `243`: Show autoclosing OSD. Can b used in videoFullScreen.xml window id=2005 + ADDON_ACTION_TRIGGER_OSD = 243, + + /// @brief `244`: Input text. + ADDON_ACTION_INPUT_TEXT = 244, + + /// @brief `245`: Volume set. + ADDON_ACTION_VOLUME_SET = 245, + + /// @brief `246`: Toggle commercial skip. + ADDON_ACTION_TOGGLE_COMMSKIP = 246, + + /// @brief `247`: Browse for subtitle. Can be used in videofullscreen + ADDON_ACTION_BROWSE_SUBTITLE = 247, + + /// @brief `248`: Send a reset command to the active game + ADDON_ACTION_PLAYER_RESET = 248, + + /// @brief `249`: Toggle font. Used in TextViewer dialog + ADDON_ACTION_TOGGLE_FONT = 249, + + /// @brief `250`: Cycle video streams. Used in videofullscreen. + ADDON_ACTION_VIDEO_NEXT_STREAM = 250, + + /// @brief `251`: Used to queue an item to the next position in the playlist + ADDON_ACTION_QUEUE_ITEM_NEXT = 251, + + /// @brief `247`: Toggle display HDR on/off + ADDON_ACTION_HDR_TOGGLE = 260, + + /// @brief `300`: Voice actions + ADDON_ACTION_VOICE_RECOGNIZE = 300, + + // Number 347 used om front by ADDON_ACTION_BROWSE_SUBTITLE + + /// @brief `401`: Touch actions + ADDON_ACTION_TOUCH_TAP = 401, + + /// @brief `410`: Touch actions + ADDON_ACTION_TOUCH_TAP_TEN = 410, + + /// @brief `411`: Touch actions + ADDON_ACTION_TOUCH_LONGPRESS = 411, + + /// @brief `412`: Touch actions + ADDON_ACTION_TOUCH_LONGPRESS_TEN = 420, + + /// @brief `500`: Gesture notify. + ADDON_ACTION_GESTURE_NOTIFY = 500, + + /// @brief `501`: Gesture begin. + ADDON_ACTION_GESTURE_BEGIN = 501, + + /// @brief `502`: Send action with point and currentPinchScale (fingers together < 1.0 -> fingers apart > 1.0) + ADDON_ACTION_GESTURE_ZOOM = 502, + + /// @brief `503`: Gesture rotate. + ADDON_ACTION_GESTURE_ROTATE = 503, + + /// @brief `504`: Gesture pan. + ADDON_ACTION_GESTURE_PAN = 504, + + /// @brief `505`: Gesture was interrupted in unspecified state + ADDON_ACTION_GESTURE_ABORT = 505, + + /// @brief `511`: Gesture swipe left. + ADDON_ACTION_GESTURE_SWIPE_LEFT = 511, + + /// @brief `520`: Gesture swipe left ten + ADDON_ACTION_GESTURE_SWIPE_LEFT_TEN = 520, + + /// @brief `521`: Gesture swipe right + ADDON_ACTION_GESTURE_SWIPE_RIGHT = 521, + + /// @brief `530`: Gesture swipe right ten + ADDON_ACTION_GESTURE_SWIPE_RIGHT_TEN = 530, + + /// @brief `531`: Gesture swipe up + ADDON_ACTION_GESTURE_SWIPE_UP = 531, + + /// @brief `540`: Gesture swipe up ten + ADDON_ACTION_GESTURE_SWIPE_UP_TEN = 540, + + /// @brief `541`: Gesture swipe down. + ADDON_ACTION_GESTURE_SWIPE_DOWN = 541, + + /// @brief `550`: Gesture swipe down ten. + ADDON_ACTION_GESTURE_SWIPE_DOWN_TEN = 550, + + /// @brief `599`: 5xx is reserved for additional gesture actions + ADDON_ACTION_GESTURE_END = 599, + + // other, non-gesture actions + + /// @brief `601`: Analog thumbstick move, horizontal axis, left; see ADDON_ACTION_ANALOG_MOVE + ADDON_ACTION_ANALOG_MOVE_X_LEFT = 601, + + /// @brief `602`: Analog thumbstick move, horizontal axis, right; see ADDON_ACTION_ANALOG_MOVE + ADDON_ACTION_ANALOG_MOVE_X_RIGHT = 602, + + /// @brief `603`: Analog thumbstick move, vertical axis, up; see ADDON_ACTION_ANALOG_MOVE + ADDON_ACTION_ANALOG_MOVE_Y_UP = 603, + + /// @brief `604`: Analog thumbstick move, vertical axis, down; see ADDON_ACTION_ANALOG_MOVE + ADDON_ACTION_ANALOG_MOVE_Y_DOWN = 604, + + /// @brief `998`: ERROR action is used to play an error sound. + ADDON_ACTION_ERROR = 998, + + /// @brief `999`: The NOOP action can be specified to disable an input event. This is + /// useful in user keyboard.xml etc to disable actions specified in the + /// system mappings. + ADDON_ACTION_NOOP = 999 + ///@} +}; +///@} + +#endif /* !C_API_GUI_ACTION_IDS_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h new file mode 100644 index 0000000..f0c4dc7 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h @@ -0,0 +1,54 @@ +/* + * 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_LIST_ITEM_H +#define C_API_GUI_LIST_ITEM_H + +#include "definitions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct AddonToKodiFuncTable_kodi_gui_listItem + { + KODI_GUI_LISTITEM_HANDLE(*create) + (KODI_HANDLE kodiBase, + const char* label, + const char* label2, + const char* path); + void (*destroy)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); + + char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); + void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* label); + char* (*get_label2)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); + void (*set_label2)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* label); + char* (*get_art)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* type); + void (*set_art)(KODI_HANDLE kodiBase, + KODI_GUI_LISTITEM_HANDLE handle, + const char* type, + const char* image); + char* (*get_path)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); + void (*set_path)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* path); + char* (*get_property)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* key); + void (*set_property)(KODI_HANDLE kodiBase, + KODI_GUI_LISTITEM_HANDLE handle, + const char* key, + const char* value); + void (*select)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, bool select); + bool (*is_selected)(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle); + } AddonToKodiFuncTable_kodi_gui_listItem; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_LIST_ITEM_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h new file mode 100644 index 0000000..0f844f5 --- /dev/null +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h @@ -0,0 +1,183 @@ +/* + * 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_WINDOW_H +#define C_API_GUI_WINDOW_H + +#include "definitions.h" +#include "input/action_ids.h" + +#include + +#define ADDON_MAX_CONTEXT_ENTRIES 20 +#define ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH 80 + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + typedef struct gui_context_menu_pair + { + unsigned int id; + char name[ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH]; + } gui_context_menu_pair; + + typedef struct AddonToKodiFuncTable_kodi_gui_window + { + /* Window creation functions */ + KODI_GUI_WINDOW_HANDLE(*create) + (KODI_HANDLE kodiBase, + const char* xml_filename, + const char* default_skin, + bool as_dialog, + bool is_media); + void (*destroy)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + + void (*set_callbacks)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + KODI_GUI_CLIENT_HANDLE clienthandle, + bool (*CBInit)(KODI_GUI_CLIENT_HANDLE), + bool (*CBFocus)(KODI_GUI_CLIENT_HANDLE, int), + bool (*CBClick)(KODI_GUI_CLIENT_HANDLE, int), + bool (*CBOnAction)(KODI_GUI_CLIENT_HANDLE, enum ADDON_ACTION), + void (*CBGetContextButtons)( + KODI_GUI_CLIENT_HANDLE, int, gui_context_menu_pair*, unsigned int*), + bool (*CBOnContextButton)(KODI_GUI_CLIENT_HANDLE, int, unsigned int)); + bool (*show)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + bool (*close)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + bool (*do_modal)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + + /* Window control functions */ + bool (*set_focus_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + int (*get_focus_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + void (*set_control_label)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + int control_id, + const char* label); + void (*set_control_visible)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + int control_id, + bool visible); + void (*set_control_selected)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + int control_id, + bool selected); + + /* Window property functions */ + void (*set_property)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key, + const char* value); + void (*set_property_int)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key, + int value); + void (*set_property_bool)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key, + bool value); + void (*set_property_double)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key, + double value); + char* (*get_property)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); + int (*get_property_int)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); + bool (*get_property_bool)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); + double (*get_property_double)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key); + void (*clear_properties)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + void (*clear_property)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, const char* key); + + /* List item functions */ + void (*clear_item_list)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + void (*add_list_item)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + KODI_GUI_LISTITEM_HANDLE item, + int list_position); + void (*remove_list_item_from_position)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + int list_position); + void (*remove_list_item)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + KODI_GUI_LISTITEM_HANDLE item); + KODI_GUI_LISTITEM_HANDLE(*get_list_item) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int list_position); + void (*set_current_list_position)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + int list_position); + int (*get_current_list_position)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + int (*get_list_size)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + void (*set_container_property)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* key, + const char* value); + void (*set_container_content)(KODI_HANDLE kodiBase, + KODI_GUI_WINDOW_HANDLE handle, + const char* value); + int (*get_current_container_id)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + + /* Various functions */ + void (*mark_dirty_region)(KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle); + + /* GUI control access functions */ + KODI_GUI_CONTROL_HANDLE(*get_control_button) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_edit) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_fade_label) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_image) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_label) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_progress) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_radio_button) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_render_addon) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_settings_slider) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_slider) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_spin) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_text_box) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy1) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy2) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy3) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy4) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy5) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy6) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy7) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy8) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy9) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + KODI_GUI_CONTROL_HANDLE(*get_control_dummy10) + (KODI_HANDLE kodiBase, KODI_GUI_WINDOW_HANDLE handle, int control_id); + /* This above used to add new get_control_* functions */ + } AddonToKodiFuncTable_kodi_gui_window; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* !C_API_GUI_WINDOW_H */ -- cgit v1.2.3