Lumiera  0.pre.03
»edit your freedom«
UiDispatcher Class Reference

#include "stage/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 (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

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.

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

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