![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
\cpp_class{ kodi::addon::CInstanceScreensaver } Screensaver add-on instance More...
Modules | |
Information functions | |
To get info about the device, display and several other parts | |
Functions | |
kodi::addon::CInstanceScreensaver::CInstanceScreensaver () | |
Screensaver class constructor. More... | |
kodi::addon::CInstanceScreensaver::CInstanceScreensaver (KODI_HANDLE instance) | |
Screensaver class constructor used to support multiple instance types. More... | |
kodi::addon::CInstanceScreensaver::~CInstanceScreensaver () override=default | |
Destructor. More... | |
virtual bool | kodi::addon::CInstanceScreensaver::Start () |
Used to notify the screensaver that it has been started. More... | |
virtual void | kodi::addon::CInstanceScreensaver::Stop () |
Used to inform the screensaver that the rendering control was stopped. More... | |
virtual void | kodi::addon::CInstanceScreensaver::Render () |
Used to indicate when the add-on should render. More... | |
\cpp_class{ kodi::addon::CInstanceScreensaver } Screensaver add-on instance
A screensaver is a Kodi addon that fills the screen with moving images or patterns when the computer is not in use. Initially designed to prevent phosphor burn-in on CRT and plasma computer monitors (hence the name), screensavers are now used primarily for entertainment, security or to display system status information.
Include the header #include <kodi/addon-instance/ScreenSaver.h> to use this class.
This interface allows the creating of screensavers for Kodi, based upon DirectX or/and OpenGL rendering with C++
code.
The interface is small and easy usable. It has three functions:
Start()
- Called on creationRender()
- Called at render timeStop()
- Called when the screensaver has no workAdditionally, there are several other functions available in which the child class can ask about the current hardware, including the device, display and several other parts.
Here is an example of the minimum required code to start a screensaver:
Here is another example where the screensaver is used together with other instance types:
The destruction of the example class CMyScreenSaver
is called from Kodi's header. Manually deleting the add-on instance is not required.
|
inline |
Screensaver class constructor.
Used by an add-on that only supports screensavers.
|
inlineexplicit |
Screensaver class constructor used to support multiple instance types.
[in] | instance | The instance value given to kodi::addon::CAddonBase::CreateInstance(...) . |
instance
from the CreateInstance call Used to indicate when the add-on should render.
|
inlinevirtual |
Used to notify the screensaver that it has been started.
|
inlinevirtual |
Used to inform the screensaver that the rendering control was stopped.
|
overridedefault |
Destructor.