Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
AddonToKodiFuncTable_Game Struct Reference

Game callbacks. More...

#include <game.h>

Public Attributes

KODI_HANDLE kodiInstance
 
bool(* EnableHardwareRendering )(void *, const game_hw_rendering_properties *)
 
void(* CloseGame )(KODI_HANDLE kodiInstance)
 
double(* GetPlaybackSpeed )(KODI_HANDLE kodiInstance)
 
void(* SetGameTiming )(KODI_HANDLE kodiInstance, const struct game_system_timing *timing_info)
 
KODI_GAME_STREAM_HANDLE(* OpenStream )(KODI_HANDLE, const struct game_stream_properties *)
 
bool(* GetStreamBuffer )(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, unsigned int, unsigned int, struct game_stream_buffer *)
 
void(* AddStreamData )(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, const struct game_stream_packet *)
 
void(* ReleaseStreamBuffer )(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, struct game_stream_buffer *)
 
void(* CloseStream )(KODI_HANDLE, KODI_GAME_STREAM_HANDLE)
 
game_proc_address_t(* HwGetProcAddress )(KODI_HANDLE kodiInstance, const char *symbol)
 
bool(* InputEvent )(KODI_HANDLE kodiInstance, const struct game_input_event *event)
 
void(* RCOnGameLoaded )(KODI_HANDLE kodiInstance, const struct game_rc_game_loaded *data)
 
void(* RCOnAchievementTriggered )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_triggered *data)
 
void(* RCOnGameCompleted )(KODI_HANDLE kodiInstance, const char *title, bool hardcore)
 
void(* RCOnRichPresenceUpdated )(KODI_HANDLE kodiInstance, const char *evaluation)
 
void(* RCOnLoginResult )(KODI_HANDLE kodiInstance, const struct game_rc_login_result *data)
 
void(* RCOnAchievementProgress )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress *progress, unsigned int count)
 
void(* RCOnServerError )(KODI_HANDLE kodiInstance, const char *message, const char *api)
 
void(* RCOnConnectionChanged )(KODI_HANDLE kodiInstance, bool connected)
 
void(* RCOnChallengeIndicator )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_challenge *data, bool show)
 
void(* RCOnAchievementProgressShow )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)
 
void(* RCOnAchievementProgressUpdate )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)
 
void(* RCOnAchievementProgressHide )(KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)
 
void(* RCOnLeaderboardStarted )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)
 
void(* RCOnLeaderboardFailed )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)
 
void(* RCOnLeaderboardSubmitted )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)
 
void(* RCOnLeaderboardTrackerShow )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)
 
void(* RCOnLeaderboardTrackerUpdate )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)
 
void(* RCOnLeaderboardTrackerHide )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)
 
void(* RCOnLeaderboardScoreboard )(KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_scoreboard *data)
 
void(* RCOnReset )(KODI_HANDLE kodiInstance)
 
void(* RCOnSubsetCompleted )(KODI_HANDLE kodiInstance, const char *title)
 
bool(* StartStream )(KODI_HANDLE, KODI_GAME_STREAM_HANDLE)
 Reset a prepared hardware stream after installing its returned handle.
 
void(* ReportMissingFile )(KODI_HANDLE kodiInstance, const char *path)
 Name a file the game client looked for and couldn't find.
 
void(* SetFastForwarding )(KODI_HANDLE kodiInstance, bool fastForward, double ratio)
 Ask Kodi to fast-forward, or to stop a fast-forward it asked for.
 
void(* RCOnAchievementSets )(KODI_HANDLE kodiInstance, const game_rc_achievement_sets *data)
 Tell Kodi the loaded game's achievement sets, and which set and type each of its achievements has.
 

Detailed Description

Game callbacks.

Not to be used outside this header.

Member Data Documentation

◆ AddStreamData

void(* AddonToKodiFuncTable_Game::AddStreamData) (KODI_HANDLE, KODI_GAME_STREAM_HANDLE, const struct game_stream_packet *)

◆ CloseGame

void(* AddonToKodiFuncTable_Game::CloseGame) (KODI_HANDLE kodiInstance)

◆ CloseStream

void(* AddonToKodiFuncTable_Game::CloseStream) (KODI_HANDLE, KODI_GAME_STREAM_HANDLE)

◆ EnableHardwareRendering

bool(* AddonToKodiFuncTable_Game::EnableHardwareRendering) (void *, const game_hw_rendering_properties *)

◆ GetPlaybackSpeed

double(* AddonToKodiFuncTable_Game::GetPlaybackSpeed) (KODI_HANDLE kodiInstance)

◆ GetStreamBuffer

bool(* AddonToKodiFuncTable_Game::GetStreamBuffer) (KODI_HANDLE, KODI_GAME_STREAM_HANDLE, unsigned int, unsigned int, struct game_stream_buffer *)

◆ HwGetProcAddress

game_proc_address_t(* AddonToKodiFuncTable_Game::HwGetProcAddress) (KODI_HANDLE kodiInstance, const char *symbol)

◆ InputEvent

bool(* AddonToKodiFuncTable_Game::InputEvent) (KODI_HANDLE kodiInstance, const struct game_input_event *event)

◆ kodiInstance

KODI_HANDLE AddonToKodiFuncTable_Game::kodiInstance

