xbmc
Public Member Functions | Protected Member Functions | Friends | List of all members
KODI::RETRO::CGUIGameRenderManager Class Reference

Class to safely route commands between the GUI and RetroPlayer. More...

#include <GUIGameRenderManager.h>

Public Member Functions

void RegisterPlayer (CGUIRenderTargetFactory *factory, IRenderCallback *callback, IGameCallback *gameCallback)
 Register a RetroPlayer instance. More...
 
void UnregisterPlayer ()
 Unregister a RetroPlayer instance.
 
std::shared_ptr< CGUIRenderHandleRegisterControl (CGUIGameControl &control)
 Register a GUI game control ("gamewindow" skin control) More...
 
std::shared_ptr< CGUIRenderHandleRegisterWindow (CGameWindowFullScreen &window)
 Register a fullscreen game window ("FullscreenGame" window) More...
 
std::shared_ptr< CGUIGameVideoHandleRegisterDialog (GAME::CDialogGameVideoSelect &dialog)
 Register a video select dialog (for selecting video filters, view modes, etc.) More...
 
std::shared_ptr< CGUIGameSettingsHandleRegisterGameSettingsDialog ()
 Register a game settings dialog. More...
 

Protected Member Functions

void UnregisterHandle (CGUIRenderHandle *handle)
 
void Render (CGUIRenderHandle *handle)
 
void RenderEx (CGUIRenderHandle *handle)
 
void ClearBackground (CGUIRenderHandle *handle)
 
bool IsDirty (CGUIRenderHandle *handle)
 
void UnregisterHandle (CGUIGameVideoHandle *handle)
 
bool IsPlayingGame ()
 
bool SupportsRenderFeature (RENDERFEATURE feature)
 
bool SupportsScalingMethod (SCALINGMETHOD method)
 
void UnregisterHandle (CGUIGameSettingsHandle *handle)
 
std::string GameClientID ()
 
std::string GetPlayingGame ()
 
std::string CreateSavestate (bool autosave)
 
bool UpdateSavestate (const std::string &savestatePath)
 
bool LoadSavestate (const std::string &savestatePath)
 
void FreeSavestateResources (const std::string &savestatePath)
 
void CloseOSD ()
 

Friends

class CGUIGameSettingsHandle
 
class CGUIGameVideoHandle
 
class CGUIRenderHandle
 

Detailed Description

Class to safely route commands between the GUI and RetroPlayer.

This class is brought up before the GUI and player core factory. It provides the GUI with safe access to a registered player.

Access to the player is done through handles. When a handle is no longer needed, it should be destroyed.

Three kinds of handles are provided:

Each manager fulfills the following design requirements:

  1. No assumption of player lifetimes
  2. No assumption of GUI element lifetimes, as long as handles are destroyed before this class is destructed
  3. No limit on the number of handles

Member Function Documentation

◆ RegisterControl()

std::shared_ptr< CGUIRenderHandle > CGUIGameRenderManager::RegisterControl ( CGUIGameControl control)

Register a GUI game control ("gamewindow" skin control)

Parameters
controlThe game control
Returns
A handle to invoke render events

◆ RegisterDialog()

std::shared_ptr< CGUIGameVideoHandle > CGUIGameRenderManager::RegisterDialog ( GAME::CDialogGameVideoSelect dialog)

Register a video select dialog (for selecting video filters, view modes, etc.)

Parameters
dialogThe video select dialog
Returns
A handle to query game and video properties

◆ RegisterGameSettingsDialog()

std::shared_ptr< CGUIGameSettingsHandle > CGUIGameRenderManager::RegisterGameSettingsDialog ( )

Register a game settings dialog.

Returns
A handle to query game properties

◆ RegisterPlayer()

void CGUIGameRenderManager::RegisterPlayer ( CGUIRenderTargetFactory factory,
IRenderCallback callback,
IGameCallback gameCallback 
)

Register a RetroPlayer instance.

Parameters
factoryThe interface for creating render targets exposed to the GUI
callbackThe interface for querying video properties
gameCallbackThe interface for querying game properties

◆ RegisterWindow()

std::shared_ptr< CGUIRenderHandle > CGUIGameRenderManager::RegisterWindow ( CGameWindowFullScreen window)

Register a fullscreen game window ("FullscreenGame" window)

Parameters
windowThe game window
Returns
A handle to invoke render events

The documentation for this class was generated from the following files: