Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
c-api/addon-instance/Game.h File Reference
#include "../addon_base.h"
#include <stddef.h>

Classes

struct  game_stream_audio_properties
 Game audio stream properties More...
 
struct  game_stream_audio_packet
 Audio stream packet More...
 
struct  game_stream_video_properties
 Game video stream properties More...
 
struct  game_stream_video_packet
 Video stream packet More...
 
struct  game_stream_hw_framebuffer_properties
 Hardware framebuffer properties More...
 
struct  game_stream_hw_framebuffer_buffer
 Hardware framebuffer buffer More...
 
struct  game_stream_hw_framebuffer_packet
 Hardware framebuffer packet More...
 
struct  game_stream_sw_framebuffer_buffer
 Hardware framebuffer type More...
 
struct  game_stream_properties
 Immutable stream metadata More...
 
struct  game_stream_buffer
 Stream buffers for hardware rendering and zero-copy support More...
 
struct  game_stream_packet
 Stream packet and ephemeral metadata More...
 
struct  game_input_device
 Device that can provide input. More...
 
struct  game_input_port
 Port that can provide input. More...
 
struct  game_input_topology
 The input topology is the possible ways to connect input devices. More...
 
struct  game_digital_button_event
 
struct  game_analog_button_event
 
struct  game_axis_event
 
struct  game_analog_stick_event
 
struct  game_accelerometer_event
 
struct  game_key_event
 
struct  game_rel_pointer_event
 
struct  game_abs_pointer_event
 
struct  game_motor_event
 
struct  game_input_event
 
struct  game_system_timing
 Game system timing. More...
 
struct  AddonProps_Game
 Game properties. More...
 
struct  AddonToKodiFuncTable_Game
 Game callbacks. More...
 
struct  KodiToAddonFuncTable_Game
 Game function hooks. More...
 
struct  AddonInstance_Game
 Game instance. More...
 

Macros

#define DEFAULT_PORT_ID   "1"
 Port ID used when topology is unknown More...
 

Typedefs

typedef enum GAME_ERROR GAME_ERROR
 Game add-on error codes More...
 
typedef enum GAME_PCM_FORMAT GAME_PCM_FORMAT
 Stream Format More...
 
typedef enum GAME_AUDIO_CHANNEL GAME_AUDIO_CHANNEL
 Audio channel More...
 
typedef struct game_stream_audio_properties game_stream_audio_properties
 Game audio stream properties More...
 
typedef struct game_stream_audio_packet game_stream_audio_packet
 Audio stream packet More...
 
typedef enum GAME_PIXEL_FORMAT GAME_PIXEL_FORMAT
 Pixel format More...
 
typedef enum GAME_VIDEO_ROTATION GAME_VIDEO_ROTATION
 Video rotation position More...
 
typedef struct game_stream_video_properties game_stream_video_properties
 Game video stream properties More...
 
typedef struct game_stream_video_packet game_stream_video_packet
 Video stream packet More...
 
typedef enum GAME_HW_CONTEXT_TYPE GAME_HW_CONTEXT_TYPE
 Hardware framebuffer type More...
 
typedef struct game_stream_hw_framebuffer_properties game_stream_hw_framebuffer_properties
 Hardware framebuffer properties More...
 
typedef struct game_stream_hw_framebuffer_buffer game_stream_hw_framebuffer_buffer
 Hardware framebuffer buffer More...
 
typedef struct game_stream_hw_framebuffer_packet game_stream_hw_framebuffer_packet
 Hardware framebuffer packet More...
 
typedef void(* game_proc_address_t) (void)
 Hardware framebuffer process function address More...
 
typedef game_stream_video_properties game_stream_sw_framebuffer_properties
 Game video stream properties More...
 
typedef struct game_stream_sw_framebuffer_buffer game_stream_sw_framebuffer_buffer
 Hardware framebuffer type More...
 
typedef game_stream_video_packet game_stream_sw_framebuffer_packet
 Video stream packet More...
 
typedef enum GAME_STREAM_TYPE GAME_STREAM_TYPE
 Game stream types More...
 
typedef struct game_stream_properties game_stream_properties
 Immutable stream metadata More...
 
typedef struct game_stream_buffer game_stream_buffer
 Stream buffers for hardware rendering and zero-copy support More...
 
typedef struct game_stream_packet game_stream_packet
 Stream packet and ephemeral metadata More...
 
typedef enum GAME_REGION GAME_REGION
 Game reguin definition More...
 
typedef enum SPECIAL_GAME_TYPE SPECIAL_GAME_TYPE
 Special game types passed into game_load_game_special(). More...
 
