kodi
edit.h
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_EDIT_H
10 #define C_API_GUI_CONTROLS_EDIT_H
11 
12 #include "../definitions.h"
13 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif /* __cplusplus */
18 
19  //============================================================================
24  enum AddonGUIInputType
25  {
27  ADDON_INPUT_TYPE_READONLY = -1,
29  ADDON_INPUT_TYPE_TEXT = 0,
31  ADDON_INPUT_TYPE_NUMBER,
33  ADDON_INPUT_TYPE_SECONDS,
35  ADDON_INPUT_TYPE_TIME,
37  ADDON_INPUT_TYPE_DATE,
39  ADDON_INPUT_TYPE_IPADDRESS,
41  ADDON_INPUT_TYPE_PASSWORD,
44  ADDON_INPUT_TYPE_PASSWORD_MD5,
46  ADDON_INPUT_TYPE_SEARCH,
48  ADDON_INPUT_TYPE_FILTER,
50  ADDON_INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW
51  };
53  //----------------------------------------------------------------------------
54 
56  {
57  void (*set_visible)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool visible);
58  void (*set_enabled)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, bool enabled);
59  void (*set_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* label);
60  char* (*get_label)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle);
61  void (*set_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle, const char* text);
62  char* (*get_text)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle);
63  void (*set_cursor_position)(KODI_HANDLE kodiBase,
64  KODI_GUI_CONTROL_HANDLE handle,
65  unsigned int position);
66  unsigned int (*get_cursor_position)(KODI_HANDLE kodiBase, KODI_GUI_CONTROL_HANDLE handle);
67  void (*set_input_type)(KODI_HANDLE kodiBase,
68  KODI_GUI_CONTROL_HANDLE handle,
69  int type,
70  const char* heading);
72 
73 #ifdef __cplusplus
74 } /* extern "C" */
75 #endif /* __cplusplus */
76 
77 #endif /* !C_API_GUI_CONTROLS_EDIT_H */