diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h new file mode 100644 index 0000000..ede8e94 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/general.h | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #ifdef __cplusplus | ||
| 12 | extern "C" | ||
| 13 | { | ||
| 14 | #endif /* __cplusplus */ | ||
| 15 | |||
| 16 | //============================================================================ | ||
| 17 | /// \ingroup cpp_kodi_Defs | ||
| 18 | /// @brief For kodi::CurrentKeyboardLayout used defines | ||
| 19 | /// | ||
| 20 | typedef enum StdKbButtons | ||
| 21 | { | ||
| 22 | /// The quantity of buttons per row on Kodi's standard keyboard | ||
| 23 | STD_KB_BUTTONS_PER_ROW = 20, | ||
| 24 | /// The quantity of rows on Kodi's standard keyboard | ||
| 25 | STD_KB_BUTTONS_MAX_ROWS = 4, | ||
| 26 | /// Keyboard layout type, this for initial standard | ||
| 27 | STD_KB_MODIFIER_KEY_NONE = 0x00, | ||
| 28 | /// Keyboard layout type, this for shift controled layout (uppercase) | ||
| 29 | STD_KB_MODIFIER_KEY_SHIFT = 0x01, | ||
| 30 | /// Keyboard layout type, this to show symbols | ||
| 31 | STD_KB_MODIFIER_KEY_SYMBOL = 0x02 | ||
| 32 | } StdKbButtons; | ||
| 33 | //---------------------------------------------------------------------------- | ||
| 34 | |||
| 35 | //============================================================================ | ||
| 36 | /// \ingroup cpp_kodi_Defs | ||
| 37 | /// @brief For kodi::QueueNotification() used message types | ||
| 38 | /// | ||
| 39 | typedef enum QueueMsg | ||
| 40 | { | ||
| 41 | /// Show info notification message | ||
| 42 | QUEUE_INFO, | ||
| 43 | /// Show warning notification message | ||
| 44 | QUEUE_WARNING, | ||
| 45 | /// Show error notification message | ||
| 46 | QUEUE_ERROR, | ||
| 47 | /// Show with own given image and parts if set on values | ||
| 48 | QUEUE_OWN_STYLE | ||
| 49 | } QueueMsg; | ||
| 50 | //---------------------------------------------------------------------------- | ||
| 51 | |||
| 52 | //============================================================================ | ||
| 53 | /// \ingroup cpp_kodi_Defs | ||
| 54 | /// @brief Format codes to get string from them. | ||
| 55 | /// | ||
| 56 | /// Used on kodi::GetLanguage(). | ||
| 57 | /// | ||
| 58 | typedef enum LangFormats | ||
| 59 | { | ||
| 60 | /// two letter code as defined in ISO 639-1 | ||
| 61 | LANG_FMT_ISO_639_1, | ||
| 62 | /// three letter code as defined in ISO 639-2/T or ISO 639-2/B | ||
| 63 | LANG_FMT_ISO_639_2, | ||
| 64 | /// full language name in English | ||
| 65 | LANG_FMT_ENGLISH_NAME | ||
| 66 | } LangFormats; | ||
| 67 | //---------------------------------------------------------------------------- | ||
| 68 | |||
| 69 | /* | ||
| 70 | * For interface between add-on and kodi. | ||
| 71 | * | ||
| 72 | * This structure defines the addresses of functions stored inside Kodi which | ||
| 73 | * are then available for the add-on to call | ||
| 74 | * | ||
| 75 | * All function pointers there are used by the C++ interface functions below. | ||
| 76 | * You find the set of them on xbmc/addons/interfaces/General.cpp | ||
| 77 | * | ||
| 78 | * Note: For add-on development itself this is not needed | ||
| 79 | */ | ||
| 80 | typedef struct AddonKeyboardKeyTable | ||
| 81 | { | ||
| 82 | char* keys[STD_KB_BUTTONS_MAX_ROWS][STD_KB_BUTTONS_PER_ROW]; | ||
| 83 | } AddonKeyboardKeyTable; | ||
| 84 | typedef struct AddonToKodiFuncTable_kodi | ||
| 85 | { | ||
| 86 | char* (*get_addon_info)(void* kodiBase, const char* id); | ||
| 87 | bool (*open_settings_dialog)(void* kodiBase); | ||
| 88 | char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar); | ||
| 89 | char* (*get_localized_string)(void* kodiBase, long label_id); | ||
| 90 | char* (*get_language)(void* kodiBase, int format, bool region); | ||
| 91 | bool (*queue_notification)(void* kodiBase, | ||
| 92 | int type, | ||
| 93 | const char* header, | ||
| 94 | const char* message, | ||
| 95 | const char* imageFile, | ||
| 96 | unsigned int displayTime, | ||
| 97 | bool withSound, | ||
| 98 | unsigned int messageTime); | ||
| 99 | void (*get_md5)(void* kodiBase, const char* text, char* md5); | ||
| 100 | char* (*get_temp_path)(void* kodiBase); | ||
| 101 | char* (*get_region)(void* kodiBase, const char* id); | ||
| 102 | void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes); | ||
| 103 | int (*get_global_idle_time)(void* kodiBase); | ||
| 104 | bool (*is_addon_avilable)(void* kodiBase, const char* id, char** version, bool* enabled); | ||
| 105 | void (*kodi_version)(void* kodiBase, | ||
| 106 | char** compile_name, | ||
| 107 | int* major, | ||
| 108 | int* minor, | ||
| 109 | char** revision, | ||
| 110 | char** tag, | ||
| 111 | char** tagversion); | ||
| 112 | char* (*get_current_skin_id)(void* kodiBase); | ||
| 113 | bool (*get_keyboard_layout)(void* kodiBase, | ||
| 114 | char** layout_name, | ||
| 115 | int modifier_key, | ||
| 116 | struct AddonKeyboardKeyTable* layout); | ||
| 117 | bool (*change_keyboard_layout)(void* kodiBase, char** layout_name); | ||
| 118 | } AddonToKodiFuncTable_kodi; | ||
| 119 | |||
| 120 | |||
| 121 | #ifdef __cplusplus | ||
| 122 | } /* extern "C" */ | ||
| 123 | #endif /* __cplusplus */ | ||
