Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
EventManager Class Reference

Event manager for the UI. More...

#include <src/gui/backend/gtk_widgets/event_manager.h>

Collaboration diagram for EventManager:

Public Member Functions

 EventManager ()
 Creates the event queue and starts the event loop.
void start_events ()
 Starts accepting events.
void stop_events ()
 Stops events from getting fired.
void process_event (ZEvent &ev)
 Processes the given event.
bool process_events ()
 Source function to process events.
void process_now ()
 Processes the events now.

Data Fields

MPMCQueue< ZEvent * > mqueue_
 Event queue, mainly for GUI events.
ObjectPool< ZEventobj_pool_
 Object pool of event structs to avoid real time allocation.
sigc::scoped_connection process_source_id_
 ID of the event processing source func.
bool pending_soft_recalc_ = false
 A soft recalculation of the routing graph is pending.

Detailed Description

Event manager for the UI.

This API is responsible for collecting and processing UI events on the GTK thread.

See also
ZEvent.

Definition at line 37 of file event_manager.h.

Constructor & Destructor Documentation

◆ EventManager()

EventManager::EventManager ( )

Creates the event queue and starts the event loop.

Must be called from a GTK thread.

◆ ~EventManager()

EventManager::~EventManager ( )
inline

Definition at line 47 of file event_manager.h.

Member Function Documentation

◆ process_event()

void EventManager::process_event ( ZEvent & ev)

Processes the given event.

The caller is responsible for putting the event back in the object pool if needed.

◆ process_now()

void EventManager::process_now ( )

Processes the events now.

Must only be called from the GTK thread.

Field Documentation

◆ mqueue_

MPMCQueue<ZEvent *> EventManager::mqueue_

Event queue, mainly for GUI events.

Definition at line 91 of file event_manager.h.

◆ obj_pool_

ObjectPool<ZEvent> EventManager::obj_pool_

Object pool of event structs to avoid real time allocation.

Definition at line 97 of file event_manager.h.

◆ pending_soft_recalc_

bool EventManager::pending_soft_recalc_ = false

A soft recalculation of the routing graph is pending.

Definition at line 107 of file event_manager.h.

◆ process_source_id_

sigc::scoped_connection EventManager::process_source_id_

ID of the event processing source func.

Will be zero when stopped and non-zero when active.

Definition at line 104 of file event_manager.h.


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