typedef enum GAME_MEMORY GAME_MEMORY
 Game Memory More...
 
typedef enum GAME_SIMD GAME_SIMD
 ID values for SIMD CPU features More...
 
typedef enum GAME_INPUT_EVENT_SOURCE GAME_INPUT_EVENT_SOURCE
 
typedef enum GAME_KEY_MOD GAME_KEY_MOD
 
typedef enum GAME_PORT_TYPE GAME_PORT_TYPE
 Type of port on the virtual game console. More...
 
typedef struct game_input_device game_input_device
 Device that can provide input. More...
 
typedef struct game_input_port game_input_port
 Port that can provide input. More...
 
typedef struct game_input_topology game_input_topology
 The input topology is the possible ways to connect input devices. More...
 
typedef struct game_digital_button_event game_digital_button_event
 
typedef struct game_analog_button_event game_analog_button_event
 
typedef struct game_axis_event game_axis_event
 
typedef struct game_analog_stick_event game_analog_stick_event
 
typedef struct game_accelerometer_event game_accelerometer_event
 
typedef struct game_key_event game_key_event
 
typedef struct game_rel_pointer_event game_rel_pointer_event
 
typedef struct game_abs_pointer_event game_abs_pointer_event
 
typedef struct game_motor_event game_motor_event
 
typedef struct game_input_event game_input_event
 
typedef struct AddonProps_Game AddonProps_Game
 Game properties. More...
 
typedef voidKODI_GAME_STREAM_HANDLE
 
typedef struct AddonToKodiFuncTable_Game AddonToKodiFuncTable_Game
 Game callbacks. More...
 
typedef struct KodiToAddonFuncTable_Game KodiToAddonFuncTable_Game
 Game function hooks. More...
 
typedef struct AddonInstance_Game AddonInstance_Game
 Game instance. More...
 

Enumerations

enum  GAME_ERROR {
  GAME_ERROR_NO_ERROR , GAME_ERROR_UNKNOWN , GAME_ERROR_NOT_IMPLEMENTED , GAME_ERROR_REJECTED ,
  GAME_ERROR_INVALID_PARAMETERS , GAME_ERROR_FAILED , GAME_ERROR_NOT_LOADED , GAME_ERROR_RESTRICTED
}
 Game add-on error codes More...
 
enum  GAME_PCM_FORMAT { GAME_PCM_FORMAT_UNKNOWN , GAME_PCM_FORMAT_S16NE }
 Stream Format More...
 
enum  GAME_AUDIO_CHANNEL {
  GAME_CH_NULL , GAME_CH_FL , GAME_CH_FR , GAME_CH_FC ,
  GAME_CH_LFE , GAME_CH_BL , GAME_CH_BR , GAME_CH_FLOC ,
  GAME_CH_FROC , GAME_CH_BC , GAME_CH_SL , GAME_CH_SR ,
  GAME_CH_TFL , GAME_CH_TFR , GAME_CH_TFC , GAME_CH_TC ,
  GAME_CH_TBL , GAME_CH_TBR , GAME_CH_TBC , GAME_CH_BLOC ,
  GAME_CH_BROC
}
 Audio channel More...
 
enum  GAME_PIXEL_FORMAT { GAME_PIXEL_FORMAT_UNKNOWN , GAME_PIXEL_FORMAT_0RGB8888 , GAME_PIXEL_FORMAT_RGB565 , GAME_PIXEL_FORMAT_0RGB1555 }
 Pixel format More...
 
enum  GAME_VIDEO_ROTATION { GAME_VIDEO_ROTATION_0 , GAME_VIDEO_ROTATION_90_CCW , GAME_VIDEO_ROTATION_180_CCW , GAME_VIDEO_ROTATION_270_CCW }
 Video rotation position More...
 
enum  GAME_HW_CONTEXT_TYPE {
  GAME_HW_CONTEXT_NONE , GAME_HW_CONTEXT_OPENGL , GAME_HW_CONTEXT_OPENGLES2 , GAME_HW_CONTEXT_OPENGL_CORE ,
  GAME_HW_CONTEXT_OPENGLES3 , GAME_HW_CONTEXT_OPENGLES_VERSION , GAME_HW_CONTEXT_VULKAN
}
 Hardware framebuffer type More...
 
enum  GAME_STREAM_TYPE {
  GAME_STREAM_UNKNOWN , GAME_STREAM_AUDIO , GAME_STREAM_VIDEO , GAME_STREAM_HW_FRAMEBUFFER ,
  GAME_STREAM_SW_FRAMEBUFFER
}
 Game stream types More...
 
