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/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 ++++++++++++++ 11 files changed, 499 insertions(+) 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 (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs') 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 */ -- cgit v1.2.3