kodi
ListItem.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 #pragma once
10 
11 #include "addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h"
12 
13 extern "C"
14 {
15 
16  struct AddonGlobalInterface;
17 
18  namespace ADDON
19  {
20 
30  {
31  static void Init(AddonGlobalInterface* addonInterface);
32  static void DeInit(AddonGlobalInterface* addonInterface);
33 
45  static KODI_GUI_LISTITEM_HANDLE create(KODI_HANDLE kodiBase,
46  const char* label,
47  const char* label2,
48  const char* path);
49  static void destroy(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle);
50  static char* get_label(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle);
51  static void set_label(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* label);
52  static char* get_label2(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle);
53  static void set_label2(KODI_HANDLE kodiBase,
54  KODI_GUI_LISTITEM_HANDLE handle,
55  const char* label);
56  static char* get_art(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* type);
57  static void set_art(KODI_HANDLE kodiBase,
58  KODI_GUI_LISTITEM_HANDLE handle,
59  const char* type,
60  const char* image);
61  static char* get_path(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle);
62  static void set_path(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, const char* path);
63  static char* get_property(KODI_HANDLE kodiBase,
64  KODI_GUI_LISTITEM_HANDLE handle,
65  const char* key);
66  static void set_property(KODI_HANDLE kodiBase,
67  KODI_GUI_LISTITEM_HANDLE handle,
68  const char* key,
69  const char* value);
70  static void select(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle, bool select);
71  static bool is_selected(KODI_HANDLE kodiBase, KODI_GUI_LISTITEM_HANDLE handle);
73  };
74 
75  } /* namespace ADDON */
76 } /* extern "C" */
Main structure passed from kodi to addon with basic information needed to create add-on.
Definition: addon_base.h:378
static KODI_GUI_LISTITEM_HANDLE create(KODI_HANDLE kodiBase, const char *label, const char *label2, const char *path)
callback functions from add-on to kodi
Definition: ListItem.cpp:47
Definition: Addon.cpp:39
Global gui Add-on to Kodi callback functions.
Definition: ListItem.h:29