diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h | 433 |
1 files changed, 0 insertions, 433 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h deleted file mode 100644 index 4eb64c7..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h +++ /dev/null | |||
| @@ -1,433 +0,0 @@ | |||
| 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 | #include <string> | ||
| 12 | #include <time.h> | ||
| 13 | |||
| 14 | /* | ||
| 15 | * Internal Structures to have "C"-Style data transfer | ||
| 16 | */ | ||
| 17 | extern "C" | ||
| 18 | { | ||
| 19 | |||
| 20 | typedef struct AddonToKodiFuncTable_kodi_gui_general | ||
| 21 | { | ||
| 22 | void (*lock)(); | ||
| 23 | void (*unlock)(); | ||
| 24 | int (*get_screen_height)(void* kodiBase); | ||
| 25 | int (*get_screen_width)(void* kodiBase); | ||
| 26 | int (*get_video_resolution)(void* kodiBase); | ||
| 27 | int (*get_current_window_dialog_id)(void* kodiBase); | ||
| 28 | int (*get_current_window_id)(void* kodiBase); | ||
| 29 | void* (*get_hw_context)(void* kodiBase); | ||
| 30 | } AddonToKodiFuncTable_kodi_gui_general; | ||
| 31 | |||
| 32 | typedef struct AddonToKodiFuncTable_kodi_gui_control_button | ||
| 33 | { | ||
| 34 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 35 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 36 | void (*set_label)(void* kodiBase, void* handle, const char* label); | ||
| 37 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 38 | void (*set_label2)(void* kodiBase, void* handle, const char *label); | ||
| 39 | char* (*get_label2)(void* kodiBase, void* handle); | ||
| 40 | } AddonToKodiFuncTable_kodi_gui_control_button; | ||
| 41 | |||
| 42 | typedef struct AddonToKodiFuncTable_kodi_gui_control_edit | ||
| 43 | { | ||
| 44 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 45 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 46 | void (*set_label)(void* kodiBase, void* handle, const char* label); | ||
| 47 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 48 | void (*set_text)(void* kodiBase, void* handle, const char* text); | ||
| 49 | char* (*get_text)(void* kodiBase, void* handle); | ||
| 50 | void (*set_cursor_position)(void* kodiBase, void* handle, unsigned int position); | ||
| 51 | unsigned int (*get_cursor_position)(void* kodiBase, void* handle); | ||
| 52 | void (*set_input_type)(void* kodiBase, void* handle, int type, const char* heading); | ||
| 53 | } AddonToKodiFuncTable_kodi_gui_control_edit; | ||
| 54 | |||
| 55 | typedef struct AddonToKodiFuncTable_kodi_gui_control_fade_label | ||
| 56 | { | ||
| 57 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 58 | void (*add_label)(void* kodiBase, void* handle, const char* text); | ||
| 59 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 60 | void (*set_scrolling)(void* kodiBase, void* handle, bool scroll); | ||
| 61 | void (*reset)(void* kodiBase, void* handle); | ||
| 62 | } AddonToKodiFuncTable_kodi_gui_control_fade_label; | ||
| 63 | |||
| 64 | typedef struct AddonToKodiFuncTable_kodi_gui_control_image | ||
| 65 | { | ||
| 66 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 67 | void (*set_filename)(void* kodiBase, void* handle, const char* filename, bool use_cache); | ||
| 68 | void (*set_color_diffuse)(void* kodiBase, void* handle, uint32_t color_diffuse); | ||
| 69 | } AddonToKodiFuncTable_kodi_gui_control_image; | ||
| 70 | |||
| 71 | typedef struct AddonToKodiFuncTable_kodi_gui_control_label | ||
| 72 | { | ||
| 73 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 74 | void (*set_label)(void* kodiBase, void* handle, const char* text); | ||
| 75 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 76 | } AddonToKodiFuncTable_kodi_gui_control_label; | ||
| 77 | |||
| 78 | typedef struct AddonToKodiFuncTable_kodi_gui_control_progress | ||
| 79 | { | ||
| 80 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 81 | void (*set_percentage)(void* kodiBase, void* handle, float percent); | ||
| 82 | float (*get_percentage)(void* kodiBase, void* handle); | ||
| 83 | } AddonToKodiFuncTable_kodi_gui_control_progress; | ||
| 84 | |||
| 85 | typedef struct AddonToKodiFuncTable_kodi_gui_control_radio_button | ||
| 86 | { | ||
| 87 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 88 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 89 | void (*set_label)(void* kodiBase, void* handle, const char* text); | ||
| 90 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 91 | void (*set_selected)(void* kodiBase, void* handle, bool selected); | ||
| 92 | bool (*is_selected)(void* kodiBase, void* handle); | ||
| 93 | } AddonToKodiFuncTable_kodi_gui_control_radio_button; | ||
| 94 | |||
| 95 | typedef struct AddonToKodiFuncTable_kodi_gui_control_rendering | ||
| 96 | { | ||
| 97 | void (*set_callbacks)(void* kodiBase, void* handle, void* clienthandle, | ||
| 98 | bool (*createCB)(void*,int,int,int,int,void*), | ||
| 99 | void (*renderCB)(void*), | ||
| 100 | void (*stopCB)(void*), | ||
| 101 | bool (*dirtyCB)(void*)); | ||
| 102 | void (*destroy)(void *kodiBase, void* handle); | ||
| 103 | } AddonToKodiFuncTable_kodi_gui_control_rendering; | ||
| 104 | |||
| 105 | typedef struct AddonToKodiFuncTable_kodi_gui_control_settings_slider | ||
| 106 | { | ||
| 107 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 108 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 109 | void (*set_text)(void* kodiBase, void* handle, const char* label); | ||
| 110 | void (*reset)(void* kodiBase, void* handle); | ||
| 111 | void (*set_int_range)(void* kodiBase, void* handle, int start, int end); | ||
| 112 | void (*set_int_value)(void* kodiBase, void* handle, int value); | ||
| 113 | int (*get_int_value)(void* kodiBase, void* handle); | ||
| 114 | void (*set_int_interval)(void* kodiBase, void* handle, int interval); | ||
| 115 | void (*set_percentage)(void* kodiBase, void* handle, float percent); | ||
| 116 | float (*get_percentage)(void* kodiBase, void* handle); | ||
| 117 | void (*set_float_range)(void* kodiBase, void* handle, float start, float end); | ||
| 118 | void (*set_float_value)(void* kodiBase, void* handle, float value); | ||
| 119 | float (*get_float_value)(void* kodiBase, void* handle); | ||
| 120 | void (*set_float_interval)(void* kodiBase, void* handle, float interval); | ||
| 121 | } AddonToKodiFuncTable_kodi_gui_control_settings_slider; | ||
| 122 | |||
| 123 | typedef struct AddonToKodiFuncTable_kodi_gui_control_slider | ||
| 124 | { | ||
| 125 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 126 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 127 | void (*reset)(void* kodiBase, void* handle); | ||
| 128 | char* (*get_description)(void* kodiBase, void* handle); | ||
| 129 | void (*set_int_range)(void* kodiBase, void* handle, int start, int end); | ||
| 130 | void (*set_int_value)(void* kodiBase, void* handle, int value); | ||
| 131 | int (*get_int_value)(void* kodiBase, void* handle); | ||
| 132 | void (*set_int_interval)(void* kodiBase, void* handle, int interval); | ||
| 133 | void (*set_percentage)(void* kodiBase, void* handle, float percent); | ||
| 134 | float (*get_percentage)(void* kodiBase, void* handle); | ||
| 135 | void (*set_float_range)(void* kodiBase, void* handle, float start, float end); | ||
| 136 | void (*set_float_value)(void* kodiBase, void* handle, float value); | ||
| 137 | float (*get_float_value)(void* kodiBase, void* handle); | ||
| 138 | void (*set_float_interval)(void* kodiBase, void* handle, float interval); | ||
| 139 | } AddonToKodiFuncTable_kodi_gui_control_slider; | ||
| 140 | |||
| 141 | typedef struct AddonToKodiFuncTable_kodi_gui_control_spin | ||
| 142 | { | ||
| 143 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 144 | void (*set_enabled)(void* kodiBase, void* handle, bool enabled); | ||
| 145 | void (*set_text)(void* kodiBase, void* handle, const char* text); | ||
| 146 | void (*reset)(void* kodiBase, void* handle); | ||
| 147 | void (*set_type)(void* kodiBase, void* handle, int type); | ||
| 148 | void (*add_string_label)(void* kodiBase, void* handle, const char* label, const char* value); | ||
| 149 | void (*set_string_value)(void* kodiBase, void* handle, const char* value); | ||
| 150 | char* (*get_string_value)(void* kodiBase, void* handle); | ||
| 151 | void (*add_int_label)(void* kodiBase, void* handle, const char* label, int value); | ||
| 152 | void (*set_int_range)(void* kodiBase, void* handle, int start, int end); | ||
| 153 | void (*set_int_value)(void* kodiBase, void* handle, int value); | ||
| 154 | int (*get_int_value)(void* kodiBase, void* handle); | ||
| 155 | void (*set_float_range)(void* kodiBase, void* handle, float start, float end); | ||
| 156 | void (*set_float_value)(void* kodiBase, void* handle, float value); | ||
| 157 | float (*get_float_value)(void* kodiBase, void* handle); | ||
| 158 | void (*set_float_interval)(void* kodiBase, void* handle, float interval); | ||
| 159 | } AddonToKodiFuncTable_kodi_gui_control_spin; | ||
| 160 | |||
| 161 | typedef struct AddonToKodiFuncTable_kodi_gui_control_text_box | ||
| 162 | { | ||
| 163 | void (*set_visible)(void* kodiBase, void* handle, bool visible); | ||
| 164 | void (*reset)(void* kodiBase, void* handle); | ||
| 165 | void (*set_text)(void* kodiBase, void* handle, const char* text); | ||
| 166 | char* (*get_text)(void* kodiBase, void* handle); | ||
| 167 | void (*scroll)(void* kodiBase, void* handle, unsigned int scroll); | ||
| 168 | void (*set_auto_scrolling)(void* kodiBase, void* handle, int delay, int time, int repeat); | ||
| 169 | } AddonToKodiFuncTable_kodi_gui_control_text_box; | ||
| 170 | |||
| 171 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogContextMenu | ||
| 172 | { | ||
| 173 | int (*open)(void* kodiBase, const char *heading, const char *entries[], unsigned int size); | ||
| 174 | } AddonToKodiFuncTable_kodi_gui_dialogContextMenu; | ||
| 175 | |||
| 176 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress | ||
| 177 | { | ||
| 178 | void* (*new_dialog)(void* kodiBase, const char *title); | ||
| 179 | void (*delete_dialog)(void* kodiBase, void* handle); | ||
| 180 | char* (*get_title)(void* kodiBase, void* handle); | ||
| 181 | void (*set_title)(void* kodiBase, void* handle, const char *title); | ||
| 182 | char* (*get_text)(void* kodiBase, void* handle); | ||
| 183 | void (*set_text)(void* kodiBase, void* handle, const char *text); | ||
| 184 | bool (*is_finished)(void* kodiBase, void* handle); | ||
| 185 | void (*mark_finished)(void* kodiBase, void* handle); | ||
| 186 | float (*get_percentage)(void* kodiBase, void* handle); | ||
| 187 | void (*set_percentage)(void* kodiBase, void* handle, float percentage); | ||
| 188 | void (*set_progress)(void* kodiBase, void* handle, int currentItem, int itemCount); | ||
| 189 | } AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress; | ||
| 190 | |||
| 191 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogFileBrowser | ||
| 192 | { | ||
| 193 | bool (*show_and_get_directory)(void* kodiBase, const char* shares, const char* heading, const char* path_in, char** path_out, bool writeOnly); | ||
| 194 | bool (*show_and_get_file)(void* kodiBase, const char* shares, const char* mask, const char* heading, const char* path_in, char** path_out, bool use_thumbs, bool use_file_directories); | ||
| 195 | bool (*show_and_get_file_from_dir)(void* 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); | ||
| 196 | bool (*show_and_get_file_list)(void* kodiBase, const char* shares, const char* mask, const char* heading, char*** file_list, unsigned int* entries, bool use_thumbs, bool use_file_directories); | ||
| 197 | bool (*show_and_get_source)(void* kodiBase, const char* path_in, char** path_out, bool allow_network_shares, const char* additional_share, const char* type); | ||
| 198 | bool (*show_and_get_image)(void* kodiBase, const char* shares, const char* heading, const char* path_in, char** path_out); | ||
| 199 | bool (*show_and_get_image_list)(void* kodiBase, const char* shares, const char* heading, char*** file_list, unsigned int* entries); | ||
| 200 | void (*clear_file_list)(void* kodiBase, char*** file_list, unsigned int entries); | ||
| 201 | } AddonToKodiFuncTable_kodi_gui_dialogFileBrowser; | ||
| 202 | |||
| 203 | // typedef void (*char_callback_t) (CGUIKeyboard *ref, const std::string &typedString); | ||
| 204 | |||
| 205 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard | ||
| 206 | { | ||
| 207 | bool (*show_and_get_input_with_head)(void* kodiBase, const char* text_in, char** text_out, const char* heading, bool allow_empty_result, bool hiddenInput, unsigned int auto_close_ms); | ||
| 208 | bool (*show_and_get_input)(void* kodiBase, const char* text_in, char** text_out, bool allow_empty_result, unsigned int auto_close_ms); | ||
| 209 | bool (*show_and_get_new_password_with_head)(void* kodiBase, const char* password_in, char** password_out, const char* heading, bool allow_empty_result, unsigned int auto_close_ms); | ||
| 210 | bool (*show_and_get_new_password)(void* kodiBase, const char* password_in, char** password_out, unsigned int auto_close_ms); | ||
| 211 | bool (*show_and_verify_new_password_with_head)(void* kodiBase, char** password_out, const char* heading, bool allow_empty_result, unsigned int auto_close_ms); | ||
| 212 | bool (*show_and_verify_new_password)(void* kodiBase, char** password_out, unsigned int auto_close_ms); | ||
| 213 | int (*show_and_verify_password)(void* kodiBase, const char* password_in, char** password_out, const char* heading, int retries, unsigned int auto_close_ms); | ||
| 214 | bool (*show_and_get_filter)(void* kodiBase, const char* text_in, char** text_out, bool searching, unsigned int auto_close_ms); | ||
| 215 | bool (*send_text_to_active_keyboard)(void* kodiBase, const char* text, bool close_keyboard); | ||
| 216 | bool (*is_keyboard_activated)(void* kodiBase); | ||
| 217 | } AddonToKodiFuncTable_kodi_gui_dialogKeyboard; | ||
| 218 | |||
| 219 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric | ||
| 220 | { | ||
| 221 | bool (*show_and_verify_new_password)(void* kodiBase, char** password); | ||
| 222 | int (*show_and_verify_password)(void* kodiBase, const char* password, const char *heading, int retries); | ||
| 223 | bool (*show_and_verify_input)(void* kodiBase, const char* verify_in, char** verify_out, const char* heading, bool verify_input); | ||
| 224 | bool (*show_and_get_time)(void* kodiBase, tm *time, const char *heading); | ||
| 225 | bool (*show_and_get_date)(void* kodiBase, tm *date, const char *heading); | ||
| 226 | bool (*show_and_get_ip_address)(void* kodiBase, const char* ip_address_in, char** ip_address_out, const char *heading); | ||
| 227 | bool (*show_and_get_number)(void* kodiBase, const char* input_in, char** input_out, const char *heading, unsigned int auto_close_ms); | ||
| 228 | bool (*show_and_get_seconds)(void* kodiBase, const char* time_in, char** time_out, const char *heading); | ||
| 229 | } AddonToKodiFuncTable_kodi_gui_dialogNumeric; | ||
| 230 | |||
| 231 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogOK | ||
| 232 | { | ||
| 233 | void (*show_and_get_input_single_text)(void* kodiBase, const char *heading, const char *text); | ||
| 234 | void (*show_and_get_input_line_text)(void* kodiBase, const char *heading, const char *line0, const char *line1, const char *line2); | ||
| 235 | } AddonToKodiFuncTable_kodi_gui_dialogOK; | ||
| 236 | |||
| 237 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogProgress | ||
| 238 | { | ||
| 239 | void* (*new_dialog)(void* kodiBase); | ||
| 240 | void (*delete_dialog)(void* kodiBase, void* handle); | ||
| 241 | void (*open)(void* kodiBase, void* handle); | ||
| 242 | void (*set_heading)(void* kodiBase, void* handle, const char* heading); | ||
| 243 | void (*set_line)(void* kodiBase, void* handle, unsigned int lineNo, const char* line); | ||
| 244 | void (*set_can_cancel)(void* kodiBase, void* handle, bool canCancel); | ||
| 245 | bool (*is_canceled)(void* kodiBase, void* handle); | ||
| 246 | void (*set_percentage)(void* kodiBase, void* handle, int percentage); | ||
| 247 | int (*get_percentage)(void* kodiBase, void* handle); | ||
| 248 | void (*show_progress_bar)(void* kodiBase, void* handle, bool pnOff); | ||
| 249 | void (*set_progress_max)(void* kodiBase, void* handle, int max); | ||
| 250 | void (*set_progress_advance)(void* kodiBase, void* handle, int nSteps); | ||
| 251 | bool (*abort)(void* kodiBase, void* handle); | ||
| 252 | } AddonToKodiFuncTable_kodi_gui_dialogProgress; | ||
| 253 | |||
| 254 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogSelect | ||
| 255 | { | ||
| 256 | int (*open)(void* kodiBase, const char *heading, const char *entries[], unsigned int size, int selected, unsigned int autoclose); | ||
| 257 | bool (*open_multi_select)(void* kodiBase, const char* heading, const char* entryIDs[], const char* entryNames[], | ||
| 258 | bool entriesSelected[], unsigned int size, unsigned int autoclose); | ||
| 259 | } AddonToKodiFuncTable_kodi_gui_dialogSelect; | ||
| 260 | |||
| 261 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogTextViewer | ||
| 262 | { | ||
| 263 | void (*open)(void* kodiBase, const char *heading, const char *text); | ||
| 264 | } AddonToKodiFuncTable_kodi_gui_dialogTextViewer; | ||
| 265 | |||
| 266 | typedef struct AddonToKodiFuncTable_kodi_gui_dialogYesNo | ||
| 267 | { | ||
| 268 | bool (*show_and_get_input_single_text)(void* kodiBase, const char *heading, const char *text, bool *canceled, const char *noLabel, const char *yesLabel); | ||
| 269 | bool (*show_and_get_input_line_text)(void* kodiBase, const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel, const char *yesLabel); | ||
| 270 | bool (*show_and_get_input_line_button_text)(void* kodiBase, const char *heading, const char *line0, const char *line1, const char *line2, bool *canceled, const char *noLabel, const char *yesLabel); | ||
| 271 | } AddonToKodiFuncTable_kodi_gui_dialogYesNo; | ||
| 272 | |||
| 273 | typedef struct AddonToKodiFuncTable_kodi_gui_listItem | ||
| 274 | { | ||
| 275 | void* (*create)(void* kodiBase, const char* label, const char* label2, const char* icon_image, const char* path); | ||
| 276 | void (*destroy)(void* kodiBase, void* handle); | ||
| 277 | char* (*get_label)(void* kodiBase, void* handle); | ||
| 278 | void (*set_label)(void* kodiBase, void* handle, const char* label); | ||
| 279 | char* (*get_label2)(void* kodiBase, void* handle); | ||
| 280 | void (*set_label2)(void* kodiBase, void* handle, const char* label); | ||
| 281 | char* (*get_art)(void* kodiBase, void* handle, const char* type); | ||
| 282 | void (*set_art)(void* kodiBase, void* handle, const char* type, const char* image); | ||
| 283 | char* (*get_path)(void* kodiBase, void* handle); | ||
| 284 | void (*set_path)(void* kodiBase, void* handle, const char* path); | ||
| 285 | char* (*get_property)(void* kodiBase, void* handle, const char* key); | ||
| 286 | void (*set_property)(void* kodiBase, void* handle, const char* key, const char* value); | ||
| 287 | void (*select)(void* kodiBase, void* handle, bool select); | ||
| 288 | bool (*is_selected)(void* kodiBase, void* handle); | ||
| 289 | } AddonToKodiFuncTable_kodi_gui_listItem; | ||
| 290 | |||
| 291 | #define ADDON_MAX_CONTEXT_ENTRIES 20 | ||
| 292 | #define ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH 80 | ||
| 293 | typedef struct gui_context_menu_pair | ||
| 294 | { | ||
| 295 | unsigned int id; | ||
| 296 | char name[ADDON_MAX_CONTEXT_ENTRY_NAME_LENGTH]; | ||
| 297 | } gui_context_menu_pair; | ||
| 298 | |||
| 299 | typedef struct AddonToKodiFuncTable_kodi_gui_window | ||
| 300 | { | ||
| 301 | /* Window creation functions */ | ||
| 302 | void* (*create)(void* kodiBase, const char* xml_filename, const char* default_skin, bool as_dialog, bool is_media); | ||
| 303 | void (*destroy)(void* kodiBase, void* handle); | ||
| 304 | void (*set_callbacks)(void* kodiBase, void* handle, void* clienthandle, | ||
| 305 | bool (*CBInit)(void*), | ||
| 306 | bool (*CBFocus)(void*, int), | ||
| 307 | bool (*CBClick)(void*, int), | ||
| 308 | bool (*CBOnAction)(void*, int, uint32_t, wchar_t), | ||
| 309 | void (*CBGetContextButtons)(void*, int, gui_context_menu_pair*, unsigned int*), | ||
| 310 | bool (*CBOnContextButton)(void*, int, unsigned int)); | ||
| 311 | bool (*show)(void* kodiBase, void* handle); | ||
| 312 | bool (*close)(void* kodiBase, void* handle); | ||
| 313 | bool (*do_modal)(void* kodiBase, void* handle); | ||
| 314 | |||
| 315 | /* Window control functions */ | ||
| 316 | bool (*set_focus_id)(void* kodiBase, void* handle, int control_id); | ||
| 317 | int (*get_focus_id)(void* kodiBase, void* handle); | ||
| 318 | void (*set_control_label)(void* kodiBase, void* handle, int control_id, const char* label); | ||
| 319 | void (*set_control_visible)(void* kodiBase, void* handle, int control_id, bool visible); | ||
| 320 | void (*set_control_selected)(void* kodiBase, void* handle, int control_id, bool selected); | ||
| 321 | |||
| 322 | /* Window property functions */ | ||
| 323 | void (*set_property)(void* kodiBase, void* handle, const char* key, const char* value); | ||
| 324 | void (*set_property_int)(void* kodiBase, void* handle, const char* key, int value); | ||
| 325 | void (*set_property_bool)(void* kodiBase, void* handle, const char* key, bool value); | ||
| 326 | void (*set_property_double)(void* kodiBase, void* handle, const char* key, double value); | ||
| 327 | char* (*get_property)(void* kodiBase, void* handle, const char* key); | ||
| 328 | int (*get_property_int)(void* kodiBase, void* handle, const char* key); | ||
| 329 | bool (*get_property_bool)(void* kodiBase, void* handle, const char* key); | ||
| 330 | double (*get_property_double)(void* kodiBase, void* handle, const char* key); | ||
| 331 | void (*clear_properties)(void* kodiBase, void* handle); | ||
| 332 | void (*clear_property)(void* kodiBase, void* handle, const char* key); | ||
| 333 | |||
| 334 | /* List item functions */ | ||
| 335 | void (*clear_item_list)(void* kodiBase, void* handle); | ||
| 336 | void (*add_list_item)(void* kodiBase, void* handle, void* item, int list_position); | ||
| 337 | void (*remove_list_item_from_position)(void* kodiBase, void* handle, int list_position); | ||
| 338 | void (*remove_list_item)(void* kodiBase, void* handle, void* item); | ||
| 339 | void* (*get_list_item)(void* kodiBase, void* handle, int list_position); | ||
| 340 | void (*set_current_list_position)(void* kodiBase, void* handle, int list_position); | ||
| 341 | int (*get_current_list_position)(void* kodiBase, void* handle); | ||
| 342 | int (*get_list_size)(void* kodiBase, void* handle); | ||
| 343 | void (*set_container_property)(void* kodiBase, void* handle, const char* key, const char* value); | ||
| 344 | void (*set_container_content)(void* kodiBase, void* handle, const char* value); | ||
| 345 | int (*get_current_container_id)(void* kodiBase, void* handle); | ||
| 346 | |||
| 347 | /* Various functions */ | ||
| 348 | void (*mark_dirty_region)(void* kodiBase, void* handle); | ||
| 349 | |||
| 350 | /* GUI control access functions */ | ||
| 351 | void* (*get_control_button)(void* kodiBase, void* handle, int control_id); | ||
| 352 | void* (*get_control_edit)(void* kodiBase, void* handle, int control_id); | ||
| 353 | void* (*get_control_fade_label)(void* kodiBase, void* handle, int control_id); | ||
| 354 | void* (*get_control_image)(void* kodiBase, void* handle, int control_id); | ||
| 355 | void* (*get_control_label)(void* kodiBase, void* handle, int control_id); | ||
| 356 | void* (*get_control_progress)(void* kodiBase, void* handle, int control_id); | ||
| 357 | void* (*get_control_radio_button)(void* kodiBase, void* handle, int control_id); | ||
| 358 | void* (*get_control_render_addon)(void* kodiBase, void* handle, int control_id); | ||
| 359 | void* (*get_control_settings_slider)(void* kodiBase, void* handle, int control_id); | ||
| 360 | void* (*get_control_slider)(void* kodiBase, void* handle, int control_id); | ||
| 361 | void* (*get_control_spin)(void* kodiBase, void* handle, int control_id); | ||
| 362 | void* (*get_control_text_box)(void* kodiBase, void* handle, int control_id); | ||
| 363 | void* (*get_control_dummy1)(void* kodiBase, void* handle, int control_id); | ||
| 364 | void* (*get_control_dummy2)(void* kodiBase, void* handle, int control_id); | ||
| 365 | void* (*get_control_dummy3)(void* kodiBase, void* handle, int control_id); | ||
| 366 | void* (*get_control_dummy4)(void* kodiBase, void* handle, int control_id); | ||
| 367 | void* (*get_control_dummy5)(void* kodiBase, void* handle, int control_id); | ||
| 368 | void* (*get_control_dummy6)(void* kodiBase, void* handle, int control_id); | ||
| 369 | void* (*get_control_dummy7)(void* kodiBase, void* handle, int control_id); | ||
| 370 | void* (*get_control_dummy8)(void* kodiBase, void* handle, int control_id); | ||
| 371 | void* (*get_control_dummy9)(void* kodiBase, void* handle, int control_id); | ||
| 372 | void* (*get_control_dummy10)(void* kodiBase, void* handle, int control_id); /* This and above used to add new get_control_* functions */ | ||
| 373 | } AddonToKodiFuncTable_kodi_gui_window; | ||
| 374 | |||
| 375 | typedef struct AddonToKodiFuncTable_kodi_gui | ||
| 376 | { | ||
| 377 | AddonToKodiFuncTable_kodi_gui_general* general; | ||
| 378 | AddonToKodiFuncTable_kodi_gui_control_button* control_button; | ||
| 379 | AddonToKodiFuncTable_kodi_gui_control_edit* control_edit; | ||
| 380 | AddonToKodiFuncTable_kodi_gui_control_fade_label* control_fade_label; | ||
| 381 | AddonToKodiFuncTable_kodi_gui_control_label* control_label; | ||
| 382 | AddonToKodiFuncTable_kodi_gui_control_image* control_image; | ||
| 383 | AddonToKodiFuncTable_kodi_gui_control_progress* control_progress; | ||
| 384 | AddonToKodiFuncTable_kodi_gui_control_radio_button* control_radio_button; | ||
| 385 | AddonToKodiFuncTable_kodi_gui_control_rendering* control_rendering; | ||
| 386 | AddonToKodiFuncTable_kodi_gui_control_settings_slider* control_settings_slider; | ||
| 387 | AddonToKodiFuncTable_kodi_gui_control_slider* control_slider; | ||
| 388 | AddonToKodiFuncTable_kodi_gui_control_spin* control_spin; | ||
| 389 | AddonToKodiFuncTable_kodi_gui_control_text_box* control_text_box; | ||
| 390 | void* control_dummy1; | ||
| 391 | void* control_dummy2; | ||
| 392 | void* control_dummy3; | ||
| 393 | void* control_dummy4; | ||
| 394 | void* control_dummy5; | ||
| 395 | void* control_dummy6; | ||
| 396 | void* control_dummy7; | ||
| 397 | void* control_dummy8; | ||
| 398 | void* control_dummy9; | ||
| 399 | void* control_dummy10; /* This and above used to add new controls */ | ||
| 400 | AddonToKodiFuncTable_kodi_gui_dialogContextMenu* dialogContextMenu; | ||
| 401 | AddonToKodiFuncTable_kodi_gui_dialogExtendedProgress* dialogExtendedProgress; | ||
| 402 | AddonToKodiFuncTable_kodi_gui_dialogFileBrowser* dialogFileBrowser; | ||
| 403 | AddonToKodiFuncTable_kodi_gui_dialogKeyboard* dialogKeyboard; | ||
| 404 | AddonToKodiFuncTable_kodi_gui_dialogNumeric* dialogNumeric; | ||
| 405 | AddonToKodiFuncTable_kodi_gui_dialogOK* dialogOK; | ||
| 406 | AddonToKodiFuncTable_kodi_gui_dialogProgress* dialogProgress; | ||
| 407 | AddonToKodiFuncTable_kodi_gui_dialogSelect* dialogSelect; | ||
| 408 | AddonToKodiFuncTable_kodi_gui_dialogTextViewer* dialogTextViewer; | ||
| 409 | AddonToKodiFuncTable_kodi_gui_dialogYesNo* dialogYesNo; | ||
| 410 | void* dialog_dummy1; | ||
| 411 | void* dialog_dummy2; | ||
| 412 | void* dialog_dummy3; | ||
| 413 | void* dialog_dummy4; | ||
| 414 | void* dialog_dummy5; | ||
| 415 | void* dialog_dummy6; | ||
| 416 | void* dialog_dummy7; | ||
| 417 | void* dialog_dummy8; | ||
| 418 | void* dialog_dummy9; | ||
| 419 | void* dialog_dummy10; /* This and above used to add new dialogs */ | ||
| 420 | AddonToKodiFuncTable_kodi_gui_listItem* listItem; | ||
| 421 | AddonToKodiFuncTable_kodi_gui_window* window; | ||
| 422 | } AddonToKodiFuncTable_kodi_gui; | ||
| 423 | |||
| 424 | } /* extern "C" */ | ||
| 425 | |||
| 426 | //============================================================================ | ||
| 427 | /// | ||
| 428 | /// \ingroup cpp_kodi_gui_CControlRendering_Defs cpp_kodi_gui_CWindow_Defs | ||
| 429 | /// @{ | ||
| 430 | /// @brief Handle to use as independent pointer for GUI | ||
| 431 | typedef void* GUIHANDLE; | ||
| 432 | /// @} | ||
| 433 | //---------------------------------------------------------------------------- | ||
