Lumiera  0.pre.03
»edityourfreedom«
UiDispatcher Class Reference

#include "gui/ctrl/ui-dispatcher.hpp"

Description

Helper to dispatch code blocks into the UI event thread for execution.

Implementation of the actual dispatch is based on Glib::Dispatcher

Warning
any UiDispatcher instance must be created such as to ensure it outlives the GTK event loop

Definition at line 111 of file ui-dispatcher.hpp.

Public Member Functions

template<class FUN >
 UiDispatcher (FUN notification)
 
void event (Operation &&op)
 move the given operation into our private dispatcher queue and then schedule dequeuing and invocation into the UI event thread. More...
 

Private Types

using Operation = lib::CallQueue::Operation
 

Private Attributes

Glib::Dispatcher dispatcher_
 
lib::CallQueue queue_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
 ~NonCopyable ()=default
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Typedef Documentation

◆ Operation

Definition at line 117 of file ui-dispatcher.hpp.

Constructor & Destructor Documentation

◆ UiDispatcher()

UiDispatcher ( FUN  notification)
inline

Definition at line 121 of file ui-dispatcher.hpp.

References CallQueue::invoke().

+ Here is the call graph for this function:

Member Function Documentation

◆ event()

void event ( Operation &&  op)
inline

move the given operation into our private dispatcher queue and then schedule dequeuing and invocation into the UI event thread.

Parameters
opa completely closed lambda or functor
Warning
closure need to be by value or equivalent, since the operation will be executed in another call stack

Definition at line 148 of file ui-dispatcher.hpp.

References CallQueue::feed().

+ Here is the call graph for this function:

Member Data Documentation

◆ queue_

lib::CallQueue queue_
private

Definition at line 114 of file ui-dispatcher.hpp.

◆ dispatcher_

Glib::Dispatcher dispatcher_
private

Definition at line 115 of file ui-dispatcher.hpp.

+ Inheritance diagram for UiDispatcher:
+ Collaboration diagram for UiDispatcher:

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