summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h
blob: 90f971afdf8030104e5ac3788bb6ddf5e1a0c351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 *  Copyright (C) 2005-2020 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#ifndef C_API_ADDONINSTANCE_SCREENSAVER_H
#define C_API_ADDONINSTANCE_SCREENSAVER_H

#include "../addon_base.h"

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

  struct AddonInstance_Screensaver;

  /*!
   * @brief Screensaver properties
   *
   * Not to be used outside this header.
   */
  typedef struct AddonProps_Screensaver
  {
    ADDON_HARDWARE_CONTEXT device;
    int x;
    int y;
    int width;
    int height;
    float pixelRatio;
    const char* name;
    const char* presets;
    const char* profile;
  } AddonProps_Screensaver;

  /*!
   * @brief Screensaver callbacks
   *
   * Not to be used outside this header.
   */
  typedef struct AddonToKodiFuncTable_Screensaver
  {
    KODI_HANDLE kodiInstance;
  } AddonToKodiFuncTable_Screensaver;

  /*!
   * @brief Screensaver function hooks
   *
   * Not to be used outside this header.
   */
  typedef struct KodiToAddonFuncTable_Screensaver
  {
    KODI_HANDLE addonInstance;
    bool(__cdecl* Start)(struct AddonInstance_Screensaver* instance);
    void(__cdecl* Stop)(struct AddonInstance_Screensaver* instance);
    void(__cdecl* Render)(struct AddonInstance_Screensaver* instance);
  } KodiToAddonFuncTable_Screensaver;

  /*!
   * @brief Screensaver instance
   *
   * Not to be used outside this header.
   */
  typedef struct AddonInstance_Screensaver
  {
    struct AddonProps_Screensaver* props;
    struct AddonToKodiFuncTable_Screensaver* toKodi;
    struct KodiToAddonFuncTable_Screensaver* toAddon;
  } AddonInstance_Screensaver;

#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */

#endif /* !C_API_ADDONINSTANCE_SCREENSAVER_H */