Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

General GUI related functions
This includes independent functions which can be used by different locations and called up independently. More...

Typedefs

typedef enum AdjustRefreshRateStatus AdjustRefreshRateStatus
 Adjust refresh rate enum
Used to get the Adjust refresh rate status info.
 

Enumerations

enum  AdjustRefreshRateStatus { ADJUST_REFRESHRATE_STATUS_OFF = 0 , ADJUST_REFRESHRATE_STATUS_ALWAYS , ADJUST_REFRESHRATE_STATUS_ON_STARTSTOP , ADJUST_REFRESHRATE_STATUS_ON_START }
 Adjust refresh rate enum
Used to get the Adjust refresh rate status info. More...
 

Functions

void ATTR_DLL_LOCAL kodi::gui::Lock ()
 Performs a graphical lock of rendering engine.
 
void ATTR_DLL_LOCAL kodi::gui::Unlock ()
 Performs a graphical unlock of previous locked rendering engine.
 
int ATTR_DLL_LOCAL kodi::gui::GetScreenHeight ()
 Return the the current screen height with pixel.
 
int ATTR_DLL_LOCAL kodi::gui::GetScreenWidth ()
 Return the the current screen width with pixel.
 
int ATTR_DLL_LOCAL kodi::gui::GetVideoResolution ()
 Return the the current screen rendering resolution.
 
int ATTR_DLL_LOCAL kodi::gui::GetCurrentWindowDialogId ()
 Returns the id for the current 'active' dialog as an integer.
 
int ATTR_DLL_LOCAL kodi::gui::GetCurrentWindowId ()
 Returns the id for the current 'active' window as an integer.
 
kodi::HardwareContext kodi::gui::GetHWContext ()
 To get hardware specific device context interface.
 
AdjustRefreshRateStatus ATTR_DLL_LOCAL kodi::gui::GetAdjustRefreshRateStatus ()
 Get Adjust refresh rate setting status.
 

Detailed Description

General GUI related functions
This includes independent functions which can be used by different locations and called up independently.

Permits the use of the required functions of the add-on to Kodi.

These are pure functions them no other initialization need.

It has the header #include <kodi/gui/General.h> be included to enjoy it.

Typedef Documentation

◆ AdjustRefreshRateStatus

Adjust refresh rate enum
Used to get the Adjust refresh rate status info.

Enumeration Type Documentation

◆ AdjustRefreshRateStatus

Adjust refresh rate enum
Used to get the Adjust refresh rate status info.

Enumerator
ADJUST_REFRESHRATE_STATUS_OFF 
ADJUST_REFRESHRATE_STATUS_ALWAYS 
ADJUST_REFRESHRATE_STATUS_ON_STARTSTOP 
ADJUST_REFRESHRATE_STATUS_ON_START 

Function Documentation

◆ GetAdjustRefreshRateStatus()

AdjustRefreshRateStatus ATTR_DLL_LOCAL kodi::gui::GetAdjustRefreshRateStatus ( )
inline

Get Adjust refresh rate setting status.

Returns
The Adjust refresh rate setting status

◆ GetCurrentWindowDialogId()

int ATTR_DLL_LOCAL kodi::gui::GetCurrentWindowDialogId ( )
inline

Returns the id for the current 'active' dialog as an integer.

Returns
The currently active dialog Id

Example:

..
..
int ATTR_DLL_LOCAL GetCurrentWindowDialogId()
Returns the id for the current 'active' dialog as an integer.
Definition kodi-dev-kit/include/kodi/gui/General.h:111

◆ GetCurrentWindowId()

int ATTR_DLL_LOCAL kodi::gui::GetCurrentWindowId ( )
inline

Returns the id for the current 'active' window as an integer.

Returns
The currently active window Id

Example:

..
..
int ATTR_DLL_LOCAL GetCurrentWindowId()
Returns the id for the current 'active' window as an integer.
Definition kodi-dev-kit/include/kodi/gui/General.h:135

◆ GetHWContext()

kodi::HardwareContext kodi::gui::GetHWContext ( )
inline

To get hardware specific device context interface.

Returns
A pointer to the used device with kodi::HardwareContext
Warning
This function is only be supported under Windows, on all other OS it return nullptr!
Note
Returned Windows class pointer is ID3D11DeviceContext1.

Example:

#include <d3d11_1.h>
..
ID3D11DeviceContext1* context = static_cast<ID3D11DeviceContext1*>(kodi::gui::GetHWContext());
..
kodi::HardwareContext GetHWContext()
To get hardware specific device context interface.
Definition kodi-dev-kit/include/kodi/gui/General.h:165

◆ GetScreenHeight()

int ATTR_DLL_LOCAL kodi::gui::GetScreenHeight ( )
inline

Return the the current screen height with pixel.

Returns
Screen height with pixel

◆ GetScreenWidth()

int ATTR_DLL_LOCAL kodi::gui::GetScreenWidth ( )
inline

Return the the current screen width with pixel.

Returns
Screen width with pixel

◆ GetVideoResolution()

int ATTR_DLL_LOCAL kodi::gui::GetVideoResolution ( )
inline

Return the the current screen rendering resolution.

Returns
Current screen rendering resolution

◆ Lock()

void ATTR_DLL_LOCAL kodi::gui::Lock ( )
inline

Performs a graphical lock of rendering engine.

◆ Unlock()

void ATTR_DLL_LOCAL kodi::gui::Unlock ( )
inline

Performs a graphical unlock of previous locked rendering engine.