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

#include <GUIWindowManager.h>

Inheritance diagram for CGUIWindowManager:
KODI::MESSAGING::IMessageTarget

Public Member Functions

 CGUIWindowManager ()
 
 ~CGUIWindowManager () override
 
bool SendMessage (CGUIMessage &message)
 
bool SendMessage (int message, int senderID, int destID, int param1=0, int param2=0)
 
bool SendMessage (CGUIMessage &message, int window)
 
void Initialize ()
 
void Add (CGUIWindow *pWindow)
 
void AddUniqueInstance (CGUIWindow *window)
 
void AddCustomWindow (CGUIWindow *pWindow)
 
void Remove (int id)
 
void Delete (int id)
 
void ActivateWindow (int iWindowID, const std::string &strPath="")
 
void ForceActivateWindow (int iWindowID, const std::string &strPath="")
 
void ChangeActiveWindow (int iNewID, const std::string &strPath="")
 
void ActivateWindow (int iWindowID, const std::vector< std::string > &params, bool swappingWindows=false, bool force=false)
 
void PreviousWindow ()
 
bool SwitchToFullScreen (bool force=false)
 Switch window to fullscreen.
 
void CloseDialogs (bool forceClose=false) const
 
void CloseInternalModalDialogs (bool forceClose=false) const
 
void OnApplicationMessage (KODI::MESSAGING::ThreadMessage *pMsg) override
 This gets called whenever a message matching the registered message mask is processed.
 
int GetMessageMask () override
 Should return the message mask that it wishes to receive messages for.
 
bool OnAction (const CAction &action) const
 
void Process (unsigned int currentTime)
 Process active controls allowing them to animate before rendering.
 
void MarkDirty ()
 Mark the screen as dirty, forcing a redraw at the next Render()
 
void MarkDirty (const CRect &rect)
 Mark a region as dirty, forcing a redraw at the next Render()
 
bool Render ()
 Rendering of the current window and any dialogs Render is called every frame to draw the current window and any dialogs. It should only be called from the application thread. Returns true only if it has rendered something.
 
void RenderEx () const
 
void AfterRender ()
 Do any post render activities.
 
void FrameMove ()
 Per-frame updating of the current window and any dialogs FrameMove is called every frame to update the current window and any dialogs on screen. It should only be called from the application thread.
 
bool Initialized () const
 Return whether the window manager is initialized. The window manager is initialized on skin load - if the skin isn't yet loaded, no windows should be able to be initialized.
 
void CreateWindows ()
 Create and initialize all windows and dialogs.
 
bool DestroyWindows ()
 Destroy and remove all windows and dialogs.
 
void DestroyWindow (int id)
 Destroy and remove the window or dialog with the given id.
 
- Public Member Functions inherited from KODI::MESSAGING::IMessageTarget
virtual ~IMessageTarget ()=default
 

Constructor & Destructor Documentation

◆ CGUIWindowManager()

CGUIWindowManager::CGUIWindowManager ( )

◆ ~CGUIWindowManager()

CGUIWindowManager::~CGUIWindowManager ( )
overridedefault

Member Function Documentation

◆ ActivateWindow() [1/2]

void CGUIWindowManager::ActivateWindow ( int iWindowID,
const std::string & strPath = "" )

◆ ActivateWindow() [2/2]

void CGUIWindowManager::ActivateWindow ( int iWindowID,
const std::vector< std::string > & params,
bool swappingWindows = false,
bool force = false )

◆ Add()

void CGUIWindowManager::Add ( CGUIWindow * pWindow)

◆ AddCustomWindow()

void CGUIWindowManager::AddCustomWindow ( CGUIWindow * pWindow)

◆ AddUniqueInstance()

void CGUIWindowManager::AddUniqueInstance ( CGUIWindow * window)

◆ AfterRender()

void CGUIWindowManager::AfterRender ( )

Do any post render activities.

◆ ChangeActiveWindow()

void CGUIWindowManager::ChangeActiveWindow ( int iNewID,
const std::string & strPath = "" )

◆ CloseDialogs()

void CGUIWindowManager::CloseDialogs ( bool forceClose = false) const

◆ CloseInternalModalDialogs()

