kodi
general.h
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 #ifndef C_API_GENERAL_H
10 #define C_API_GENERAL_H
11 
12 #include <stdbool.h>
13 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif /* __cplusplus */
18 
19  //============================================================================
23  typedef enum StdKbButtons
24  {
35  } StdKbButtons;
36  //----------------------------------------------------------------------------
37 
38  //============================================================================
42  typedef enum QueueMsg
43  {
52  } QueueMsg;
53  //----------------------------------------------------------------------------
54 
55  //============================================================================
61  typedef enum LangFormats
62  {
69  } LangFormats;
70  //----------------------------------------------------------------------------
71 
72  /*
73  * For interface between add-on and kodi.
74  *
75  * This structure defines the addresses of functions stored inside Kodi which
76  * are then available for the add-on to call
77  *
78  * All function pointers there are used by the C++ interface functions below.
79  * You find the set of them on xbmc/addons/interfaces/General.cpp
80  *
81  * Note: For add-on development itself this is not needed
82  */
83  typedef struct AddonKeyboardKeyTable
84  {
88  {
89  char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar);
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_region)(void* kodiBase, const char* id);
101  void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes);
102  int (*get_global_idle_time)(void* kodiBase);
103  bool (*is_addon_avilable)(void* kodiBase, const char* id, char** version, bool* enabled);
104  void (*kodi_version)(void* kodiBase,
105  char** compile_name,
106  int* major,
107  int* minor,
108  char** revision,
109  char** tag,
110  char** tagversion);
111  char* (*get_current_skin_id)(void* kodiBase);
112  bool (*get_keyboard_layout)(void* kodiBase,
113  char** layout_name,
114  int modifier_key,
115  struct AddonKeyboardKeyTable* layout);
116  bool (*change_keyboard_layout)(void* kodiBase, char** layout_name);
118 
119 #ifdef __cplusplus
120 } /* extern "C" */
121 #endif /* __cplusplus */
122 
123 #endif /* !C_API_GENERAL_H */
Definition: general.h:83
Show info notification message.
Definition: general.h:45
QueueMsg
For kodi::QueueNotification() used message types.
Definition: general.h:42
The quantity of rows on Kodi&#39;s standard keyboard.
Definition: general.h:28
LangFormats
Format codes to get string from them.
Definition: general.h:61
StdKbButtons
For kodi::CurrentKeyboardLayout used defines.
Definition: general.h:23
Keyboard layout type, this for initial standard.
Definition: general.h:30
three letter code as defined in ISO 639-2/T or ISO 639-2/B
Definition: general.h:66
Show error notification message.
Definition: general.h:49
Keyboard layout type, this to show symbols.
Definition: general.h:34
two letter code as defined in ISO 639-1
Definition: general.h:64
Show with own given image and parts if set on values.
Definition: general.h:51
Show warning notification message.
Definition: general.h:47
Keyboard layout type, this for shift controlled layout (uppercase)
Definition: general.h:32
Definition: general.h:87
The quantity of buttons per row on Kodi&#39;s standard keyboard.
Definition: general.h:26
full language name in English
Definition: general.h:68