Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
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
15extern "C"
16{
17#endif /* __cplusplus */
18
19 //============================================================================
36 //----------------------------------------------------------------------------
37
38 //============================================================================
53 //----------------------------------------------------------------------------
54
55 //============================================================================
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 */
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 */
LangFormats
Format codes to get string from them.
Definition general.h:62
QueueMsg
For kodi::QueueNotification() used message types.
Definition general.h:43
StdKbButtons
For kodi::CurrentKeyboardLayout used defines.
Definition general.h:24
@ LANG_FMT_ISO_639_1
two letter code as defined in ISO 639-1
Definition general.h:64
@ LANG_FMT_ENGLISH_NAME
full language name in English
Definition general.h:68
@ LANG_FMT_ISO_639_2
three letter code as defined in ISO 639-2/T or ISO 639-2/B
Definition general.h:66
@ QUEUE_WARNING
Show warning notification message.
Definition general.h:47
@ QUEUE_INFO
Show info notification message.
Definition general.h:45
@ QUEUE_OWN_STYLE
Show with own given image and parts if set on values.
Definition general.h:51
@ QUEUE_ERROR
Show error notification message.
Definition general.h:49
@ STD_KB_BUTTONS_PER_ROW
The quantity of buttons per row on Kodi's standard keyboard.
Definition general.h:26
@ STD_KB_BUTTONS_MAX_ROWS
The quantity of rows on Kodi's standard keyboard.
Definition general.h:28
@ STD_KB_MODIFIER_KEY_NONE
Keyboard layout type, this for initial standard.
Definition general.h:30
@ STD_KB_MODIFIER_KEY_SHIFT
Keyboard layout type, this for shift controlled layout (uppercase)
Definition general.h:32
@ STD_KB_MODIFIER_KEY_SYMBOL
Keyboard layout type, this to show symbols.
Definition general.h:34
Definition general.h:84
Definition general.h:88