◆ OpenStream

KODI_GAME_STREAM_HANDLE(* AddonToKodiFuncTable_Game::OpenStream) (KODI_HANDLE, const struct game_stream_properties *)

◆ RCOnAchievementProgress

void(* AddonToKodiFuncTable_Game::RCOnAchievementProgress) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress *progress, unsigned int count)

◆ RCOnAchievementProgressHide

void(* AddonToKodiFuncTable_Game::RCOnAchievementProgressHide) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)

◆ RCOnAchievementProgressShow

void(* AddonToKodiFuncTable_Game::RCOnAchievementProgressShow) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)

◆ RCOnAchievementProgressUpdate

void(* AddonToKodiFuncTable_Game::RCOnAchievementProgressUpdate) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_progress_indicator *data)

◆ RCOnAchievementSets

void(* AddonToKodiFuncTable_Game::RCOnAchievementSets) (KODI_HANDLE kodiInstance, const game_rc_achievement_sets *data)

Tell Kodi the loaded game's achievement sets, and which set and type each of its achievements has.

Call it after RCOnGameLoaded(). Since game API 8.5.0.

◆ RCOnAchievementTriggered

void(* AddonToKodiFuncTable_Game::RCOnAchievementTriggered) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_triggered *data)

◆ RCOnChallengeIndicator

void(* AddonToKodiFuncTable_Game::RCOnChallengeIndicator) (KODI_HANDLE kodiInstance, const struct game_rc_achievement_challenge *data, bool show)

◆ RCOnConnectionChanged

void(* AddonToKodiFuncTable_Game::RCOnConnectionChanged) (KODI_HANDLE kodiInstance, bool connected)

◆ RCOnGameCompleted

void(* AddonToKodiFuncTable_Game::RCOnGameCompleted) (KODI_HANDLE kodiInstance, const char *title, bool hardcore)

◆ RCOnGameLoaded

void(* AddonToKodiFuncTable_Game::RCOnGameLoaded) (KODI_HANDLE kodiInstance, const struct game_rc_game_loaded *data)

◆ RCOnLeaderboardFailed

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardFailed) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)

◆ RCOnLeaderboardScoreboard

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardScoreboard) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_scoreboard *data)

◆ RCOnLeaderboardStarted

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardStarted) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)

◆ RCOnLeaderboardSubmitted

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardSubmitted) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard *data)

◆ RCOnLeaderboardTrackerHide

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardTrackerHide) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)

◆ RCOnLeaderboardTrackerShow

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardTrackerShow) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)

◆ RCOnLeaderboardTrackerUpdate

void(* AddonToKodiFuncTable_Game::RCOnLeaderboardTrackerUpdate) (KODI_HANDLE kodiInstance, const struct game_rc_leaderboard_tracker *data)

◆ RCOnLoginResult

void(* AddonToKodiFuncTable_Game::RCOnLoginResult) (KODI_HANDLE kodiInstance, const struct game_rc_login_result *data)

◆ RCOnReset

void(* AddonToKodiFuncTable_Game::RCOnReset) (KODI_HANDLE kodiInstance)

◆ RCOnRichPresenceUpdated

void(* AddonToKodiFuncTable_Game::RCOnRichPresenceUpdated) (KODI_HANDLE kodiInstance, const char *evaluation)

◆ RCOnServerError

void(* AddonToKodiFuncTable_Game::RCOnServerError) (KODI_HANDLE kodiInstance, const char *message, const char *api)

◆ RCOnSubsetCompleted

void(* AddonToKodiFuncTable_Game::RCOnSubsetCompleted) (KODI_HANDLE kodiInstance, const char *title)

◆ ReleaseStreamBuffer

void(* AddonToKodiFuncTable_Game::ReleaseStreamBuffer) (KODI_HANDLE, KODI_GAME_STREAM_HANDLE, struct game_stream_buffer *)

◆ ReportMissingFile

void(* AddonToKodiFuncTable_Game::ReportMissingFile) (KODI_HANDLE kodiInstance, const char *path)

Name a file the game client looked for and couldn't find.

Call it before returning GAME_ERROR_MISSING_FILES. The path is relative to the client's system directory. Since game API 8.3.0.

◆ SetFastForwarding

void(* AddonToKodiFuncTable_Game::SetFastForwarding) (KODI_HANDLE kodiInstance, bool fastForward, double ratio)

Ask Kodi to fast-forward, or to stop a fast-forward it asked for.

A ratio above 1 is the speed asked for; anything else leaves it to Kodi. Since game API 8.4.0.

◆ SetGameTiming

void(* AddonToKodiFuncTable_Game::SetGameTiming) (KODI_HANDLE kodiInstance, const struct game_system_timing *timing_info)

◆ StartStream

bool(* AddonToKodiFuncTable_Game::StartStream) (KODI_HANDLE, KODI_GAME_STREAM_HANDLE)

Reset a prepared hardware stream after installing its returned handle.

OpenStream creates the context and framebuffer without calling the add-on. Call StartStream after storing that handle, so HwContextReset can acquire a framebuffer. Repeated calls do not reset again. On failure, CloseStream must release the handle; Kodi calls HwContextDestroy before teardown.


The documentation for this struct was generated from the following file: