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

#include <GUIDialogBusy.h>

Inheritance diagram for CGUIDialogBusy:
CGUIDialog

Public Types

enum class  WaitResult { COMPLETED , CANCELLED , TIMED_OUT }
 How a wait on an event ended. More...
 

Static Public Member Functions

static bool Wait (IRunnable *runnable, unsigned int displaytime, bool allowCancel)
 Wait for a runnable to execute off-thread. Creates a thread to run the given runnable, and while waiting it displays the busy dialog.
 
static bool WaitOnEvent (CEvent &event, unsigned int displaytime=100, bool allowCancel=true)
 Wait on an event while displaying the busy dialog. Throws up the busy dialog after the given time.
 
static WaitResult WaitOnEventFor (CEvent &event, std::chrono::milliseconds timeout, unsigned int displaytime=100, bool allowCancel=true)
 Wait on an event for at most timeout, displaying the busy dialog as WaitOnEvent does.
 

Friends

class CGUIWindowManager
 

Member Enumeration Documentation

◆ WaitResult

enum class CGUIDialogBusy::WaitResult
strong

How a wait on an event ended.

Enumerator
COMPLETED 

the event was set

CANCELLED 

the user cancelled the wait

TIMED_OUT 

the timeout passed first

Member Function Documentation

◆ Wait()

bool CGUIDialogBusy::Wait ( IRunnable * runnable,
unsigned int displaytime,
bool allowCancel )
static

Wait for a runnable to execute off-thread. Creates a thread to run the given runnable, and while waiting it displays the busy dialog.

Parameters
runnablethe IRunnable to run.
displaytimethe time in ms to wait prior to showing the busy dialog (defaults to 100ms)
allowCancelwhether the user can cancel the wait, defaults to true.
Returns
true if the runnable completes, false if the user cancels early.

◆ WaitOnEvent()

bool CGUIDialogBusy::WaitOnEvent ( CEvent & event,
unsigned int displaytime = 100,
bool allowCancel = true )
static

Wait on an event while displaying the busy dialog. Throws up the busy dialog after the given time.

Parameters
eventthe CEvent to wait on.
displaytimethe time in ms to wait prior to showing the busy dialog (defaults to 100ms)
allowCancelwhether the user can cancel the wait, defaults to true.
Returns
true if the event completed, false if cancelled.

◆ WaitOnEventFor()

CGUIDialogBusy::WaitResult CGUIDialogBusy::WaitOnEventFor ( CEvent & event,
std::chrono::milliseconds timeout,
unsigned int displaytime = 100,
bool allowCancel = true )
static

Wait on an event for at most timeout, displaying the busy dialog as WaitOnEvent does.

Parameters
eventthe CEvent to wait on.
timeouthow long to wait for the event.
displaytimethe time in ms to wait prior to showing the busy dialog (defaults to 100ms)
allowCancelwhether the user can cancel the wait, defaults to true.
Returns
how the wait ended.

Friends And Related Symbol Documentation

◆ CGUIWindowManager

friend class CGUIWindowManager
friend

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