enum  GAME_REGION { GAME_REGION_UNKNOWN , GAME_REGION_NTSC , GAME_REGION_PAL }
 Game reguin definition More...
 
enum  SPECIAL_GAME_TYPE { SPECIAL_GAME_TYPE_BSX , SPECIAL_GAME_TYPE_BSX_SLOTTED , SPECIAL_GAME_TYPE_SUFAMI_TURBO , SPECIAL_GAME_TYPE_SUPER_GAME_BOY }
 Special game types passed into game_load_game_special(). More...
 
enum  GAME_MEMORY {
  GAME_MEMORY_MASK = 0xff , GAME_MEMORY_SAVE_RAM = 0 , GAME_MEMORY_RTC = 1 , GAME_MEMORY_SYSTEM_RAM = 2 ,
  GAME_MEMORY_VIDEO_RAM = 3 , GAME_MEMORY_SNES_BSX_RAM = ((1 << 8) | GAME_MEMORY_SAVE_RAM) , GAME_MEMORY_SNES_BSX_PRAM = ((2 << 8) | GAME_MEMORY_SAVE_RAM) , GAME_MEMORY_SNES_SUFAMI_TURBO_A_RAM = ((3 << 8) | GAME_MEMORY_SAVE_RAM) ,
  GAME_MEMORY_SNES_SUFAMI_TURBO_B_RAM = ((4 << 8) | GAME_MEMORY_SAVE_RAM) , GAME_MEMORY_SNES_GAME_BOY_RAM = ((5 << 8) | GAME_MEMORY_SAVE_RAM) , GAME_MEMORY_SNES_GAME_BOY_RTC = ((6 << 8) | GAME_MEMORY_RTC)
}
 Game Memory More...
 
enum  GAME_SIMD {
  GAME_SIMD_SSE = (1 << 0) , GAME_SIMD_SSE2 = (1 << 1) , GAME_SIMD_VMX = (1 << 2) , GAME_SIMD_VMX128 = (1 << 3) ,
  GAME_SIMD_AVX = (1 << 4) , GAME_SIMD_NEON = (1 << 5) , GAME_SIMD_SSE3 = (1 << 6) , GAME_SIMD_SSSE3 = (1 << 7) ,
  GAME_SIMD_MMX = (1 << 8) , GAME_SIMD_MMXEXT = (1 << 9) , GAME_SIMD_SSE4 = (1 << 10) , GAME_SIMD_SSE42 = (1 << 11) ,
  GAME_SIMD_AVX2 = (1 << 12) , GAME_SIMD_VFPU = (1 << 13)
}
 ID values for SIMD CPU features More...
 
enum  GAME_INPUT_EVENT_SOURCE {
  GAME_INPUT_EVENT_DIGITAL_BUTTON , GAME_INPUT_EVENT_ANALOG_BUTTON , GAME_INPUT_EVENT_AXIS , GAME_INPUT_EVENT_ANALOG_STICK ,
  GAME_INPUT_EVENT_ACCELEROMETER , GAME_INPUT_EVENT_KEY , GAME_INPUT_EVENT_RELATIVE_POINTER , GAME_INPUT_EVENT_ABSOLUTE_POINTER ,
  GAME_INPUT_EVENT_MOTOR
}
 
enum  GAME_KEY_MOD {
  GAME_KEY_MOD_NONE = 0x0000 , GAME_KEY_MOD_SHIFT = 0x0001 , GAME_KEY_MOD_CTRL = 0x0002 , GAME_KEY_MOD_ALT = 0x0004 ,
  GAME_KEY_MOD_META = 0x0008 , GAME_KEY_MOD_SUPER = 0x0010 , GAME_KEY_MOD_NUMLOCK = 0x0100 , GAME_KEY_MOD_CAPSLOCK = 0x0200 ,
  GAME_KEY_MOD_SCROLLOCK = 0x0400
}
 
enum  GAME_PORT_TYPE { GAME_PORT_UNKNOWN , GAME_PORT_KEYBOARD , GAME_PORT_MOUSE , GAME_PORT_CONTROLLER }
 Type of port on the virtual game console. More...
 

Typedef Documentation

◆ AddonInstance_Game

Game instance.

Not to be used outside this header.

◆ AddonProps_Game

Game properties.

Not to be used outside this header.

◆ AddonToKodiFuncTable_Game

Game callbacks.

Not to be used outside this header.

◆ KODI_GAME_STREAM_HANDLE

◆ KodiToAddonFuncTable_Game

Game function hooks.

Not to be used outside this header.