Events module

UI event handling.

Contents

Classes

struct ZEvent
A Zrythm event.
struct EventManager
Event manager.

Enums

enum EventType { ET_ARRANGER_OBJECT_CREATED, ET_ARRANGER_OBJECT_REMOVED, ET_ARRANGER_OBJECT_CHANGED, ET_ARRANGER_SELECTIONS_CREATED, ET_ARRANGER_SELECTIONS_CHANGED, ET_ARRANGER_SELECTIONS_REMOVED, ET_ARRANGER_SELECTIONS_MOVED, ET_ARRANGER_SELECTIONS_QUANTIZED, ET_ARRANGER_SELECTIONS_ACTION_FINISHED, ET_TRACK_STATE_CHANGED, ET_RULER_STATE_CHANGED, ET_AUTOMATION_TRACK_ADDED, ET_AUTOMATION_TRACK_REMOVED, ET_TIME_SIGNATURE_CHANGED, ET_TRACK_ADDED, ET_TRACK_CHANGED, ET_TRACK_COLOR_CHANGED, ET_TRACK_NAME_CHANGED, ET_CHANNEL_SEND_CHANGED, ET_RULER_DISPLAY_TYPE_CHANGED, ET_LAST_TIMELINE_OBJECT_CHANGED, ET_TRACK_AUTOMATION_VISIBILITY_CHANGED, ET_AUTOMATION_TRACK_CHANGED, ET_CLIP_EDITOR_REGION_CHANGED, ET_CLIP_MARKER_POS_CHANGED, ET_UNDO_REDO_ACTION_DONE, ET_RANGE_SELECTION_CHANGED, ET_TIMELINE_LOOP_MARKER_POS_CHANGED, ET_TIMELINE_PUNCH_MARKER_POS_CHANGED, ET_TIMELINE_SONG_MARKER_POS_CHANGED, ET_RULER_SIZE_CHANGED, ET_LOOP_TOGGLED, ET_TOOL_CHANGED, ET_TIMELINE_VIEWPORT_CHANGED, ET_PLUGIN_ADDED, ET_PLUGINS_ADDED, ET_PLUGINS_REMOVED, ET_PLUGIN_DELETED, ET_PLAYHEAD_POS_CHANGED, ET_PLAYHEAD_POS_CHANGED_MANUALLY, ET_AUTOMATION_VALUE_CHANGED, ET_TRACKLIST_SELECTIONS_CHANGED, ET_PLUGIN_VISIBILITY_CHANGED, ET_PLUGIN_WINDOW_VISIBILITY_CHANGED, ET_PLUGIN_STATE_CHANGED, ET_TRACKS_ADDED, ET_TRACKS_REMOVED, ET_TRACKS_MOVED, ET_CHANNEL_REMOVED, ET_REFRESH_ARRANGER, ET_MIXER_SELECTIONS_CHANGED, ET_CHANNEL_OUTPUT_CHANGED, ET_CHANNEL_SLOTS_CHANGED, ET_DRUM_MODE_CHANGED, ET_MODULATOR_ADDED, ET_RT_SELECTIONS_CHANGED, ET_PINNED_TRACKLIST_SIZE_CHANGED, ET_TRACK_LANES_VISIBILITY_CHANGED, ET_TRACK_LANE_ADDED, ET_TRACK_LANE_REMOVED, ET_PIANO_ROLL_HIGHLIGHTING_CHANGED, ET_PIANO_ROLL_MIDI_MODIFIER_CHANGED, ET_AUTOMATION_TRACKLIST_AT_REMOVED, ET_ARRANGER_SELECTIONS_IN_TRANSIT, ET_CHORD_KEY_CHANGED, ET_JACK_TRANSPORT_TYPE_CHANGED, ET_TRACK_VISIBILITY_CHANGED, ET_SELECTING_IN_ARRANGER, ET_TRACKS_RESIZED, ET_CLIP_EDITOR_FIRST_TIME_REGION_SELECTED, ET_BPM_CHANGED, ET_CHANNEL_FADER_VAL_CHANGED, ET_PIANO_ROLL_KEY_HEIGHT_CHANGED, ET_TRIAL_LIMIT_REACHED, ET_MAIN_WINDOW_LOADED, ET_PROJECT_LOADED, ET_PROJECT_SAVED, ET_PLUGIN_LATENCY_CHANGED, ET_ARRANGER_HIGHLIGHT_CHANGED, ET_ENGINE_ACTIVATE_CHANGED, ET_MIDI_BINDINGS_CHANGED, ET_PORT_CONNECTION_CHANGED }

Typedefs

using ZEvent = struct ZEvent
A Zrythm event.
using EventManager = struct EventManager
Event manager.

Functions

auto event_manager_new(void) -> EventManager*
Creates the event queue and starts the event loop.
void event_manager_start_events(EventManager* self)
Starts accepting events.
void event_manager_stop_events(EventManager* self)
Stops events from getting fired.
void event_manager_process_now(EventManager* self)
Processes the events now.
void event_manager_remove_events_for_obj(EventManager* self, void* obj)
Removes events where the arg matches the given object.

Defines

#define EVENT_QUEUE
The event queue.
#define EVENTS_PUSH(et, _arg)
Push events.

Enum documentation

enum EventType