void CGUIWindowManager::CloseInternalModalDialogs ( bool forceClose = false) const

◆ CreateWindows()

void CGUIWindowManager::CreateWindows ( )

Create and initialize all windows and dialogs.

◆ Delete()

void CGUIWindowManager::Delete ( int id)

◆ DestroyWindow()

void CGUIWindowManager::DestroyWindow ( int id)

Destroy and remove the window or dialog with the given id.

Parameters
idthe window id

◆ DestroyWindows()

bool CGUIWindowManager::DestroyWindows ( )

Destroy and remove all windows and dialogs.

Returns
true on success, false if destruction fails for any window

◆ ForceActivateWindow()

void CGUIWindowManager::ForceActivateWindow ( int iWindowID,
const std::string & strPath = "" )

◆ FrameMove()

void CGUIWindowManager::FrameMove ( )

Per-frame updating of the current window and any dialogs FrameMove is called every frame to update the current window and any dialogs on screen. It should only be called from the application thread.

◆ GetMessageMask()

int CGUIWindowManager::GetMessageMask ( )
overridevirtual

Should return the message mask that it wishes to receive messages for.

The message mask is defined in "messaging/ApplicationMessenger.h" pick the next one available when creating a new

Implements KODI::MESSAGING::IMessageTarget.

◆ Initialize()

void CGUIWindowManager::Initialize ( )

◆ Initialized()

bool CGUIWindowManager::Initialized ( ) const
inline

Return whether the window manager is initialized. The window manager is initialized on skin load - if the skin isn't yet loaded, no windows should be able to be initialized.

Returns
true if the window manager is initialized, false otherwise.

◆ MarkDirty() [1/2]

void CGUIWindowManager::MarkDirty ( )

Mark the screen as dirty, forcing a redraw at the next Render()

◆ MarkDirty() [2/2]

void CGUIWindowManager::MarkDirty ( const CRect & rect)

Mark a region as dirty, forcing a redraw at the next Render()

◆ OnAction()

bool CGUIWindowManager::OnAction ( const CAction & action) const

◆ OnApplicationMessage()

void CGUIWindowManager::OnApplicationMessage ( KODI::MESSAGING::ThreadMessage * msg)
overridevirtual

This gets called whenever a message matching the registered message mask is processed.

There are no ordering guarantees here so implementations should never rely on a certain ordering of messages.

Cleaning up any pointers stored in the message payload is not specified and is decided by the implementer of the message. In general prefer to delete any data in this method to keep the callsites cleaner and simpler but if data is to be passed back it's perfectly valid to handle it any way that fits the situation as long as it's documented along with the message.

To return a simple value the result parameter of

See also
ThreadMessage can be used as it will be used as the return value for
CApplicationMessenger::SendMsg. It is up to the implementer to decide if this is to be used and it should be documented along with any new message implemented.

Implements KODI::MESSAGING::IMessageTarget.

◆ PreviousWindow()

void CGUIWindowManager::PreviousWindow ( )
Todo
we may need to test here for the whether our history should be changed

◆ Process()

void CGUIWindowManager::Process ( unsigned int currentTime)

Process active controls allowing them to animate before rendering.

◆ Remove()

void CGUIWindowManager::Remove ( int id)

◆ Render()

bool CGUIWindowManager::Render ( )

Rendering of the current window and any dialogs Render is called every frame to draw the current window and any dialogs. It should only be called from the application thread. Returns true only if it has rendered something.

◆ RenderEx()

void CGUIWindowManager::RenderEx ( ) const

◆ SendMessage() [1/3]

bool CGUIWindowManager::SendMessage ( CGUIMessage & message)

◆ SendMessage() [2/3]

bool CGUIWindowManager::SendMessage ( CGUIMessage & message,
int window )

◆ SendMessage() [3/3]

bool CGUIWindowManager::SendMessage ( int message,
int senderID,
int destID,
int param1 = 0,
int param2 = 0 )

◆ SwitchToFullScreen()

bool CGUIWindowManager::SwitchToFullScreen ( bool force = false)

Switch window to fullscreen.

Parameters
forceenforce fullscreen switch
Returns
True if switch is made to fullscreen, otherwise False

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