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

To get info about the device, display and several other parts More...

Functions

kodi::HardwareContext kodi::addon::CInstanceScreensaver::Device ()
 Device that represents the display adapter.
 
int kodi::addon::CInstanceScreensaver::X ()
 Returns the X position of the rendering window.
 
int kodi::addon::CInstanceScreensaver::Y ()
 Returns the Y position of the rendering window.
 
int kodi::addon::CInstanceScreensaver::Width ()
 Returns the width of the rendering window.
 
int kodi::addon::CInstanceScreensaver::Height ()
 Returns the height of the rendering window.
 
float kodi::addon::CInstanceScreensaver::PixelRatio ()
 Pixel aspect ratio (often abbreviated PAR) is a ratio that describes how the width of a pixel compares to the height of that pixel.
 

Detailed Description

To get info about the device, display and several other parts

Function Documentation

◆ Device()

kodi::HardwareContext kodi::addon::CInstanceScreensaver::Device ( )
inline

Device that represents the display adapter.

Returns
A pointer to the device
Note
This is only available on DirectX, It us unused (nullptr) on OpenGL

This value can also be becomed by kodi::gui::GetHWContext() and is recommended to use.


Example:

#include <d3d11_1.h>
..
// Note: Device() there is used inside addon child class about
// kodi::addon::CInstanceVisualization
ID3D11DeviceContext1* context = static_cast<ID3D11DeviceContext1*>(kodi::addon::CInstanceVisualization::Device());
..
kodi::HardwareContext Device()
Device that represents the display adapter.
Definition kodi-dev-kit/include/kodi/addon-instance/Visualization.h:717

◆ Height()

int kodi::addon::CInstanceScreensaver::Height ( )
inline

Returns the height of the rendering window.

Returns
The height, in pixels

◆ PixelRatio()

float kodi::addon::CInstanceScreensaver::PixelRatio ( )
inline

Pixel aspect ratio (often abbreviated PAR) is a ratio that describes how the width of a pixel compares to the height of that pixel.

Returns
The pixel aspect ratio used by the display

◆ Width()

int kodi::addon::CInstanceScreensaver::Width ( )
inline

Returns the width of the rendering window.

Returns
The width, in pixels

◆ X()

int kodi::addon::CInstanceScreensaver::X ( )
inline

Returns the X position of the rendering window.

Returns
The X position, in pixels

◆ Y()

int kodi::addon::CInstanceScreensaver::Y ( )
inline

Returns the Y position of the rendering window.

Returns
The Y position, in pixels