Enumerators
ET_ARRANGER_OBJECT_CREATED
ET_ARRANGER_OBJECT_REMOVED
ET_ARRANGER_OBJECT_CHANGED
ET_ARRANGER_SELECTIONS_CREATED
ET_ARRANGER_SELECTIONS_CHANGED
ET_ARRANGER_SELECTIONS_REMOVED
ET_ARRANGER_SELECTIONS_MOVED
ET_ARRANGER_SELECTIONS_QUANTIZED
ET_ARRANGER_SELECTIONS_ACTION_FINISHED

To be used after an action is finished to redraw everything.

ET_TRACK_STATE_CHANGED

also for channels

ET_RULER_STATE_CHANGED

works for all rulers

ET_AUTOMATION_TRACK_ADDED
ET_AUTOMATION_TRACK_REMOVED
ET_TIME_SIGNATURE_CHANGED
ET_TRACK_ADDED
ET_TRACK_CHANGED
ET_TRACK_COLOR_CHANGED
ET_TRACK_NAME_CHANGED
ET_CHANNEL_SEND_CHANGED
ET_RULER_DISPLAY_TYPE_CHANGED
ET_LAST_TIMELINE_OBJECT_CHANGED
ET_TRACK_AUTOMATION_VISIBILITY_CHANGED
ET_AUTOMATION_TRACK_CHANGED
ET_CLIP_EDITOR_REGION_CHANGED

ZRegion (clip) to show in the piano roll changed.

Eg., a region in the timeline was clicked.

ET_CLIP_MARKER_POS_CHANGED

Clip marker (clip start, loop start, loop end) position changed.

ET_UNDO_REDO_ACTION_DONE
ET_RANGE_SELECTION_CHANGED
ET_TIMELINE_LOOP_MARKER_POS_CHANGED
ET_TIMELINE_PUNCH_MARKER_POS_CHANGED
ET_TIMELINE_SONG_MARKER_POS_CHANGED
ET_RULER_SIZE_CHANGED
ET_LOOP_TOGGLED
ET_TOOL_CHANGED

Selected tool (mode) changed.

ET_TIMELINE_VIEWPORT_CHANGED

Zoom level or view area changed.

ET_PLUGIN_ADDED
ET_PLUGINS_ADDED
ET_PLUGINS_REMOVED
ET_PLUGIN_DELETED
ET_PLAYHEAD_POS_CHANGED
ET_PLAYHEAD_POS_CHANGED_MANUALLY
ET_AUTOMATION_VALUE_CHANGED
ET_TRACKLIST_SELECTIONS_CHANGED
ET_PLUGIN_VISIBILITY_CHANGED

Plugin visibility parameter changed, should close/open UI.

ET_PLUGIN_WINDOW_VISIBILITY_CHANGED

Plugin UI opened or closed, should redraw.

ET_PLUGIN_STATE_CHANGED
ET_TRACKS_ADDED
ET_TRACKS_REMOVED
ET_TRACKS_MOVED
ET_CHANNEL_REMOVED
ET_REFRESH_ARRANGER
ET_MIXER_SELECTIONS_CHANGED
ET_CHANNEL_OUTPUT_CHANGED
ET_CHANNEL_SLOTS_CHANGED
ET_DRUM_MODE_CHANGED
ET_MODULATOR_ADDED
ET_RT_SELECTIONS_CHANGED
ET_PINNED_TRACKLIST_SIZE_CHANGED
ET_TRACK_LANES_VISIBILITY_CHANGED
ET_TRACK_LANE_ADDED
ET_TRACK_LANE_REMOVED
ET_PIANO_ROLL_HIGHLIGHTING_CHANGED
ET_PIANO_ROLL_MIDI_MODIFIER_CHANGED
ET_AUTOMATION_TRACKLIST_AT_REMOVED
ET_ARRANGER_SELECTIONS_IN_TRANSIT
ET_CHORD_KEY_CHANGED
ET_JACK_TRANSPORT_TYPE_CHANGED
ET_TRACK_VISIBILITY_CHANGED
ET_SELECTING_IN_ARRANGER
ET_TRACKS_RESIZED
ET_CLIP_EDITOR_FIRST_TIME_REGION_SELECTED
ET_BPM_CHANGED
ET_CHANNEL_FADER_VAL_CHANGED
ET_PIANO_ROLL_KEY_HEIGHT_CHANGED
ET_TRIAL_LIMIT_REACHED

Trial limit reached.

Used to show a window to inform the user.

ET_MAIN_WINDOW_LOADED

Sent after the main window finishes loading.

ET_PROJECT_LOADED

Sent when a project is loaded.

ET_PROJECT_SAVED

Sent when a project is saved.

ET_PLUGIN_LATENCY_CHANGED

Sent when plugin latency changes, to update the graph.

ET_ARRANGER_HIGHLIGHT_CHANGED

Arranger highlight rectangle changed.

ET_ENGINE_ACTIVATE_CHANGED
ET_MIDI_BINDINGS_CHANGED
ET_PORT_CONNECTION_CHANGED

Typedef documentation

typedef struct ZEvent ZEvent

A Zrythm event.

typedef struct EventManager EventManager

Event manager.

Function documentation

EventManager* event_manager_new(void)

Creates the event queue and starts the event loop.

Must be called from a GTK thread.

void event_manager_start_events(EventManager* self)

Starts accepting events.

void event_manager_stop_events(EventManager* self)

Stops events from getting fired.

void event_manager_process_now(EventManager* self)

Processes the events now.

Must only be called from the GTK thread.

void event_manager_remove_events_for_obj(EventManager* self, void* obj)

Removes events where the arg matches the given object.

Define documentation

#define EVENT_QUEUE

The event queue.

#define EVENTS_PUSH(et, _arg)

Push events.