1 /* 2 * Copyright (C) 2005-2020 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 #ifndef C_API_GUI_CONTROLS_SPIN_H 10 #define C_API_GUI_CONTROLS_SPIN_H 11 12 #include "../definitions.h" 13 14 #ifdef __cplusplus 15 extern "C" 16 { 17 #endif /* __cplusplus */ 18 19 typedef struct AddonToKodiFuncTable_kodi_gui_control_spin 20 { 21 void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible); 22 void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled); 23 void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text); 24 void (*reset)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); 25 void (*set_type)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int type); 26 void (*add_string_label)(KODI_HANDLE kodiBase, 27 KODI_GUI_CONTROL_HANDLE handle, 28 const char* label, 29 const char* value); 30 void (*set_string_value)(KODI_HANDLE kodiBase, 31 KODI_GUI_CONTROL_HANDLE handle, 32 const char* value); 33 char* (*get_string_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); 34 void (*add_int_label)(KODI_HANDLE kodiBase, 35 KODI_GUI_CONTROL_HANDLE handle, 36 const char* label, 37 int value); 38 void (*set_int_range)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int start, int end); 39 void (*set_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, int value); 40 int (*get_int_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); 41 void (*set_float_range)(KODI_HANDLE kodiBase, 42 KODI_GUI_CONTROL_HANDLE handle, 43 float start, 44 float end); 45 void (*set_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, float value); 46 float (*get_float_value)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle); 47 void (*set_float_interval)(KODI_HANDLE kodiBase, 48 KODI_GUI_CONTROL_HANDLE handle, 49 float interval); 50 } AddonToKodiFuncTable_kodi_gui_control_spin; 51 52 #ifdef __cplusplus 53 } /* extern "C" */ 54 #endif /* __cplusplus */ 55 56 #endif /* !C_API_GUI_CONTROLS_SPIN_H */ 57