Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
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
 Software 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_controller_layout
 "C" Game add-on controller layout. 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
 A digital button event, such as a button press or release. More...
 
struct  game_analog_button_event
 An analog button event, such as a trigger press or release. More...
 
struct  game_axis_event
 An axis event, such as a joystick or accelerometer. More...
 
struct  game_analog_stick_event
 An analog stick event, such as a joystick's motion. More...
 
struct  game_accelerometer_event
 An accelerometer event. More...
 
struct  game_key_event
 A key event, such as a key press or release. More...
 
struct  game_rel_pointer_event
 A relative pointer event, such as a mouse motion. More...
 
struct  game_abs_pointer_event
 An absolute pointer event, such as a touchscreen or tablet motion. More...
 
struct  game_motor_event
 A motor vibration event. More...
 
struct  game_input_event
 An input event. More...
 
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 ROOT_PORT_ADDRESS   "/"
 **Root address of the controller tree
 
#define DEFAULT_PORT_ID   "1"
 Port ID used when topology is unknown
 
#define KEYBOARD_PORT_ID   "keyboard"
 **Port ID used for the keyboard input device
 
#define MOUSE_PORT_ID   "mouse"
 **Port ID used for the mouse input device
 
#define DEFAULT_PORT_ADDRESS   "/1"
 Port address used when topology is unknown
 
#define KEYBOARD_PORT_ADDRESS   "/keyboard"
 **Port address used for the keyboard input device
 
#define MOUSE_PORT_ADDRESS   "/mouse"
 **Port address used for the mouse input device
 

Typedefs

typedef enum GAME_ERROR GAME_ERROR
 Game add-on error codes
 
typedef enum GAME_PCM_FORMAT GAME_PCM_FORMAT
 Stream Format
 
typedef enum GAME_AUDIO_CHANNEL GAME_AUDIO_CHANNEL
 Audio channel
 
typedef struct game_stream_audio_properties game_stream_audio_properties
 Game audio stream properties
 
typedef struct game_stream_audio_packet game_stream_audio_packet
 Audio stream packet
 
typedef enum GAME_PIXEL_FORMAT GAME_PIXEL_FORMAT
 Pixel format
 
typedef enum GAME_VIDEO_ROTATION GAME_VIDEO_ROTATION
 Video rotation position
 
typedef struct game_stream_video_properties game_stream_video_properties
 Game video stream properties
 
typedef struct game_stream_video_packet game_stream_video_packet
 Video stream packet
 
typedef enum GAME_HW_CONTEXT_TYPE GAME_HW_CONTEXT_TYPE
 Hardware framebuffer type
 
typedef struct game_stream_hw_framebuffer_properties game_stream_hw_framebuffer_properties
 Hardware framebuffer properties
 
typedef struct game_stream_hw_framebuffer_buffer game_stream_hw_framebuffer_buffer
 Hardware framebuffer buffer
 
typedef struct game_stream_hw_framebuffer_packet game_stream_hw_framebuffer_packet
 Hardware framebuffer packet
 
typedef void(* game_proc_address_t) (void)
 Hardware framebuffer process function address
 
typedef game_stream_video_properties game_stream_sw_framebuffer_properties
 Game software framebuffer stream properties
 
typedef struct game_stream_sw_framebuffer_buffer game_stream_sw_framebuffer_buffer
 Software framebuffer type
 
typedef game_stream_video_packet game_stream_sw_framebuffer_packet
 Software framebuffer packet
 
typedef enum GAME_STREAM_TYPE GAME_STREAM_TYPE
 Game stream types
 
typedef struct game_stream_properties game_stream_properties
 Immutable stream metadata
 
typedef struct game_stream_buffer game_stream_buffer
 Stream buffers for hardware rendering and zero-copy support
 
typedef struct game_stream_packet game_stream_packet
 Stream packet and ephemeral metadata
 
typedef enum GAME_REGION GAME_REGION
 Game region definition
 
typedef enum SPECIAL_GAME_TYPE SPECIAL_GAME_TYPE
 Special game types passed into game_load_game_special().
 
typedef enum GAME_MEMORY GAME_MEMORY
 Game Memory
 
typedef enum GAME_SIMD GAME_SIMD
 ID values for SIMD CPU features
 
typedef enum GAME_INPUT_EVENT_SOURCE GAME_INPUT_EVENT_SOURCE
 Type of input event.
 
typedef enum GAME_KEY_MOD GAME_KEY_MOD
 A modifier key pressed to give another key a special meaning.
 
typedef enum GAME_PORT_TYPE GAME_PORT_TYPE
 Type of port on the virtual game console.
 
typedef struct game_controller_layout game_controller_layout
 "C" Game add-on controller layout.
 
typedef struct game_input_device game_input_device
 Device that can provide input.
 
typedef struct game_input_port game_input_port
 Port that can provide input.
 
typedef struct game_input_topology game_input_topology
 The input topology is the possible ways to connect input devices.
 
typedef struct game_digital_button_event game_digital_button_event
 A digital button event, such as a button press or release.
 
typedef struct game_analog_button_event game_analog_button_event
 An analog button event, such as a trigger press or release.
 
typedef struct game_axis_event game_axis_event
 An axis event, such as a joystick or accelerometer.
 
typedef struct game_analog_stick_event game_analog_stick_event
 An analog stick event, such as a joystick's motion.
 
typedef struct game_accelerometer_event game_accelerometer_event
 An accelerometer event.
 
typedef struct game_key_event game_key_event
 A key event, such as a key press or release.
 
typedef struct game_rel_pointer_event game_rel_pointer_event
 A relative pointer event, such as a mouse motion.
 
typedef struct game_abs_pointer_event game_abs_pointer_event
 An absolute pointer event, such as a touchscreen or tablet motion.
 
typedef struct game_motor_event game_motor_event
 A motor vibration event.
 
typedef struct game_input_event game_input_event
 An input event.
 
typedef struct AddonProps_Game AddonProps_Game
 Game properties.
 
typedef voidKODI_GAME_STREAM_HANDLE
 
typedef struct AddonToKodiFuncTable_Game AddonToKodiFuncTable_Game
 Game callbacks.
 
typedef struct KodiToAddonFuncTable_Game KodiToAddonFuncTable_Game
 Game function hooks.
 
typedef struct AddonInstance_Game AddonInstance_Game
 Game instance.
 

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 region 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
}
 Type of input event. More...
 
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
}
 A modifier key pressed to give another key a special meaning. More...
 
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

typedef struct AddonInstance_Game AddonInstance_Game

Game instance.

Not to be used outside this header.

◆ AddonProps_Game

typedef struct AddonProps_Game AddonProps_Game

Game properties.

Not to be used outside this header.

◆ AddonToKodiFuncTable_Game

typedef struct AddonToKodiFuncTable_Game AddonToKodiFuncTable_Game

Game callbacks.

Not to be used outside this header.

◆ KODI_GAME_STREAM_HANDLE

◆ KodiToAddonFuncTable_Game

typedef struct KodiToAddonFuncTable_Game KodiToAddonFuncTable_Game

Game function hooks.

Not to be used outside this header.