Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

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

Function Documentation

◆ Device()

kodi::HardwareContext 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 Visualization.h:717

◆ X()

int X ( )
inline

Returns the X position of the rendering window.

Returns
The X position, in pixels

◆ Y()

int Y ( )
inline

Returns the Y position of the rendering window.

Returns
The Y position, in pixels

◆ Width()

int Width ( )
inline

Returns the width of the rendering window.

Returns
The width, in pixels

◆ Height()

int Height ( )
inline

Returns the height of the rendering window.

Returns
The height, in pixels

◆ PixelRatio()

float 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